commit fb064541d6e0982a1d56415209ce128a57bbd214 Author: Raten Date: Thu Nov 27 16:46:48 2025 +0900 new diff --git a/UltimateToolbox93_docs/Problems.txt b/UltimateToolbox93_docs/Problems.txt new file mode 100644 index 0000000..e75bba9 --- /dev/null +++ b/UltimateToolbox93_docs/Problems.txt @@ -0,0 +1,29 @@ +The help files for Ultimate Toolbox, Ultimate Grid, and Ultimate TCP/IP are now distributed in a compiled htm format - this avoids some IE7 problems encountered with the previous WebHelp offering, allows for a simpler download, and better index and search capabilities. + +Since the downloads first became available, several users have discovered some problems on first usage, and this text is intended as a troubleshooting guide. + +EXPLORER: + +When you first open the .chm file, you may see a message such as: + +"Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable." or "This program cannot display the webpage", etc. + +Later versions of windows will associate zone information with files downloaded from the internet - and this zone info may be applied to the files contained within the .zip when extracted. This may block Explorer's navigation to the html topics. + +To solve this problem, right click on the .chm file, select Properties, and Unblock. + +PATH: + +You may also receive this message if the path to the .chm file contains a '#' character - this will require either the renaming of a directory or moving the files - the '#' sign is being interpreted by the viewer as a bookmark indicator. + +Lastly, a '%' sign in the path will prevent the main window from appearing, with the contents pane displaying, e.g., 'Cannot locate "mk:MSITStore:D:\This% is a test\UTCP_IP42.chm::/TCP_IP.hhc". Again, renaming or moving the file should help. + +INDEX: + +There are chm compilations distributed with each of the Ultimate Toolbox, Ultimate Grid, and Ultimate TCP/IP libraries. Of these, the Ultimate Grid (UGrid72.chm) and Ultimate TCP/IP (UTCP_IP42.chm) use external index (chi) files. If these are not available in the path along with the .chm files, you should see a message box stating 'The window name "NewWindow" passed to HH_GET_WIN_TYPE has not been specified.' To resolve, make sure the associated .chi file is available. + +Thanks for your interest in The Ultimate Toolbox. If you encounter any problems with these help compilations not addressed by this text, please post a message at http://www.codeproject.com/MFC/UltimateToolbox.asp. + + + + diff --git a/UltimateToolbox93_docs/UTBX93.chm b/UltimateToolbox93_docs/UTBX93.chm new file mode 100644 index 0000000..0b5e653 Binary files /dev/null and b/UltimateToolbox93_docs/UTBX93.chm differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/BDIFCALC.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/BDIFCALC.h new file mode 100644 index 0000000..8ecdd38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/BDIFCALC.h @@ -0,0 +1,276 @@ +// ========================================================================== +// Class Specification : COXBinDiffCalculator +// ========================================================================== + +// Header file : bdifcalc.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class can be used to compute the binary differnce between two files +// (the original and the updated file) +// A third file that contains the difference is generated then. +// difference = updated - original +// Using the difference file and the original one, the updated file can be +// computed +// updated = original + difference +// This class can be used by supplying the names of the files directly +// An alternative use is that three CFile-derived objects are created and +// opened and than passed as parameter. This permits other media besides +// disk access (e.g. CMemFile for in-memory computation) + +// Remark: +// The progress of the computation is routed to an object of a COXDiffProgress +// derived object. The default implementation writes to the console +// using cprintf. You can derive a class from COXDiffProgress and override +// the virtual functions Init(), Adjust(), Abort() and Close(). +// The new progreesbar will be used after a call to ReplaceProgressBar() + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __BDIFCALC_H__ +#define __BDIFCALC_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +// By #defining BDEXTR as 1, a reduced, decode-only version is created +// If BDEXTR is not defined or 0, a complete version is created. +#ifndef BDEXTR +#define BDEXTR 0 +#endif + +class COXDiffProgress; +class COXDiffFileHeader; + +class OX_CLASS_DECL COXBinDiffCalculator : public CObject +{ +DECLARE_DYNAMIC(COXBinDiffCalculator) +// Data members ------------------------------------------------------------- +public: + static const double m_cMinMeanChunkLen; + static const double m_cMaxMeanChunkLen; + static const double m_cBigChunkLen; + static const TCHAR* m_cFileHeader; + static const BOOL m_cDropEOL; + static const DWORD m_cBufSiz; + static const WORD m_cMinMatchLen; + static const WORD m_cMinEqualRunLen; + + static const BYTE m_cTagSmallDiff; + static const BYTE m_cTagMediumDiff; + static const BYTE m_cTagLargeDiff; + static const BYTE m_cTagSmallNearCopy; + static const BYTE m_cTagMediumNearCopy; + static const BYTE m_cTagLargeNearCopy; + static const BYTE m_cTagSmallDistantCopy; + static const BYTE m_cTagMediumDistantCopy; + static const BYTE m_cTagLargeDistantCopy; + static const BYTE m_cTagSmallFarCopy; + static const BYTE m_cTagMediumFarCopy; + static const BYTE m_cTagLargeFarCopy; + static const BYTE m_cTagEOF; + + static const DWORD m_cSmallSize; + static const DWORD m_cMediumSize; + static const DWORD m_cLargeSize; + static const DWORD m_cNearDistance; + static const DWORD m_cDistantDistance; + static const DWORD m_cMaxStrLen; + +protected: +#if ! BDEXTR +// The following structures are not needed in extraction program */ + +// Tree node: has 3 pointers: a pointer to lesser, and greater or equal nodes +// The third pointer is a linked list pointer: the root node of the tree is also +// the head of the linked list. The linked list is not built in a special order: +// nodes are added to it in order of occurence. The tree is a binary tree. + +struct COXTreeNode + { + LONG filPos; + BYTE* bytes; + COXTreeNode* pGE; /* Greater or equal */ + COXTreeNode* pLT; /* Less than */ + COXTreeNode() { bytes = new BYTE[m_cMinMatchLen]; } + ~COXTreeNode() { delete[] bytes; } + }; + +// Match block structure: for each match found between the two files, we +// encode the positions in the two files and the length of the match. + +struct COXMatchBlock + { + LONG len; + LONG orgFilPos; + LONG derivedFilPos; + LONG distance; /* = orgFilPos - derivedFilPos */ + COXMatchBlock* pNxt; + }; + +struct COXByteAttribs + { + DWORD sum; + double sumSquares; + double mean; + double stdDev; + + // ... Last file position where a byte was encountered, for all bytes. + // Initialized to -1 ('before' the first FILE position). + LONG lastPos; + + // ... Count of occurences + LONG cnt; + }; + + COXTreeNode* m_LstFreeTreeNode; + COXMatchBlock* m_LstFreeMatchBlock; + +#endif /* ! BDEXTR */ + + COXDiffProgress* m_pProgressBar; + +private: + +// Member functions --------------------------------------------------------- +public: + COXBinDiffCalculator(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + +#if ! BDEXTR + void SubtractFiles(LPCTSTR orgFilNam, LPCTSTR derivedFilNam, LPCTSTR diffFilNam, + COXDiffFileHeader* pHeader = NULL); + // --- In : orgFilNam : Full path of the original file + // derivedFilNam : Full path of the updated file + // diffFilNam : Full path of the difference file + // --- Out : + // --- Returns : + // --- Effect : Calculates the binary differences between the + // original and updated file and writes it + // in the difference file +#endif // ! BDEXTR + + void AddFiles(LPCTSTR orgFilNam, LPCTSTR derivedFilNam, LPCTSTR diffFilNam, + COXDiffFileHeader* pHeader = NULL); + // --- In : orgFilNam : Full path of the original file + // derivedFilNam : Full path of the updated file + // diffFilNam : Full path of the difference file + // --- Out : + // --- Returns : + // --- Effect : Applies the binary difference to the original file + // writes the updated file + +#if ! BDEXTR + virtual void SubtractFiles(CFile* pOrgFil, CFile* pDerivedFil, CFile* pDiffFil, + COXDiffFileHeader* pHeader = NULL); + // --- In : orgFilNam : Pointer to OPENED file (Read) + // derivedFilNam : Pointer to OPENED file (Read) + // diffFilNam : Pointer to OPENED file (Create/Read/Write) + // --- Out : + // --- Returns : + // --- Effect : Calculates the binary differences between the + // original and updated file and writes it + // in the difference file +#endif // ! BDEXTR + + virtual void AddFiles(CFile* pOrgFil, CFile* pDerivedFil, CFile* pDiffFil, + COXDiffFileHeader* pHeader = NULL); + // --- In : orgFilNam : Pointer to OPENED file (Read) + // derivedFilNam : Pointer to OPENED file (Create/Read/Write) + // diffFilNam : Pointer to OPENED file (Read) + // --- Out : + // --- Returns : + // --- Effect : Applies the binary difference to the original file + // writes the updated file + + void ReplaceProgressBar(COXDiffProgress* pProgressBar); + // --- In : pProgressBar : The new progress bar to use + // --- Out : + // --- Returns : + // --- Effect : Replaces the standard progress bar by + // another (COXDiffProgress derived) + // This will be automatically deleted when + // this COXBinDiffCalculator is destructed + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXBinDiffCalculator(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + void CopyFileChars(LONG count, CFile* pInFile, CFile* pOutFile, LONG& sum); + LONG ReadLongNBytes(CFile* pFile,int n); +#if ! BDEXTR + void WriteLongNBytes(LONG x, CFile* pFile,int n); + void ScanFile(CFile* pFile, COXByteAttribs* byteTable); + int FindDelimiter(CFile* pFile, double minMeanChunkLen, double maxMeanChunkLen); + void DeleteTreeNode(COXTreeNode* pTreeNode); + COXTreeNode* NewTreeNode(); + void FreeTreeNode(COXTreeNode* pTreeNode); + int CmpNode(COXTreeNode* pNode1, CFile* pFil1, COXTreeNode* pNode2, + CFile* pFil2, int delim, LONG* pEqualLen); + void FindBestMatch(COXTreeNode* pOrgTreeRoot, + COXTreeNode** ppOrgTreeNode, CFile* pOrgFil, COXTreeNode* pDerivedTreeNode, + CFile* pDerivedFil, int delim, LONG* pMatchLen); + void AddTreeNode(COXTreeNode** ppTreeRoot, CFile* pFile, + int delim, COXTreeNode* pNewNode); + COXTreeNode* BuildTree(CFile* pFile, int delim, LONG& OrgSum); + void ExtendMatch(LONG& OrgFilPos, CFile* pOrgFil, + LONG& DerivedFilPos, CFile* pDerivedFil, LONG& MatchLen); + void DeleteMatchBlocks(COXMatchBlock* pBlock); + COXMatchBlock* NewMatchBlock(void); + void FreeMatchBlock(COXBinDiffCalculator::COXMatchBlock* pMatchBlock); + void AddMatch(COXTreeNode* pOrgTreeNode, + CFile* pOrgFil, COXTreeNode* pDerivedTreeNode, + CFile* pDerivedFil, LONG matchLen, COXMatchBlock** ppMatchLst); + void ShrinkMatchList(COXMatchBlock** ppMatchLst); + COXMatchBlock* MatchFiles(COXTreeNode* pOrgTreeRoot,CFile* pOrgFil, + CFile* pDerivedFil, int delim, LONG& DerivedSum); + void DumpDiff(COXMatchBlock* pMatchLst, CFile* pDerivedFil, CFile* pDiffFil); + +#endif // ! BDEXTR + +private: + +}; + +#endif // __BDIFCALC_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.h new file mode 100644 index 0000000..e910c9f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.h @@ -0,0 +1,115 @@ +// ========================================================================== +// Class Specification : COXBlob +// ========================================================================== + +// Header file : OXBlob.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CByteArray + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is an extension of CByteArray and it can by used +// to contain a Binary Large Object + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXBLOB_H__ +#define __OXBLOB_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXVariant.h" + + +class OX_CLASS_DECL COXBlob : public CByteArray +{ +DECLARE_DYNAMIC(COXBlob); + +// Data members ------------------------------------------------------------- +public: +protected: + +private: + +// Member functions --------------------------------------------------------- +public: + + // Constructors + COXBlob(); + COXBlob(const COXBlob& blobSrc); + COXBlob(const CByteArray& arrSrc); + COXBlob(const CLongBinary& lbSrc); + + COXBlob(const VARIANT& varSrc); + COXBlob(LPCVARIANT pSrc); + COXBlob(const COleVariant& varSrc); + COXBlob(const COXVariant& varSrc); + + // Assignemnt operators + COXBlob& operator=(const COXBlob& blobSrc); + COXBlob& operator=(const CByteArray& arrSrc); + COXBlob& operator=(const CLongBinary& lbSrc); + + COXBlob& operator=(const VARIANT& varSrc); + COXBlob& operator=(LPCVARIANT pSrc); + COXBlob& operator=(const COleVariant& varSrc); + COXBlob& operator=(const COXVariant& varSrc); + + BOOL ReadRaw(LPCTSTR pszPath); + // --- In : pszPath : The full path specification + // --- Out : + // --- Returns : Whether it succeeded or not + // --- Effect : Reads data from the specified file into this object + + BOOL WriteRaw(LPCTSTR pszPath); + // --- In : pszPath : The full path specification + // --- Out : + // --- Returns : Whether it succeeded or not + // --- Effect : Writes the data of this object to the specified file + + // Destructor + virtual ~COXBlob(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + BOOL CopyVariant(LPCVARIANT pSrc); + +private: + +}; + +#include "OXBlob.inl" + +#endif // __OXBLOB_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.inl b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.inl new file mode 100644 index 0000000..5c4ba76 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBlob.inl @@ -0,0 +1,97 @@ +// ========================================================================== +// Inline Implementation : COXBlob +// ========================================================================== + +// Source file : OXBlob.inl + +// Source : R.Mortelmans +// Creation Date : 7th March 1996 +// Last Modification : 7th March 1996 + +// ////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + +// Member functions --------------------------------------------------------- +// public: +inline COXBlob::COXBlob() + { + } + +inline COXBlob::COXBlob(const COXBlob& blobSrc) + { + Copy(blobSrc); + } + +inline COXBlob::COXBlob(const CByteArray& arrSrc) + { + Copy(arrSrc); + } + +inline COXBlob::COXBlob(const VARIANT& varSrc) + { + CopyVariant(&varSrc); + } + +inline COXBlob::COXBlob(LPCVARIANT pSrc) + { + CopyVariant(pSrc); + } + +inline COXBlob::COXBlob(const COleVariant& varSrc) + { + CopyVariant(&varSrc); + } + +inline COXBlob::COXBlob(const COXVariant& varSrc) + { + CopyVariant(&varSrc); + } + +inline COXBlob& COXBlob::operator=(const COXBlob& blobSrc) + { + if(this==&blobSrc) + return *this; + Copy(blobSrc); + return *this; + } + +inline COXBlob& COXBlob::operator=(const CByteArray& arrSrc) + { + Copy(arrSrc); + return *this; + } + +inline COXBlob& COXBlob::operator=(const VARIANT& varSrc) + { + CopyVariant(&varSrc); + return *this; + } + +inline COXBlob& COXBlob::operator=(LPCVARIANT pSrc) + { + CopyVariant(pSrc); + return *this; + } + +inline COXBlob& COXBlob::operator=(const COleVariant& varSrc) + { + CopyVariant(&varSrc); + return *this; + } + +inline COXBlob& COXBlob::operator=(const COXVariant& varSrc) + { + CopyVariant(&varSrc); + return *this; + } + +inline COXBlob::~COXBlob() + { + } + +// protected: +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBmpPrv.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBmpPrv.h new file mode 100644 index 0000000..8552dc3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXBmpPrv.h @@ -0,0 +1,100 @@ +// ========================================================================== +// Class Specification : COXBmpFileDialog +// ========================================================================== + +// Header file : oxbmpprv.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXPreviewDialog + +// YES Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// YES Has a message map +// YES Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class implements the two virtual function of COXPreviewDialog, to display +// BMP/DIB format. + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __BMP_PREVDLG_H__ +#define __BMP_PREVDLG_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXPrvDlg.h" +#include "oxdib.h" + + +class OX_CLASS_DECL COXBmpFileDialog : public COXPreviewDialog +{ +DECLARE_DYNAMIC(COXBmpFileDialog) + +// Data members ------------------------------------------------------------- +public: + +protected: + COXDIB m_dib; + +private: + +// Member functions --------------------------------------------------------- +public: + COXBmpFileDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs + LPCTSTR lpszDefExt = NULL, + LPCTSTR lpszFileName = NULL, + DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + LPCTSTR lpszFilter = NULL, + CWnd* pParentWnd = NULL); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + + virtual ~COXBmpFileDialog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +#ifndef WIN32 + int DoModal(); +#endif + + +protected: + virtual void OnNewFileSelect(const CString& sFilename); + virtual void OnPaintPreview(CDC* pDC, const CRect& paintRect); + virtual void OnDoRealizePalette(CWnd* pFocusWnd); + +private: + +}; + +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdLne.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdLne.h new file mode 100644 index 0000000..6307d73 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdLne.h @@ -0,0 +1,129 @@ +// ========================================================================== +// Class Specification : COXCommandLine +// ========================================================================== + +// Header file : oxcmdlne.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// Yes Uses exceptions (same as CFile) + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// Tokenizes the commandline string and serves them up one by one for +// COXCommandOptions::ParseCommandLine(). Constructor has two forms, one which +// takes a CStdioFile pointer to support response files to get arround cmd line +// limitations, the other takes a Character pointer. + +// Remark: + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __CMDLINE_H__ +#define __CMDLINE_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXCommandLine : public CObject +{ +DECLARE_DYNAMIC(COXCommandLine) +// Expands any meta chars (*, ?, etc) (well, one day it will :-) +// for files in the current working directory... + +// Data members ------------------------------------------------------------- +public: + +protected: + CStringArray m_Tokens; + int m_NumTokens; + +private: + +// Member functions --------------------------------------------------------- +public: + COXCommandLine(LPCSTR pszCmdLine); + // --- In : pszCmdLine : the ANSI command line to be tokenized + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + +#ifdef WIN32 + COXCommandLine(LPCWSTR pszCmdLine); + // --- In : pszCmdLine : the UNICODE command line to be tokenized + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state +#endif + + COXCommandLine(CStdioFile* pInfile); + // --- In : pInfile : The file containing a command line + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + inline int GetNumArgs() const; + // --- In : + // --- Out : + // --- Returns : The number of separate command line options in this command line + // --- Effect : + + inline CString operator[] (const int iElem) const; + // --- In : iElem : index of a Command line option + // --- Out : + // --- Returns : a command line option + // --- Effect : + + virtual ~COXCommandLine(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + void Tokenize(LPTSTR pszCmdLine); +}; + +inline int COXCommandLine::GetNumArgs() const + { + return m_NumTokens; + } + +inline CString COXCommandLine::operator[] (const int iElem) const + { + ASSERT((iElem >= 0) && (iElem <= m_NumTokens)); + return m_Tokens[iElem]; + } + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpd.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpd.h new file mode 100644 index 0000000..973a0af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpd.h @@ -0,0 +1,262 @@ +// ========================================================================== +// Class Specification : COXCommandOptionDesc +// ========================================================================== + +// Header file : oxcmdopd.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// Yes Uses exceptions (same as CFile) + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// Contains information about a command option, its full name, abbreviations, +// description, etc. +// For detailed explanation, see constructor with parameters. + +// Remark: +// The option descriptor class, each instance of +// this class represents a valid option to the +// program and some properties about that option. +// Can be used by CmdOptions to produce a +// usage message as well as to parse valid options. +// Example: +// void CMyApp::CreateValidOptions() +// { +// COXCommandOptionDesc codHelp (_T("HELP"), NULL, _T("Prints a help message")); +// COXCommandOptionDesc codRun (_T("RUN"), NULL, _T("Automatically execute a testcase")); +// COXCommandOptionDesc codEmf (_T("EMF"), COD_LASTARG, _T("MetaFile which specified GDI calls to make")); +// COXCommandOptionDesc codVerify(_T("VERIFY"), COD_ARGOK, _T("Verification option")); +// COXCommandOptionDesc codDiff (_T("DIFFERENCE"),COD_FIRSTARG,_T("File to write screen differences to")); +// COXCommandOptionDesc codCmpScr(_T("CMPSCR"), COD_FIRSTARG,_T("File to compare screen to")); +// COXCommandOptionDesc codOutScr(_T("OUTSCR"), COD_FIRSTARG,_T("File to write actual screen to")); +// COXCommandOptionDesc codMask (_T("MASK"), COD_FIRSTARG,_T("File to mask screen differences with")); +// COXCommandOptionDesc codCrc (_T("CRC"), COD_FIRSTARG,_T("File to read/write CRC code from/to")); +// COXCommandOptionDesc codGen (_T("GENERATE"), NULL, _T("Interactive session for generating EMF file")); +// COXCommandOptionDesc codRes (_T("RES"), COD_ARRAY, _T("Resources available")); +// COXCommandOptionDesc codXList (_T("X"), COD_ASSOCARRAY,_T("Variable/Value pairs")); +// } + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __CMDOPTD_H__ +#define __CMDOPTD_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +const int COD_ARGOK = 0x1; // Does option take argument? +const int COD_REPEATOK = 0x2; // Is option valid more than once? +const int COD_REP_FIRST = 0x4; // Use first if option is repeated +const int COD_REP_LAST = 0x8; // Use last if option is repeated +const int COD_REP_ARRAY = 0x10; // Build array if option is repeated +const int COD_ASSOCIATIVE = 0x20; // Takes two arguments i.e. /X=variable=value +const int COD_FIRSTARG = COD_ARGOK | COD_REPEATOK | COD_REP_FIRST; +const int COD_LASTARG = COD_ARGOK | COD_REPEATOK | COD_REP_LAST; +const int COD_ARRAY = COD_ARGOK | COD_REPEATOK | COD_REP_ARRAY; +const int COD_ASSOCARRAY = COD_ARGOK | COD_REPEATOK | COD_ASSOCIATIVE; + +// Currently allows for COD_REP_FIRST && COD_REP_LAST, and other nonsense combinations. +// This is not correct so pay attention to which flags you are combining !!!!! + +class OX_CLASS_DECL COXCommandOptionDesc : public CObject +{ +DECLARE_DYNAMIC(COXCommandOptionDesc) + +// Data members ------------------------------------------------------------- +public: + +protected: + CString m_sOptionName; + int m_nFlags; + CString m_sDescription; + CString m_sAbbr; + +private: + +// Member functions --------------------------------------------------------- +public: + COXCommandOptionDesc(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXCommandOptionDesc(LPCTSTR psczOptionName, int iFlags, + LPCTSTR psczDescription, LPCTSTR psczAbbr = _T("")); + // --- In : psczOptionName : the name of the option, CASE-INSENSITIVE + // iFlags : the flags of the option + // COD_ARGOK Does option take an argument + // COD_REPEATOK Is option valid morethan once? + // COD_REP_FIRST Use first if option is repeated + // COD_REP_LAST Use last if option is repeated (i.e. /l dir1 /l dir2) + // COD_REP_ARRAY Build array if option is repeated + // COD_ASSOCIATIVE Takes two arguments i.e. /D variable=value or /D variable value + // COD_FIRSTARG Takes an argument, is repeatable, and repeats are ignored + // COD_LASTARG Takes an argument, is repeatable, and repeats are ignored + // COD_ARRAY Takes an argument, is repeatable, builds an array + // (i.e. The INCLUDE option would use this) + // COD_ASSOCARRAY Takes two arguments, is repeatable, builds associative array + // + // psczDescription : the description of the option, for usage messages + // psczAbbr : the abbreviation of the option. + // A DEFINITE abbreviation of the argument, this abbreviation will + // be used unless it conflicts with another option's DEFINITE abbreviation. + // This can be used to have an abbreviation of I for the INCLUDE option, even + // if there is another option which begins with I. + // For all options, any UNIQUE shortening of the option name is acceptable. + // For example, with an option name of INCLUDE, possible abbreviations would + // be I, IN, INC, INCL, INCLU, INCLUD. Which of these possibilities are + // valid, depends on which ones are are unique for a given option set. + // The DEFINITE abbreviation need not be a true abbreviation of the option name. + // For example, an option name EXPORT, could have a DEFINITE abbreviation + // of X even though that is not strictly an abbreviation of the name. + // + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXCommandOptionDesc(const COXCommandOptionDesc& OptDescSrc); + // --- In : OptDescSrc : COXCommandOptionDesc object which will be copied + // --- Out : + // --- Returns : + // --- Effect : Copy contruction. + + COXCommandOptionDesc& operator=(const COXCommandOptionDesc& OptDescSrc); + // --- In : OptDescSrc : COXCommandOptionDesc object which will be assign to 'this' COXCommandOptionDesc object + // --- Out: + // --- Returns: + // --- Effect : Assignment operator + + int TakesArg() const; + // --- In : + // --- Out : + // --- Returns : does this option takes arguments or not + // --- Effect : + + int IsRepeatable() const; + // --- In : + // --- Out : + // --- Returns : can this option appear more than once on a command line + // --- Effect : + + int ReturnsFirstRep() const; + // --- In : + // --- Out : + // --- Returns : will only the first occurrence of this option be recorded or not + // --- Effect : + + int ReturnsLastRep() const; + // --- In : + // --- Out : + // --- Returns : will only the last occurrence of this option be recorded or not + // --- Effect : + + int ReturnsArray() const; + // --- In : + // --- Out : + // --- Returns : will the occurrences of this option build an array or not + // --- Effect : + + int ReturnsAssociative() const; + // --- In : + // --- Out : + // --- Returns : will the occurrences of this option build an associative array or not + // --- Effect : + + LPCTSTR GetDescription() const; + // --- In : + // --- Out : + // --- Returns : the description of this option + // --- Effect : + + CString GetOptName() const; + // --- In : + // --- Out : + // --- Returns : the name of this option + // --- Effect : + + CString GetOptAbbr() const; + // --- In : + // --- Out : + // --- Returns : the DEFINITE abbreviation of this option + // --- Effect : + + virtual ~COXCommandOptionDesc(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +private: +}; + +inline int COXCommandOptionDesc::TakesArg() const + { + return m_nFlags & COD_ARGOK; + } + +inline int COXCommandOptionDesc::IsRepeatable() const + { + return m_nFlags & COD_REPEATOK; + } +inline int COXCommandOptionDesc::ReturnsFirstRep() const + { + return m_nFlags & COD_REP_FIRST; + } +inline int COXCommandOptionDesc::ReturnsLastRep() const + { + return m_nFlags & COD_REP_LAST; + } +inline int COXCommandOptionDesc::ReturnsArray() const + { + return m_nFlags & COD_REP_ARRAY; + } +inline int COXCommandOptionDesc::ReturnsAssociative() const + { + return m_nFlags & COD_ASSOCIATIVE; + } +inline LPCTSTR COXCommandOptionDesc::GetDescription() const + { + return m_sDescription; + } + +inline CString COXCommandOptionDesc::GetOptName() const + { + return m_sOptionName; + } + +inline CString COXCommandOptionDesc::GetOptAbbr() const + { + return m_sAbbr; + } + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpt.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpt.h new file mode 100644 index 0000000..d181dab --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdOpt.h @@ -0,0 +1,200 @@ +// ========================================================================== +// Class Specification : COXCommandOptions +// ========================================================================== + +// Header file : oxcmdopt.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// Yes Uses exceptions (same as CFile) + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// Parses the command line options and +// answers questions about what was requested. +// This is the 'workhorse' of the whole thing, contains the list of valid options, the map of +// abbreviations to options, and the values of arguments to the options. + +// Remark: + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __CMDOPT_H__ +#define __CMDOPT_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXCmdOpD.h" +#include "OXCmdLne.h" + + +class OX_CLASS_DECL COXCommandOptions : public CObject +{ +DECLARE_DYNAMIC(COXCommandOptions) + +// Data members ------------------------------------------------------------- +public: + +protected: + CObArray m_CmdOptDescList; // Descriptions of possible command line switches + + CMapStringToOb m_AbbrMap; // Points abbreviations to objects + + CMapStringToOb m_Values; // Points to actual values from user + // -RUN is stored as Values[RUN] = 1 + // -EMF=foobar is stored as Values[EMF] = foobar.emf + // -RES=disk -RES=tape is stored as Values[RES] = "disk\ntape" + // -x a=b is stored as Values[x] = "a=b" + +private: + +// Member functions --------------------------------------------------------- +public: + COXCommandOptions(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + void Add(COXCommandOptionDesc* pOptionDesc); + // --- In : OptionDesc : An Option Description + // --- Out : + // --- Returns : + // --- Effect : Add the Option Description to the array + // You need not to worry about Option descriptions + // going out of scope because they are copied internally + // before being added to an option description array. + + void Add(LPCTSTR psczOptionName, int iFlags, + LPCTSTR psczDescription, LPCTSTR psczsAbbr = _T("")); + // --- In : psczOptionName : the name of the option, CASE-INSENSITIVE + // iFlags : the flags of the option + // COD_ARGOK Does option take an argument + // COD_REPEATOK Is option valid morethan once? + // COD_REP_FIRST Use first if option is repeated + // COD_REP_LAST Use last if option is repeated (i.e. /l dir1 /l dir2) + // COD_REP_ARRAY Build array if option is repeated + // COD_ASSOCIATIVE Takes two arguments i.e. /D variable=value or /D variable value + // COD_FIRSTARG Takes an argument, is repeatable, and repeats are ignored + // COD_LASTARG Takes an argument, is repeatable, and repeats are ignored + // COD_ARRAY Takes an argument, is repeatable, builds an array + // (i.e. The INCLUDE option would use this) + // COD_ASSOCARRAY Takes two arguments, is repeatable, builds associative array + // + // psczDescription : the description of the option, for usage messages + // psczAbbr : the abbreviation of the option. + // A DEFINITE abbreviation of the argument, this abbreviation will + // be used unless it conflicts with another option's DEFINITE abbreviation. + // This can be used to have an abbreviation of I for the INCLUDE option, even + // if there is another option which begins with I. + // For all options, any UNIQUE shortening of the option name is acceptable. + // For example, with an option name of INCLUDE, possible abbreviations would + // be I, IN, INC, INCL, INCLU, INCLUD. Which of these possibilities are + // valid, depends on which ones are are unique for a given option set. + // The DEFINITE abbreviation need not be a true abbreviation of the option name. + // For example, an option name EXPORT, could have a DEFINITE abbreviation + // of X even though that is not strictly an abbreviation of the name. + // + // --- Out : + // --- Returns : + // --- Effect : Add the Option Description to the array + + BOOL Remove(LPCTSTR pszcOption); + // --- In : pszcOption : the option to delete + // --- Out : + // --- Returns : succeeded or not + // --- Effect : Removes this option from all internal lists + + CString ParseCmdLine(COXCommandLine& cl, CStringList* pRestList = NULL); + // --- In : cl : the Command line object to parse + // pRestList : when provided will contain the strings on the command line + // that aren't flags. Is actually the same as the return string + // except that the separate parts are stored in a Stringlist. + // --- Out : + // --- Returns : Anything left over on the command line after parsing the valid options + // --- Effect : Construct array of actual parameters based on command line object + // Can throw an COXCommandLineException + + const COXCommandOptionDesc* GetOptionObject(LPCTSTR psczOption) const; + // --- In : psczOption : the name of the option + // --- Out : + // --- Returns : the option object with pszcOption as NAME. NULL if not found. + // --- Effect : + + BOOL IsEnabled(LPCTSTR psczOption) const; + // --- In : + // --- Out : + // --- Returns : Did the option appeared on the command line or not + // --- Effect : It works for any of the argument forms + + CString GetValue(LPCTSTR psczOption) const; + // --- In : + // --- Out : + // --- Returns : The argument associated with the option + // --- Effect : It is used with single-occurrence, single-argument options + + const CStringList* GetValues(LPCTSTR psczOption) const; + // --- In : + // --- Out : + // --- Returns : The list of arguments associated with the option + // --- Effect : It is used with single-argument, multiple-occurrence options + + const CMapStringToString* GetAssocPairs(LPCTSTR psczOption) const; + // --- In : + // --- Out : + // --- Returns : The list of combined arguments associated with the option + // --- Effect : It is used with options that take two arguments, the first being + // a key name, the second the value of of the key. This is useful + // for options that set variables like -Dfoo=bar in a compiler + + CString Usage(LPCTSTR psczMsg) const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : prints usage message if StdHandles are available + + virtual ~COXCommandOptions(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + // Construct abbreviation map from given OptionDesc's + void BuildAbbrTable(); + + // Reset contents of all maps and lists. Called by destructor + void ResetMaps(); + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdlEx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdlEx.h new file mode 100644 index 0000000..3b732f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCmdlEx.h @@ -0,0 +1,96 @@ +// ========================================================================== +// Class Specification : COXCommandLineException +// ========================================================================== + +// Header file : oxcmdlex.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CException + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates a new exception for Command line parsing + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __CMDLEXCEPTION_H__ +#define __CMDLEXCEPTION_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class COXCommandOptions; + +class OX_CLASS_DECL COXCommandLineException : public CException +{ +DECLARE_DYNAMIC(COXCommandLineException) + +// Data members ------------------------------------------------------------- +public: + +protected: + CString m_sErrMsg; + +private: + +// Member functions --------------------------------------------------------- +public: + COXCommandLineException(LPCTSTR pszcError, COXCommandOptions* pCmdOpt = NULL); + // --- In : pszcError : the actual Errormessage + // pCmdOpt : the command option object that parses the command line. + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + // This constructor will expand the error message with some + // extra information concerning the command line being parsed + + virtual BOOL GetErrorMessage(LPTSTR lpszError, UINT nMaxError, UINT* pnHelpContext = NULL ); + // --- In : see CException::GetErrorMessage() + // --- Out : + // --- Returns : TRUE if string available, otherwise FALSE + // --- Effect : retrieves the error string if available + + BOOL WriteToStdErr(); + // --- In : + // --- Out : + // --- Returns : TRUE if write was successful, otherwise FALSE + // --- Effect : Writes the error message to the STDERR (for use in CONSOLE programs) + + +protected: + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommMsg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommMsg.h new file mode 100644 index 0000000..e24c497 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommMsg.h @@ -0,0 +1,142 @@ +// ========================================================================== +// Class Specification : COXCommMsg +// ========================================================================== + +// Header file : OXCommMSg.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CArray + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates strict typed data +// It is an array of OLE variants. +// It can be used to communicate data together with the type + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXCOMMMSG_H__ +#define __OXCOMMMSG_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include +#include "OXVariant.h" + + +class OX_CLASS_DECL COXCommMsg : public CArray +{ +DECLARE_DYNAMIC(COXCommMsg) +// Data members ------------------------------------------------------------- +public: + // Possible types + enum EOXArgumentTypes // ID bytes C-type member name + { + ATEmpty = VT_EMPTY, // (0) 0 - - + ATNull = VT_NULL, // (1) 0 - - + ATBool = VT_BOOL, // (11) 2 VARIANT_BOOL bool + ATUI1 = VT_UI1, // (17) 1 unsigned char bVal + ATI2 = VT_I2, // (2) 2 short iVal + ATI4 = VT_I4, // (3) 4 long lVal + ATCy = VT_CY, // (6) 8 CY cyVal + ATR4 = VT_R4, // (4) 4 float fltVal + ATR8 = VT_R8, // (5) 8 double dblVal + ATStr = VT_BSTR, // (8) 4+len BSTR bstrVal + ATDate = VT_DATE, // (7) 8 DATE date + ATError = VT_ERROR, // (10) 4 SCODE scode + ATBlob = VT_UI1 | VT_ARRAY + // (8209)4+len - - + }; + + // Total number of types + enum + { + m_nArgumentTypesCount = 13 + }; + // Array containing all the types + static EOXArgumentTypes m_types[m_nArgumentTypesCount]; + static LPCTSTR m_typeNames[m_nArgumentTypesCount]; + +protected: + static WORD m_nMagicNumber; + static WORD m_nVariantType; + +private: + +// Member functions --------------------------------------------------------- +public: + + COXCommMsg(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + + virtual void Serialize(CArchive& ar); + // --- In : ar : Archive used in serialization + // --- Out : + // --- Returns : + // --- Effect : Serializes the object + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. +#endif + + virtual ~COXCommMsg(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + +private: + +}; + +#endif // __OXCOMMMSG_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.h new file mode 100644 index 0000000..b7d587a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by OXCommon.rc +// +#define psh14 0x040d +#define chx1 0x0410 +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc32 0x045f +#define lst1 0x0460 +#define lst2 0x0461 +#define cmb1 0x0470 +#define cmb2 0x0471 +#define edt1 0x0480 +#define IDC_PREVIEW_WND 23080 +#define IDC_PREVIEW_FRAME 23081 +#define IDC_PREVIEW 23082 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 23083 +#define _APS_NEXT_COMMAND_VALUE 53080 +#define _APS_NEXT_CONTROL_VALUE 23080 +#define _APS_NEXT_SYMED_VALUE 23080 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.rc new file mode 100644 index 0000000..3d54756 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommon.rc @@ -0,0 +1,118 @@ +//Microsoft Developer Studio generated resource script. +// +#include "OXCommon.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 DISCARDABLE +BEGIN + "OXCommon.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +PREVIEWFILEOPEN DIALOG DISCARDABLE 36, 24, 279, 132 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Open" +FONT 8, "Helv" +BEGIN + LTEXT "File &Name:",stc3,6,6,76,10 + EDITTEXT edt1,6,16,90,12,ES_LOWERCASE | ES_AUTOHSCROLL | + ES_OEMCONVERT + LISTBOX lst1,6,32,90,68,LBS_SORT | LBS_OWNERDRAWFIXED | + LBS_HASSTRINGS | LBS_EXTENDEDSEL | LBS_DISABLENOSCROLL | + WS_VSCROLL | WS_TABSTOP + LTEXT "&Directories:",IDC_STATIC,110,6,92,9 + LTEXT "",stc1,110,16,92,9,SS_NOPREFIX + LISTBOX lst2,110,32,92,68,LBS_SORT | LBS_OWNERDRAWFIXED | + LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL | + WS_TABSTOP + LTEXT "List Files of &Type:",stc2,6,102,90,9 + COMBOBOX cmb1,6,112,90,36,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_BORDER | WS_VSCROLL | WS_TABSTOP + LTEXT "Dri&ves:",stc4,110,102,92,9 + COMBOBOX cmb2,110,112,92,68,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | + CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | + WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,213,2,50,13,WS_GROUP + PUSHBUTTON "Cancel",IDCANCEL,213,16,50,13,WS_GROUP + PUSHBUTTON "&Help",1038,159,95,6,6,WS_GROUP + PUSHBUTTON "Net&work...",psh14,213,112,50,13,WS_GROUP + CONTROL "&Read Only",chx1,"Button",BS_AUTOCHECKBOX | WS_GROUP | + WS_TABSTOP,176,94,8,8 + CONTROL "&Preview",IDC_PREVIEW,"Button",BS_AUTOCHECKBOX | + WS_GROUP | WS_TABSTOP,213,101,50,11 + GROUPBOX "",IDC_PREVIEW_FRAME,212,28,59,68 + CONTROL "",IDC_PREVIEW_WND,"Button",BS_OWNERDRAW | WS_TABSTOP, + 213,34,56,61 +END + +PREVIEWFILEOPEN95 DIALOG DISCARDABLE 36, 24, 353, 152 +STYLE DS_MODALFRAME | DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_VISIBLE | + WS_CLIPSIBLINGS +FONT 8, "Helv" +BEGIN + LTEXT "",stc32,5,9,266,123 + CONTROL "&Preview",IDC_PREVIEW,"Button",BS_AUTOCHECKBOX | + WS_GROUP | WS_TABSTOP,283,98,50,11 + GROUPBOX "",IDC_PREVIEW_FRAME,281,25,60,68 + CONTROL "",IDC_PREVIEW_WND,"Button",BS_OWNERDRAW | WS_TABSTOP, + 283,31,56,61 +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommunicator.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommunicator.h new file mode 100644 index 0000000..ed644cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXCommunicator.h @@ -0,0 +1,328 @@ +// ========================================================================== +// Class Specification : COXCommunicator +// ========================================================================== + +// Header file : OXCommunicator.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CSocket + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class can be used to create a client server communication +// using WinSockets. +// This class can be used as a client that will connect to a server +// This is much like the base class CSocket +// * Initialize(nTimeOut, pCancelWnd) +// * Create() +// * Connect(sRemoteAddress, nRemotePort) +// When you use this class as a server that listens to multiple clients +// a socket for each client connection will be created. +// * Initialize(nTimeOut, pCancelWnd) +// * Create(nServerPort) +// * Listen() +// Yo end a communication, just call +// * Close() +// To simplify the communications two archives are available, +// one for reading and one for writing +// * GetInStream() +// * GetOutStream() + +// All client connections are also COXCommunicator objects +// They will be created automatically when a server gets a request +// from a new client. They can be address by a handle HCLIENT_COMMUNICATOR + +// All callbacks are virtual functions of this class + + +// Remark: +// This type of communication will block like a socket +// This means that during Send() and Receive() the entire thread will block +// until the function completes +// There are three exceptions to this rule : +// 1) A timer can be specified. When the time out is reached +// the blocking operation will be cancelled +// 2) Tou can specify a cancel window. All the messages for this +// window and its children will still be dispatched +// 3) WM_PAINT messages will still be dispatched + +// While a communicator is blocking, it may not start a new operation +// Such a recursive call could occur when the cancel window would +// initiate a new operation. So be sure to avoid this situation + + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXCOMMUNICATOR_H__ +#define __OXCOMMUNICATOR_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include + +#define HCLIENT_COMMUNICATOR long + + +class OX_CLASS_DECL COXCommunicator : public CSocket +{ +DECLARE_DYNAMIC(COXCommunicator) + +// Data members ------------------------------------------------------------- +public: + +protected: + COXCommunicator* m_pMasterCommunicator; + CMap m_connections; + CSocketFile* m_pFile; + CArchive* m_pInStream; + CArchive* m_pOutStream; + HWND m_hCancelWindow; + UINT m_nTimeOut; + UINT m_nTimerID; + UINT m_nStreamBufferSize; + + static HCLIENT_COMMUNICATOR m_nLastUsedHandle; + static CMap m_TimerToCommunicator; + +private: + +// Member functions --------------------------------------------------------- +public: + + COXCommunicator(UINT nStreamBufferSize = 4096, COXCommunicator* pMasterCommunicator = NULL); + // --- In : nStreamBufferSize : The size of the buffer used for the input and output stream + // If you intend to use very large objects, increase the buffer size + // pMasterCommunicator : The master communicator to notify + // This parameter is only used for client connections + // and should always by NULL + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + + HCLIENT_COMMUNICATOR GetClientHandle(COXCommunicator* pClientCommunicator); + // --- In : pClientCommunicator : The client communicator which handle is requested + // --- Out : + // --- Returns : The handle of the specified communicator (or NULL when not found) + // --- Effect : + + COXCommunicator* GetClientCommunicator(HCLIENT_COMMUNICATOR hClient); + // --- In : hClient : The client communicator handle which object is requested + // --- Out : + // --- Returns : A pointer to the specified communicator (or NULL when not found) + // --- Effect : + + void Initialize(UINT uTimeOut = 10000, CWnd* pCancelWnd = NULL); + // --- In : uTimeOut : Time out value in milli seconds + // pCancelWnd : Pointer to the cancel window + // --- Out : + // --- Returns : + // --- Effect : Initializes the communicator + + void SetCancelWindow(CWnd* pCancelWnd); + // --- In : pCancelWnd : Pointer to the cancel window + // --- Out : + // --- Returns : + // --- Effect : Sets a new cancel window + + void SetTimeOut(UINT uTimeOut); + // --- In : uTimeOut : Time out value in milli seconds + // --- Out : + // --- Returns : + // --- Effect : Sets a new timeout value + + BOOL IsOpen(); + // --- In : + // --- Out : + // --- Returns : Whether a valid socket is associated with this communicator + // --- Effect : + + BOOL IsListening(); + // --- In : + // --- Out : + // --- Returns : Whether this communicator is listening + // --- Effect : + + BOOL IsBlocking(); + // --- In : + // --- Out : + // --- Returns : Whether this communicator is blocking on an operation + // --- Effect : + + BOOL AreAnyBlocking(); + // --- In : + // --- Out : + // --- Returns : Whether this communicator or any client communicators + // are blocking on an operation + // --- Effect : + + void CancelAllBlockingCalls(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Cancels the blocking call of this communicator and all the + // client communicators + + DWORD GetMaxReadable(); + // --- In : + // --- Out : + // --- Returns : Determine the maximum number of bytes that can be read with + // one Receive() call. + // This is normally the same as the total amount of data queued + // --- Effect : + + CArchive* GetInStream(); + // --- In : + // --- Out : + // --- Returns : The input stream of which may be read + // --- Effect : The communicator must be open + // Use IsBufferEmpty() to see whether data is still waiting + + CArchive* GetOutStream(); + // --- In : + // --- Out : + // --- Returns : The output stream to which may be written + // --- Effect : The communicator must be open + + // Notifications of a client communicator + virtual void OnClientCreate(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator); + // --- In : hClient : The handle of the client communicator + // pClientCommunicator : A pointer to the client communicator + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that a new client communicator has been created + + virtual void OnClientReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode); + // --- In : hClient : The handle of the client communicator + // pClientCommunicator : A pointer to the client communicator + // nSize : The number of bytes that can be read in one Receive() + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that the specified client communicator has received data + // which can be read using the input stream of the communicator + + virtual void OnClientClose(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, int nErrorCode); + // --- In : hClient : The handle of the client communicator + // pClientCommunicator : A pointer to the client communicator + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that the specified client communicator has closed + + virtual void OnClientDestroy(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator); + // --- In : hClient : The handle of the client communicator + // pClientCommunicator : A pointer to the client communicator + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that an existent client communicator will be destroyed + + // Notifications of this communicator + virtual void OnServerReceive(DWORD nSize, int nErrorCode); + // --- In : nSize : The number of bytes that can be read in one Receive() + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that this communicator has received data + // which can be read using the input stream + + virtual void OnServerClose(int nErrorCode); + // --- In : nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies that this communicator has closed + + // The following functions have the save effect as those of the base class CSocket + // with the additional features of a timeout value and a cancel window + virtual BOOL Accept(CAsyncSocket& rConnectedSocket, + SOCKADDR* lpSockAddr = NULL, int* lpSockAddrLen = NULL); + virtual int Receive(void* lpBuf, int nBufLen, int nFlags = 0); + virtual int Send(const void* lpBuf, int nBufLen, int nFlags = 0); + virtual void Close(); + + virtual BOOL OnMessagePending(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Overrides the base class implementation to add additional features + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. +#endif + + virtual ~COXCommunicator(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + virtual void OnAccept(int nErrorCode); + virtual void OnReceive(int nErrorCode); + virtual void OnClose(int nErrorCode); + + void OnNotifyReceive(COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode); + void OnNotifyClose(COXCommunicator* pClientCommunicator, int nErrorCode); + void OnNotifyKill(COXCommunicator* pClientCommunicator, int nErrorCode); + + void CreateTimer(); + void CloseTimer(); + static UINT StartTimer(COXCommunicator* pCommunicator, UINT nTimeOut); + static void StopTimer(UINT nTimerID); + static void CALLBACK TimerProc(HWND hWnd, UINT nMsg, UINT nTimerID, DWORD dwTime); + + virtual BOOL ConnectHelper(const SOCKADDR* lpSockAddr, int nSockAddrLen); + virtual int ReceiveFromHelper(void* lpBuf, int nBufLen, + SOCKADDR* lpSockAddr, int* lpSockAddrLen, int nFlags); + virtual int SendToHelper(const void* lpBuf, int nBufLen, + const SOCKADDR* lpSockAddr, int nSockAddrLen, int nFlags); + +private: + +}; + +#endif // __OXCOMMUNICATOR_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDFlHdr.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDFlHdr.h new file mode 100644 index 0000000..c6ab5ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDFlHdr.h @@ -0,0 +1,135 @@ +// ========================================================================== +// Class Specification : COXDiffFileHeader +// ========================================================================== + +// Header file : OXDFlHdr.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// YES Persistent objects (saveable on disk) +// YES Uses exceptions +// Throws CArchiveException::badSchema : Incorrect file type +// Verion incorrect +// CArchiveException::badClass : Value of object out of range +// Passes through CArchiveException +// CFileException +// CMemoryException + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates the header of a binary difference file + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __DIFF_HEADER_H__ +#define __DIFF_HEADER_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXDiffFileHeader : public CObject +{ +DECLARE_DYNAMIC(COXDiffFileHeader) + +// Data members ------------------------------------------------------------- +public: + +protected: + CString m_sSignText; + +private: + +// Member functions --------------------------------------------------------- +public: + COXDiffFileHeader(CString sSignature); + // --- In : sSignature : Signature of object + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + CString GetSignature() const; + // --- In : + // --- Out : + // --- Returns : the signature of the file that was read from disk + // Identifies a file as one of this category + // --- Effect : + + virtual void ReadHeader(CFile* pFile); + // --- In : pFile : pointer to file + // --- Out : + // --- Returns : + // --- Effect : Reads the object (header) from the file + + virtual void WriteHeader(CFile* pFile); + // --- In : pFile : pointer to file + // --- Out : + // --- Returns : + // --- Effect : Writes the object (header) to the file + + virtual void Serialize(CArchive& ar); + // --- In : ar : archive + // --- Out : + // --- Returns : + // --- Effect : Reads or writes the object (header and/or data) to the archive + + COXDiffFileHeader(const COXDiffFileHeader& HdrSrc); + // --- In : HdrSrc : Header object which will be copied + // --- Out : + // --- Returns : + // --- Effect : Copy contruction. + // Notice that global memory will be copied + + COXDiffFileHeader& operator=(const COXDiffFileHeader& HdrSrc); + // --- In : HdrSrc : Header object which will be assign to 'this' Header object + // --- Out: + // --- Returns: + // --- Effect : Assignment operator + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + virtual ~COXDiffFileHeader(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + virtual void Read(CArchive& ar, BOOL bReportLogicalErrors = TRUE); + virtual void Write(CArchive& ar); + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDispatchMarshaller.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDispatchMarshaller.h new file mode 100644 index 0000000..0593544 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXDispatchMarshaller.h @@ -0,0 +1,104 @@ +// ========================================================================== +// Class Specification : COXDispatchMarshaller +// ========================================================================== + +// Header file : OXDispatchMarshaller.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// Encapsulation of a IStream object used for marshalling between thread. +// + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXDISPATCHMARSHALLER_H__ +#define __OXDISPATCHMARSHALLER_H__ + + +///////////////////////////////////////////////////////////////////////////// +// COXDispatchMarshaller definition + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXDispatchMarshaller +{ +// Data Members +public: + +protected: + LPSTREAM m_pStream; // A IStream object used for marshalling between thread (appartements) + HANDLE m_hMutexEvent; // Mutex for synchronisation of Marshall and Unmarshall. + +private: + +// Member Functions +public: + COXDispatchMarshaller(); + // --- In : none + // --- Out : none + // --- Returns : + // --- Effect : constructs the object ans allocates memory for the Stream + + virtual ~COXDispatchMarshaller(); + // --- In : none + // --- Out : none + // --- Returns : + // --- Effect : destructs the object ans releases the Stream + + HRESULT Marshal(IDispatch* pDisp); + // --- In : pDisp: the dispatch object that needs to be marshalled between to threads + // --- Out : none + // --- Returns : the result of the marshalling + // --- Effect : calls internally CoMarshalInterface (see DSK Ref. for return values) + + HRESULT Unmarshal(void** pDisp); + // --- In : none + // --- Out : none + // --- Returns : the result of the Unmarshalling + // --- Effect : calls internally CoUnmarshalInterface (see DSK Ref. for return values) + + BOOL CheckStream(); + // --- In : none + // --- Out : none + // --- Returns : If the internal stream pointer is created successfully + // --- Effect : + +protected: + +private: + +}; + +#endif //__OXDISPATCHMARSHALLER_H__ \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXFinalReleaseWnd.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXFinalReleaseWnd.h new file mode 100644 index 0000000..0da8b4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXFinalReleaseWnd.h @@ -0,0 +1,102 @@ +// ========================================================================== +// Class Specification : COXFinalReleaseWnd +// ========================================================================== + +// Header file : OXFinalReleaseWnd.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) + +// YES Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// This object serves as a message sink for the COXOwnThread object +// It's important that the COXOwnThread object is deleted by the same +// thread that instantiation ed the object (the Owner thread). +// The OnFinalRelease function of COXOwnThread will check which thread +// (Owner or Own thread) tries to delete the object. If it is the Own +// thread, a message is send to this object (which is a data member of +// the COWOwnThread object). Because this object is a window created by +// the Owner thread, the message will be handled by the Owner thread and +// consequently the COXOwnThread object can be safely destroyed from here. + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXFINALERELEASEWND_H__ +#define __OXFINALERELEASEWND_H__ + + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#define WMOX_FINAL_RELEASE WM_USER+1 + + +class COXOwnThread; + +class OX_CLASS_DECL COXFinalReleaseWnd : public CWnd +{ +// Data Members +public: + +protected: + static CString m_sClassName; // the class name used for registration + COXOwnThread* m_pOwnThread; // a pointer to the parent object + // initialized by constructor + +private: + +// Member Functions +public: + COXFinalReleaseWnd(COXOwnThread* pOwnThread); + // --- In : pOwnThread: a pointer to the parent object COXOwnThread + // so that we can delete the parent from within this object + // --- Out : none + // --- Returns : + // --- Effect : Constructs the object + + virtual ~COXFinalReleaseWnd(); + // --- In : none + // --- Out : none + // --- Returns : + // --- Effect : Destructs the object + +protected: + afx_msg LONG OnObjectFinalRelease(UINT, LONG); + + DECLARE_MESSAGE_MAP() + +private: + +}; + +#endif //__OXFINALERELEASEWND_H__ + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXMetafileViewer.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXMetafileViewer.h new file mode 100644 index 0000000..c32ef29 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXMetafileViewer.h @@ -0,0 +1,72 @@ +#if !defined(_OXMETAFILEVIEWER_H__) +#define _OXMETAFILEVIEWER_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +// OXMetafileViewer.h : header file +// + +#include "OXMetaFile.h" +#include "OXScrollWnd.h" + +///////////////////////////////////////////////////////////////////////////// +// COXMetafileViewer window + +class OX_CLASS_DECL COXMetafileViewer : public COXScrollWnd +{ + DECLARE_DYNAMIC(COXMetafileViewer) +// Construction +public: + COXMetafileViewer(); + +// Attributes +public: + +protected: + // metafile image + COXMetaFile m_MetaFile; + +// Operations +public: + + BOOL LoadFile(LPCTSTR lpszPathName); + inline BOOL LoadResource(UINT nIDResource, CString strResType=_T("METAFILE")); + + inline COXMetaFile* GetImage() { return &m_MetaFile; } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXMetafileViewer) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COXMetafileViewer(); + +protected: + CSize GetMetafileSize(); + + virtual BOOL InitializeImage(const CSize& sizePage=CSize(100,100), + const CSize& sizeLine=CSize(10,10)); + + BOOL DrawMetafile(CDC* pDC, const CRect& rectSrc); + + // Generated message map functions +protected: + //{{AFX_MSG(COXMetafileViewer) + afx_msg void OnPaint(); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXMETAFILEVIEWER_H__) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThread.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThread.h new file mode 100644 index 0000000..4aec3dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThread.h @@ -0,0 +1,172 @@ +// ========================================================================== +// Class Specification : COXOwnThread +// ========================================================================== + +// Header file : OXOwnThread.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// The purpose of this class is to serve as a base class for COXOwnThreadCmdTarget, +// COXOwnThreadDocument or user derived classes from CCmdTarget (Encapsulation around +// a IDispatch OLE object). +// The class mainly encapsulates the marshalling of IDispatch object between the +// Owner thread (the thread that created the object) and the Own thread (a own +// message loop). +// By marshalling the IDispatch object, the OLE calls to the object will be +// re-routed to the Own thread. +// The derived class needs to derive from CCmdTarget (or other derived class from +// CCmdTarget) and from this class, in order to re-route the OLE calls complete +// transparently. COXOwnThreadCmdTarget and COXOwnThreadDocument are 2 (ready to use) +// examples of how to use this COwnThread engine class. + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXOWNTHREAD_H__ +#define __OXOWNTHREAD_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +#include "OXDispatchMarshaller.h" +#include "OXFinalReleaseWnd.h" + + +///////////////////////////////////////////////////////////////////////////// +// COwnThread engine + +class OX_CLASS_DECL COXOwnThread +{ +// Data Members +public: + +protected: + BOOL m_bHasOwnThread; + HANDLE m_hCreatedEvent; + HANDLE m_hThreadEvent; + HANDLE m_hEndEvent; + HRESULT m_hCreateResult; + LPUNKNOWN m_pMarshalledPunk; + BOOL m_bEndThread; + DWORD m_nOwnerThreadID; + DWORD m_nOwnThreadID; + COXDispatchMarshaller + m_dispatchMarshaller; + COXFinalReleaseWnd + m_finalReleaseWnd; + + friend COXFinalReleaseWnd; + +private: + + +// Member Functions +public: + COXOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : nothing + // --- Effect : constructs the object + + virtual ~COXOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : nothing + // --- Effect : constructs the object + + BOOL EnableOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : If the own thread is started successful or not + // This function should always succeed unless + // the operating systems is extremely low on resources + // --- Effect : All the OLE Calls to this object will be re-routed + // by the own thread. + // Different objects can be served simultaneous. + + BOOL HasOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : if the CmdTarget has a own thread started. + // --- Effect : + + BOOL FinalReleaseRouter(); + // --- In : none + // --- Out : none + // --- Returns : if the call is re-routed or not + // --- Effect : If you override the virtual member function 'OnFinalRelease' of CCmdTarget, + // you have to call this function before you do anything else. + // If the call returns TRUE, you have to return immediately. + // Example with CMyCmdTarget derived from COXOwnThreadCmdTarget + // void CMyCmdTarget::OnFinalRelease() + // { + // if (FinalReleaseRouter()) + // return; + // + // // TODO: Add your specialised code here and/or call the base class + // + // CCmdTarget::OnFinalRelease(); + // } + + void SetThreadEvent(); + // --- In : none + // --- Out : none + // --- Returns : nothing + // --- Effect : Fires an event to the own thread, which will call the overridable + // function 'OnThreadEvent'. + + virtual LPDISPATCH GetIDispatch(BOOL bAddRef) = 0; + // --- In : bAddRef: Specifies whether to increment the reference count for the object. + // --- Out : none + // --- Returns : The IDispatch pointer associated with the object + // --- Effect : This is a pure virtual function, so the implementation of the derived class is used. + // This declaration is needed to give access to the real CCmdTarget implementation of this function + +protected: + LPUNKNOWN GetInterfaceHook(const void*); + virtual void OnFinalRelease() = 0; + void Run(); + static UINT __cdecl StartThread(LPVOID pOwnThread); + void EndThread(); + virtual void OnThreadEvent(); + virtual void OnThreadDestroy(); + + +private: + +}; + +#endif //__OXOWNTHREAD_H__ + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThreadCmdTarget.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThreadCmdTarget.h new file mode 100644 index 0000000..4aeefc9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXOwnThreadCmdTarget.h @@ -0,0 +1,162 @@ +// ========================================================================== +// Class Specification : COXOwnThreadCmdTarget +// ========================================================================== + +// Header file : OXOwnThreadCmdTarget.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// This class is an alternative for CCmdTarget. It offers multi-threading +// functionality to your automation server. +// By deriving from this class instead of CCmdTarget, all your OLE calls +// are handled by a separate Own thread. In that way more concurrently +// calls can be handled simultaneously. +// The main part of the implementation is done in the COXOwnThread class, so +// the code can be shared by other derivation of CCmdTarget (see COXOwnThreadDocument). + +// HOW TO USE -> it is as easy as this: +// As said above, you need to derive from this class instead of CCmdTarget. +// Further more you need to call the 'EnableOwnthread' function from within +// the constructor of your derived class. +// If you are overriding the 'OnFinalRelease' function of CCmdTarget +// you need also to call 'FinalReleaseRouter()' (see 'FinalReleaseRouter' further on) + +// For derivation of CDocument you have to use COXOwnThreadDocument. +// For other derivation you can build your own class analogue to COXOwnThreadCmdTarget +// and COXOwnThreadDocument. + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXOWNTHREADCMDTARGET_H__ +#define __OXOWNTHREADCMDTARGET_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +///////////////////////////////////////////////////////////////////////////// +// COwnThreadCmdTarget command target + +#include "OXOwnThread.h" + + +class OX_CLASS_DECL COXOwnThreadCmdTarget : public CCmdTarget, public COXOwnThread +{ +DECLARE_DYNCREATE(COXOwnThreadCmdTarget) + +// Data Members +public: + +protected: + +private: + +// Member Functions +public: + +// The public interface of this class contains 3 easy functions. +// They are defined in COXOwnThread where this class is derived from: + +// BOOL EnableOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : If the own thread is started successful or not + // This function should always succeed unless + // the operating systems is extremely low on resources + // --- Effect : All the OLE Calls to this object will be re-routed + // by the own thread. + // Different objects can be served simultaneous. + +// BOOL HasOwnThread(); + // --- In : none + // --- Out : none + // --- Returns : if the CmdTarget has a own thread started. + // --- Effect : + +// BOOL FinalReleaseRouter(); + // --- In : none + // --- Out : none + // --- Returns : if the call is re-routed or not + // --- Effect : If you override the virtual member function 'OnFinalRelease' of CCmdTarget, + // you have to call this function before you do anything else. + // If the call returns TRUE, you have to return immediately. + // Example: + // void CMyCmdTarget::OnFinalRelease() + // { + // if (FinalReleaseRouter()) + // return; + // + // // TODO: Add your specialised code here and/or call the base class + // + // CCmdTarget::OnFinalRelease(); + // } + + + virtual LPDISPATCH GetIDispatch(BOOL bAddRef); + // --- In : bAddRef: Specifies whether to increment the reference count for the object. + // --- Out : none + // --- Returns : The IDispatch pointer associated with the object + // --- Effect : provides access to the IDispatch handle + // Is used by the COXOwnThread base class + + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXOwnThreadCmdTarget) + public: + virtual void OnFinalRelease(); + //}}AFX_VIRTUAL + + +protected: + COXOwnThreadCmdTarget(); // protected constructor used by dynamic creation + virtual ~COXOwnThreadCmdTarget(); + + virtual LPUNKNOWN GetInterfaceHook(const void*); + + // Generated message map functions + //{{AFX_MSG(COXOwnThreadCmdTarget) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + // Generated OLE dispatch map functions + //{{AFX_DISPATCH(COXOwnThreadCmdTarget) + //}}AFX_DISPATCH + DECLARE_DISPATCH_MAP() + +private: + +}; +#endif //__OXOWNTHREADCMDTARGET_H__ + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXPrvDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXPrvDlg.h new file mode 100644 index 0000000..4b5a5e2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXPrvDlg.h @@ -0,0 +1,136 @@ +// ========================================================================== +// Class Specification : COXPreviewDialog +// ========================================================================== + +// Header file : OXPrvDlg.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CFileDialog + +// YES Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// YES Has a message map +// YES Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class extends the Common File Dialog with a specific +// custom template in order to have a preview area in this dialog. To implement a +// dialog that previews BMP's, derive a class from this class and implement two +// virtual functions : OnNewFileSelect() and +// OnPaintPreview(CDC* pDC, const CRect& paintRect) + +// Remark: +// This file uses resources. +// The reserved ID ranges are : 23080 -> 23099 and 53080 -> 53099 + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __OXPRVDLG_H__ +#define __OXPRVDLG_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXPreviewDialog : public CFileDialog +{ +DECLARE_DYNAMIC(COXPreviewDialog) + +// Data members ------------------------------------------------------------- +public: + +protected: + CStatic m_previewFrame; + BOOL m_bPreview; + BOOL m_bPrevPreview; + CString m_sSelectedFile; + CString m_sPrevSelectedFile; + + class OX_CLASS_DECL COXPreview : public CButton + { + // Data Members + public: + protected: + private: + // Member Functions + public: + COXPreview(); + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); + protected: + private: + } m_preview; + + +private: + +friend COXPreview; + +// Member functions --------------------------------------------------------- +public: + COXPreviewDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs + LPCTSTR lpszDefExt = NULL, + LPCTSTR lpszFileName = NULL, + DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + LPCTSTR lpszFilter = NULL, + CWnd* pParentWnd = NULL); + // --- In : see constructor MFC CFiledialog + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + + virtual ~COXPreviewDialog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + + +protected: + virtual void OnNewFileSelect(const CString& sFilename); + virtual void OnPaintPreview(CDC* pDC, const CRect& paintRect); + virtual void OnDoRealizePalette(CWnd* pFocusWnd); + + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + void CheckFileSelection(); + +#ifdef WIN32 + BOOL IsWin95(); + virtual void OnFileNameChange(); + CString GetFilePath() const; +#endif + + afx_msg void OnPreview(); + virtual BOOL OnInitDialog(); + + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); + + DECLARE_MESSAGE_MAP() + +private: + virtual void OnLBSelChangedNotify( UINT nIDBox, UINT iCurSel, UINT nCode); + +}; + +#endif //__OXPRVDLG_H__ + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultObj.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultObj.h new file mode 100644 index 0000000..c8eab66 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultObj.h @@ -0,0 +1,187 @@ +// ========================================================================== +// Class Specification : COXResultObj +// ========================================================================== + +// Header file : OXResultObj.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// YES Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates a collection of COXResultParts + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXRESULTOBJ_H__ +#define __OXRESULTOBJ_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "AfxTempl.h" +#include "OXResultPart.h" + + +class OX_CLASS_DECL COXResultObj : public CArray +{ +DECLARE_DYNAMIC(COXResultObj); + +// Data members ------------------------------------------------------------- +public: +protected: + COXResultPart m_defaultPart; + +private: + +// Member functions --------------------------------------------------------- +public: + COXResultObj(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + + COXResultObj(const COXResultPart& defaultPart); + // --- In : defaultPart + // --- Out : + // --- Returns : + // --- Effect : Constructs the object and sets the default part + // The default part will be returned when + // you want to retrieve a part when this object is empty + + COXResultObj(const COXResultObj& result); + // --- In : result : Object to copy + // --- Out : + // --- Returns : + // --- Effect : Copy constructor + + COXResultObj& operator=(const COXResultObj& result); + // --- In : result : Object to assigne + // --- Out : + // --- Returns : This object + // --- Effect : Assignment operator + + void operator+=(const COXResultObj& result); + // --- In : result : Object to add + // --- Out : + // --- Returns : + // --- Effect : Adds the specified result to this object + + void operator+=(const COXResultPart& resultPart); + // --- In : resultPart : Object to add + // --- Out : + // --- Returns : + // --- Effect : Adds the specified result part to this result object + + COXResultPart& GetDefaultPart(); + // --- In : + // --- Out : + // --- Returns : The default part + + COXResultPart GetDefaultPart() const; + // --- In : + // --- Out : + // --- Returns : The default part + + void SetDefaultPart(const COXResultPart& defaultPart); + // --- In : defaultPart + // --- Out : + // --- Returns : + // --- Effect : Sets the default part + // The default part will be returned when + // you want to retrieve a part when this object is empty + + void Empty(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Empties this result object + + BOOL IsEmpty() const; + // --- In : + // --- Out : + // --- Returns : Whether this object contains any result itemùs (FALSE) or not (TRUE) + // --- Effect : + + COXResultPart& GetMostSeverePart(); + // --- In : + // --- Out : + // --- Returns : The result part with the highest extended severity + // --- Effect : When this object does not contain any parts, + // a new part is added to this object and returned + + COXResultPart GetMostSeverePart() const; + // --- In : + // --- Out : + // --- Returns : The result part with the highest extended severity + // --- Effect : When this object does not contain any parts, + // a new empty part is returned + + COXResultPart* operator->(); + // --- In : + // --- Out : + // --- Returns : The result part with the highest extended severity + // --- Effect : When this object does not contain any parts, + // a new part is added to this object and returned + // This is a quick way to get the most severe part from + // the collection and perform a function on it + + virtual void Serialize(CArchive& ar); + // --- In : ar : Archive used in serialization + // --- Out : + // --- Returns : + // --- Effect : Serializes the object + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. +#endif + + virtual ~COXResultObj(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + +private: + +}; + +#endif // __OXRESULTOBJ_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPart.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPart.h new file mode 100644 index 0000000..e104b41 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPart.h @@ -0,0 +1,269 @@ +// ========================================================================== +// Class Specification : COXResultPart +// ========================================================================== + +// Header file : OXResultPart.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// YES Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates a single result code and its message + +// An object can be constructed from an HRESULT value. +// Now the accompanying message will be retrieved from the message resource +// When optional parameters are needed they can be supplied + +// A group of these object can be stored in a COXResultObj + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXRESULTPART_H__ +#define __OXRESULTPART_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#ifndef __AFXOLE_H__ +#include +#define __AFXOLE_H__ +#endif + + +class OX_CLASS_DECL COXResultPart : public CObject +{ +DECLARE_SERIAL(COXResultPart); + +// Data members ------------------------------------------------------------- +public: +protected: + COleDateTime m_creationTime; + HRESULT m_resultCode; + CString m_sResultMessage; + DWORD m_dwExtra; + + static DWORD m_dwLangID; + +private: + +// Member functions --------------------------------------------------------- +public: + COXResultPart(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs an empty result item object + + COXResultPart(HRESULT resultCode, ...); + COXResultPart(LPCTSTR pszModuleName, HRESULT resultCode, ...); + // --- In : (optional) pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // ... : Optional parameters used to build the message + // --- Out : + // --- Returns : + // --- Effect : Constructs a result item object with the specified + // resultcode + // The appropriate message is retrieved from resource + // and for this the optional parameters may be used + + COXResultPart(const COXResultPart& resultItem); + // --- In : resultItem : Object to copy + // --- Out : + // --- Returns : + // --- Effect : Copy constructor + + BOOL Initialize(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Initializes to an empty result item object + + BOOL Initialize(HRESULT resultCode, ...); + BOOL Initialize(LPCTSTR pszModuleName, HRESULT resultCode, ...); + BOOL InitializeSpecial(LPCTSTR pszModuleName, DWORD resultCode, ...); + // --- In : (optional) pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // ... : Optional parameters used to build the message + // --- Out : + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result item object with the specified + // resultcode + // The appropriate message is retrieved from resource + // and for this the optional parameters may be used + + HRESULT GetResultCode() const; + // --- In : + // --- Out : + // --- Returns : The result code of this object + // --- Effect : + + void SetResultCode(HRESULT resultCode); + // --- In : resultCode : New result code to set + // --- Out : + // --- Returns : + // --- Effect : Sets the result code to a new value + // Other parts (message etc) are not automatically updated + + CString GetResultMessage() const; + // --- In : + // --- Out : + // --- Returns : The result message of this object + // --- Effect : + + void SetResultMessage(CString sResultMessage); + // --- In : sResultMessage : New result message to set + // --- Out : + // --- Returns : + // --- Effect : Sets the result code to a new value + // Other parts (code etc) are not automatically updated + + void AppendMessage(CString sMessage); + // --- In : sMessage : Message to append + // --- Out : + // --- Returns : + // --- Effect : Appends the specified text to the result message + + CString BuildExtendedMessage() const; + // --- In : + // --- Out : + // --- Returns : The extended result message of this object + // --- Effect : + + COleDateTime GetTimeStamp() const; + // --- In : + // --- Out : + // --- Returns : The time stamp when the item was created + // --- Effect : + + void SetTimeStamp(COleDateTime creationTime); + // --- In : creationTime : New creation time to set + // --- Out : + // --- Returns : + // --- Effect : Sets the creation date to a new value + // Other parts (code etc) are not automatically updated + // The date must be valid + + DWORD GetExtraData() const; + // --- In : + // --- Out : + // --- Returns : The extra data of this object + // --- Effect : + + void SetExtraData(DWORD dwExtra); + // --- In : dwExtra : New extra data to set + // --- Out : + // --- Returns : + // --- Effect : Sets the extra data to a new value + // Other parts (code etc) are not automatically updated + + COXResultPart& operator=(const COXResultPart& resultItem); + // --- In : resultItem : Object to assigne + // --- Out : + // --- Returns : This object + // --- Effect : Assignment operator + + BOOL Succeeded() const; + // --- In : + // --- Out : + // --- Returns : Whether the result code specifies success (SUCCEEDED) + // --- Effect : + + BOOL Failed() const; + // --- In : + // --- Out : + // --- Returns : Whether the result code specifies failure (FAILED) + // --- Effect : + + WORD GetCode() const; + // --- In : + // --- Out : + // --- Returns : The code part of the result code (HRESULT_CODE) + // --- Effect : + + WORD GetFacility() const; + // --- In : + // --- Out : + // --- Returns : The facility part of the result code (HRESULT_FACILITY) + // --- Effect : + + WORD GetSeverity() const; + // --- In : + // --- Out : + // --- Returns : The severity part of the result code (HRESULT_SEVERITY) + // --- Effect : + + WORD GetSeverityEx() const; + // --- In : + // --- Out : + // --- Returns : The extended severity part of the result code (bits 31 and 30) + // --- Effect : + + virtual void Serialize(CArchive& ar); + // --- In : ar : Archive used in serialization + // --- Out : + // --- Returns : + // --- Effect : Serializes the object + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. +#endif + + virtual ~COXResultPart(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + BOOL InitializeEx(HRESULT resultCode, va_list* pArgs); + BOOL InitializeEx(LPCTSTR pszModuleName, HRESULT resultCode, va_list* pArgs); + BOOL InitializeExSpecial(LPCTSTR pszModuleName, DWORD dwResultCode, va_list* pArgs); + static BOOL RetrieveResultMessage(CString sModuleName, HRESULT resultCode, + va_list* pArgs, CString& sResultMessage); + static BOOL RetrieveSpecialMessage(CString sModuleName, DWORD dwResultCode, + va_list* pArgs, CString& sResultMessage); + +private: + +}; + +// Define some handy macros +#include "OXResultPartDef.h" + +#endif // __OXRESULTPART_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPartDef.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPartDef.h new file mode 100644 index 0000000..a6bf5e0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXResultPartDef.h @@ -0,0 +1,81 @@ +// ========================================================================== +// Macro Definition for COXResultPart +// ========================================================================== + +// Header file : OXResultPartDef.h + +// ////////////////////////////////////////////////////////////////////////// + +// These macros only have an actual implementation if _DEBUG is defined +// otherwise they all are defined empty + +#ifndef __OXRESULTPARTDEF_H__ +#define __OXRESULTPARTDEF_H__ + +#ifdef _DEBUG + // OX_TRACE_ERROR_EX(RES, TX) + // --- In : RES : The numeric result code (long) + // TX : A string which will be used as prefix + // --- Out : + // --- Returns : + // --- Effect : Traces the messages associated with sepcified result code + // together with leading text +#define OX_TRACE_ERROR_EX(RES, TX) \ + { \ + HRESULT r = (RES); \ + if (HRESULT_FACILITY(r) == 0) \ + r = HRESULT_FROM_WIN32(r); \ + if (FAILED(r)) \ + { \ + COXResultPart resultPart(r); \ + TRACE(_T("%s : HRESULT = 0x%X\n\t%s"), (TX), r, resultPart.GetResultMessage()); \ + } \ + } + + // OX_TRACE_ERROR_EX(RES) + // --- In : RES : The numeric result code (long) + // --- Out : + // --- Returns : + // --- Effect : Traces the messages associated with sepcified result code + // together with the current file name and line number +#define OX_TRACE_ERROR(RES) \ + { \ + CString sLine; \ + sLine.Format(_T("%i"), __LINE__); \ + OX_TRACE_ERROR_EX(RES, CString(__FILE__) + _T(" (") + sLine + _T(")")); \ + } + + // OX_TRACE_LAST_ERROR_EX(TX) + // --- In : TX : A string which will be used as prefix + // --- Out : + // --- Returns : + // --- Effect : Traces the message associated with the last error + // together with leading text +#define OX_TRACE_LAST_ERROR_EX(TX) \ + { \ + HRESULT nLastError = ::GetLastError(); \ + OX_TRACE_ERROR_EX(HRESULT_FROM_WIN32(nLastError), TX); \ + } + + // OX_TRACE_LAST_ERROR() + // --- In : TX : A string which will be used as prefix + // --- Out : + // --- Returns : + // --- Effect : Traces the message associated with the last error + // together with the current file name and line number +#define OX_TRACE_LAST_ERROR() \ + { \ + HRESULT nLastError = ::GetLastError(); \ + CString sLine; \ + sLine.Format(_T("%i"), __LINE__); \ + OX_TRACE_ERROR_EX(HRESULT_FROM_WIN32(nLastError), CString(__FILE__) + _T(" (") + sLine + _T(")")); \ + } + +#else +#define OX_TRACE_ERROR_EX(RES, TX) +#define OX_TRACE_ERROR(RES) +#define OX_TRACE_LAST_ERROR_EX(TX) +#define OX_TRACE_LAST_ERROR() +#endif +#endif // __OXRESULTPARTDEF_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCFG.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCFG.H new file mode 100644 index 0000000..12508c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCFG.H @@ -0,0 +1,144 @@ +// ========================================================================== +// Class Specification : COXSerialCommConfig +// ========================================================================== + +// Header file : OXSCCFG.H + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Is derived from Wnd +// NO Two stage creation (constructor & Initialize()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// COXSerialCommConfig class +// This object defines the port configuration settings like port ID, baudrate, +// bytesize, parity, stopbits and flowcontrol. You can set also the size of +// the software buffers and the timeout values of the ‘clear to send’, +// ‘data set ready’ and ‘Carrier detect’ signals. These settings can be loaded +// and saved to disk. + +// Remark: +// + + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXSCCFG_H_ +#define __OXSCCFG_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXSerialCommConfig : public CObject +{ + DECLARE_SERIAL(COXSerialCommConfig); + +// Data Members +public: + enum EFlowControl // flow control enum type + { + NONE, + HARDWARE, + XON_XOFF + }; + + BYTE m_nPortId; // 0..8 (COM1..COM9) + UINT m_nBaudRate; // CBR_xxx (as in DCB) + BYTE m_nByteSize; // 7..8 (as in DCB) + BYTE m_nParity; // 0..2 (as in DCB) + BYTE m_nStopBits; // 0/2 (as in DCB) + EFlowControl m_eFlowControl; // flow control type + + UINT m_nSizeReceivingQueue; // buffer size of the incomming queue + UINT m_nSizeTransmissionQueue; // buffer size of the outgoing queue + UINT m_nCdTimeout; // the time that the carrier must be down + // before the signal is changing state + UINT m_nCtsTimeout; // Clear to send timeout + UINT m_nDsrTimeout; // Data set ready timeout + +protected: + +private: + +// Member Functions +public: + COXSerialCommConfig(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: Constructs the configutration object + + COXSerialCommConfig(COXSerialCommConfig& config); + // --- In: config: another COXSerialCommConfig object + // --- Out: none + // --- Returns: none + // --- Effect: copy constructor + + COXSerialCommConfig& operator = (const COXSerialCommConfig& config); + // --- In: config: another COXSerialCommConfig object + // --- Out: none + // --- Returns: the reference of the object that is copied into + // --- Effect: copy operator + + CString GetCommName() const; + // --- In: none + // --- Out: none + // --- Returns: the name of the communication device as a stdio filename + // (example: "COM1" for port com1) + // --- Effect: none + + int DoConfigDialog(CString sTitle = _T("")); + // --- In: sTitle: the title of the dialog box (a default title is used if empty) + // --- Out: none + // --- Returns: IDOK or IDCANCEL + // --- Effect: start a modal configuration dialog box + + BOOL IsPortAvailable() const; + // --- In: none + // --- Out: none + // --- Returns: if the port is available or not + // --- Effect: tries to open the port + + BOOL Load(CString sFileName); + // --- In: sFileName: the filename of the configuration file + // --- Out: none + // --- Returns: if the configuration file is successfully loaded + // --- Effect: loads the configuration file into this object + + BOOL Save(CString sFileName); + // --- In: sFileName: the filename of the configuration file + // --- Out: none + // --- Returns: if the configuration file is successfully saved + // --- Effect: saves the configuration setting to file + +protected: + virtual void Serialize(CArchive& ar); + +private: + +}; + +#endif //__OXSCCFG_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCNST.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCNST.H new file mode 100644 index 0000000..207b36e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCCNST.H @@ -0,0 +1,22 @@ +#ifndef __OXSCCNST_H_ +#define __OXSCCNST_H_ + +const int COMM_MSRSHADOW = 35; // Modem Status Register "shadow" +const int MSR_CTS = 0x10; // see Microsoft PSS ID Q101417 +const int MSR_DSR = 0x20; +const int MSR_RI = 0x40; +const int MSR_RLSD = 0x80; + +const UINT DefaultSizeReceivingQueue = 4096; +const UINT DefaultSizeTransmissionQueue = 4096; +const UINT DefaultCdTimeout = 2000; +const UINT DefaultCtsTimeout = 5000; +const UINT DefaultDsrTimeout = 5000; + +const int MaxNumberOfBuffers = 4; +const int RS232TimerId = 0x1245; +const int RS232TimerValue = 100; // 100 mSec. +const UINT _Rs232PostMessage_ = WM_USER; +const UINT _Rs232InternalNotify_ = WM_USER+1; + +#endif __OXSCCNST_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCEXCP.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCEXCP.H new file mode 100644 index 0000000..7e5d9dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCEXCP.H @@ -0,0 +1,55 @@ +#ifndef __OXSCEXCP_H_ +#define __OXSCEXCP_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +OX_API_DECL void AFXAPI AfxThrowSerialCommException(int cause, + LPCTSTR lpszSerialCommName = NULL); + +class OX_CLASS_DECL COXSerialCommException: public CFileException +{ +DECLARE_DYNAMIC(COXSerialCommException) + +// Data Members +public: + enum VALUE + { + none, + notAvailable, + breakDetect, + rxTimeout, + ctsTimeout, + dsrTimeout, + cdTimeout, + frameError, + parityError, + overrunError, + rxQueueOverflow, + txQueueFull, + wmQuitReceived, + ioError, + modeError + }; + + int m_ext_cause; + +// Member Functions +public: + COXSerialCommException(int cause = none, + LPCTSTR lpszSerialCommName = NULL); + COXSerialCommException(COXSerialCommException& other); + COXSerialCommException& operator = (const COXSerialCommException& other); + virtual BOOL GetErrorMessage( LPTSTR lpszError, UINT nMaxError, PUINT pnHelpContext = NULL ); +#ifdef _DEBUG + virtual void Dump(CDumpContext& dc) const; +#endif + + +}; + +#endif //__OXSCEXCP_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCFILE.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCFILE.H new file mode 100644 index 0000000..a231797 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCFILE.H @@ -0,0 +1,274 @@ +// ========================================================================== +// Class Specification : COXSerialCommFile +// ========================================================================== + +// Header file : OXSCFILE.H + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Is derived from CFile +// NO Two stage creation (constructor & Initialize()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// COXSerialCommFile class +// The COXSerialCommFile class is the main class which controls the serial port. +// It is derived from CFile and is therefor compatible with MFC serialization. +// Next to the derived interface, COXSerialCommFile is extended with some other +// function for controlling the handshake signals, the read and write buffers and +// the time-out values. +// + +// Remark: +// If the following error appears the only solution is to add at the top of the +// initinstance the following code: (the default depth is only 8!. Maximum = 120.) +// int QueueDepth = 32; +// while (!::SetMessageQueue(QueueDepth)) +// QueueDepth--; +// +// ERROR MESSAGE: +// FATAL ERROR! +// The Windows message queue is full! +// Rs232 messages lost! +// Increase the message queue depth. + + + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXSCFILE_H_ +#define __OXSCFILE_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXSCCFG.H" +#include "OXSCEXCP.H" + + +class OX_CLASS_DECL COXSerialCommFile : public CFile +{ +// Data Members +public: + +protected: + HANDLE m_hCommDevice; + +private: + +// Member Functions +public: + COXSerialCommFile(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: Constructs the object and initialize the internal state + + virtual ~COXSerialCommFile(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: Destructs the object + + BOOL Open(const COXSerialCommConfig& config, COXSerialCommException* pException = NULL); + // --- In: config: the configurations of the serial communication device to open + // pException: + // --- Out: none + // --- Returns: if the opening was successful + // --- Effect: opens the serial communication device configured in the config struct. + + virtual void Close(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: closes this serial comunication device + + BOOL SetTimeouts(DWORD dwRxTimeout=5000, DWORD dwTxTimeout=5000); // time in milliseconds + // --- In: dwRxTimeout: + // dwTxTimeout: + // --- Out: none + // --- Returns: if ot was successful or not + // --- Effect: sets the time-out parameters for all read and write operations on this serial + // communications device. + + BOOL IsOpen() const; + // --- In: none + // --- Out: none + // --- Returns: if the port is already opened or not + // --- Effect: none + + UINT Read( void* lpBuf, UINT nCount ); + // --- In: none + // --- Out: lpBuf: reserved memory block to receive data + // nCount: size of the reserved buffer + // --- Returns: actual number of bytes received + // --- Effect: + + void Write( const void* lpBuf, UINT nCount ); + // --- In: lpBuf: address of data block to transmit + // nCount: number of bytes to transmit + // --- Out: none + // --- Returns: none + // --- Effect: transmits the data to the serial port + + void PurgeRx(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: makes the receive queue empty + + void PurgeTx(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: makes the transmit queue empty + + BOOL IsRxQueueEmpty() const; + // --- In: none + // --- Out: none + // --- Returns: if the Receive queue is empty or not + // --- Effect: none + + BOOL IsTxQueueEmpty() const; + // --- In: none + // --- Out: none + // --- Returns: if the Transmit queue is empty or not + // --- Effect: none + + void SetDTR(BOOL bValue); + // --- In: bValue: new value of the DTR flag + // --- Out: none + // --- Returns: none + // --- Effect: Sets the handshake signal 'DTR' (data terminal ready ) + + void SetRTS(BOOL bValue); + // --- In: bValue: new value of the RTS flag + // --- Out: none + // --- Returns: none + // --- Effect: Sets the handshake signal 'RDSR' (request to send) + + BOOL GetCTS() const; + // --- In: none + // --- Out: none + // --- Returns: the state of the 'CTS' (clear to send) flag + // --- Effect: none + + BOOL GetDSR() const; + // --- In: none + // --- Out: none + // --- Returns: the state of the 'DSR' (data set ready) flag + // --- Effect: none + + BOOL GetCD() const; + // --- In: none + // --- Out: none + // --- Returns: the state of the 'CD' (carrier detect) flag + // --- Effect: none + + BOOL GetRI() const; + // --- In: none + // --- Out: none + // --- Returns: the state of the 'RI' (ring indicator) flag + // --- Effect: none + + HANDLE GetSafeHandle() const; + // --- In: none + // --- Out: none + // --- Returns: a HANDLE to the COMM Device or NULL if no open handle exists + // --- Effect: + // --- Note: You may call this function on a non-attached COMM device. It will + // return NULL. + + BOOL SetCommMask(const DWORD dwEventMask); + // --- In: dwEventMask: Specifies the events to be enabled. A value of zero + // disables all events. The below table summarizes the + // possible values for dwEventMask, you may combine these + // using the bit-wise OR operator. + // + // Value Meaning + // -------------------------------------------------------------------- + // EV_BREAK A break was detected on input. + // EV_CTS The CTS (clear-to-send) signal changed state. + // EV_DSR The DSR (data-set-ready) signal changed state. + // EV_ERR A line-status error occurred. Line-status errors are CE_FRAME, + // CE_OVERRUN, and CE_RXPARITY. + // EV_RING A ring indicator was detected. + // EV_RLSD The RLSD (receive-line-signal-detect) signal changed state. + // EV_RXCHAR A character was received and placed in the input buffer. + // EV_RXFLAG The event character was received and placed in the input + // buffer. The event character is specified in the device's + // DCB structure, which is applied to a serial port by using + // the SetCommState function. + // EV_TXEMPTY The last character in the output buffer was sent. + // + // --- Out: none + // --- Returns: If the function succeeds, the return value is nonzero. Otherwise it is zero. + // --- Effect: The SetCommMask function specifies the set of events that can be monitored + // for a particular communications resource. + + BOOL GetCommMask(DWORD& dwEventMask) const; + // --- In: dwEventMask: a reference to a DWORD value to receive the event mask + // --- Out: dwEventMask: this value receives the event mask + // (see COXSerialCommFile::SetCommMask for more information) + // --- Returns: If the function succeeds, the return value is nonzero. Otherwise it is zero. + // --- Effect: none + + BOOL GetCommProperties(LPCOMMPROP lpCommProp) const; + // --- In: lpCommProp: address of communications properties structure + // --- Out: lpCommProp: Pointer to a COMMPROP structure in which the + // communications properties information is returned + // --- Returns: If the function succeeds, the return value is nonzero. Otherwise it is zero. + // --- Effect: The GetCommProperties function returns information from a device driver + // about the configuration settings that are supported by the driver + + UINT GetBytesToRead() const; + // --- In: none + // --- Out: none + // --- Returns: Number of bytes waiting to be read from the COMM port, 0 if none. + // --- Effect: none + + UINT GetBytesToWrite() const; + // --- In: none + // --- Out: none + // --- Returns: Number of bytes waiting to be sent to the COMM port, 0 if none. + // --- Effect: none + +protected: + COXSerialCommException::VALUE GetCommException(COMSTAT& comstat) const; + +private: + +}; + +inline BOOL COXSerialCommFile::IsOpen() const +{ + return GetSafeHandle() != NULL; +} + +inline HANDLE COXSerialCommFile::GetSafeHandle() const +{ + return this == NULL ? NULL : m_hCommDevice; +} + +#endif // __OXSCFILE_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCSTP.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCSTP.H new file mode 100644 index 0000000..01ace3a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSCSTP.H @@ -0,0 +1,112 @@ +// ========================================================================== +// Class Specification : COXSerialCommSetup +// ========================================================================== + +// Header file : OXSCSTP.H + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Is derived from CDialog +// YES Two stage creation (constructor & Initialize()) +// YES Has a message map +// YES Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// COXSerialCommSetup class +// The COXSerialCommSetup is a standard dialog for setting the Serial +// Communication Configuration settings. This dialog can be popped up +// with the DoConfigDialog() function of the COXSerialCommConfig class. + +// Remark: +// + + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXSCSTP_H_ +#define __OXSCSTP_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXSCCFG.H" + +// private header +#include "OXRSERCM.H" + + +///////////////////////////////////////////////////////////////////////////// +class OX_CLASS_DECL COXSerialCommSetup : public CDialog +///////////////////////////////////////////////////////////////////////////// +{ +// Data Members +public: + const CString m_sCommTitle; + COXSerialCommConfig m_config; + + //{{AFX_DATA(COXSerialCommSetup) + enum { IDD = IDD_COMMSETUP }; + CString m_sBaudRate; + CString m_sDataBit; + CString m_sParity; + CString m_sPort; + CString m_sStopBit; + CString m_sFlowControl; + //}}AFX_DATA + + +protected: +private: + +// Member Functions +public: + COXSerialCommSetup(CString sTitle = _T(""), CWnd* pParent = NULL); + // --- In: sTitle: the title of the dialog box (used default title if ignored) + // pParent: parent window + // --- Out: none + // --- Returns: none + // --- Effect: constructs the dialog object + + +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + + // Generated message map functions + //{{AFX_MSG(COXSerialCommSetup) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + CString BaudRateToString(UINT Val); + CString ParityToString(BYTE Val); + CString FlowControlToString(COXSerialCommConfig::EFlowControl eVal); + UINT BaudRateToVal(CString sString); + BYTE ParityToVal(CString sString); + COXSerialCommConfig::EFlowControl FlowControlToVal(CString sString); +private: + +}; +///////////////////////////////////////////////////////////////////////////// + +#endif //__OXSCSTP_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSEH.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSEH.h new file mode 100644 index 0000000..b44b311 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSEH.h @@ -0,0 +1,292 @@ +// ========================================================================== +// Class Specification : COXSEHException +// ========================================================================== + +// Header File : OXSEH.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CException + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is a C++ wrapper around Structured Exception Handling. +// SEH-exceptions that are thrown can now be catched using the +// C++ try - catch statements or by the MFC TRY - CATCH macros + +// Remark: +// Call the function EnableSEHTrapping() to enable this exception wrapper +// All SEH exceptions are from that point onwwards translated to a +// COXSEHException* exception. +// The original exception code can be retrieved by calling the member function +// GetCause() + +// Example + +// COXSEHException::EnableSEHTrapping(); +// TRY +// { +// int x = 1; +// x = x / 0; +// } +// CATCH(COXSEHException, px) +// { +// if (pe->GetCause() == EXCEPTION_INT_DIVIDE_BY_ZERO) +// ::AfxMessageBox(_T("Integer divide by zero trapped with TRY, CATCH")); +// } +// END_CATCH + +// COXSEHException::EnableSEHTrapping(); +// try +// { +// int x = 1; +// x = x / 0; +// } +// catch(COXSEHException* px) +// { +// if (pe->GetCause() == EXCEPTION_INT_DIVIDE_BY_ZERO) +// ::AfxMessageBox(_T("Integer divide by zero trapped with try, catch")); +// px->Delete(); +// } + +// Note that all settings are organized on a per-thread base. So functions such as +// EnableSEHTrapping() will enable trapping in the current thread. +// If you are building a multi-threaded application and you want to trap all +// exceptions, you should call EnableSEHTrapping() from within every thread + +// Prerequisites (necessary conditions): +// This wrapper works only in WIN32 because WIN16 does not support SEH + +///////////////////////////////////////////////////////////////////////////// +#ifndef __SEHEXCPT_H__ +#define __SEHEXCPT_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include // For _set_se_translator + +// If you do not want to trap Floating Point exceptions, define OXSEH_USE_FP as 0 +#ifndef OXSEH_USE_FP +#define OXSEH_USE_FP 1 +#endif //OXSEH_USE_FP + +#if (0 < OXSEH_USE_FP) +#include +#endif // (0 < OXSEH_USE_FP) + + +class OX_CLASS_DECL COXSEHException : public CException +{ +DECLARE_DYNAMIC(COXSEHException) + +// Data members ------------------------------------------------------------- +public: + +protected: + _EXCEPTION_POINTERS* m_pEP; + + typedef void (__cdecl *_se_translator_function)( unsigned int, _EXCEPTION_POINTERS*); + class OX_CLASS_DECL COXSEHState : public CNoTrackObject + { + public: + BOOL m_bSEHTrapping; + BOOL m_bFPTrapping; + unsigned int m_nPreviousFPControl; + unsigned int m_nFPControlMask; + _se_translator_function m_pfPreviousTranslator; + + COXSEHState() + : + m_bSEHTrapping(FALSE), + m_bFPTrapping(FALSE), + m_nPreviousFPControl(0), +#if (0 < OXSEH_USE_FP) + m_nFPControlMask(_EM_ZERODIVIDE | _EM_INVALID | _EM_DENORMAL | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT), +#else + m_nFPControlMask(0), +#endif // (0 < OXSEH_USE_FP) + m_pfPreviousTranslator(0) + { + } + + }; + static CThreadLocal m_pSEHState; + +private: + +// Member functions --------------------------------------------------------- +public: + static void EnableSEHTrapping(BOOL bTrapFP = FALSE); + // --- In : bTrapFP : Whether floating point exceptions should be trapped as well + // --- Out : + // --- Returns : + // --- Effect : Start the mapping of SEH to C++ exceptions; + + static void DisableSEHTrapping(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Stops the mapping of SEH to C++ exceptions; + // EnableSEHTrapping() must have been called previously + + static BOOL IsSEHTrappingEnabled(); + // --- In : + // --- Out : + // --- Returns : Whether the mapping of SEH to C++ exceptions is enabled + // --- Effect : + + static BOOL IsSEHFPTrappingEnabled(); + // --- In : + // --- Out : + // --- Returns : Whether FP exception will be trapped + // --- Effect : + + COXSEHException(_EXCEPTION_POINTERS* pEP = NULL); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + UINT GetCause(); + // --- In : + // --- Out : + // --- Returns : The cause why the exception was thrown. + // It is the code used by SEH (e.g. EXCEPTION_ACCESS_VIOLATION) + // See for possible codes + // --- Effect : + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + + virtual ~COXSEHException(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + static void __cdecl MapSEHToCPPExceptions(UINT uCode, _EXCEPTION_POINTERS* pep); + +private: + +// Message handlers --------------------------------------------------------- + +}; + +class OX_CLASS_DECL COXSEHMemoryException : public COXSEHException +{ +DECLARE_DYNAMIC(COXSEHMemoryException) +// Data members ------------------------------------------------------------- +// Member functions --------------------------------------------------------- +public: + COXSEHMemoryException(_EXCEPTION_POINTERS* pEP = NULL); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + BOOL IsInfoAvailable(); + // --- In : + // --- Out : + // --- Returns : Whether extra information is available + // (Read/Write flag and virtual memory address) + // --- Effect : + + BOOL GetReadWriteFlag(); + // --- In : + // --- Out : + // --- Returns : Whether the exception occurred when trying to read (FALSE) + // or to write (TRUE) to a virtual memory address + // --- Effect : Be sure that IsInfoAvailable() == TRUE + + DWORD GetAddress(); + // --- In : + // --- Out : + // --- Returns : Get the virtual memory address that resulted in an exception + // --- Effect : + // --- Effect : Be sure that IsInfoAvailable() == TRUE + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXSEHMemoryException(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object +}; + +class OX_CLASS_DECL COXSEHMathException : public COXSEHException +{ +DECLARE_DYNAMIC(COXSEHMathException) +// Data members ------------------------------------------------------------- +// Member functions --------------------------------------------------------- +public: + COXSEHMathException(_EXCEPTION_POINTERS* pEP = NULL); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXSEHMathException(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object +}; + +class OX_CLASS_DECL COXSEHSpecialException : public COXSEHException +{ +DECLARE_DYNAMIC(COXSEHSpecialException) +// Data members ------------------------------------------------------------- +// Member functions --------------------------------------------------------- +public: + COXSEHSpecialException(_EXCEPTION_POINTERS* pEP = NULL); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXSEHSpecialException(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.H new file mode 100644 index 0000000..a6405d8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.H @@ -0,0 +1,5 @@ +#include "OXSCFILE.H" +#include "OXSCEXCP.H" +#include "OXSCSTP.H" +#include "OXSCCFG.H" +#include "OXSCFILE.H" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.RC b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.RC new file mode 100644 index 0000000..3e4c8b5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSERCOM.RC @@ -0,0 +1,257 @@ +//Microsoft Developer Studio generated resource script. +// +#ifndef _OXSerCom_RC__ +#define _OXSerCom_RC__ + +#include "OXRSERCM.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 DISCARDABLE +BEGIN + "OXRSERCM.H\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_COMMSETUP DIALOG DISCARDABLE 0, 0, 163, 107 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Serial Comm Setup" +FONT 8, "Helv" +BEGIN + LTEXT "&Port:",-1,6,9,17,8 + COMBOBOX IDC_PORT,45,7,48,50,CBS_DROPDOWNLIST | CBS_HASSTRINGS | + WS_VSCROLL | WS_TABSTOP + LTEXT "&Baud Rate:",-1,6,24,38,8,NOT WS_GROUP + COMBOBOX IDC_BAUDRATE,45,22,48,84,CBS_DROPDOWNLIST | + CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + LTEXT "&Data Bits:",-1,6,39,34,8,NOT WS_GROUP + COMBOBOX IDC_DATABIT,45,37,48,57,CBS_DROPDOWNLIST | + CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + LTEXT "P&arity:",-1,6,54,22,8,NOT WS_GROUP + COMBOBOX IDC_PARITY,45,52,48,57,CBS_DROPDOWNLIST | CBS_HASSTRINGS | + WS_VSCROLL | WS_TABSTOP + LTEXT "&Stop Bits:",-1,6,69,33,8,NOT WS_GROUP + COMBOBOX IDC_STOPBIT,45,67,48,33,CBS_DROPDOWNLIST | + CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "&Ok",IDOK,107,6,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,107,23,50,14 + LTEXT "&Flow Ctrl:",-1,6,84,33,8,NOT WS_GROUP + COMBOBOX IDC_FLOWCONTROL,45,82,48,42,CBS_DROPDOWNLIST | + CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_COMMSETUP DLGINIT +BEGIN + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0031, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0032, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0033, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0034, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0035, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0036, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0037, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0038, + IDC_PORT, 0x403, 6, 0 +0x6f43, 0x206d, 0x0039, + IDC_BAUDRATE, 0x403, 4, 0 +0x3131, 0x0030, + IDC_BAUDRATE, 0x403, 4, 0 +0x3033, 0x0030, + IDC_BAUDRATE, 0x403, 4, 0 +0x3036, 0x0030, + IDC_BAUDRATE, 0x403, 5, 0 +0x3231, 0x3030, "\000" + IDC_BAUDRATE, 0x403, 5, 0 +0x3432, 0x3030, "\000" + IDC_BAUDRATE, 0x403, 5, 0 +0x3834, 0x3030, "\000" + IDC_BAUDRATE, 0x403, 5, 0 +0x3639, 0x3030, "\000" + IDC_BAUDRATE, 0x403, 6, 0 +0x3431, 0x3034, 0x0030, + IDC_BAUDRATE, 0x403, 6, 0 +0x3931, 0x3032, 0x0030, + IDC_BAUDRATE, 0x403, 6, 0 +0x3833, 0x3034, 0x0030, + IDC_BAUDRATE, 0x403, 6, 0 +0x3735, 0x3036, 0x0030, + IDC_BAUDRATE, 0x403, 7, 0 +0x3131, 0x3235, 0x3030, "\000" + IDC_DATABIT, 0x403, 2, 0 +0x0034, + IDC_DATABIT, 0x403, 2, 0 +0x0035, + IDC_DATABIT, 0x403, 2, 0 +0x0036, + IDC_DATABIT, 0x403, 2, 0 +0x0037, + IDC_DATABIT, 0x403, 2, 0 +0x0038, + IDC_PARITY, 0x403, 5, 0 +0x7645, 0x6e65, "\000" + IDC_PARITY, 0x403, 4, 0 +0x644f, 0x0064, + IDC_PARITY, 0x403, 10, 0 +0x6f4e, 0x5020, 0x7261, 0x7469, 0x0079, + IDC_PARITY, 0x403, 5, 0 +0x614d, 0x6b72, "\000" + IDC_PARITY, 0x403, 6, 0 +0x7053, 0x6361, 0x0065, + IDC_STOPBIT, 0x403, 2, 0 +0x0031, + IDC_STOPBIT, 0x403, 2, 0 +0x0032, + IDC_FLOWCONTROL, 0x403, 5, 0 +0x6f4e, 0x656e, "\000" + IDC_FLOWCONTROL, 0x403, 9, 0 +0x6148, 0x6472, 0x6177, 0x6572, "\000" + IDC_FLOWCONTROL, 0x403, 11, 0 +0x6f58, 0x206e, 0x202f, 0x6f58, 0x6666, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DEFAULT_TITLE "General Purpose Comm. Handler" + IDS_MSG_DEFAULT_CONFIG "%s:\nConfiguration file not found.\nDefault Parameters Assumed." + IDS_MSG_BAD_CONFIG "%s:\nError loading the parameters file.\nDefault Parameters Assumed." + IDS_MSG_NO_SAVE "%s:\nError saving the parameters file." + IDS_MSG_NO_PORT_AVAILABLE + "The selected COM port is either not supported\nor is being used by another application.\nPlease select another port." + IDS_MSG_PORT_UNAVAILABLE + "%s:\nFailed to open the communication device.\nThe configurated COM port is either not supported\nor is being used by another application." + IDS_SERIAL_NONAME "Unknown Name" + IDS_SERIAL_NONE "No Error" + IDS_SERIAL_NOT_AVAILABLE + "%1:\nThe selected COM port is either not supported\nor is being used by another application.\nPlease select another port." + IDS_SERIAL_BREAK_DETECT "%1:\nBreak Detect !" + IDS_SERIAL_RX_TIMEOUT "%1:\nRx Timeout !" + IDS_SERIAL_CTS_TIMEOUT "%1:\nClear To Send Timeout !" + IDS_SERIAL_DSR_TIMEOUT "%1:\nData Set Ready Timeout !" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERIAL_CD_TIMEOUT "%1:\nCarrier Detect Timeout !" + IDS_SERIAL_FRAME_ERROR "%1:\nFrame Error !" + IDS_SERIAL_PARITY_ERROR "%1:\nParity Error !" + IDS_SERIAL_OVERRUN_ERROR "%1:\nOverrun Error !" + IDS_SERIAL_RX_QUEUE_OVERFLOW "%1:\nRx Buffer Overflow !" + IDS_SERIAL_TX_QUEUE_FULL "%1:\nTx Buffer Full !" + IDS_SERIAL_WM_QUIT_RECEIVED "%1:\nUnexpected WM_QUIT received !" + IDS_SERIAL_IO_ERROR "%1:\nI/O Error !" + IDS_SERIAL_MODE_ERROR "%1:\nMode Error ! (request mode not supported)" + IDS_SERIAL_UNKNOWN_ERROR "%1:\nUnknown Error !" + IDS_SERIAL_LOST_MESSAGES + "FATAL ERROR!\nThe Windows message queue is full!\nSerial Comm messages lost!\nIncrease the message queue depth." + IDS_DEFAULTFILE "unknown.cfg" + IDS_110 "110" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_300 "300" + IDS_600 "600" + IDS_1200 "1200" + IDS_2400 "2400" + IDS_4800 "4800" + IDS_9600 "9600" + IDS_14400 "14400" + IDS_19200 "19200" + IDS_38400 "38400" + IDS_56000 "56000" + IDS_128000 "128000" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_256000 "256000" + IDS_EVEN "Even" + IDS_ODD "Odd" + IDS_NOPARITY "No Parity" + IDS_MARK "Mark" + IDS_SPACE "Space" + IDS_NONE "None" + IDS_HARDWARE "Hardware" + IDS_XONXOFF "Xon / Xoff" + IDS_NOTIMER_AVAIL "RS232 Driver Internal Error:\nNo timer available to handle the timeout function.\nSolution: close some other application and then restart this one." + IDS_57600 "57600" + IDS_115200 "115200" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +#endif //_OXSerCom_RC__ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.h new file mode 100644 index 0000000..123ae5d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.h @@ -0,0 +1,381 @@ +// ========================================================================== +// Template Specification : COXSPtr +// ========================================================================== + +// Header file : OXSPtr.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Derived from + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions +// (CMemoryException by NULL-pointer dereference) + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class works together with CObject derived classesto provide +// a solution for smart pointers and objects +// All access to the object must be done through its smart pointer + +// Normally construction of the object is done together with the +// smart pointer. So when a smart pointer is constructed it also constructs +// the object +// When you specify NULL as parameter when construcing a smart pointer +// it will not construct an object + +// The lifetime of objects is ruled by reference counting +// When no references to the object exists it will be deleted. +// You can remove the reference to an object explicitely by assigning +// NULL to the smart pointer +// You can also construct a new object explicitely by assigning the special value +// NEW_OBJECT to it. + +// Apart from construction and destruction everything that can be done with a +// normal (dumb) pointer can also be done with a smart pointer + +// Remark: +// The runtime overhead of using a smart pointer instead of a dumb pointer +// are very minimal +// COXSPtr is a class with no base class and no virtual functions +// The size of a smart pointer thus equals the size of its members : +// two pointer (to the object and to the reference count). +// All access functions of COXSPtr are inline and are very short. +// E.g. operator-> just checks whether the pointer is not NULL +// and returns it then +// So computational overhead is minimal too. + +// When you try to dereference a smart pointer that is NULL +// a CMemoryException will be thrown (and in DEBUG the function will ASSERT) + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __OXSPTR_H__ +#define __OXSPTR_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +// Defining ENABLE_SMART_WRAPPER enables the possibility to wrap a smart pointer +// around an existing object. The locking functions are also available then. +// By default this is not defined and thus not enabled +// #define ENABLE_SMART_WRAPPER 1 + +// Defining DISABLE_SMART_DOWNCAST_TEST disnables the runtime test when a +// smart pointer is downcasted (from base class to derived class) +// By default this is not defined and thus enabled +// #define DISABLE_SMART_DOWNCAST_TEST 1 + +// Defining DISABLE_SMART_SERIALIZATION disnables the serialization functionality +// of a smart pointer (and groups) +// By default this is not defined and thus enabled +// #define DISABLE_SMART_SERIALIZATION 1 + +// Defining DISABLE_SMART_CHECK disables the runtime checks during Debug +// These checks include wrapping a smart pointer around an existing object, +// a smart pointer around a steck based object and cyclic graphs. +// By default this is not defined and thus enabled +// #define DISABLE_SMART_CHECK 1 + +// Use special creator object (NEW_OBJECT) that can be used in the +// constructor and assignment operator of a smart pointer +// to construct a new object +class OX_CLASS_DECL COXObjectCreator + { + // This class is only used to mark a special parameter + // during construction or assignment of a smart pointer + // No actual members are needed + }; +extern OX_CLASS_DECL COXObjectCreator NEW_OBJECT; + +template class OX_CLASS_DECL COXSPtr; +#ifndef DISABLE_SMART_SERIALIZATION +template CArchive& AFXAPI operator<<(CArchive& ar, const COXSPtr& pSObj); +template CArchive& AFXAPI operator>>(CArchive& ar, COXSPtr& pSObj); +#endif // DISABLE_SMART_SERIALIZATION + +template class OX_CLASS_DECL COXSPtr +{ +// Data members ------------------------------------------------------------- +public: +protected: + T* m_pSmartObject; + LONG* m_pnReferenceCount; + +private: + +// Member functions --------------------------------------------------------- +public: + COXSPtr(const COXObjectCreator& objCreator = NEW_OBJECT); + // --- In : objCreator : NEW_OBJECT : Creates a new object + // --- Out : + // --- Returns : + // --- Effect : This constructs a smart pointer and it also + // creates the associated object + // This is the default constructor + // The only valid parameter is NEW_OBJECT + +#ifndef ENABLE_SMART_WRAPPER + COXSPtr(const COXObjectCreator* pNull); + // --- In : pNull : NULL + // --- Out : + // --- Returns : + // --- Effect : This constructs a smart NULL pointer + // The only valid parameter is NULL + +#else + + COXSPtr(T* pSObj); + // --- In : pSObj : Pointer to the object + // around which this smart pointer will be created + // or NULL : Makes this a NULL-pointer + // --- Out : + // --- Returns : + // --- Effect : This constructs a smart pointer around an existing + // object or constructs a smart NULL pointer + // The object's lifetime is now decided by the smart pointer + // You should not delete the object directly +#endif // ENABLE_SMART_WRAPPER + + COXSPtr(const COXSPtr& sPtr); + // --- In : sPtr : The smart pointer to be copied + // --- Out : + // --- Returns : + // --- Effect : Copy constructor + + COXSPtr& operator=(const COXSPtr& sPtr); + // --- In : sPtr : A smart pointer + // --- Out : + // --- Returns : + // --- Effect : Assignment operator + + COXSPtr& operator=(const COXObjectCreator& objCreator); + // --- In : objCreator : NEW_OBJECT + // --- Out : + // --- Returns : + // --- Effect : Constructs a new object and assigns it to this smart pointer + // The only valid parameter is NEW_OBJECT + +#ifndef ENABLE_SMART_WRAPPER + COXSPtr& operator=(const COXObjectCreator* pNull); + // --- In : pNull : NULL + // --- Out : + // --- Returns : + // --- Effect : Makes this smart pointer a smart NULL pointer + // The only valid parameter is NULL + +#else + + COXSPtr& operator=(T* pSObj); + // --- In : pSObj : A pointer to the object or NULL + // --- Out : + // --- Returns : + // --- Effect : Assignment operator + // If pSObj == NULL this smart pointer becomes a smart NULL pointer + // The object's lifetime is now decided by the smart pointer + // You should not delete the object directly +#endif // ENABLE_SMART_WRAPPER + + T& operator*() const; + // throw(CMemoryException); + // --- In : + // --- Out : + // --- Returns : The object pointed to + // --- Effect : Dereference operator + + T* operator->() const; + // throw(CMemoryException); + // --- In : + // --- Out : + // --- Returns : Pointer to the object + // --- Effect : Member operator + + operator T*() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Conversion operator + + BOOL operator!() const; + // --- In : + // --- Out : + // --- Returns : Whether this pointer points to NULL (TRUE) or to + // a valid object (FALSE) + // --- Effect : + + BOOL operator==(T* pSObj) const; + // --- In : pSObj : Pointer to a smart element + // --- Out : + // --- Returns : Whether this pointer points to the specified + // object + // --- Effect : + + BOOL operator!=(T* pSObj) const; + // --- In : pSObj : Pointer to a smart element + // --- Out : + // --- Returns : Whether this pointer does not point to the specified + // object + // --- Effect : + +#ifndef DISABLE_SMART_SERIALIZATION + friend CArchive& AFXAPI operator<<(CArchive& ar, const COXSPtr& pSObj); + // --- In : ar : Archive to store the object in + // pSObj : Object to store + // --- Out : + // --- Returns : The archive itself + // --- Effect : This functions serializes the object wrapped by this smart pointer + // Object I/O is pointer based to avoid added construction overhead and + // to support polymorphism + // Use the Serialize member function directly for embedded objects. + + friend CArchive& AFXAPI operator>>(CArchive& ar, COXSPtr& pSObj); + // --- In : ar : Archive to load the object from + // pSObj : Object pointer to load into + // --- Out : + // --- Returns : The archive itself + // --- Effect : This functions serializes the object into this smart pointer + // Object I/O is pointer based to avoid added construction overhead and + // to support polymorphism + // Use the Serialize member function directly for embedded objects. +#endif // DISABLE_SMART_SERIALIZATION + + COXSPtr& PolyAssign(T* pSObj, LONG* pnReferenceCount); + // --- In : pSObj : Pointer to a T or T derived object + // pnReferenceCount : Pointer to its reference count + // --- Out : + // --- Returns : A smart pointer wrapping the object + // --- Effect : Assignment function, internally used for + // polymorphic assignment + // Do not call this function directly, use + // the operator <<= instead + + LONG* GetRefCountAddress() const; + // --- In : + // --- Out : + // --- Returns : The address of the reference count of the object + // or NULL when smart null pointer + // --- Effect : Helper function, internally used for polymorphic assignment + // Do not call this function directly, use + // the operator <<= instead + +#ifdef ENABLE_SMART_WRAPPER + // CAUTION : THE NEXT THREE FUNCTIONS ARE NOT INTENDED FOR NORMAL USE + // THEY DISABLE A LOT OF IMPORTANT FUNCTIONALITY AND + // SHOULD ONLY BE USED IN EXCEPTIONAL CIRCUMSTANCES + + void Lock(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Locks all the smart pointers that point to the object + // this smart pointer points to + // Locking will disable automatic deletion when the + // reference count reaches 0 + + void Unlock(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Unlocks all the smart pointers that point to the object + // this smart pointer points to + // Unlocking will re-enable automatic deletion when the + // reference count reaches 0 + + BOOL IsLocked(); + // --- In : + // --- Out : + // --- Returns : Whether the smart pointer is locked or not + // --- Effect : +#endif // ENABLE_SMART_WRAPPER + +#ifdef _DEBUG + void AssertValid() const; +#endif // _DEBUG + + ~COXSPtr(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : This destructs the pointer object + +protected: + LONG Grab(); + LONG Release(); + +private: + +}; + +template +inline COXSPtr& SmartUpCast(COXSPtr& pBaseObj, const COXSPtr& pObj) + // --- In : pBaseObj : Smart pointer you want to assign to + // pObj : Smart pointer being assigned + // --- Out : + // --- Returns : The smart pointer assigned to + // --- Effect : This is the 'polymorphic assignemnt' operator + // A smart pointer wrapping a T object can be assigned to a + // smart pointer normally wrapping BASE_T object, + // if T* could be assigned to BASE_T* + // This means T must be derived from BASE_T + { + // The next line will generate a compiler error (cannot convert parameter 1 from ...) + // if T (pObj) is not derived from BASE_T (pBaseObj) + return pBaseObj.PolyAssign(pObj, pObj.GetRefCountAddress()); + }; + +template +inline COXSPtr& operator<<=(COXSPtr& pBaseObj, const COXSPtr& pObj) + { + return SmartUpCast(pBaseObj, pObj); + }; + +template +inline COXSPtr& SmartDownCast(COXSPtr& pObj, const COXSPtr& pBaseObj) + // --- In : pObj : Smart pointer you want to assign to + // pBaseObj : Smart pointer being assigned + // --- Out : + // --- Returns : The smart pointer assigned to + // --- Effect : This is the 'cast assignemnt' operator + // A smart pointer wrapping a BASE_T object will be assigned to a + // smart pointer wrapping a T object, + // A runtime check will be performed, to check the validity + // When an incorrect cast is performed a smart NULL pointer is returned + { +#ifndef DISABLE_SMART_DOWNCAST_TEST + // The macro DYNAMIC_DOWNCAST does not work with templates, so we mimic that functionality + // ... Build a (temporary T object) just to get to the runtime class + COXSPtr pDummyObj; + if (pBaseObj != NULL && !pBaseObj->IsKindOf(pDummyObj->GetRuntimeClass())) + { + TRACE(_T("SmartDownCast (Cast assignment) returning smart NULL pointer\n")); + return pObj.PolyAssign(NULL, NULL); + } + else +#endif // DISABLE_SMART_DOWNCAST_TEST + return pObj.PolyAssign((T*)(BASE_T*)pBaseObj, pBaseObj.GetRefCountAddress()); + }; + +template +inline COXSPtr& operator>>=(COXSPtr& pObj, const COXSPtr& pBaseObj) + { + return SmartDownCast(pObj, pBaseObj); + }; + +#include "OXSPtr.inl" + +#endif // __OXSPTR_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.inl b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.inl new file mode 100644 index 0000000..f1eb602 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSPtr.inl @@ -0,0 +1,517 @@ +// ========================================================================== +// Template Implementation : COXSPtr +// ========================================================================== + +// Source file : OXSPtr.inl + +// Source : R.Mortelmans +// Creation Date : 19th December 1995 +// Last Modification : 23rd January 1996 + +// ////////////////////////////////////////////////////////////////////////// +// Definition of static members + +#ifndef new +#define new DEBUG_NEW +#define _REMOVE_DEBUG_NEW +#endif + +#if defined(_DEBUG) && !defined(DISABLE_SMART_CHECK) +#include "OXSWatcher.h" +extern COXSmartWatcher smartWatcher; +// We will use sizeof(*pObj) to get the size of the object pointed to by the smart pointer +// This will not be correct when polymorhic assignment is used, but it's the best we can do +#define REG_PTR_OBJ(pObj) smartWatcher.RegisterPointerAndObject(this, pObj, sizeof(*pObj)) +#define UNREG_OBJ(pObj) smartWatcher.UnRegisterObject(pObj) +#define UNREG_PTR(pObj) smartWatcher.UnRegisterPointer(this, pObj) +#define IS_REG_OBJ(pObj) smartWatcher.IsRegisteredObject(pObj) +#else +#define REG_PTR_OBJ(pObj) +#define UNREG_OBJ(pObj) +#define UNREG_PTR(pObj) +#define IS_REG_OBJ(pObj) (FALSE) +#endif // _DEBUG + +// Use special ASSERT_VALID_SPTR macro to check the validity of a +// smart pointer. Because COXSPtr is not derived from CObject the +// normal ASSERT_VALID does not work + +#ifdef _DEBUG +#define ASSERT_VALID_SPTR(pSPtr) (pSPtr)->AssertValid() +#else +#define ASSERT_VALID_SPTR(pSPtr) +#endif // _DEBUG + +// Data members ------------------------------------------------------------- +// protected: + // T* m_pSmartObject; + // --- Pointer to the object this smart pointer references + // or NULL when the smart pointer does not point to anything + + // LONG* m_pnReferenceCount; + // --- Pointer to the reference count of the object pointed to + // or NULL when the smart pointer does not point to anything + // When the object is locked the reference count is a negative number + +// private: + +// Member functions --------------------------------------------------------- +// public: + +template inline COXSPtr::COXSPtr(const COXObjectCreator& objCreator /* = NEW_OBJECT */) + : + m_pSmartObject(NULL), + m_pnReferenceCount(NULL) + { + UNUSED(objCreator); + ASSERT_VALID_SPTR(this); + // ... May only be used to create a new object + ASSERT(&objCreator == &NEW_OBJECT); + + m_pSmartObject = new T; + m_pnReferenceCount = new LONG(0); + // ... Register new smart pointer (for debugging purposes only) + Grab(); + + ASSERT_VALID_SPTR(this); + } + +#ifndef ENABLE_SMART_WRAPPER +template inline COXSPtr::COXSPtr(const COXObjectCreator* pNull) + : + m_pSmartObject(NULL), + m_pnReferenceCount(NULL) + { + UNUSED(pNull); + // ... May only assign NULL pointer + ASSERT(pNull == NULL); + ASSERT_VALID_SPTR(this); + } + +#else + +template inline COXSPtr::COXSPtr(T* pSObj) + : + m_pSmartObject(pSObj), + m_pnReferenceCount(NULL) + { + // ... May only assign valid object + ASSERT(pSObj == NULL || AfxIsValidAddress(pSObj, sizeof(T))); + + if (pSObj != NULL) + { + m_pnReferenceCount = new LONG(0); + // Make sure this object does not have another smart pointer wrapped + // around it yet : For polymorhic assignemnt use SmartUpCast or operator<<= + ASSERT(!IS_REG_OBJ(m_pSmartObject)); + // ... Register new smart pointer (for debugging purposes only) + Grab(); + } + + ASSERT_VALID_SPTR(this); + } +#endif // ENABLE_SMART_WRAPPER + +template inline COXSPtr::COXSPtr(const COXSPtr& sPtr) + : + m_pSmartObject(sPtr.m_pSmartObject), + m_pnReferenceCount(sPtr.m_pnReferenceCount) + { + ASSERT_VALID_SPTR(&sPtr); + ASSERT_VALID_SPTR(this); + + if (m_pSmartObject != NULL) + { + // ... Should at least have one reference + ASSERT(sPtr.m_pnReferenceCount != NULL); + ASSERT(*sPtr.m_pnReferenceCount != 0); + Grab(); + } + + ASSERT_VALID_SPTR(this); + } + +template inline COXSPtr& COXSPtr::operator=(const COXSPtr& sPtr) + { + ASSERT_VALID_SPTR(this); + ASSERT_VALID_SPTR(&sPtr); + + // ... Make sure that assigning the same smart element (a = a) works too + if (m_pSmartObject != sPtr.m_pSmartObject) + { + if (m_pSmartObject != NULL) + Release(); + m_pSmartObject = sPtr.m_pSmartObject; + m_pnReferenceCount = NULL; + if (m_pSmartObject != NULL) + { + // ... Should at least have one reference + ASSERT(sPtr.m_pnReferenceCount != NULL); + ASSERT(*sPtr.m_pnReferenceCount != 0); + m_pnReferenceCount = sPtr.m_pnReferenceCount; + Grab(); + } + } + + ASSERT_VALID_SPTR(this); + return *this; + } + +template inline COXSPtr& COXSPtr::operator=(const COXObjectCreator& objCreator) + { + ASSERT_VALID_SPTR(this); + // ... May only be used to create a new object + ASSERT(&objCreator == &NEW_OBJECT); + + if (m_pSmartObject != NULL) + Release(); + m_pSmartObject = new T; + m_pnReferenceCount = new LONG(0); + // ... Register new smart pointer (for debugging purposes only) + Grab(); + + ASSERT_VALID_SPTR(this); + return *this; + } + +#ifndef ENABLE_SMART_WRAPPER +template inline COXSPtr& COXSPtr::operator=(const COXObjectCreator* pNull) + { + UNUSED(pNull); + ASSERT_VALID_SPTR(this); + // ... May only assign smart NULL pointer + ASSERT(pNull == NULL); + + if (m_pSmartObject != NULL) + Release(); + m_pSmartObject = NULL; + + ASSERT_VALID_SPTR(this); + return *this; + } + +#else + +template inline COXSPtr& COXSPtr::operator=(T* pSObj) + { + ASSERT_VALID_SPTR(this); + ASSERT(pSObj == NULL || AfxIsValidAddress(pSObj, sizeof(T))); + + // ... Make sure that assigning the same smart element (a = a) works too + if (m_pSmartObject != pSObj) + { + if (m_pSmartObject != NULL) + Release(); + m_pSmartObject = pSObj; + m_pnReferenceCount = NULL; + if (m_pSmartObject != NULL) + { + m_pnReferenceCount = new LONG(0); + // Make sure this object does not have another smart pointer wrapped + // around it yet : For polymorhic assignemnt use SmartUpCast or operator<<= + ASSERT(!IS_REG_OBJ(m_pSmartObject)); + // ... Register new smart pointer (for debugging purposes only) + Grab(); + } + } + + ASSERT_VALID_SPTR(this); + return *this; + } +#endif // ENABLE_SMART_WRAPPER + +template inline T& COXSPtr::operator*() const + { + ASSERT_VALID_SPTR(this); + if (m_pSmartObject == NULL) + { + TRACE(TEXT("COXSPtr::operator* : Trying to dereference a NULL pointer, throwing memory exception\n")); + ASSERT(FALSE); + AfxThrowMemoryException(); + } + return *m_pSmartObject; + } + +template inline T* COXSPtr::operator->() const + { + ASSERT_VALID_SPTR(this); + if (m_pSmartObject == NULL) + { + TRACE(TEXT("COXSPtr::operator-> : Trying to dereference a NULL pointer, throwing memory exception\n")); + ASSERT(FALSE); + AfxThrowMemoryException(); + } + return m_pSmartObject; + } + +template inline COXSPtr::operator T*() const + { + ASSERT_VALID_SPTR(this); + return m_pSmartObject; + } + + +template inline BOOL COXSPtr::operator!() const + { + ASSERT_VALID_SPTR(this); + return (m_pSmartObject == NULL); + } + +template inline BOOL COXSPtr::operator==(T* pSObj) const + { + ASSERT_VALID_SPTR(this); + return (m_pSmartObject == pSObj); + } + +template inline BOOL COXSPtr::operator!=(T* pSObj) const + { + ASSERT_VALID_SPTR(this); + return (m_pSmartObject != pSObj); + } + +#ifndef DISABLE_SMART_SERIALIZATION +template inline CArchive& AFXAPI operator<<(CArchive& ar, const COXSPtr& pSObj) + { + ASSERT_VALID_SPTR(&pSObj); + // Let the object archive itself + ar << pSObj.m_pSmartObject; + return ar; + } + +template inline CArchive& AFXAPI operator>>(CArchive& ar, COXSPtr& pSObj) + { + ASSERT_VALID_SPTR(&pSObj); + T* pObj = NULL; + + // Create an object dynamically when archiving + ar >> pObj; + + // Store the newly read object in this smart pointer + if (pSObj.m_pSmartObject != NULL) + pSObj.Release(); + pSObj.m_pSmartObject = pObj; + pSObj.m_pnReferenceCount = NULL; + + if (pSObj.m_pSmartObject != NULL) + { + pSObj.m_pnReferenceCount = new LONG(0); + // ... Register new smart pointer (for debugging purposes only) + pSObj.Grab(); + } + + ASSERT_VALID_SPTR(&pSObj); + + return ar; + } +#endif // DISABLE_SMART_SERIALIZATION + +template inline COXSPtr& COXSPtr::PolyAssign(T* pSObj, LONG* pnReferenceCount) + { + ASSERT_VALID_SPTR(this); + + // ... May only assign valid object + ASSERT(pSObj == NULL || AfxIsValidAddress(pSObj, sizeof(T))); + ASSERT(pnReferenceCount == NULL || AfxIsValidAddress(pnReferenceCount, sizeof(LONG))); + + // ... Make sure that assigning the same smart element (a = a) works too + if (m_pSmartObject != pSObj) + { + if (m_pSmartObject != NULL) + Release(); + m_pSmartObject = pSObj; + m_pnReferenceCount = NULL; + if (m_pSmartObject != NULL) + { + // ... Should at least have one reference + ASSERT(pnReferenceCount != NULL); + ASSERT(*pnReferenceCount != 0); + m_pnReferenceCount = pnReferenceCount; + Grab(); + } + } + + ASSERT_VALID_SPTR(this); + return *this; + } + +template inline LONG* COXSPtr::GetRefCountAddress() const + { + ASSERT_VALID_SPTR(this); + return m_pnReferenceCount; + } + +#ifdef ENABLE_SMART_WRAPPER +template inline void COXSPtr::Lock() + { + ASSERT_VALID_SPTR(this); +#ifdef _DEBUG + if (m_pSmartObject == NULL) + { + ASSERT(m_pnReferenceCount == NULL); + TRACE(TEXT("COXSPtr::Lock : Trying to lock smart NULL pointer, ignoring\n")); + } +#endif // _DEBUG + // Make reference count negative to mark a locked object + if (m_pnReferenceCount != NULL && 0 < *m_pnReferenceCount) + *m_pnReferenceCount = -*m_pnReferenceCount; + ASSERT_VALID_SPTR(this); + } + +template inline void COXSPtr::Unlock() + { + ASSERT_VALID_SPTR(this); +#ifdef _DEBUG + if (m_pSmartObject == NULL) + { + ASSERT(m_pnReferenceCount == NULL); + TRACE(TEXT("COXSPtr::Unlock : Trying to lock smart NULL pointer, ignoring\n")); + } +#endif // _DEBUG + // Make reference count positive to mark an unlocked object + if (m_pnReferenceCount != NULL && *m_pnReferenceCount < 0) + *m_pnReferenceCount = -*m_pnReferenceCount; + ASSERT_VALID_SPTR(this); + } + +template inline BOOL COXSPtr::IsLocked() + { + ASSERT_VALID_SPTR(this); + return (m_pnReferenceCount != NULL && *m_pnReferenceCount < 0); + } +#endif // ENABLE_SMART_WRAPPER + +#ifdef _DEBUG +template inline void COXSPtr::AssertValid() const + { + ASSERT(this != NULL); + ASSERT(AfxIsValidAddress(this, sizeof(COXSPtr))); + ASSERT(m_pSmartObject == NULL || AfxIsValidAddress(m_pSmartObject, sizeof(T))); + + // Because thee next check has to many exceptions we skip it. +/* +#if defined(_INC_CRTDBG) && !defined(DISABLE_SMART_CHECK) + // ... The next assert will fail if a block of memory was not allocated + // on the local heap. + // NEVER allocate objects for smart pointers on the STACK !!! + // ... Because of polymorphic assignment we use _msize(m_pSmartObject) instead of sizeof(T) + // ... NOTE : This test may also fail if a dynamically linked library (DLL) + // contains a static link to the run-time library. + // ... NOTE : If the object is not derived from CObject it will be allocated + // as a _NORMAL_BLOCK instead of _CLIENT_BLOCK. + // In this case you may recieve an assertion of the Debug Heap CRT library + // (pHead->nBlockUse == nBlockUse). You may savely ignore this assert + ASSERT(m_pSmartObject == NULL || + _CrtIsMemoryBlock((const void *)m_pSmartObject, _msize_dbg(m_pSmartObject, _CLIENT_BLOCK), NULL, NULL, NULL)); +#endif // _INC_CRTDBG +*/ + ASSERT(m_pnReferenceCount == NULL || AfxIsValidAddress(m_pnReferenceCount, sizeof(LONG))); + ASSERT( (m_pSmartObject == NULL && m_pnReferenceCount == NULL) || + (m_pSmartObject != NULL && m_pnReferenceCount != NULL) ); + ASSERT(m_pnReferenceCount == NULL || *m_pnReferenceCount != 0); +#ifndef ENABLE_SMART_WRAPPER + ASSERT(m_pnReferenceCount == NULL || 0 <= *m_pnReferenceCount); +#endif // ENABLE_SMART_WRAPPER + } +#endif // _DEBUG + +template inline COXSPtr::~COXSPtr() + { + ASSERT_VALID_SPTR(this); + if (m_pSmartObject != NULL) + Release(); + } + +// protected: +template inline LONG COXSPtr::Grab() + // --- In : + // --- Out : + // --- Returns : The reference count after Grab() + // --- Effect : Increases the reference count by 1 for not locked objects + // otherwise the reference count is decreased by 1 + { + ASSERT(m_pnReferenceCount != NULL); + REG_PTR_OBJ(m_pSmartObject); +#ifndef ENABLE_SMART_WRAPPER + ASSERT(0 <= *m_pnReferenceCount); + (*m_pnReferenceCount)++; + return *m_pnReferenceCount; +#else + if (0 <= *m_pnReferenceCount) + { + (*m_pnReferenceCount)++; + return *m_pnReferenceCount; + } + else + // Object is locked : use negative reference count + { + (*m_pnReferenceCount)--; + // ... Always return a positive number + return -*m_pnReferenceCount; + } +#endif // ENABLE_SMART_WRAPPER + } + +template inline LONG COXSPtr::Release() + // --- In : + // --- Out : + // --- Returns : The reference count after Release() + // --- Effect : Decreases the reference count of non-locked objects by 1 + // for loked objects the reference count is increased by 1 + // Deletes the object and the reference count when 0 is reached + { + ASSERT_VALID_SPTR(this); + ASSERT(m_pnReferenceCount != NULL); + ASSERT(*m_pnReferenceCount != 0); + + LONG nTempReferenceCount = 0; + if (*m_pnReferenceCount == 1) + { + // ... Unregister smart pointer (for debugging purposes only) + UNREG_OBJ(m_pSmartObject); + // ... Object will be deleted and thus does not have to be reachable + UNREG_PTR(NULL); + delete m_pnReferenceCount; + delete m_pSmartObject; + } +#ifndef ENABLE_SMART_WRAPPER + else + { + ASSERT(0 < *m_pnReferenceCount); + nTempReferenceCount = --(*m_pnReferenceCount); + UNREG_PTR(m_pSmartObject); + } +#else + else if (*m_pnReferenceCount == -1) + { + // Reference count of locked object reached 0, object NOT deleted + // ... Unregister smart pointer (for debugging purposes only) + UNREG_OBJ(m_pSmartObject); + // ... Object will be deleted and thus does not have to be reachable + UNREG_PTR(NULL); + delete m_pnReferenceCount; + } + else + { + if (0 <= *m_pnReferenceCount) + nTempReferenceCount = --(*m_pnReferenceCount); + else + // ... Object is locked : use negative reference count + // ... Always return a positive number + nTempReferenceCount = -(++(*m_pnReferenceCount)); + UNREG_PTR(m_pSmartObject); + } +#endif // ENABLE_SMART_WRAPPER + + m_pnReferenceCount = NULL; + m_pSmartObject = NULL; + return nTempReferenceCount; + } + + +// private: + +#ifdef _REMOVE_DEBUG_NEW +#undef new +#undef _REMOVE_DEBUG_NEW +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSRLZR.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSRLZR.H new file mode 100644 index 0000000..deee6ac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSRLZR.H @@ -0,0 +1,130 @@ +// ========================================================================== +// Class Specification : COXSerializer +// ========================================================================== + +// Header file : OXSRLZR.H + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Is derived from CWnd +// NO Two stage creation (constructor & Initialize()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// COXSerializer class +// BOOL Initialize(LPCTSTR pFileName, CObject* pObject); +// --------------------------------------------------------- +// Set the filename that has to be serialized and its relative object. +// return FALSE only if an invalid string pointer or a CObject derived +// object pointer or a not serializable object is passed . +// Initialize can be called anytime. +// +// BOOL Load(BOOL DisplayException = TRUE); +// ---------------------------------------- +// Loads the object from the archive. The object and the file name +// are to be set by the Initialize function. +// DisplayException=FALSE: No messages by messagebox are displayed +// return FALSE if this object was not initialized or a Exception was +// encounterd. (see FileException,ArchiveException and MemoryException +// public data member to obtains more informations) +// +// BOOL Save(BOOL DisplayException = TRUE); +// ---------------------------------------------------- +// Store the object to the archive. The object and the file name +// are to be set by the Initialize function. +// DisplayException=FALSE: No messages by messagebox are displayed +// return FALSE if this object was not initialized or a Exception was +// encounterd. (see FileException,ArchiveException and MemoryException +// public data member to obtains more informations) + +// Remark: +// + + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __OXSRLZR_H__ +#define __OXSRLZR_H__ + + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXSerializer : public CObject +{ +// Data Members +public: + CFileException m_fileException; // exceptions as data member + CArchiveException m_archiveException; // if you chose not to display exceptions + BOOL m_bMemoryException; // then you can check them via these members + +protected: + BOOL m_bInitialized; // if initialized or not + CString m_sFileName; // the filename of the file to serialize from or to + CObject* m_pObject; // the object to serialize + +private: + +// Member Functions +public: + COXSerializer(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: constructs the object + + virtual ~COXSerializer(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: destructs the object + + BOOL Initialize(CString sFileName, CObject* pObject); + // --- In: sFileName: the filename of the file you want to serialize to or from + // pObject: the parent object you want to serialize + // --- Out: none + // --- Returns: if the initialization was successful + // --- Effect: initialize and checks if the object is serializable + + BOOL Load(BOOL bDisplayException = TRUE); + // --- In: bDisplayException: if the exception is reported + // --- Out: none + // --- Returns: if successful or not + // --- Effect: loads the object (see initialize) from file + + BOOL Save(BOOL bDisplayException = TRUE); + // --- In: bDisplayException: if the exception is reported + // --- Out: none + // --- Returns: if successful or not + // --- Effect: saves the object (see initialize) to file + +protected: + +private: +}; + +#endif // __SERIALIZE_ENH_H__ + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSendMail.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSendMail.h new file mode 100644 index 0000000..6d521b7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXSendMail.h @@ -0,0 +1,227 @@ +// ========================================================================== +// Class Specification : COXSendMail +// ========================================================================== + +// Header file : OXSendMail.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// The COXSendMail class is designed to send Mail from Windows NT service applications +// like the Microsoft IIS server. The class has an extremely simple interface which +// enables you to send mail with only 3 function calls. +// The COXSendMail class is based on our MFC framework for extended MAPI (through +// OLE Messaging). This framework provides 14 powerful classes which allow you to add +// quickly and easily the ability to send and receive mail messages to your MFC application. +// It also enables easy interaction with folders and address books. You can create +// programmable messaging objects. The functionality of these objects can be used to build +// workflow automation solutions. +// You can add different kind of recipients (CC, BCC, distribution lists) and attachments +// (binary, ole-objects) and send it to a MAPI compatible mail system (Exchange, Microsoft +// Mail, Internet Mail, ...). +// + +// Remark: +// If your NT service application logs on with a specific user account you must provide an +// additional privilege for this account: the user-right "Restore Files and Directories" must +// be granted. If the service uses the system account you have to impersonate a specific +// user account if you send a message. For example, if you use the Microsoft IIS to call +// your ISAPI extensions, the IIS will impersonate the anonymous WWW-account ‘USR_COMPUTER_NAME’ +// before calling your extension DLL. +// You have to provide a suitable Profile for that user account. If MAPI logs on to a store or +// transport provider it uses a MAPI profile which defines the providers to use. +// Instantiate a COXSendMail object and call the Logon() function with the profile name and +// password as parameters. Call the CreateMessage() function and add your recipients and attachments +// with the AddRecipient() and AddAttachment() functions. Finally call the SendMessage() function +// and you are done. +// +// *** There are two compile version of this class. One that uses our OXMapi framework (don't define +// the OX_MAPI_DIRECT switch. And one that uses extended MAPI direct (use the #define OX_MAPI_DIRECT +// switch. + + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __SENDMAIL_H__ +#define __SENDMAIL_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +// See the *** remark section for the following switch +//#define OX_MAPI_DIRECT + +#ifndef OX_MAPI_DIRECT +#include "oxmdisp.h" +#else +#include +#endif + + +#define CRecipientArray CArray +#define CAttachmentArray CArray +#define CInternRecipientArray CArray +#define CInternAttachmentArray CArray + +class OX_CLASS_DECL COXSendMail : public CObject +{ +// Data Members +public: + enum ERecipientType + { + rtTO = 1, + rtCC = 2, + rtBCC = 3 + }; + enum EAttachmentType + { + atFileData = 1, + atFileLink = 2, + atOleObject = 3 + }; + class OX_CLASS_DECL CMessage + { + friend COXSendMail; + // Data Members + public: + CString m_sSubject; + CString m_sContent; + + protected: + struct SRecipient + { + CString sName; + ERecipientType eType; + }; + struct SAttachment + { + CString sPath; + EAttachmentType eType; + CString sOleDocument; + }; + CInternRecipientArray m_recipients; + CInternAttachmentArray m_attachments; + + // Member Functions + public: + CMessage(); + virtual ~CMessage(); + void AddRecipient(CString sRecipient, ERecipientType eType); + void AddAttachment(CString sAttachment, EAttachmentType eType, CString sOleDocument = _T("")); + }; + +protected: + + CString m_sMAPIProfile; + +#ifndef OX_MAPI_DIRECT + COXMSession m_objSession; +#endif + +public: + COXSendMail(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual ~COXSendMail(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + + BOOL Initialize(CString sProfileName, CString sPassword = _T("")); + // --- In: sProfileName: name of the profile you want to log on with + // sPassword: optional password to log on + // --- Out: none + // --- Returns: if successful or not + // --- Effect: Logs on to the mail services defined in the given profile + + BOOL IsInitialized(); + // --- In: none + // --- Out: none + // --- Returns: if initialized or not + // --- Effect: none + + void Uninitialize(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: logs off from the mail system and does some cleaning + + CString GetProfile(); + // --- In: none + // --- Out: none + // --- Returns: if initialized the name of the profile + // --- Effect: none + + BOOL SendMessage(CMessage& message); + // --- In: message: the message to send + // --- Out: none + // --- Returns: if message was send successful or not + // --- Effect: sends the message + + static CString GetReturnMsg(int nErr); + // --- In: nErr: the error code returned by MAPI + // --- Out: none + // --- Returns: a description of the error message + // --- Effect: none + +protected: + + +// ****************************************************************** +// this is needed for the Extended MAPI alternative; see the *** remark section +// ****************************************************************** +#ifdef OX_MAPI_DIRECT + BOOL InitializeMessageStore(); + LPMESSAGE ComposeMessage(CMessage& message); + HRESULT AddRecipients(LPMESSAGE pMessage, CRecipientArray& recipients); + HRESULT AddAttachments(LPMESSAGE pMessage, CAttachmentArray& attachments); + LPMAPISESSION m_pMAPISession; + LPADRBOOK m_pAddressBook; + LPENTRYID m_peidDefaultMDB; + ULONG m_cbeidDefaultMDB; + LPMDB m_pDefaultMDB; + LPMAPIFOLDER m_pRootFolder; + LPSTR m_szRecipient; + ULONG m_uLogoffFlags; + LPSTR m_szAttachData; +#endif +// ****************************************************************** + +}; + +#endif // __MAILTO_H__ +// ========================================================================== + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXStaticMenuItem.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXStaticMenuItem.h new file mode 100644 index 0000000..2d8312a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXStaticMenuItem.h @@ -0,0 +1,114 @@ +#if !defined(_OXSSTATICMENUITEM_H__) +#define _OXSSTATICMENUITEM_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +// OXStaticMenuItem.h : header file +// + +#include "OXHookWnd.h" +#include "OXStaticText.h" +#include "OXMainRes.h" + + +///////////////////////////////////////////////////////////////////////////// +// COXStaticMenuItem window + +class OX_CLASS_DECL COXStaticMenuItem : public COXStaticText +{ +// Construction +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + COXStaticMenuItem(); + +// Attributes +public: + +protected: + // flag specifies whether the mouse button is currently pressed in + BOOL m_bPressedDown; + // color of the text when item is active + COLORREF m_clrActive; + // color of the text when item is inactive + COLORREF m_clrNormalText; + + // helper object to spy for mouse entering and leaving events + COXHookWnd m_MouseSpy; + +// Operations +public: + + // --- In : clrText - text color in the inactive (normal) state + // clrBack - background color + // clrActive - text color in the active state + // nFontHeight - text font height + // nFontWeight - text font weight + // sFontName - text font name + // bEmboss - if TRUE then font will be drawn + // with 3D effect + // nHorzAlignment - horizontal alignment of the text + // in the control + // nVertAlignment - vertical alignment of the text + // in the control + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + void SetProperties(COLORREF clrText=::GetSysColor(COLOR_BTNTEXT), + COLORREF clrBack=::GetSysColor(COLOR_BTNFACE), + COLORREF clrActive=RGB(192,0,0), int nFontHeight=12, + int nFontWeight=FW_NORMAL, CString sFontName=_T("MS Sans Serif"), + BOOL bEmboss=TRUE, int nHorzAlignment=OX_ALIGNHORZ_LEFT, + int nVertAlignment=OX_ALIGNVERT_CENTER); + + + inline void SetActiveColor(COLORREF clrActive, BOOL bPrepareNow=FALSE) + { + m_clrActive=clrActive; + if(m_MouseSpy.IsMouseOver()) + PrepareBitmap(bPrepareNow); + } + + inline COLORREF GetActiveColor() const { return m_clrActive; } + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXStaticMenuItem) + protected: + virtual void PreSubclassWindow(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COXStaticMenuItem(); + + // Generated message map functions +protected: + + // helper to notify parent about COXStaticMenuItem events + void NotifyParent(int nEventID); + + //{{AFX_MSG(COXStaticMenuItem) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + afx_msg LONG OnMouseEnter(WPARAM wParam, LPARAM lParam); + afx_msg LONG OnMouseLeave(WPARAM wParam, LPARAM lParam); + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXSSTATICMENUITEM_H__) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXThreadEngine.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXThreadEngine.h new file mode 100644 index 0000000..c9ee100 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXThreadEngine.h @@ -0,0 +1,261 @@ +// ========================================================================== +// Class Specification : COXThreadEngine +// ========================================================================== + +// Header file : OXOwnThread.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Is a Cwnd. +// YES Two stage creation (constructor & Initialize()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Description : +// CThreadEngine class +// You can use the COXThreadEngine for dedicated access to data objects. +// It is a good approach to the design of multithreaded applications to prevent +// as much as possible that specific data is accessed from more than one thread. +// The class provides build-in functionality such as communication techniques +// to communicate to and between different engines. +// Suppose for example that we want to access a CMyOLEObject from more threads. +// *** The first step is to derive a CMyEngine class from the COXThreadEngine base class. +// We add the CMyOLEObject as a protected data member of the engine class. +// Then we overload the pure virtual function "OnExecuteCmd()". This function will +// be called internally by the COXThreadEngine and needs to dispatch the commands +// to the appropriated function. Most of the time this can be implemented with a simply +// switch structure. +// Next, we have to derive a CMyCmd from the COXEngineCmd class to hold your +// command parameters and return values. This class will be used internally to queue +// multiple calls to the engine object. +// Finally we provide a public wrapper function "DoSomething" which queues the CDoSomethingCmd +// commands. We instantiate a CDoSomethingCmd object which we pass on to the PostCommand() +// function. The PostCommand function will wait until the engine has executed the +// command (in this example the command is synchronous). Before we return in this function +// we need to release the command object. This object is reference counted and will +// be destroyed automatically. If we now want to return a data member of the command +// object, we need to copy the value to a temporary variable, because the command object could +// be destroyed after we called the Release() function. +// +// *** Communication techniques: +// + Synchronous, queued: create a COXEngineCmd without optional parameters and +// post it with the PostCommand() function to the COXThreadEngine +// + Synchronous, ASAP: create a COXEngineCmd without optional parameters and +// post it with the PostCommand() function with the bASAP parameter set to TRUE +// + Asynchronous, queued: create a COXEngineCmd with the first parameter set to FALSE +// and post it with the PostCommand() function +// + Asynchronous, ASAP: create a COXEngineCmd with the first parameter set to FALSE +// and post it with the PostCommand() function with the bASAP parameter set to TRUE +// * OPTIONAL for all the techniques, you can use a second parameter in the +// constructor of COXEngineCmd if you want to receive a DONE notification. +// This can be important for the asynchronous techniques. For this: the requesting +// object need to be derived of COXDoneNotifier. You need to pass the this pointer +// of the requesting object to the constructor of COXEngineCmd. Your requesting object +// will now receive a DoneCommand() call after the execution of the command. +// The command itself will be passed on as a parameter. You can use the command type and +// the command index to track the initial request. For this, it is important that you +// catalogue the index of the command after the construction of it. +// Important is that you need to call the Release() function of your command also after +// DONE notification. + +// Remark: +// If you forget the call the Release() function of COXEngineCmd you will end up +// with memory leaks. +// You need to call the COXEngineCmd::Release() function after you posted the command +// with the COXThreadEngine::PostCommand() function. And you need to call the Release() +// function ones again if you implement a "done notification" for your command. +// If the object that requested the command is also running in his own engine, +// it can be necessary to post done notification commands to the queue of your requesting +// engine. In this case you need to use a own command for this "Post" which takes the first +// one, that came with the "done notification" as a data member. In this case you must call +// the Release() function of the first command in the destructor of the second one. + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __OXTHREADENGINE_H_ +#define __OXTHREADENGINE_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + + +class COXEngineCmd; +class COXThreadEngine; + +class OX_CLASS_DECL COXDoneNotifier +{ +friend COXThreadEngine; +protected: + virtual void DoneCommand(COXEngineCmd* pCmd) = 0; +}; + +class OX_CLASS_DECL COXEngineCmd : public CObject +{ + DECLARE_DYNAMIC(COXEngineCmd) + +friend COXThreadEngine; + +// Data Members +public: + DWORD m_dwIndex; // every instantiated command has an unique index + +protected: + COXDoneNotifier* m_pDoneNotifier; // for optional notification after execution + HANDLE m_hFinishedEvent; // use for synchronisation of synchrone commands + LONG m_nRef; // used for reference counting + +private: + static DWORD m_dwGlobalIndex; // internal cyclic counter + +// Member Functions +public: + COXEngineCmd(BOOL bSynchrone = TRUE, COXDoneNotifier* pDoneNotifier = NULL); + // --- In : bSynchrone: defines if the command will be executed synchronous or asynchronous + // pDoneNotifier: will be notified when the execution of the command is done + // --- Out : none + // --- Returns : none + // --- Effect : Contructor of an egine command + + void Release(); + // --- In : none + // --- Out : none + // --- Returns : none + // --- Effect : decreases the reference count and deletes the object if zero + + BOOL IsSynchrone() const; + // --- In : none + // --- Out : none + // --- Returns : if the command is synchronous or not + // --- Effect : + +protected: + virtual ~COXEngineCmd(); + +private: +}; + +class OX_CLASS_DECL COXThreadEngine : public CObject +{ +// Data Members +public: + +protected: + BOOL m_bEndThread; // thread shall terminate during next thread event + BOOL m_bInitialized; // if successfully initialised + CWinThread* m_pThread; // thread pointer of the engines thread + HANDLE m_hCreatedEvent;// event for initialisation synchronisation + HANDLE m_hEndEvent; // event for termination synchronisation + HANDLE m_hThreadEvent; // event when a new command is posted + DWORD m_nTerinationTimeout; + + class OX_CLASS_DECL COXEngineCmdList : public CTypedPtrList + { + // Data Members + public: + protected: + HANDLE m_hMutex; + private: + // Member functions + public: + COXEngineCmdList(); + virtual ~COXEngineCmdList(); + void Lock(); + void Unlock(); + protected: + private: + } m_cmdList; + +private: + +// Member Functions +public: + COXThreadEngine(); + // --- In : none + // --- Out : none + // --- Returns : none + // --- Effect : construction of engine (still need to be initialised) + + virtual ~COXThreadEngine(); + // --- In : none + // --- Out : none + // --- Returns : none + // --- Effect : destructs the engine (need to be terminated first) + + BOOL Initialize(); + // --- In : none + // --- Out : none + // --- Returns : if the engine is successfully initialised + // --- Effect : start the engines thread (as a result + // OnThreadConstruction() will be called) + + BOOL IsInitialized(); + // --- In : none + // --- Out : none + // --- Returns : if the engine is successfully initialised + // --- Effect : + + void Terminate(); + // --- In : none + // --- Out : none + // --- Returns : none + // --- Effect : stops the engines thread (first + // OnThreadDestruction() will be called) + + void PostCommand(COXEngineCmd* pCmd, BOOL bASAP = FALSE); + // --- In : pCmd : the command that will be added to the engines queue + // bASAP : the command will be executed as soon as possible + // when this flag is used the command will be added to + // the head instead of the tail of the queue + // --- Out : none + // --- Returns : none + // --- Effect : the command is added to the engines queue and the engine + // thread is notified by an event + +protected: +///////////////////////////////////////////////////////////////////////////// +// --- this function must be overloaded in your derived engine + virtual void OnExecuteCmd(COXEngineCmd* pCmd) = 0; + // --- In: pCmd: the next command in the queue that should be executed + // --- Out: none + // --- Returns: none + // --- Effect: Up to YOU !!!!! + + // these two function can be overloaded if some specific initialisation and + // uninitialisation is needed + virtual BOOL OnThreadCreation(); + virtual void OnThreadDestruction(); + + // these two function can be overloaded if some specific initialisation and + // uninitialisation is needed + virtual void OnThreadEvent(); + +private: + void Run(); + static UINT StartThread( LPVOID pParam ); + +}; + + +#endif // __OXTHREADENGINE_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXTimer.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXTimer.h new file mode 100644 index 0000000..9870bfc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXTimer.h @@ -0,0 +1,216 @@ +// ========================================================================== +// Class Specification : COXTimer +// ========================================================================== + +// Header file : OXTimer.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class can be used to measure the elapsed time between two moments +// (interval timer) or the trigger a notification when a specified amount +// of time has elapsed (notification timer) + +// Remark: +// All time is expressed in nanoseconds. But it is possible that such an +// accuracy is not met (either by the hardware or by Win32). +// An interval timer can be queried for its resolution + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXTIMER_H__ +#define __OXTIMER_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include + + +class COXTimer; + +// ... Type definition of the callback function +typedef void (CALLBACK OX_TIMER_NOTIFICATION) (COXTimer* pTimer); +typedef OX_TIMER_NOTIFICATION* P_OX_TIMER_NOTIFICATION; + +// Some handy macros to convert between unit, milli, micro and nano +// Nano seconds use a LONGLONG, unit, milli and micro use an int +#define NANO_TO_MICRO(nano) (int)((LONGLONG)(nano) / 1000) +#define NANO_TO_MILLI(nano) (int)((LONGLONG)(nano) / 1000000) +#define NANO_TO_UNIT(nano) (int)((LONGLONG)(nano) / 1000000000) +#define MICRO_TO_NANO(micro) ((LONGLONG)(micro) * 1000) +#define MILLI_TO_NANO(milli) ((LONGLONG)(milli) * 1000000) +#define UNIT_TO_NANO(unit) ((LONGLONG)(unit) * 1000000000) + +class OX_CLASS_DECL COXTimer : public CObject +{ +DECLARE_DYNAMIC(COXTimer); + +// Data members ------------------------------------------------------------- +public: +protected: + LARGE_INTEGER m_startIntervalCounter; + LARGE_INTEGER m_stopIntervalCounter; + static LARGE_INTEGER m_nIntervalTimerFrequency; // -1 = not available, 0 = unknown, other OK + + DWORD m_nUserData; + P_OX_TIMER_NOTIFICATION m_pfNotification; + UINT m_nNonSynchronizedTimerNotifierID; + UINT m_nSynchronizedTimerNotifierID; + BOOL m_bPeriodic; + static CMap m_allTimers; + static CMap m_synchronizedTimers; + +private: + +// Member functions --------------------------------------------------------- +public: + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + COXTimer(); + + // *** Interval Timer functions + + // --- In : + // --- Out : + // --- Returns : Whether it succeeded or not. This function may fail if the platform + // does not support a high accuracy interval timer + // --- Effect : Starts the interval timer + BOOL StartInterval(); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Stops the interval timer + void StopInterval(); + + + // --- In : + // --- Out : + // --- Returns : The elapsed time of the counter in nanoseconds + // There are 1,000,000,000 nanoseconds in 1 second + // If the value is not strictly positive an error has occurred + // --- Effect : This function returns the elapsed time between the last start and stop + // of the counter + LONGLONG GetInterval() const; + + // --- In : + // --- Out : + // --- Returns : The maximum accuracy of an interval timer specified in nanoseconds + // There are 1,000,000,000 nanoseconds in 1 second + // (return -1 in case the platform does not support a + // high accuracy interval timer) + // --- Effect : + static LONGLONG GetIntervalAccuracy(); + + + // *** Notification Timer functions + + // --- In : nDelay : The delay in nanoseconds that must elaps before the + // notificvation function is called + // pfTimerNotification : The notification function to call + // bPeriodic : Whether the function should be called periodically (TRUE) + // or just one (FALSE) + // bSynchronized : Whether the callback should be called from this thread (TRUE) + // or from a seperate dedicated thread (TRUE) + // Using a seperate thread will produce more superieur results + // nAccuracy : The minimum accuracy in nanoseconds. Bu default this is 1% + // of the specified delay with a maximum of 1 second + // --- Out : + // --- Returns : Whether it succeeded or not. + // --- Effect : Starts the timer notifier + // Using this function with a very small delay time (< 10 ms) might + // use so much CPU time that your computers seems to hang + BOOL StartNotifier(LONGLONG nDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL bPeriodic = FALSE, BOOL bSynchronized = FALSE, LONGLONG nAccuracy = -1); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Stops the timer notifier + void StopNotifier(); + + + // --- In : nUserData : The user data to associate with this timer + // --- Out : + // --- Returns : + // --- Effect : + void SetUserData(DWORD nUserData = 0); + + + // --- In : + // --- Out : + // --- Returns : The user data associated with this timer + // --- Effect : + DWORD GetUserData() const; + + +#ifdef _DEBUG + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + virtual void AssertValid() const; + + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. + virtual void Dump(CDumpContext& dc) const; +#endif + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + virtual ~COXTimer(); + +protected: + BOOL StartNonSynchronizedNotifier(int nMilliDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL bPeriodic, int nMilliAccuracy); + static void CALLBACK NonSynchronizedNotificationCallback(UINT uTimerID, UINT uMsg, + DWORD dwUser, DWORD dw1, DWORD dw2); + void OnNonSynchronizedNotification(); + void StopNonSynchronizedNotifier(); + + BOOL StartSynchronizedNotifier(int nMilliDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL bPeriodic, int nMilliAccuracy); + static void CALLBACK SynchronizedNotificationCallback(HWND hWnd, UINT uMsg, + UINT nTimerID, DWORD nTime); + void OnSynchronizedNotification(); + void StopSynchronizedNotifier(); + +private: + +}; + +#endif // __OXTIMER_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.h new file mode 100644 index 0000000..4f1e6b2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.h @@ -0,0 +1,142 @@ +// ========================================================================== +// Class Specification : COXVariant +// ========================================================================== + +// Header file : OXVariant.h + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COleVariant + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is an extension on COleVariant +// It supports the serialization of byte arrays (VT_UI1 | VT_ARRAY) + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXVARIANT_H__ +#define __OXVARIANT_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXVariant : public COleVariant +{ +// Data members ------------------------------------------------------------- +public: +protected: + +private: + +// Member functions --------------------------------------------------------- +public: + + // Constructors + COXVariant(); + + COXVariant(const VARIANT& varSrc); + COXVariant(LPCVARIANT pSrc); + COXVariant(const COleVariant& varSrc); + COXVariant(const COXVariant& varSrc); + + COXVariant(LPCTSTR lpszSrc); + COXVariant(CString& strSrc); + + COXVariant(BYTE nSrc); + COXVariant(short nSrc, VARTYPE vtSrc = VT_I2); + COXVariant(long lSrc, VARTYPE vtSrc = VT_I4); + COXVariant(const COleCurrency& curSrc); + COXVariant(bool bSrc); + + COXVariant(float fltSrc); + COXVariant(double dblSrc); + COXVariant(const COleDateTime& timeSrc); + + COXVariant(const CByteArray& arrSrc); + COXVariant(const CLongBinary& lbSrc); + + COXVariant(LPCTSTR lpszSrc, VARTYPE vtSrc); // Used by DAO classes + + // Assignemnt operators + const COXVariant& operator=(const VARIANT& varSrc); + const COXVariant& operator=(LPCVARIANT pSrc); + const COXVariant& operator=(const COleVariant& varSrc); + const COXVariant& operator=(const COXVariant& varSrc); + + const COXVariant& operator=(const LPCTSTR lpszSrc); + const COXVariant& operator=(const CString& strSrc); + + const COXVariant& operator=(BYTE nSrc); + const COXVariant& operator=(short nSrc); + const COXVariant& operator=(long lSrc); + const COXVariant& operator=(const COleCurrency& curSrc); + const COXVariant& operator=(bool bSrc); + + const COXVariant& operator=(float fltSrc); + const COXVariant& operator=(double dblSrc); + const COXVariant& operator=(const COleDateTime& dateSrc); + + const COXVariant& operator=(const CByteArray& arrSrc); + const COXVariant& operator=(const CLongBinary& lbSrc); + + static void CheckError(SCODE sc); + // --- In : The result an OLE call + // --- Out : + // --- Returns : + // --- Effect : If the result code indicates failure an COleException is thrown + // unless it indicates out of memory, then a CMemoryException is thrown + // When no failure is indicated, this function does nothing + + virtual ~COXVariant(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + +private: + +}; + +// COXVariant diagnostics and serialization +#ifdef _DEBUG +OX_API_DECL CDumpContext& AFXAPI operator<<(CDumpContext& dc, COXVariant varSrc); +#endif +OX_API_DECL CArchive& AFXAPI operator<<(CArchive& ar, COXVariant varSrc); +OX_API_DECL CArchive& AFXAPI operator>>(CArchive& ar, COXVariant& varSrc); + +// special collections functions for COXVariant +OX_API_DECL void AFXAPI ConstructElements(COXVariant* pElements, int nCount); +OX_API_DECL void AFXAPI DestructElements(COXVariant* pElements, int nCount); +OX_API_DECL void AFXAPI CopyElements(COXVariant* pDest, const COXVariant* pSrc, + int nCount); +OX_API_DECL void AFXAPI SerializeElements(CArchive& ar, COXVariant* pElements, + int nCount); +OX_API_DECL void AFXAPI DumpElements(CDumpContext& dc, COXVariant* pElements, + int nCount); + +#include "OXVariant.inl" + +#endif // __OXVARIANT_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.inl b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.inl new file mode 100644 index 0000000..9f30e61 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVariant.inl @@ -0,0 +1,235 @@ +// ========================================================================== +// Inline Implementation : COXVariant +// ========================================================================== + +// Source file : OXVariant.inl + +// Source : R.Mortelmans +// Creation Date : 7th March 1996 +// Last Modification : 7th March 1996 + +// ////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + +// Member functions --------------------------------------------------------- +// public: +inline COXVariant::COXVariant() + : + COleVariant() + { + } + +inline COXVariant::COXVariant(const VARIANT& varSrc) + : + COleVariant(varSrc) + { + } + +inline COXVariant::COXVariant(LPCVARIANT pSrc) + : + COleVariant(pSrc) + { + } + +inline COXVariant::COXVariant(const COleVariant& varSrc) + : + COleVariant(varSrc) + { + } + +inline COXVariant::COXVariant(const COXVariant& varSrc) + : + COleVariant((COleVariant) varSrc) + { + } + +inline COXVariant::COXVariant(LPCTSTR lpszSrc) + : + COleVariant(lpszSrc) + { + } + +inline COXVariant::COXVariant(CString& strSrc) + : + COleVariant(strSrc) + { + } + +inline COXVariant::COXVariant(BYTE nSrc) + : + COleVariant(nSrc) + { + } + +inline COXVariant::COXVariant(short nSrc, VARTYPE vtSrc /* = VT_I2 */) + : + COleVariant(nSrc, vtSrc) + { + } + +inline COXVariant::COXVariant(long lSrc, VARTYPE vtSrc /* = VT_I4 */) + : + COleVariant(lSrc, vtSrc) + { + } + +inline COXVariant::COXVariant(const COleCurrency& curSrc) + : + COleVariant(curSrc) + { + } + +inline COXVariant::COXVariant(bool bSrc) + : + COleVariant((short)bSrc, VT_BOOL) + { + } + +inline COXVariant::COXVariant(float fltSrc) + : + COleVariant(fltSrc) + { + } + +inline COXVariant::COXVariant(double dblSrc) + : + COleVariant(dblSrc) + { + } + +inline COXVariant::COXVariant(const COleDateTime& timeSrc) + : + COleVariant(timeSrc) + { + } + +inline COXVariant::COXVariant(const CByteArray& arrSrc) + : + COleVariant(arrSrc) + { + } + +inline COXVariant::COXVariant(const CLongBinary& lbSrc) + : + COleVariant(lbSrc) + { + } + +inline COXVariant::COXVariant(LPCTSTR lpszSrc, VARTYPE vtSrc) + : + COleVariant(lpszSrc, vtSrc) + { + } + +inline const COXVariant& COXVariant::operator=(const VARIANT& varSrc) + { + COleVariant::operator=(varSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(LPCVARIANT pSrc) + { + COleVariant::operator=(pSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const COXVariant& varSrc) + { + COleVariant::operator=(varSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const COleVariant& varSrc) + { + COleVariant::operator=(varSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const LPCTSTR lpszSrc) + { + COleVariant::operator=(lpszSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const CString& strSrc) + { + COleVariant::operator=(strSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(BYTE nSrc) + { + COleVariant::operator=(nSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(short nSrc) + { + COleVariant::operator=(nSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(long lSrc) + { + COleVariant::operator=(lSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const COleCurrency& curSrc) + { + COleVariant::operator=(curSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(bool bSrc) + { + vt = VT_BOOL; + + if (!bSrc) + V_BOOL(this) = AFX_OLE_FALSE; + else + V_BOOL(this) = AFX_OLE_TRUE; + + return *this; + } + +inline const COXVariant& COXVariant::operator=(float fltSrc) + { + COleVariant::operator=(fltSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(double dblSrc) + { + COleVariant::operator=(dblSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const COleDateTime& dateSrc) + { + COleVariant::operator=(dateSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const CByteArray& arrSrc) + { + COleVariant::operator=(arrSrc); + return *this; + } + +inline const COXVariant& COXVariant::operator=(const CLongBinary& lbSrc) + { + COleVariant::operator=(lbSrc); + return *this; + } + +inline COXVariant::~COXVariant() + { + } + +// protected: +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVerinfo.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVerinfo.h new file mode 100644 index 0000000..1167efe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXVerinfo.h @@ -0,0 +1,150 @@ +// ========================================================================== +// Class Specification : COXVersionInfo +// ========================================================================== + +// Header file : OXVerinfo.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class can be used to retrieve the version information +// from a file 5EXE, DLL, etc) + +// Remark: +// *** + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// +#ifndef __VERINFO_H__ +#define __VERINFO_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXVersionInfo : public CObject +{ +DECLARE_DYNAMIC(COXVersionInfo) + +// Data members ------------------------------------------------------------- +public: + DWORD m_dwSignature; + DWORD m_dwStrucVersion; + DWORD m_dwFileVersionMS; + DWORD m_dwFileVersionLS; + DWORD m_dwProductVersionMS; + DWORD m_dwProductVersionLS; + DWORD m_dwFileFlagsMask; + DWORD m_dwFileFlags; + DWORD m_dwFileOS; + DWORD m_dwFileType; + DWORD m_dwFileSubtype; + DWORD m_dwFileDateMS; + DWORD m_dwFileDateLS; + + DWORD m_dwLanguageCountryID; + CString m_sLanguageCountry; + + CString m_sComments; + CString m_sCompanyName; + CString m_sFileDescription; + CString m_sFileVersion; + CString m_sInternalName; + CString m_sLegalCopyright; + CString m_sLegalTrademarks; + CString m_sOriginalFilename; + CString m_sPrivateBuild; + CString m_sProductName; + CString m_sProductVersion; + CString m_sSpecialBuild; + +protected: + BOOL m_bValid; + + static const DWORD m_dwFixedFileInfoSignature; + static const DWORD m_dwAmericanEnglishTranslation; + static LPCTSTR m_pszTranslation; + static LPCTSTR m_pszFileInfo; + +private: + +// Member functions --------------------------------------------------------- +public: + COXVersionInfo(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + BOOL ReadInfo(LPCTSTR pszPathName); + // --- In : pszPathName : The full path of the file of which the version info is requested + // --- Out : + // --- Returns : Whether version info was found + // --- Effect : Extracts the version info for the file + + BOOL ContainsValidInfo(); + // --- In : + // --- Out : + // --- Returns : Whether this version info contains valid info + // --- Effect : + + CString GetOSName(); + // --- In : + // --- Out : + // --- Returns : A text specifying the Operating System + // --- Effect : + + void Empty(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Clears the object + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + virtual ~COXVersionInfo(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +// Message handlers --------------------------------------------------------- + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.h new file mode 100644 index 0000000..22ddbdb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.h @@ -0,0 +1,153 @@ +// ============================================================================= +// Class Specification : COXWebView +// ============================================================================= +// +// Header file : OXWebView.h +// +// ///////////////////////////////////////////////////////////////////////////// +// +// Properties: +// +// NO Abstract class (does not have any objects) +// YES Derived from CObject +// YES Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// YES Has a message map +// NO Needs a resource (template) +// NO Persistent objects (saveable on disk) +// NO Uses exceptions +// +//////////////////////////////////////////////////////////////////////////////// +// +// Desciption : +// This class provides a simple to use html viewer by leveraging +// Microsoft's Internet Explorer web control. +// +// Remark: +// +// Prerequisites (necessary conditions): +// The user must have Microsoft Internet Explorer v3.x (or higher) +// installed on his machine in order for this class to function. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXWEBVIEW_H__ +#define __OXWEBVIEW_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +#include +#include "OXWebCtrl.h" + + +class OX_CLASS_DECL COXWebView : public CView +{ +// Data members ------------------------------------------------------------- +public: +protected: +private: + static CFont* m_pfontToolbarURL; + static int m_nNumInstantiated; + + CComboBox m_cbxToolbarURL; + COXWebCtrl m_WebCtrl; + CToolBar m_Toolbar; + CToolTipCtrl m_Tooltips; + + BOOL m_bCanGoBack; + BOOL m_bCanGoForward; + BOOL m_bCanRefresh; + +// Member functions --------------------------------------------------------- +public: + virtual ~COXWebView(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + + COXWebCtrl& GetWebControl() + { return m_WebCtrl; } + // --- In : + // --- Out : + // --- Returns : A reference to the web control embedded within the view. + // --- Effect : This method allows the user to get at the web control + // if access is needed. + + CToolBar& GetToolbar() + { return m_Toolbar; } + // --- In : + // --- Out : + // --- Returns : A reference to the toolbar contained within the view. + // --- Effect : This method allows the user to get at the toolbar of + // the web view. + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXWebView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + DECLARE_DYNCREATE(COXWebView) + enum { IDC_WEB_CTRL = 100, IDC_TOOLBAR_URL = 101 }; + + COXWebView(); // create from serialization only + virtual void BeforeNavigate(LPCTSTR pcszURL, long lFlags, LPCTSTR pcszTargetFrameName, VARIANT* PostData, LPCTSTR pcszHeaders, VARIANT_BOOL* pbCancel); + virtual void NavigateComplete(LPCTSTR pcszURL); + virtual void StatusTextChange(LPCTSTR pcszText); + virtual void Quit(VARIANT_BOOL* pbCancel); + virtual void DownloadBegin(); + virtual void NewWindow(LPCTSTR pcszURL, long lFlags, LPCTSTR pcszTargetFrameName, VARIANT* PostData, LPCTSTR pcszHeaders, VARIANT_BOOL* pbCancel); + virtual void ProgressChange(long lProgress, long lProgressMax); + virtual void DownloadComplete(); + virtual void CommandStateChange(long lCmdID, BOOL bEnabled); + virtual void PropertyChange(LPCTSTR pcszProperty); + virtual void TitleChange(LPCTSTR pcszTitle); + virtual void FrameBeforeNavigate(LPCTSTR pcszURL, long lFlags, LPCTSTR pcszTargetFrameName, VARIANT* PostData, LPCTSTR pcszHeaders, VARIANT_BOOL* pbCancel); + virtual void FrameNavigateComplete(LPCTSTR pcszURL); + virtual void FrameNewWindow(LPCTSTR pcszURL, long lFlags, LPCTSTR pcszTargetFrameName, VARIANT* PostData, LPCTSTR pcszHeaders, VARIANT_BOOL* pbCancel); + + //{{AFX_MSG(COXWebView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnWebviewBack(); + afx_msg void OnWebviewForward(); + afx_msg void OnUpdateWebviewBack(CCmdUI* pCmdUI); + afx_msg void OnUpdateWebviewForward(CCmdUI* pCmdUI); + afx_msg void OnWebviewHome(); + afx_msg void OnWebviewSearch(); + afx_msg void OnUpdateWebviewStop(CCmdUI* pCmdUI); + afx_msg void OnWebviewStop(); + afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI); + afx_msg void OnFilePrint(); + afx_msg void OnUpdateWebviewRefresh(CCmdUI* pCmdUI); + afx_msg void OnWebviewRefresh(); + //}}AFX_MSG + afx_msg void OnToolbarURLChange(); + afx_msg BOOL OnTooltipNeedText(UINT id, NMHDR* pNMHDR, LRESULT* pResult); + DECLARE_MESSAGE_MAP() + DECLARE_EVENTSINK_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // __OXWEBVIEW_H__ + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.rc new file mode 100644 index 0000000..d0dfe61 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/OXWebView.rc @@ -0,0 +1,117 @@ +//Microsoft Developer Studio generated resource script. +// +#ifndef _OXWEBVIEW_RC__ +#define _OXWEBVIEW_RC__ +#include "OXMainRes.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 + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_OX_WEBVIEW_BAR TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_OX_WEBVIEW_BACK + BUTTON ID_OX_WEBVIEW_FORWARD + BUTTON ID_OX_WEBVIEW_STOP + BUTTON ID_OX_WEBVIEW_REFRESH + BUTTON ID_OX_WEBVIEW_HOME + BUTTON ID_OX_WEBVIEW_SEARCH +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_OX_WEBVIEW_BAR BITMAP DISCARDABLE "res\\OXWebBar.bmp" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resrc1.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + ID_OX_WEBVIEW_BACK "Navigates to previous page\nBack" + ID_OX_WEBVIEW_STOP "Stops downloading the current page\nStop" + ID_OX_WEBVIEW_HOME "Navigates to your start page\nHome" + ID_OX_WEBVIEW_SEARCH "Navigates to your search page\nSearch" + ID_OX_WEBVIEW_FORWARD "Navigates to next page\nForward" + ID_OX_WEBVIEW_REFRESH "Refreshes the current page\nRefresh" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + +#endif //_OXWEBVIEW_RC__ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/PROGRESS.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/PROGRESS.h new file mode 100644 index 0000000..ba9445b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/PROGRESS.h @@ -0,0 +1,122 @@ +// ========================================================================== +// Class Specification : COXDiffProgress +// ========================================================================== + +// Header file : progress.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates a progress bar that will be used +// when calculating the binary differences +// You can derive from this class and use and own implementation + +// Remark: +// *** + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __PROGRESS_H__ +#define __PROGRESS_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXDiffProgress : public CObject +{ +DECLARE_DYNAMIC(COXDiffProgress) +// Data members ------------------------------------------------------------- +public: + +protected: + LONG m_MinVal; + LONG m_MaxVal; + LONG m_CurPos; + +private: + +// Member functions --------------------------------------------------------- +public: + COXDiffProgress(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + + virtual void Init(LONG minVal, LONG maxVal, LPCTSTR pszMessage); + // --- In : minVal : Minimum value + // maxVal : Maximum value + // pszMessage : Message text to show + // --- Out : + // --- Returns : + // --- Effect : Initializes the progress bar + + virtual BOOL Adjust(LONG curVal); + // --- In : curVal : The new current value + // representing the progress + // --- Out : + // --- Returns : Whether the action may continue (TRUE) + // returning FALSE will abort the action in progress + // --- Effect : Adjust the progress bar + + virtual void Abort(LPCTSTR pszMessage); + // --- In : pszMessage : The abort message + // --- Out : + // --- Returns : + // --- Effect : This function shows a message to the user and + // aborts the program + // This function should never return + + virtual void Close(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Closes the progress bar + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXDiffProgress(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +}; + +#endif // __PROGRESS_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/UTB64Bit.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/UTB64Bit.h new file mode 100644 index 0000000..b1ae65c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/UTB64Bit.h @@ -0,0 +1,43 @@ + + +#if _MSC_VER < 1400 + +#ifndef GetWindowLongPtr +#define GetWindowLongPtr GetWindowLong +#endif + +#ifndef SetWindowLongPtr +#define SetWindowLongPtr SetWindowLong +#endif + +#ifndef GetClassLongPtr +#define GetClassLongPtr GetClassLong +#endif + +#ifndef SetClassLongPtr +#define SetClassLongPtr SetClassLong +#endif + +#ifndef ULongToPtr +#define ULongToPtr(x) x +#endif + +#ifndef LongToPtr +#define LongToPtr(x) x +#endif + +#ifndef PtrToUint +#define PtrToUint(x) x +#endif + +#ifndef PtrToInt +#define PtrToInt(x) x +#endif + +typedef DWORD DWORD_PTR; +typedef LONG LONG_PTR; +typedef ULONG ULONG_PTR; + +// Frustratingly, INT_PTR is an int in VC2005, and a long in VC6, so we can't define it here, the code needs to just handle it elsewhere + +#endif \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMAINFRM.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMAINFRM.h new file mode 100644 index 0000000..cd930ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMAINFRM.h @@ -0,0 +1,151 @@ +// ========================================================================== +// Class Specification : COXMainFrame +// ========================================================================== + +// Header file : xmainfrm.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CMDIFrameWnd + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This is a base class that is used to provide a basic layer +// for all MainFrames that we want to have a bitmap and/or color shown as +// background. Palette handling is provided. It has a subclass for the MDICLIENT. +// There is also some functionality to save and restore its position on +// on the screen + +// Remark: +// *** + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// +#ifndef __X_MAINFRAME_H__ +#define __X_MAINFRAME_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "xmdiclt.h" + +// User message for sending palette changes to this MDI Childs +#define WM_DOREALIZE (WM_USER + 105) + +class OX_CLASS_DECL COXMainFrame : public CMDIFrameWnd +{ +DECLARE_DYNAMIC(COXMainFrame) + +// Data members ------------------------------------------------------------- +public: + WINDOWPLACEMENT* m_pWindowPlacement; + // --- The initial window placement. + // This is used to initially show the window + // The last used placement is persistently saved, and used the next time + // the window is created + +protected: + COXMDIClient m_XMDIClient; + +// Member functions --------------------------------------------------------- +public: + COXMainFrame(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual BOOL CreateClient(LPCREATESTRUCT lpCreateStruct, CMenu* pWindowMenu ); + // --- In : lpCreateStruct : A long pointer to a CREATESTRUCT structure. + // pWindowMenu : A pointer to the Window pop-up menu. + // --- Out : + // --- Returns : Nonzero if successful; otherwise 0. + // --- Effect : Creates the MDI client window that manages the CMDIChildWnd objects. + // This member function should be called if you override the + // OnCreate member function directly. + + void InitialShowWindow(WINDOWPLACEMENT& windowPlacement, UINT nCmdShow); + // --- In : windowPlacement : The placement of the mainframe + // that must be used the show the window initialy + // nCmdShow : + // --- Out : + // --- Returns : + // --- Effect : Show the window in the correct state + + BOOL SetPaletteState(BOOL bBackGround = TRUE); + // --- In : bBackGround : whether the DIB on the MDI CLIENT is treated as + // a background image or foreground for palette selecting + // --- Out : + // --- Returns : successful or not + // --- Effect : Set this parameter always BEFORE you set a new Background + + BOOL GetPaletteState(); + // --- In : + // --- Out : + // --- Returns : whether the DIB on the MDI CLIENT is treated as + // a background or foreground image for palette selecting + // --- Effect : + + BOOL SetWallPaper(COLORREF rgbColor = RGB(192, 192, 192), + EWallOrg eWallOrganisation = WP_Center , COXDIB* pDib = NULL ); + // --- In : rgbColor : The background color of te MDICLIENT + // eWallOrganisation : the organisation of the bitmap on the MDI CLIENT + // pDib : the Device Independant Bitmap to be painted on the MDI CLIENT + // --- Out : + // --- Returns : Succeeded or not + // --- Effect : Paints a DIB with a special organisation and back color on the + // Client area of the MDI Client of this mainframe + + virtual ~COXMainFrame(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Message handlers --------------------------------------------------------- + //{{AFX_MSG(COXMainFrame) + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg BOOL OnQueryNewPalette(); + afx_msg void OnClose(); + afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMDICLT.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMDICLT.h new file mode 100644 index 0000000..ea99ff3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/XMDICLT.h @@ -0,0 +1,146 @@ +// ========================================================================== +// Class Specification : COXMDIClient +// ========================================================================== + +// Header file : xmdiclt.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CWnd + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class implements a MDIClient area. This is the window in the client area +// of the MDiFrameWindow and which manages all the mdichild framewindows +// This implementation takes care of painting a bitmap on its paint DC + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __XMDICLT_H__ +#define __XMDICLT_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "oxdib.h" // Encapsulation of a Device independant bitmap +#include "screen.h" // Enumeration of possible screen organisations + + +// User message for sending palette changes to this MDI CLIENT +#define WM_DOMDICLTREALIZE (WM_USER + 104) + +class OX_CLASS_DECL COXMDIClient : public CWnd +{ +// Data members ------------------------------------------------------------- +public: +protected: + COXDIB m_bmpBackGround; + CPalette* m_pPictPalette; + CBitmap* m_pTotalNewBitmap; + COLORREF m_rgbBkColor; + EWallOrg m_eWallPaperOrganisation; + + CSize m_sizeClient; + CSize m_DibSize; + + HBITMAP m_hOldDestBitmap; + HBITMAP m_hOldSrcBitmap; + CDC m_MemDCSrc; + CDC m_MemDCDest; + + BOOL m_bFirstCreation; + BOOL m_bBackGround; + BOOL m_bWin4; + + static WNDPROC pfnSuper; + +// Member functions --------------------------------------------------------- +public: + COXMDIClient(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual ~COXMDIClient(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + + BOOL SetPaletteState(BOOL bBackGround = TRUE, EPalUpdate ePalUpdate = PU_IntelUpdate); + // --- In : bBackGround : whether the DIB on the MDI CLIENT is treated as + // a background image or foreground for palette selecting + // ePalUpdate : Specifying PU_NoUpdate causes the palette not to be realized now + // Specifying PU_IntelUpdate causes the palette to be realized intelligently + // Specifying PU_ForceUpdate causes the palette to be realized now + // --- Out : + // --- Returns : successful or not + // --- Effect : Set this parameter always BEFORE you set a new Background + + BOOL GetPaletteState(); + // --- In : + // --- Out : + // --- Returns : whether the DIB on the MDI CLIENT is treated as + // a background or foreground image for palette selecting + // --- Effect : + + BOOL SetNewBackGround(COLORREF rgbColor = GetSysColor(COLOR_APPWORKSPACE), + EWallOrg eWallOrganisation = WP_Center , COXDIB* pDib = NULL ); + // --- In : rgbColor : The background color of te MDICLIENT + // eWallOrganisation : the organisation of the bitmap on the MDI CLIENT + // pDib : the Device Independant Bitmap to be painted on the MDI CLIENT + // --- Out : + // --- Returns : Succeeded or not + // --- Effect : Paints a DIB with a special organisation and back color on the + // client area of this MDI client window + + virtual WNDPROC* GetSuperWndProcAddr(); + // --- In : + // --- Out : + // --- Returns : The address in which to store the default WndProc for this class. + // --- Effect : Needed when we subclass a Windows object + + +protected: + BOOL PrepareMemDC(int nWidth, int nHeight); + +// Message handlers --------------------------------------------------------- + // Generated message map functions + //{{AFX_MSG(COXMDIClient) + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + + afx_msg LRESULT OnDoMDICltRealize(WPARAM wParam, LPARAM lParam); // user message + DECLARE_MESSAGE_MAP() +}; + +#endif +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/oxmdisp.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/oxmdisp.h new file mode 100644 index 0000000..9f082f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/include/oxmdisp.h @@ -0,0 +1,1734 @@ +// ========================================================================== +// Class Specification : MAPI Framework +// COXMSession; +// COXMInfoStores; +// COXMInfoStore; +// COXMFolders; +// COXMFolder; +// COXMMessages; +// COXMMessage; +// COXMFields; +// COXMField; +// COXMRecipients; +// COXMRecipient; +// COXMAttachments; +// COXMAttachment; +// COXMAddressEntry; + +// ========================================================================== + +// Header file : oxmdisp.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// These classes encapsulate the OLE Messaging client interface which was originally +// designed to develop powerful Visual Basic Messaging applications. +// The OLE Messaging objects use variants as input and output parameters. +// This is a good solution for Visual Basic, because Visual Basic can automatically +// cast variables. In C++ you have to cast these parameters manually to the correct +// variable types. +// The classes in this framework do this type conversion for you. + +// Remark: +// For a full documentation on these classes we refer to the Microsoft SDK documentation: +// SDK +// Win32 SDK +// Win32 Messaging API (MAPI) +// OLE Messaging Library + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXMDISP_H__ +#define __OXMDISP_H__ + + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +// Predeclarations +class COXMSession; +class COXMInfoStores; +class COXMInfoStore; +class COXMFolders; +class COXMFolder; +class COXMMessages; +class COXMMessage; +class COXMFields; +class COXMField; +class COXMRecipients; +class COXMRecipient; +class COXMAttachments; +class COXMAttachment; +class COXMAddressEntry; + +enum EOXMClass +{ + oxmAddressEntry = 8, + oxmAttachment = 5, + oxmAttachments = 21, + oxmField = 6, + oxmFields = 22, + oxmFolder = 2, + oxmFolders = 18, + oxmInfoStore = 1, + oxmInfoStores = 17, + oxmMsg = 3, + oxmMessages = 19, + oxmRecipient = 4, + oxmRecipients = 20, + oxmSession = 0 +}; + +enum EOXMDisplayType +{ + oxmdtMailUser = 0, + oxmdtDistList = 1, + oxmdtForum = 2, + oxmdtAgent = 3, + oxmdtOrganisation = 4, + oxmdtPrivateDistList = 5, + oxmdtRemoteMailUser = 6 +}; + +enum EOXMRecipientType +{ + oxmrtTo = 1, + oxmrtCc = 2, + oxmrtBcc = 3 +}; + +enum EOXMAttachmentType +{ + oxmatFileData = 1, + oxmatFileLink = 2, + oxmatOleObject = 3 +}; + + +///////////////////////////////////////////////////////////////////////////// +// COXMSession wrapper class + +class OX_CLASS_DECL COXMSession : public COleDispatchDriver +{ +// Member Functions +public: + COXMSession() {} // Calls COleDispatchDriver default constructor + COXMSession(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMSession(const COXMSession& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Session object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + LPUNKNOWN GetMapiobject(); + // --- In: none + // --- Out: none + // --- Returns: an IUnknown pointer to the real Extended MAPI Session (IMAPISession) object. + // --- Effect: none + + void SetMapiobject(LPUNKNOWN pSession); + // --- In: pSession: IUnknown pointer of an Extended MAPI Session (IMAPISession) object + // --- Out: none + // --- Returns: none + // --- Effect: Attaches an IUnknown pointer of an Extended MAPI Session (IMAPISession) object. + + CString GetVersion(); + // --- In: none + // --- Out: none + // --- Returns: the version number of the OLE Messaging Library as a string, for example, "1.00". + // --- Effect: none + + CString GetOperatingSystem(); + // --- In: none + // --- Out: none + // --- Returns: the name and version number of the current operating system. + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the name of the profile logged on to this session. + // --- Effect: none + + COXMAddressEntry GetCurrentUser(); + // --- In: none + // --- Out: none + // --- Returns: the active user as an AddressEntry object. + // --- Effect: none + + COXMFolder GetInbox(); + // --- In: none + // --- Out: none + // --- Returns: a Folder object representing the current user's default Inbox folder. + // --- Effect: none + + COXMFolder GetOutbox(); + // --- In: none + // --- Out: none + // --- Returns: a Folder object representing the current user's default Outbox folder. + // --- Effect: none + + COXMInfoStores GetInfoStores(); + // --- In: none + // --- Out: none + // --- Returns: an InfoStores object representing a collection of available information stores. Each InfoStore object contains a root folder object. + // --- Effect: none + + void Logon(CString sProfileName = _T(""), CString sProfilePassword = _T(""), BOOL bShowDialog = TRUE, BOOL bNewSession = FALSE, HWND hParentWindow = NULL); + // --- In: sProfileName: specifies the user's logon name. To prompt the user to enter a logon name, omit profileName and set showDialog to TRUE. + // sProfilePassword: specifies the user's logon password. + // bShowDialog: If TRUE, displays a logon dialog box. + // bNewSession: Determines whether the application opens a new MAPI session or uses the current shared MAPI session. + // hParentWindow: Specifies the parent window handle for the logon dialog box. A value of 0 (the default) specifies that any dialog box + // displayed is application modal. + // --- Out: none + // --- Returns: none + // --- Effect: The Logon method logs on to the MAPI system. + // --- COleDispatchException: MAPI_E_LOGON_FAILURE if not successful + + void Logoff(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: logs off from the MAPI system. + + COXMInfoStore GetInfoStore(CString sStoreID); + // --- In: specifies the unique identifier of the store to retrieve + // --- Out: none + // --- Returns: if successful an InfoStore object that can be used to + // navigate through both public folders and the user's personal folders. + // If not successful: an COXMInfoStore object with an m_lpDispatch member + // set to NULL + // --- Effect: none + + COXMFolder GetFolder(CString sFolderID, CString sStoreID = _T("")); + // --- In: sFolderId: specifies the unique identifier of the folder. When you provide an empty string, some providers return the root folder. + // sStoreID: specifies the unique identifier of the store. The default value is an empty string, which corresponds to the default store. + // --- Out: none + // --- Returns: if successful a Folder object from a MAPI information store. + // If not successful: an COXMInfoStore object with an m_lpDispatch member + // set to NULL + // --- Effect: none + + COXMMessage GetMessage(CString sMessageID, CString sStoreID = _T("")); + // --- In: sMessageID:specifies the unique identifier of the message. + // sStoreID: specifies the unique identifier of the store. The default value is an empty string, which corresponds to the default store. + // --- Out: none + // --- Returns: if successful a Message object from a MAPI information store. + // If not successful: an COXMInfoStore object with an m_lpDispatch member + // set to NULL + // --- Effect: none + + COXMAddressEntry GetAddressEntry(CString sEntryID); + // --- In: sEntryID: specifies the unique identifier of the address entry. + // --- Out: none + // --- Returns: On successful return, represents the AddressEntry object specified by entryID. + // --- Effect: none + + COXMRecipients AddressBook(LPDISPATCH pRecipients = NULL, + CString sTitle = _T(""), + BOOL bOneAddress = FALSE, + BOOL bForceResolution = TRUE, + LONG nRecipLists = 0, + CString sTOLabel = _T(""), + CString sCCLabel = _T(""), + CString sBCCLabel = _T(""), + HWND hParentWindow = NULL); + // --- In: pRecipients: A Recipients collection object that provides the initial value for the recipient list boxes in the address book. + // sTitle: The title or caption of the address book dialog box. + // bOneAddress: Allows the user to enter or select only one address. + // bForceResolution: If TRUE, attempts to resolve all names before closing the address book. Prompts the user to resolve any ambiguous names. + // nRecipLists: The number of recipient list boxes to display in the address book dialog box: + // 0: no list boxes; 1: To; 2: To and CC; 3: TO, CC and BCC + // sTOLabel:The caption for the button associated with the first list box + // sCCLabel:The caption for the button associated with the second list box + // sBCCLabel:The caption for the button associated with the third list box + // hParentWindow:The parent window handle for the address book dialog box. A value of 0 (the default) specifies that any dialog box displayed is application modal. + // --- Out: none + // --- Returns: The selections are returned in a Recipients collection object. + // --- Effect: The AddressBook method displays the MAPI dialog box that allows the user to select entries from the address book. + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMInfoStores wrapper class + +class OX_CLASS_DECL COXMInfoStores : public COleDispatchDriver +{ +// Member Functions +public: + COXMInfoStores() {} // Calls COleDispatchDriver default constructor + COXMInfoStores(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMInfoStores(const COXMInfoStores& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging InfoStores object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + LONG GetCount(); + // --- In: none + // --- Out: none + // --- Returns: the number of InfoStore objects in the collection. + // --- Effect: none + + COXMInfoStore GetItem(LONG nItem); + // --- In: nItem: the index + // --- Out: none + // --- Returns: a single item from this collection. + // --- Effect: none +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMInfoStore wrapper class + +class OX_CLASS_DECL COXMInfoStore : public COleDispatchDriver +{ +// Member Functions +public: + COXMInfoStore() {} // Calls COleDispatchDriver default constructor + COXMInfoStore(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMInfoStore(const COXMInfoStore& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging InfoStore object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMInfoStores GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the collection this store belongs to + // --- Effect: none + + LONG GetIndex(); + // --- In: none + // --- Out: none + // --- Returns: the index number for the InfoStore object within the parent InfoStores collection. + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the name of the InfoStore object as a string. Read-only. The string "Public Folders" is the name of the InfoStore object that contains the public folders. + // --- Effect: none + + CString GetId(); + // --- In: none + // --- Out: none + // --- Returns: the unique identifier of this InfoStore object as a string. + // --- Effect: none + + CString GetProviderName(); + // --- In: none + // --- Out: none + // --- Returns: the name of the InfoStore provider as a string. + // --- Effect: none + + COXMFolder GetRootFolder(); + // --- In: none + // --- Out: none + // --- Returns: a folder object representing the root of the IPM tree for this InfoStore object. + // --- Effect: none + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMFolder wrapper class + +class OX_CLASS_DECL COXMFolder : public COleDispatchDriver +{ +// Member Functions +public: + COXMFolder() {} // Calls COleDispatchDriver default constructor + COXMFolder(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMFolder(const COXMFolder& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Folder object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + LPDISPATCH GetParent(); + // --- In: none + // --- Out: none + // --- Returns: The Parent property returns the parent of the object. + // An Inbox, Outbox and Root folder return a Session Object + // Other Folders return a Folders collection + // --- Effect: none + + LPUNKNOWN GetMapiobject(); + // --- In: none + // --- Out: none + // --- Returns: returns an IUnknown pointer to the real Extended MAPI Folder (IMAPIFolder) object. + // --- Effect: + + void SetMapiobject(LPUNKNOWN pSession); + // --- In: pSession: an IUnknown pointer to the real Extended MAPI Folder (IMAPIFolder) object. + // --- Out: none + // --- Returns: none + // --- Effect: Attaches an IUnknown pointer of an Extended MAPI Folder (IMAPIFolder) object. + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the name of the Folder object as a string. + // --- Effect: none + + void SetName(CString sName); + // --- In: none + // --- Out: none + // --- Returns: the name of the Folder object as a string. + // --- Effect: none + + CString GetId(); + // --- In: none + // --- Out: none + // --- Returns: the unique identifier of this Folder object as a string. + // --- Effect: none + + CString GetFolderID(); + // --- In: none + // --- Out: none + // --- Returns: the unique identifier of this subfolder's parent folder as a string. + // --- Effect: none + + CString GetStoreID(); + // --- In: none + // --- Out: none + // --- Returns: the identifier of the Store object in which this Folder object resides. + // --- Effect: none + + COXMFolders GetFolders(); + // --- In: none + // --- Out: none + // --- Returns: a collection of subfolders within the parent folder. + // --- Effect: none + + COXMMessages GetMessages(); + // --- In: none + // --- Out: none + // --- Returns: a Messages collection object within the folder. + // --- Effect: none + + COXMFields GetFields(); + // --- In: none + // --- Out: none + // --- Returns: a single field (a Field object) or a collection of fields (a Fields collection object) of the Folder object. + // --- Effect: none + + void Update(BOOL bMakePermanent = TRUE, BOOL bRrefreshObject = FALSE); + // --- In: bMakePermanent: TRUE indicates that the property cache is flushed and all changes are committed in the underlying store. + // FALSE indicates that the property cache is flushed and not committed to the store. + // bRrefreshObject: TRUE indicates that the property cache is reloaded from the values in the underlying store. + // FALSE indicates that the property cache is not reloaded. + // --- Out: none + // --- Returns: none + // --- Effect: Saves the folder in the MAPI system. + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMFolders wrapper class + +class OX_CLASS_DECL COXMFolders : public COleDispatchDriver +{ +// Member Functions +public: + COXMFolders() {} // Calls COleDispatchDriver default constructor + COXMFolders(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMFolders(const COXMFolders& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Folders object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMFolder GetParent(); + // --- In: none + // --- Out: none + // --- Returns: a Folder object + // --- Effect: none + + COXMFolder GetFirst(); + // --- In: none + // --- Out: none + // --- Returns: the first object in the Folders collection. + // Returns an object witch a m_lpDispatch member set to NULL if no first object exists. + // --- Effect: increments the internal item pointer + + COXMFolder GetNext(); + // --- In: none + // --- Out: none + // --- Returns: the first object in the Folders collection. + // Returns an object with a m_lpDispatch member set to NULL if no first object exists. + // --- Effect: increments the internal item pointer + + COXMFolder GetLast(); + // --- In: none + // --- Out: none + // --- Returns: the last object in the Folders collection. + // Returns an object with a m_lpDispatch member set to NULL if no last object exists. + // --- Effect: none + + COXMFolder GetPrevious(); + // --- In: none + // --- Out: none + // --- Returns: the first object in the Folders collection. + // Returns an object witch a m_lpDispatch member set to NULL if no first object exists. + // --- Effect: decrements the internal item pointer + +}; +///////////////////////////////////////////////////////////////////////////// +// COXMMessages wrapper class + +class OX_CLASS_DECL COXMMessages : public COleDispatchDriver +{ +// Member Functions +public: + COXMMessages() {} // Calls COleDispatchDriver default constructor + COXMMessages(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMMessages(const COXMMessages& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Messages object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMFolder GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object. + // --- Effect: none + + COXMMessage Add(CString sSubject = _T(""), CString sText = _T(""), CString sType = _T(""), LONG nImportance=1); + // --- In: sSubject: The subject of the message. + // sText: The body text of the message. + // sType: The message class of the message. When ommited type is IPM.Note. + // nImportance: 0: Low priority; 1: Normal priority (default); 2: High priority + // --- Out: none + // --- Returns: a new created Message object + // --- Effect: creates and returns a new Message object in the Messages collection + + void Delete(BOOL bSubFolders = TRUE); + // --- In: bSubFolders: if TRUE: deletes all subfolders too + // --- Out: none + // --- Returns: none + // --- Effect: deletes all messages in the collection. + + void Sort(LONG nSortOrder); + // --- In: nSortOrder: 0: No sort; 1: Ascending; 2: Descending + // --- Out: none + // --- Returns: none + // --- Effect: sorts the messages in the collection according to the specified sort order + + COXMMessage GetFirst(CString sFilter = _T("")); + // --- In: sFilter: Specifies the message class of the object, such as the default value, IPM.Note (if ommitted). + // Corresponds to the Type property of the Message object. + // --- Out: none + // --- Returns: the first Message object in the collection. + // --- Effect: increments the internal item pointer + + COXMMessage GetNext(); + // --- In: none + // --- Out: none + // --- Returns: The next object in the Messages collection. Nothing if no next object exists. + // --- Effect: increments the internal item pointer + + COXMMessage GetLast(CString sFilter = _T("")); + // --- In: sFilter: Specifies the message class of the object, such as the default value, IPM.Note (if ommitted). + // Corresponds to the Type property of the Message object. + // --- Out: none + // --- Returns: the last Message object in the collection. + // --- Effect: remembers the filter + + COXMMessage GetPrevious(); + // --- In: none + // --- Out: none + // --- Returns: The previous object in the collection. Nothing if no previous object exists. + // --- Effect: decrements the internal item pointer + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMMessage wrapper class + +class OX_CLASS_DECL COXMMessage : public COleDispatchDriver +{ +// Member Functions +public: + COXMMessage() {} // Calls COleDispatchDriver default constructor + COXMMessage(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMMessage(const COXMMessage& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Session object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMMessages GetParent(); + // --- In: none + // --- Out: none + // --- Returns: The parent of the object which is the messages collection. + // --- Effect: none + + LPUNKNOWN GetMapiobject(); + // --- In: none + // --- Out: none + // --- Returns: an IUnknown pointer to the real Extended MAPI Session (IMAPISession) object. + // --- Effect: none + + void SetMapiobject(LPUNKNOWN pSession); + // --- In: pSession: IUnknown pointer of an Extended MAPI Session (IMAPISession) object + // --- Out: none + // --- Returns: none + // --- Effect: Attaches an IUnknown pointer of an Extended MAPI Session (IMAPISession) object. + + CString GetId(); + // --- In: none + // --- Out: none + // --- Returns: the unique ID of the object as a string. + // --- Effect: none + + CString GetFolderID(); + // --- In: none + // --- Out: none + // --- Returns: the unique ID of the folder in which the message resides. + // --- Effect: none + + CString GetStoreID(); + // --- In: none + // --- Out: none + // --- Returns: The unique identifier for the information store that contains this message. + // --- Effect: none + + CString GetType(); + // --- In: none + // --- Out: none + // --- Returns: the MAPI message class for the message. + // --- Effect: none + + void SetType(CString sType); + // --- In: the MAPI message class for the message. + // --- Out: none + // --- Returns: none + // --- Effect: sets the MAPI message class for the message. + + LONG GetSize(); + // --- In: none + // --- Out: none + // --- Returns: The approximate size in bytes of the message. + // --- Effect: none + + LONG GetImportance(); + // --- In: none + // --- Out: none + // --- Returns: the importance of the message as one of mapiNormal (the default), mapiLow, or mapiHigh. + // --- Effect: none + + void SetImportance(LONG); + // --- In: the importancy of the message. + // --- Out: none + // --- Returns: none + // --- Effect: sets the importance of the message as one of mapiNormal (the default), mapiLow, or mapiHigh. + + CString GetSubject(); + // --- In: none + // --- Out: none + // --- Returns: Returns the subject of the message as a string. + // --- Effect: none + + void SetSubject(CString); + // --- In: the subject of the message as a string. + // --- Out: none + // --- Returns: none + // --- Effect: sets the subject of the message as a string. + + COXMAddressEntry GetSender(); + // --- In: none + // --- Out: none + // --- Returns: the originator or original author of a message as an AddressEntry object. + // --- Effect: none + + COleDateTime GetTimeSent(); + // --- In: none + // --- Out: none + // --- Returns: the date and time the message was sent as a vbDate variant data type. + // --- Effect: none + + void SetTimeSent(COleDateTime); + // --- In: the date and time the message was sent + // --- Out: none + // --- Returns: none + // --- Effect: Sets the date and time the message was sent as a vbDate variant data type. + + COleDateTime GetTimeReceived(); + // --- In: none + // --- Out: none + // --- Returns: the date and time the message was received as a vbDate variant data type. + // --- Effect: none + + void SetTimeReceived(COleDateTime); + // --- In: the date and time the message was received. + // --- Out: none + // --- Returns: none + // --- Effect: Sets the date and time the message was received as a vbDate variant data type. + + CString GetText(); + // --- In: none + // --- Out: none + // --- Returns: the body text of the message as a string. + // --- Effect: none + + void SetText(CString); + // --- In: the body text of the message. + // --- Out: none + // --- Returns: none + // --- Effect: sets the body text of the message as a string. + + BOOL GetSent(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if the message has been sent through the MAPI system. + // --- Effect: none + + void SetSent(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags the message that it has been sent or not. + + BOOL GetSubmitted(); + // --- In: none + // --- Out: none + // --- Returns: TRUE when the message has been submitted. + // --- Effect: none + + void SetSubmitted(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags the message that has been submitted or not. + + BOOL GetUnread(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if the message has not been read by the current user. + // --- Effect: none + + void SetUnread(BOOL ); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags the message that has not been read by the current user, or not. + + BOOL GetSigned(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if the message has been tagged with a digital signature. + // --- Effect: none + + void SetSigned(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags the message that has been tagged with a digital signature, or not. + + BOOL GetEncrypted(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if the message has been encrypted. + // --- Effect: none + + void SetEncrypted(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags the message that has been encrypted, or not. + + BOOL GetReadReceipt(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if a read-receipt notification message is requested. + // --- Effect: none + + void SetReadReceipt(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags that a read-receipt notification message is requested, or not. + + BOOL GetDeliveryReceipt(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if a delivery-receipt notification message is requested. + // --- Effect: none + + void SetDeliveryReceipt(BOOL); + // --- In: TRUE or FALSE + // --- Out: none + // --- Returns: none + // --- Effect: flags that a delivery-receipt notification message is requested, or not. + + CString GetConversationIndex(); + // --- In: none + // --- Out: none + // --- Returns: the index to the conversation thread of the message. + // --- Effect: none + + void SetConversationIndex(CString); + // --- In: index to the conversation thread of the message + // --- Out: none + // --- Returns: none + // --- Effect: sets the index to the conversation thread of the message. + + CString GetConversationTopic(); + // --- In: none + // --- Out: none + // --- Returns: the name of the conversation thread. + // --- Effect: none + + void SetConversationTopic(CString); + // --- In: name of the conversation thread. + // --- Out: none + // --- Returns: none + // --- Effect: specifies the name of the conversation thread. + + COXMFields GetFields(); + // --- In: none + // --- Out: none + // --- Returns: a single field (a Field object) or a collection of fields (a Fields collection object) of the Message object. + // --- Effect: none + + COXMRecipients GetRecipients(); + // --- In: none + // --- Out: none + // --- Returns: a single Recipient object or a Recipients collection object. + // --- Effect: none + + COXMAttachments GetAttachments(); + // --- In: none + // --- Out: none + // --- Returns: a single Attachment object or an Attachments collection. + // --- Effect: none + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the Message object. + + void Update(BOOL bMakePermanent = TRUE, BOOL bRefreshObject = FALSE); + // --- In: bMakePermanent: TRUE indicates that the property cache is flushed and all changes are committed to the underlying store. + // FALSE indicates that the property cache is flushed and not committed to the store. + // bRefreshObject: TRUE indicates that the property cache is reloaded from the values in the underlying store. + // FALSE indicates that the property cache is not reloaded. + // --- Out: none + // --- Returns: none + // --- Effect: Saves the message in the MAPI system. + + void Send(BOOL bSaveCopy = TRUE, BOOL bShowDialog = FALSE, HWND hParentWindow = NULL); + // --- In: bSaveCopy: Saves a copy of the Message in a user folder, such as the Sent Messages folder. + // bShowDialog: Displays a Send Message dialog box where the user can change the message contents or recipients. + // hParentWindow: The parent window handle for the Send Message dialog box. + // A value of NULL (the default) specifies that any dialog box displayed is application-modal. + // --- Out: none + // --- Returns: none + // --- Effect: Sends the message to the recipients via the MAPI system. + + void Options(HWND hParentWindow = NULL); + // --- In: hParentWindow: The parent window handle for the options dialog box. + // A value of NULL (the default) specifies an application-modal dialog box. + // --- Out: none + // --- Returns: none + // --- Effect: Displays a message options dialog box where the user can change the submission options for a message. + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMFields wrapper class + +class OX_CLASS_DECL COXMFields : public COleDispatchDriver +{ +// Member Functions +public: + COXMFields() {} // Calls COleDispatchDriver default constructor + COXMFields(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMFields(const COXMFields& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Fields object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + LPDISPATCH GetParent(); + // --- In: none + // --- Out: none + // --- Returns: The parent of the object (Message or Folder object). + // --- Effect: none + + LONG GetCount(); + // --- In: none + // --- Out: none + // --- Returns: The number of Field objects in the collection. + // --- Effect: none + + COXMField GetItem(COleVariant vItem, CString sPropSetID = _T("")); + // --- In: vItem: + short -> index within collection + // + LONG -> property tag value for the MAPI property to be retrieved + // + string -> Specifies the name of the user-defined property + // sPropSetID: Contains the unique identifier for the property set, represented as a string + // of hexadecimal characters. When propsetID is not supplied, the property set used for + // the access is the default property set value set by this collection's SetNamespace + // method, or the initial default property set value, PS_PUBLIC_STRINGS. + // --- Out: none + // --- Returns: a single item from a collection. + // --- Effect: none + + void SetNamespace(CString sPropsetID); + // --- In: sPropsetID: Contains a unique identifier that identifies the property set, + // represented as a string of hexadecimal characters. The PropsetID + // identifies the property set to be used for subsequent property accesses + // using the Field object and Fields collection. An empty string resets + // the default to the property set PS_PUBLIC_STRINGS. + // --- Out: none + // --- Returns: none + // --- Effect: Selects the property set that is to be used for subsequent property + // accesses using the Add method and Item property. + + COXMField Add(CString sName, COleVariant value, CString sPropsetID = _T("")); + // --- In: sName: the name of the new field object + // value: the value of the field. There are limited number of supported types: + // VT_NULL, VT_I2, VT_I4, VT_R4, VT_R8, VT_CY, VT_DATE, VT_BSTR, + // VT_BOOL, VT_UNKNOWN, VT_BLOB + // --- Out: none + // --- Return: The new added field object + // --- Effect: Creates a new Field object in the Fields collection. + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: Deletes all user-defined fields of this collection object. +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMField wrapper class + +class OX_CLASS_DECL COXMField : public COleDispatchDriver +{ +// Member Functions + public: + COXMField() {} // Calls COleDispatchDriver default constructor + COXMField(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMField(const COXMField& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Field object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMFields GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object which is the collection object. + // --- Effect: none + + LONG GetIndex(); + // --- In: none + // --- Out: none + // --- Returns: the index number of this Field object within the Fields collection. + // --- Effect: none + + LONG GetType(); + // --- In: none + // --- Out: none + // --- Returns: the variant data type of the Field object. + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the name of the field as a string. + // --- Effect: none + + LONG GetId(); + // --- In: none + // --- Out: none + // --- Returns: the unique ID of the object as a long integer. + // --- Effect: none + + COleVariant GetValue(); + // --- In: none + // --- Out: none + // --- Returns: the value of the Field object. + // --- Effect: none + + void SetValue(COleVariant); + // --- In: value of the Field object. + // --- Out: none + // --- Returns: none + // --- Effect: sets value of the Field object. + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the user-defined or optional Field object + + void ReadFromFile(CString sPath); + // --- In: sPath: The full path and file name to read + // --- Out: none + // --- Returns: none + // --- Effect: loads the value of a string or binary field from the specified file + + void WriteToFile(CString sPath); + // --- In: sPath: The full path and file name to read + // --- Out: none + // --- Returns: none + // --- Effect: saves the field value to a file in the file system +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMRecipients wrapper class + +class OX_CLASS_DECL COXMRecipients : public COleDispatchDriver +{ +// member Functions +public: + COXMRecipients() {} // Calls COleDispatchDriver default constructor + COXMRecipients(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMRecipients(const COXMRecipients& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Recipients object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMFolder GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object which is a COXMFolder object. + // --- Effect: none + + COXMRecipient GetItem(LONG nIndex); + // --- In: nIndex: the index within the collection + // --- Out: none + // --- Returns: a single Recipient from the collection. + // --- Effect: none + + LONG GetCount(); + // --- In: none + // --- Out: none + // --- Returns: the number of Recipient objects in the collection. + // --- Effect: none + + BOOL GetResolved(); + // --- In: none + // --- Out: none + // --- Returns: TRUE if all of the recipients in the collection are resolved. + // --- Effect: none + + COXMRecipient Add(CString sName = _T(""), CString sAddress = _T(""), EOXMRecipientType eType = oxmrtTo, CString sEntryID = _T("")); + // --- In: sName: The display name of the recipient. + // sAddress: The address of the recipient. + // eType: oxmrtTo, oxmrtCc or oxmrtBcc + // sEntryID: The identifier of a valid AddressEntry object for this recipient. + // When present, the other parameters are not used. When not present, + // the method uses the name, address, and type parameters to determine the recipient. + // --- Out: none + // --- Returns: represents the new Recipient object added to the collection + // --- Effect: creates a new Recipient object in the Recipients collection + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes all Recipients in the collection + + void Resolve(BOOL bShowDialog = TRUE); + // --- In: bShowDialog: if dialog should be shown or not + // --- Out: none + // --- Returns: none + // --- Effect: searches the Recipients collection to resolve all names +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMRecipient wrapper class + +class OX_CLASS_DECL COXMRecipient : public COleDispatchDriver +{ +public: + COXMRecipient() {} // Calls COleDispatchDriver default constructor + COXMRecipient(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMRecipient(const COXMRecipient& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Recipient object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMRecipients GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object. + // --- Effect: none + + LONG GetIndex(); + // --- In: none + // --- Out: none + // --- Returns: the index number of this Recipient object within the Recipients collection. + // --- Effect: none + + EOXMDisplayType GetDisplayType(); + // --- In: none + // --- Out: none + // --- Returns: Identifies the recipient type. Enables special processing based on the type, + // such as displaying an icon associated with that type. + // oxmdtMailUser (0) Local user + // oxmdtDistList (1) Distribution list + // oxmdtForum (2) Public folder + // oxmdtAgent (3) Agent + // oxmdtOrganisation (4) Organization + // oxmdtPrivateDistList (5) Private distribution list + // oxmdtRemoteMailUser (6) Remote user + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the name of this Recipient object. + // --- Effect: none + + void SetName(CString); + // --- In: the name of this Recipient object. + // --- Out: none + // --- Returns: none + // --- Effect: sets the name of this Recipient object. + + EOXMRecipientType GetType(); + // --- In: none + // --- Out: none + // --- Returns: the type of the Recipient object + // oxmrtTo (1) The recipient is on the To: line + // oxmrtCc (2) The recipient is on the Cc: line. + // oxmrtBcc (3)The recipient is on the Bcc: line. + // --- Effect: none + + void SetType(EOXMRecipientType); + // --- In: the type of the Recipient object + // oxmrtTo (1) The recipient is on the To: line + // oxmrtCc (2) The recipient is on the Cc: line. + // oxmrtBcc (3)The recipient is on the Bcc: line. + // --- Out: none + // --- Returns: none + // --- Effect: Sets the type of the Recipient object + + CString GetAddress(); + // --- In: none + // --- Out: none + // --- Returns: the full address for this recipient. + // --- Effect: none + + void SetAddress(CString); + // --- In: the full address for this recipient. + // --- Out: none + // --- Returns: none + // --- Effect: sets the full address for this recipient. + + COXMAddressEntry GetAddressEntry(); + // --- In: none + // --- Out: none + // --- Returns: the AddressEntry object for this recipient. + // --- Effect: none + + void SetAddressEntry(LPDISPATCH); + // --- In: the AddressEntry object. + // --- Out: none + // --- Returns: none + // --- Effect: Sets the AddressEntry object for this recipient. + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the Recipient object + + void Resolve(BOOL bShowDialog = TRUE); + // --- In: bShowDialog: if dialog should be shown or not + // --- Out: none + // --- Returns: none + // --- Effect: Resolves address information. When the Recipient object's Name property + // is supplied, looks up the corresponding address from the address book. + // When the Recipient object's Address property is supplied, resolves as a + // custom address. +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMAttachments wrapper class + +class OX_CLASS_DECL COXMAttachments : public COleDispatchDriver +{ +// Member Functions +public: + COXMAttachments() {} // Calls COleDispatchDriver default constructor + COXMAttachments(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMAttachments(const COXMAttachments& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Attachments object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMMessage GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object. + // --- Effect: none + + COXMAttachment GetItem(LONG nIndex); + // --- In: nIndex: the index within the collection + // --- Out: none + // --- Returns: a single item from a collection. + // --- Effect: none + + LONG GetCount(); + // --- In: none + // --- Out: none + // --- Returns: the number of Attachment objects in the collection. + // --- Effect: none + + COXMAttachment Add(CString sName = _T(""), LONG nPosition = 0, EOXMAttachmentType eType = oxmatFileData, CString sSource = _T("")); + // --- In: sName: The display name of the attachment. To allow a user to click on the attachment that + // appears in the message and activate an associated application, supply the full filename, + // including the file extension. In case of an OleObject you have to specify the Class name + // ex: EXCEL.DOCUMENT + // nPosition: The position of the attachment within the body text of the message. + // eType: oxmatFileData, oxmatFileLink or oxmatOleObject + // sSource: depending of the value for type: + // FileData Specifies a full path and file name that contains the data for the attachment. + // For example, C:\DOCUMENT\BUDGET.XLS. The data is read into the attachment. + // FileLink Specifies a full path name in a universal naming convention (UNC) format, + // such as \\SALES\INFO\PRODUCTS\NEWS.DOC. The attachment is a link, so the Add + // method does not read the data. + // OleObject Specifies a full path and file name to a valid OLE docfile. For example, + // C:\DOCUMENT\BUDGET2.XLS. The data is read into the attachment. + // --- Out: none + // --- Returns: none + // --- Effect: creates a new Attachment object in the Attachments collection + + void Delete(); + // --- In:none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the entire Attachments collection +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMAttachment wrapper class + +class OX_CLASS_DECL COXMAttachment : public COleDispatchDriver +{ +// Member Functions +public: + COXMAttachment() {} // Calls COleDispatchDriver default constructor + COXMAttachment(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + COXMAttachment(const COXMAttachment& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging Attachment object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMAttachments GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object. + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the display name of the Attachment object as a string (FileData or FileLink type attachments) + // returns the OLE class name for OleObject attachments (see GetType and SetType functions) + // --- Effect: none + + void SetName(CString); + // --- In: the name of this Attachment object. + // --- Out: none + // --- Returns: none + // --- Effect: sets the display name of the Attachment object as a string + + EOXMAttachmentType GetType(); + // --- In: none + // --- Out: none + // --- Returns: describes the attachment type: oxmatFileData, oxmatFileLink or oxmatOleObject + // --- Effect: none + + void SetType(EOXMAttachmentType); + // --- In: the type of the Attachment object: + // oxmatFileData + // oxmatFileLink + // oxmatOleObject + // --- Out: none + // --- Returns: none + // --- Effect: Sets the type of the Attachment object + + LONG GetIndex(); + // --- In: none + // --- Out: none + // --- Returns: the index number for the Attachment object within the Attachments collection. + // --- Effect: none + + LONG GetPosition(); + // --- In: none + // --- Out: none + // --- Returns: the position of the attachment within the body text of the message. + // --- Effect: none + + void SetPosition(LONG); + // --- In: the position of the attachment. + // --- Out: none + // --- Returns: none + // --- Effect: sets the position of the attachment within the body text of the message. + + CString GetSource(); + // --- In: none + // --- Out: none + // --- Returns:the full path name of the attachment data file (For FileLink attachments). + // For OleObject attachments, returns the OLE class name for the attachment. + // --- Effect: none + + void SetSource(CString); + // --- In: the source for this attachment + // --- Out: none + // --- Returns:none + // --- Effect: When using oxmatFileData or oxmatOleObject this value is set by the ReadFromFile + // or WriteToFile functions. + + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the attachment. + + void ReadFromFile(CString sPath); + // --- In: sPath: The full path and file name to read. For example, C:\DOCUMENT\BUDGET.XLS. + // --- Out: none + // --- Returns: none + // --- Effect: loads the contents of an attachment from a file + + void WriteToFile(CString sPath); + // --- In: sPath: The full path and file name for the saved attachment. For example, C:\DOCUMENT\BUDGET.XLS. + // --- Out: none + // --- Returns: none + // --- Effect: Saves the attachment to a file in the file system. + // Note that if the file already exists, this method overwrites it without warning. + +}; + +///////////////////////////////////////////////////////////////////////////// +// COXMAddressEntry wrapper class + +class OX_CLASS_DECL COXMAddressEntry : public COleDispatchDriver +{ +// Data Members +public: + BOOL m_bCurrentSessionUser; +// Member Functions +public: + COXMAddressEntry() : m_bCurrentSessionUser(FALSE) {} // Calls COleDispatchDriver default constructor + COXMAddressEntry(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch), m_bCurrentSessionUser(FALSE) {} + COXMAddressEntry(const COXMAddressEntry& dispatchSrc) : COleDispatchDriver(dispatchSrc), m_bCurrentSessionUser(FALSE) {} + // --- In: pDispatch: the IDispatch pointer of the OLE messaging AddressEntry object + // dispatchSrc: the source object which will be copied + // --- Out: none + // --- Returns: none + // --- Effect: constructs this rapper object and attaches the real dispatch Interface with it + // The copy constructor version will increment the reference count of the IDispatch interface + + CString GetApplication(); + // --- In: none + // --- Out: none + // --- Returns: the name of the active application, which is the OLE Messaging Library, "OLE/Messaging." + // --- Effect: none + + EOXMClass GetClass(); + // --- In: none + // --- Out: none + // --- Returns: the OLE Messaging Library class type (see EOXMClass definition) + // --- Effect: none + + COXMSession GetSession(); + // --- In: none + // --- Out: none + // --- Returns: the top-level Session object associated with the specified OLE Messaging Library object + // --- Effect: none + + COXMRecipient GetParent(); + // --- In: none + // --- Out: none + // --- Returns: the parent of the object. + // m_lpDispatch member of returned object can be NULL (Current User) + // --- Effect: none + + EOXMDisplayType GetDisplayType(); + // --- In: none + // --- Out: none + // --- Returns: Identifies the type of the address entry. This property enables special + // processing based on the type, such as displaying an icon associated with that type. + // oxmdtMailUser (0) Local user + // oxmdtDistList (1) Distribution list + // oxmdtForum (2) Public folder + // oxmdtAgent (3) Agent + // oxmdtOrganisation (4) Organization + // oxmdtPrivateDistList (5) Private distribution list + // oxmdtRemoteMailUser (6) Remote user + // --- Effect: none + + CString GetName(); + // --- In: none + // --- Out: none + // --- Returns: the display name or alias of the AddressEntry object as a string. + // --- Effect: none + + void SetName(CString); + // --- In: the display name or alias of the AddressEntry object + // --- Out: none + // --- Returns: none + // --- Effect: sets the display name or alias of the AddressEntry object as a string. + + CString GetAddress(); + // --- In: none + // --- Out: none + // --- Returns: the messaging address of an address list entry or message recipient. + // --- Effect: none + + void SetAddress(CString); + // --- In: the messaging address of an address list entry or message recipient. + // --- Out: none + // --- Returns: none + // --- Effect: Sets the messaging address of an address list entry or message recipient. + + CString GetType(); + // --- In: none + // --- Out: none + // --- Returns: the address type, such as "SMTP," "Fax," or "X.400." + // --- Effect: none + + void SetType(CString); + // --- In: the address type + // --- Out: none + // --- Returns: none + // --- Effect: Specifies the address type, such as "SMTP," "Fax," or "X.400." + + CString GetId(); + // --- In: none + // --- Out: none + // --- Returns: the unique ID of the object as a string. + // --- Effect: none + + COXMFields GetFields(); + // --- In: none + // --- Out: none + // --- Returns: a single field (a Field object) or a collection of fields (a Fields collection object) of the Folder object. + // --- Effect: none + + void Details(HWND hParentWindow = NULL); + // --- In: hParentWindow: The parent window handle for the details dialog box. + // A value of NULL specifies a application modal dialog box. + // --- Out: none + // --- Returns: none + // --- Effect: displays a dialog box that provides detailed information about an AddressEntry object + + void Update(BOOL bMakePermanent = TRUE, BOOL bRefreshObject = FALSE); + // --- In: bMakePermanent: TRUE indicates that the property cache is flushed and all changes are + // committed in the underlying store. FALSE indicates that the property cache is flushed and + // not committed to the store. + // bRefreshObject: TRUE indicates that the property cache is reloaded from the values in the + // underlying store. FALSE indicates that the property cache is not reloaded. + // --- Out: none + // --- Returns: none + // --- Effect: Saves AddressEntry object changes in the MAPI system + + void Delete(); + // --- In: none + // --- Out: none + // --- Returns: none + // --- Effect: deletes the specified address from the address book +}; + + +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.cpp new file mode 100644 index 0000000..d18fd28 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.cpp @@ -0,0 +1,69 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Communicator.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + cs.style &= ~WS_MAXIMIZEBOX; + cs.style &= ~WS_MINIMIZEBOX; + cs.style |= WS_MAXIMIZE; + + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.cpp new file mode 100644 index 0000000..291ef03 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.cpp @@ -0,0 +1,188 @@ +// Communicator.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Communicator.h" +#include "utsampleAbout.h" +#include "MainFrm.h" +#include "ChildFrm.h" +#include "CommunicatorDoc.h" +#include "CommunicatorView.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorApp + +BEGIN_MESSAGE_MAP(CCommunicatorApp, CWinApp) + //{{AFX_MSG_MAP(CCommunicatorApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorApp construction + +CCommunicatorApp::CCommunicatorApp() + : + m_pHexDocTemplate(NULL) + { + } + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCommunicatorApp object + +CCommunicatorApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +// This identifier was generated to be statistically unique for your app. +// You may change it if you prefer to choose a specific identifier. + +// {F44C48E0-6DD7-11CF-8508-00AA0021F02C} +static const CLSID clsid = +{ 0xf44c48e0, 0x6dd7, 0x11cf, { 0x85, 0x8, 0x0, 0xaa, 0x0, 0x21, 0xf0, 0x2c } }; + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorApp initialization + +BOOL CCommunicatorApp::InitInstance() +{ + if (!AfxSocketInit()) + { + AfxMessageBox(IDP_SOCKETS_INIT_FAILED); + return FALSE; + } + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // Initialize OLE libraries + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OLE_INIT_FAILED); + return FALSE; + } + + + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + LoadStdProfileSettings(); // 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_COMMTYPE, + RUNTIME_CLASS(CCommunicatorDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CCommunicatorView)); + AddDocTemplate(pDocTemplate); + + m_pHexDocTemplate = new CMultiDocTemplate( + IDR_COMMTYPE, + RUNTIME_CLASS(CCommunicatorDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CHexView)); + + // Connect the COleTemplateServer to the document template. + // The COleTemplateServer creates new documents on behalf + // of requesting OLE containers by using information + // specified in the document template. + m_server.ConnectTemplate(clsid, pDocTemplate, FALSE); + + // Register all OLE server factories as running. This enables the + // OLE libraries to create objects from other applications. + COleTemplateServer::RegisterAll(); + // Note: MDI applications register all server objects without regard + // to the /Embedding or /Automation on the command line. + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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); + + // Check to see if launched as OLE server + if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated) + { + // Application was run with /Embedding or /Automation. Don't show the + // main window in this case. + return TRUE; + } + + // When a server application is launched stand-alone, it is a good idea + // to update the system registry in case it has been damaged. + m_server.UpdateRegistry(OAT_DISPATCH_OBJECT); + COleObjectFactory::UpdateRegistryAll(); + + // Dispatch commands specified on the command line + 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 + + + +// App command to run the dialog +void CCommunicatorApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorApp commands + +int CCommunicatorApp::ExitInstance() + { + if (m_pHexDocTemplate != NULL) + delete m_pHexDocTemplate; + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsp new file mode 100644 index 0000000..727ac6f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsp @@ -0,0 +1,318 @@ +# Microsoft Developer Studio Project File - Name="Communicator" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Communicator - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Communicator.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Communicator.mak" CFG="Communicator - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Communicator - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Communicator - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Communicator - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Communicator - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Communicator - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Communicator - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\include" /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "Communicator - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /profile /debug /machine:I386 /out:"Communicator.exe" /section:.sdata,rws + +!ELSEIF "$(CFG)" == "Communicator - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Communic" +# PROP BASE Intermediate_Dir "Communic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\include" /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "Communicator - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Communi0" +# PROP BASE Intermediate_Dir "Communi0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /profile /debug /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /profile /debug /machine:I386 /out:"Communicator.exe" /section:.sdata,rws + +!ELSEIF "$(CFG)" == "Communicator - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Communi1" +# PROP BASE Intermediate_Dir "Communi1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\include" /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Communicator.exe" /section:.sdata,rws +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "Communicator - Win32 Release" +# Name "Communicator - Win32 Debug" +# Name "Communicator - Win32 Release_Shared" +# Name "Communicator - Win32 Unicode_Debug" +# Name "Communicator - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\source\OXBlob.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXCommMsg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXCommunicator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXVariant.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\Communicator.cpp +# End Source File +# Begin Source File + +SOURCE=.\Communicator.odl +# End Source File +# Begin Source File + +SOURCE=.\Communicator.rc +# End Source File +# Begin Source File + +SOURCE=.\CommunicatorDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\CommunicatorView.cpp +# End Source File +# Begin Source File + +SOURCE=.\HexView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXDataCommunicator.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\SendDataDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Communicator.h +# End Source File +# Begin Source File + +SOURCE=.\CommunicatorDoc.h +# End Source File +# Begin Source File + +SOURCE=.\CommunicatorView.h +# End Source File +# Begin Source File + +SOURCE=.\HexView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\OXDataCommunicator.h +# End Source File +# Begin Source File + +SOURCE=.\SendDataDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Communicator.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Communicator.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\CommunicatorDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\CommunicatorInfo.rtf +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsw new file mode 100644 index 0000000..7e2c2a4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Communicator"=.\Communicator.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.h new file mode 100644 index 0000000..53c3652 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.h @@ -0,0 +1,45 @@ +// Communicator.h : main header file for the COMMUNICATOR application +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorApp: +// See Communicator.cpp for the implementation of this class +// + +class CCommunicatorApp : public CWinApp +{ +public: + CCommunicatorApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCommunicatorApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + COleTemplateServer m_server; + // Server object for document creation + + CMultiDocTemplate* m_pHexDocTemplate; + + //{{AFX_MSG(CCommunicatorApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.odl b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.odl new file mode 100644 index 0000000..11563a9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.odl @@ -0,0 +1,39 @@ +// Communicator.odl : type library source for Communicator.exe + +// This file will be processed by the Make Type Library (mktyplib) tool to +// produce the type library (Communicator.tlb). + +[ uuid(F44C48E1-6DD7-11CF-8508-00AA0021F02C), version(1.0) ] +library Communicator +{ + importlib("stdole32.tlb"); + + // Primary dispatch interface for CCommunicatorDoc + + [ uuid(F44C48E2-6DD7-11CF-8508-00AA0021F02C) ] + dispinterface IComm + { + properties: + // NOTE - ClassWizard will maintain property information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_PROP(CCommunicatorDoc) + //}}AFX_ODL_PROP + + methods: + // NOTE - ClassWizard will maintain method information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_METHOD(CCommunicatorDoc) + //}}AFX_ODL_METHOD + + }; + + // Class information for CCommunicatorDoc + + [ uuid(F44C48E0-6DD7-11CF-8508-00AA0021F02C) ] + coclass CCommunicatorDoc + { + [default] dispinterface IComm; + }; + + //{{AFX_APPEND_ODL}} +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.rc new file mode 100644 index 0000000..a2cbb97 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.rc @@ -0,0 +1,404 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_COMMTYPE ICON DISCARDABLE "res\\CommunicatorDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About Communicator...", ID_APP_ABOUT + END +END + +IDR_COMMTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Window" + BEGIN + MENUITEM "Tile ", ID_WINDOW_TILE_VERT + END + POPUP "&Help" + BEGIN + MENUITEM "&About Communicator...", ID_APP_ABOUT + END +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "COMMUNICATOR MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "COMMUNICATOR\0" + VALUE "LegalCopyright", "Copyright © 1996\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "COMMUNICATOR.EXE\0" + VALUE "ProductName", "COMMUNICATOR Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDP_OLE_INIT_FAILED "OLE initialization failed. Make sure that the OLE libraries are the correct version." + IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed." +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Communicator" + IDR_COMMTYPE "\nComm\nComm\nCommun Files (*.cmm)\n.CMM\nCommunicator.Document\nComm Document" + IDS_INVALID_VALUE "The specified value is not valid for this type" + IDS_FAILED_LISTEN "The Listen failed" + IDS_FAILED_CONNECT "Failed to establish connection" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Communicator" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCSIZE "Change the window size" + AFX_IDS_SCMOVE "Change the window position" + AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_DESCRIPTION_FILE "communicatorinfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Communicator.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SEND_DATA DIALOG DISCARDABLE 0, 0, 190, 230 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Send data" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_VALUE,7,104,155,14,ES_AUTOHSCROLL + DEFPUSHBUTTON "&Add",IDC_ADD,70,124,50,14 + LISTBOX IDC_LIST,7,150,176,49,WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "OK",IDOK,40,206,50,14 + PUSHBUTTON "Cancel",IDCANCEL,100,206,50,14 + CONTROL "&Empty",IDC_EMPTY,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,17,20,35,10 + CONTROL "&Null",IDC_NULL,"Button",BS_AUTORADIOBUTTON,17,33,28,10 + CONTROL "&Bool",IDC_BOOL,"Button",BS_AUTORADIOBUTTON,17,46,30,10 + CONTROL "&UI1 (char)",IDC_UI1,"Button",BS_AUTORADIOBUTTON,17,59, + 45,10 + CONTROL "&I2 (short)",IDC_I2,"Button",BS_AUTORADIOBUTTON,63,20, + 41,10 + CONTROL "&I4 (int)",IDC_I4,"Button",BS_AUTORADIOBUTTON,63,33,33, + 10 + CONTROL "&CY (Currency)",IDC_CY,"Button",BS_AUTORADIOBUTTON,63, + 46,57,10 + CONTROL "&R4 (float)",IDC_R4,"Button",BS_AUTORADIOBUTTON,63,59, + 43,10 + CONTROL "&R8 (double)",IDC_R8,"Button",BS_AUTORADIOBUTTON,120,20, + 51,10 + CONTROL "&Str",IDC_BSTR,"Button",BS_AUTORADIOBUTTON,120,33,29,10 + CONTROL "&Date",IDC_DATE,"Button",BS_AUTORADIOBUTTON,120,46,33, + 10 + CONTROL "&Error",IDC_ERROR,"Button",BS_AUTORADIOBUTTON,120,59,31, + 10 + CONTROL "&Binary Large Object",IDC_BINARY,"Button", + BS_AUTORADIOBUTTON,63,74,73,10 + LTEXT "&Value",IDC_STATIC,7,91,19,8 + GROUPBOX "Type",IDC_STATIC,7,7,176,81 + DEFPUSHBUTTON "...",IDC_BROWSE,168,104,15,14 +END + +IDD_COMMUNICATOR_FORM DIALOG DISCARDABLE 0, 0, 246, 277 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Server",IDC_SERVER_GROUP,7,7,232,103 + LTEXT "Local Address",IDC_LOCAL_ADDRESS_LABEL,15,17,46,8 + EDITTEXT IDC_LOCAL_ADDRESS,15,29,62,12,ES_AUTOHSCROLL | + ES_READONLY | NOT WS_TABSTOP + LTEXT "Local Port",IDC_LOCAL_PORT_LABEL,82,17,35,8 + EDITTEXT IDC_LOCAL_PORT,82,29,34,12,ES_AUTOHSCROLL + PUSHBUTTON "&Listen",IDC_LISTEN,127,28,50,14 + PUSHBUTTON "Shut&down",IDC_SHUTDOWN,182,28,50,14 + LTEXT "Client Addresses",IDC_CLIENT_ADDRESSES_LABEL,15,47,60,8 + LISTBOX IDC_CLIENT_ADDRESSES,15,58,157,44,LBS_NOINTEGRALHEIGHT | + LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Send",IDC_SEND_CLIENT,182,60,50,14 + PUSHBUTTON "&Disconnect",IDC_DISCONNECT_CLIENT,182,85,50,14 + GROUPBOX "Client",IDC_CLIENT_GROUP,7,113,232,50 + LTEXT "Remote Address",IDC_REMOTE_ADDRESS_LABEL,14,127,57,8 + EDITTEXT IDC_REMOTE_ADDRESS,14,139,62,12,ES_AUTOHSCROLL | NOT + WS_TABSTOP + LTEXT "Remote Port",IDC_REMOTE_PORT_LABEL,82,128,39,8 + EDITTEXT IDC_REMOTE_PORT,82,138,34,12,ES_AUTOHSCROLL + PUSHBUTTON "&Connect",IDC_CONNECT_SERVER,125,126,50,14 + PUSHBUTTON "&Send",IDC_SEND_SERVER,182,126,50,14 + PUSHBUTTON "Disconnect",IDC_DISCONNECT_SERVER,182,144,50,14 + PUSHBUTTON "&Spy",IDC_SPY,59,170,50,14 + LTEXT "Received Data",-1,7,175,47,8 + EDITTEXT IDC_RECEIVED_DATA,7,189,232,61,ES_MULTILINE | + ES_AUTOHSCROLL | WS_VSCROLL + PUSHBUTTON "Cancel Actions",IDC_CANCEL,93,256,59,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SEND_DATA, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 183 + TOPMARGIN, 7 + BOTTOMMARGIN, 220 + END + + IDD_COMMUNICATOR_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 239 + TOPMARGIN, 7 + BOTTOMMARGIN, 270 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#include ""utsampleAbout.rc""\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Communicator.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Dutch (Belgium) 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 +#include "utsampleAbout.rc" +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Communicator.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.reg b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.reg new file mode 100644 index 0000000..2348177 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/Communicator.reg @@ -0,0 +1,19 @@ +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\.CMM = Communicator.Document +HKEY_CLASSES_ROOT\Communicator.Document\shell\open\command = COMMUNICATOR.EXE %1 +HKEY_CLASSES_ROOT\Communicator.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\Communicator.Document\shell\open\ddeexec\application = COMMUNICATOR + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\Communicator.Document = Comm Document +HKEY_CLASSES_ROOT\Communicator.Document\CLSID = {F44C48E0-6DD7-11CF-8508-00AA0021F02C} + +HKEY_CLASSES_ROOT\CLSID\{F44C48E0-6DD7-11CF-8508-00AA0021F02C} = Comm Document +HKEY_CLASSES_ROOT\CLSID\{F44C48E0-6DD7-11CF-8508-00AA0021F02C}\LocalServer32 = COMMUNICATOR.EXE +HKEY_CLASSES_ROOT\CLSID\{F44C48E0-6DD7-11CF-8508-00AA0021F02C}\ProgId = Communicator.Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.cpp new file mode 100644 index 0000000..fdc1072 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.cpp @@ -0,0 +1,465 @@ +// CommunicatorDoc.cpp : implementation of the CCommunicatorDoc class +// + +#include "stdafx.h" +#include "Communicator.h" + +#include "CommunicatorDoc.h" +#include "OXCommMsg.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorDoc + +IMPLEMENT_DYNCREATE(CCommunicatorDoc, CDocument) + +BEGIN_MESSAGE_MAP(CCommunicatorDoc, CDocument) + //{{AFX_MSG_MAP(CCommunicatorDoc) + ON_BN_CLICKED(IDC_SPY, OnSpy) + ON_BN_CLICKED(IDC_CANCEL, OnCancel) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BEGIN_DISPATCH_MAP(CCommunicatorDoc, CDocument) + //{{AFX_DISPATCH_MAP(CCommunicatorDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_DISPATCH_MAP +END_DISPATCH_MAP() + +// Note: we add support for IID_IComm to support typesafe binding +// from VBA. This IID must match the GUID that is attached to the +// dispinterface in the .ODL file. + +// {F44C48E2-6DD7-11CF-8508-00AA0021F02C} +static const IID IID_IComm = +{ 0xf44c48e2, 0x6dd7, 0x11cf, { 0x85, 0x8, 0x0, 0xaa, 0x0, 0x21, 0xf0, 0x2c } }; + +BEGIN_INTERFACE_MAP(CCommunicatorDoc, CDocument) + INTERFACE_PART(CCommunicatorDoc, IID_IComm, Dispatch) +END_INTERFACE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorDoc construction/destruction + +CCommunicatorDoc::CCommunicatorDoc() + : + m_dataCommunicator(this), + m_pCancelWnd(NULL), + m_nTimeOut(10000) + { + m_pCancelWnd = AfxGetMainWnd(); + + EnableAutomation(); + + AfxOleLockApp(); + } + +CCommunicatorDoc::~CCommunicatorDoc() + { + AfxOleUnlockApp(); + Shutdown(); + } + +BOOL CCommunicatorDoc::OnNewDocument() + { + if (!CDocument::OnNewDocument()) + return FALSE; + + // Get the local server name + const int nMaxAddressLength = 128; + char szLocalAddress[nMaxAddressLength]; + gethostname(szLocalAddress, nMaxAddressLength); + m_sLocalAddress = szLocalAddress; + + return TRUE; + } + +CString CCommunicatorDoc::GetLocalAddress() const + { + return m_sLocalAddress; + } + +UINT CCommunicatorDoc::GetLocalPort() const + { + CString sAddress; + UINT nPort; + if ((m_dataCommunicator.m_hSocket != INVALID_SOCKET) && + ((CAsyncSocket*)&m_dataCommunicator)->GetSockName(sAddress, nPort)) + { + return nPort; + } + else + return 0; + } + +BOOL CCommunicatorDoc::IsOpen() + { + return m_dataCommunicator.IsOpen(); + } + +BOOL CCommunicatorDoc::IsListening() + { + return m_dataCommunicator.IsListening(); + } + +BOOL CCommunicatorDoc::IsBlocking() + { + return m_dataCommunicator.AreAnyBlocking(); + } + +void CCommunicatorDoc::CancelBlocking() + { + m_dataCommunicator.CancelAllBlockingCalls(); + } + +BOOL CCommunicatorDoc::Listen(long nServerPort) + { + BOOL bSuccess = TRUE; + if (m_dataCommunicator.m_hSocket != INVALID_SOCKET); + { + if (m_dataCommunicator.Create(nServerPort) && + m_dataCommunicator.Listen()) + { + m_dataCommunicator.Initialize(m_nTimeOut, m_pCancelWnd); + } + else + { + TRACE(_T("CComServerDoc::Listen : Failed to create socket server\n")); + m_dataCommunicator.Close(); + bSuccess = FALSE; + } + } + ASSERT(bSuccess == m_dataCommunicator.IsListening()); + return bSuccess; + } + +void CCommunicatorDoc::Shutdown() + { + // ... m_pDataCommunicator may already be NULL + TRY + { + m_dataCommunicator.Close(); + } + END_TRY + // Warn view of shutdown + UpdateAllViews(NULL, NotifyRemoveAllClients, NULL); + } + +void CCommunicatorDoc::DisconnectClient(HCLIENT_COMMUNICATOR hClient) + { + COXCommunicator* pClientCommunicator = m_dataCommunicator.GetClientCommunicator(hClient); + if (pClientCommunicator == NULL) + return; + TRY + { + pClientCommunicator->Close(); + } + END_TRY + + // Warn view + CHintData hintData; + hintData.m_hClient = hClient; + UpdateAllViews(NULL, NotifyRemoveClient, &hintData); + } + +BOOL CCommunicatorDoc::Send(HCLIENT_COMMUNICATOR hClient, COXCommMsg* pCommMsg) + { + ASSERT(pCommMsg != NULL); + COXCommunicator* pClientCommunicator = m_dataCommunicator.GetClientCommunicator(hClient); + if (pClientCommunicator == NULL) + return FALSE; + BOOL bSuccess = FALSE; + TRY + { + pCommMsg->Serialize(*pClientCommunicator->GetOutStream()); + pClientCommunicator->GetOutStream()->Flush(); + bSuccess = TRUE; + } + END_TRY + return bSuccess; + } + +BOOL CCommunicatorDoc::ConnectServer(CString sRemoteAddress, int nRemotePort, int nLocalPort) + { + BOOL bSuccess = TRUE; + if (!m_dataCommunicator.Create(nLocalPort) || + !(m_dataCommunicator.Initialize(m_nTimeOut, m_pCancelWnd), TRUE) || + !m_dataCommunicator.Connect(sRemoteAddress, nRemotePort)) + { + TRACE(_T("CComServerDoc::ConnectServer : Failed to create socket server\n")); + + m_dataCommunicator.Close(); + bSuccess = FALSE; + } + return bSuccess; + } + +BOOL CCommunicatorDoc::SendServer(COXCommMsg* pCommMsg) + { + BOOL bSuccess = FALSE; + TRY + { + if (m_dataCommunicator.GetOutStream() != NULL) + { + pCommMsg->Serialize(*m_dataCommunicator.GetOutStream()); + m_dataCommunicator.GetOutStream()->Flush(); + bSuccess = TRUE; + } + } + END_TRY + return bSuccess; + } + +void CCommunicatorDoc::OnReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pCommunicator, int nErrorCode) + { + POSITION pos = GetFirstViewPosition(); + if (pos != NULL) + GetNextView(pos); + if (pos == NULL) + // At most one view is attached to this doc, which cannot be a Spy view + OnReceiveDirect(hClient, pCommunicator, nErrorCode); + else + // More than one view is attached to this doc, + // at least one of them must be Spy view + OnReceiveHex(hClient, pCommunicator, nErrorCode); + } + +void CCommunicatorDoc::OnReceiveDirect(HCLIENT_COMMUNICATOR hClient, + COXCommunicator* pCommunicator, int nErrorCode) + { + UNREFERENCED_PARAMETER(nErrorCode); + + if (pCommunicator->GetMaxReadable() == 0) + // Ignore no data + return; + + CArchive* pInStream = pCommunicator->GetInStream(); + + CHintData hintData; + COXCommMsg commMsg; + + BOOL bVariantSuccess = FALSE; + + // Read the data directly in a variant array + TRY + { + commMsg.Serialize(*pInStream); + bVariantSuccess = TRUE; + } + CATCH(CFileException, e) + { + TRACE(_T("CComServerDoc::OnClientReceive : Catching CFileException\n")); + } + AND_CATCH(CArchiveException, e) + { + TRACE(_T("CComServerDoc::OnClientReceive : Catching CArchiveException\n")); + } + END_CATCH + + hintData.m_hClient = hClient; + hintData.m_pData = NULL; + hintData.m_nDataLength = 0; + if (bVariantSuccess) + hintData.m_pCommMsg = &commMsg; + UpdateAllViews(NULL, NotifyAddData, &hintData); + } + +void CCommunicatorDoc::OnReceiveHex(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pCommunicator, int nErrorCode) + { + UNREFERENCED_PARAMETER(nErrorCode); + + if (pCommunicator->GetMaxReadable() == 0) + // Ignore no data + return; + + CArchive* pInStream = pCommunicator->GetInStream(); + + CHintData hintData; + UINT nDataLength = 0; + BYTE* pData = NULL; + COXCommMsg commMsg; + + BOOL bDataSuccess = FALSE; + BOOL bVariantSuccess = FALSE; + + // First read into memory block + CMemFile memFile; + TRY + { + unsigned char pc[2];; + pc[1] = '\0'; + do + { + do + { + pInStream->Read(pc, 1); + memFile.Write(pc, 1); + } while (!pInStream->IsBufferEmpty()); + } while(pCommunicator->GetMaxReadable() != 0); + nDataLength = memFile.GetLength(); + pData = memFile.Detach(); + bDataSuccess = TRUE; + } + CATCH(CFileException, e) + { + TRACE(_T("CComServerDoc::OnReceive : Catching CFileException\n")); + if (pData == NULL) + { + nDataLength = memFile.GetLength(); + pData = memFile.Detach(); + } + } + AND_CATCH(CArchiveException, e) + { + TRACE(_T("CComServerDoc::OnReceive : Catching CArchiveException\n")); + if (pData == NULL) + { + nDataLength = memFile.GetLength(); + pData = memFile.Detach(); + } + } + END_CATCH + + // Now reread the data in a variant array + TRY + { + memFile.Attach(pData, nDataLength); + CArchive inStream(&memFile, CArchive::load); + commMsg.Serialize(inStream); + memFile.Detach(); + bVariantSuccess = TRUE; + } + CATCH(CFileException, e) + { + TRACE(_T("CComServerDoc::OnClientReceive : Catching CFileException\n")); + memFile.Detach(); + } + AND_CATCH(CArchiveException, e) + { + TRACE(_T("CComServerDoc::OnClientReceive : Catching CArchiveException\n")); + memFile.Detach(); + } + END_CATCH + + hintData.m_hClient = hClient; + if (bDataSuccess) + { + hintData.m_pData = pData; + hintData.m_nDataLength = nDataLength; + } + if (bVariantSuccess) + hintData.m_pCommMsg = &commMsg; + UpdateAllViews(NULL, NotifyAddData, &hintData); + + // Clean up memory + free(pData); + } + +void CCommunicatorDoc::OnClientCreate(HCLIENT_COMMUNICATOR hClient, + COXCommunicator* pClientCommunicator) + { + CHintData hintData; + hintData.m_hClient = hClient; + pClientCommunicator->GetPeerName(hintData.m_sClientAddress, hintData.m_nClientPort); + UpdateAllViews(NULL, NotifyAddClient, &hintData); + } + +void CCommunicatorDoc::OnClientReceive(HCLIENT_COMMUNICATOR hClient, + COXCommunicator* pClientCommunicator, + DWORD nSize, int nErrorCode) + { + UNREFERENCED_PARAMETER(nSize); + OnReceive(hClient, pClientCommunicator, nErrorCode); + } + +void CCommunicatorDoc::OnClientClose(HCLIENT_COMMUNICATOR hClient, + COXCommunicator* pClientCommunicator, + int nErrorCode) + { + UNREFERENCED_PARAMETER(nErrorCode); + UNREFERENCED_PARAMETER(pClientCommunicator); + CHintData hintData; + hintData.m_hClient = hClient; + UpdateAllViews(NULL, NotifyRemoveClient, &hintData); + } + +void CCommunicatorDoc::OnServerReceive(DWORD nSize, int nErrorCode) + { + UNREFERENCED_PARAMETER(nSize); + OnReceive(0, &m_dataCommunicator, nErrorCode); + } + +void CCommunicatorDoc::OnServerClose(int nErrorCode) + { + UNREFERENCED_PARAMETER(nErrorCode); + } + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorDoc serialization + +void CCommunicatorDoc::Serialize(CArchive& ar) + { + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } + } + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorDoc diagnostics + +#ifdef _DEBUG +void CCommunicatorDoc::AssertValid() const + { + CDocument::AssertValid(); + } + +void CCommunicatorDoc::Dump(CDumpContext& dc) const + { + CDocument::Dump(dc); + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorDoc commands + +void CCommunicatorDoc::OnSpy() + { + COleDateTime oleDate; + SYSTEMTIME t; + t.wYear = 1996; + t.wMonth = 10; + t.wDay = 6; + t.wHour = 16; + t.wMinute = 53; + t.wSecond = 24; + + oleDate = t; + + + CFrameWnd* pHexFrame = NULL; + pHexFrame = ((CCommunicatorApp*)AfxGetApp())->m_pHexDocTemplate->CreateNewFrame(this, NULL); + pHexFrame->InitialUpdateFrame(this, TRUE); + } + +void CCommunicatorDoc::OnCancel() + { + m_dataCommunicator.CancelAllBlockingCalls(); + } + +BOOL CCommunicatorDoc::IsModified() + { + // Never ask to save the doc + return FALSE; + } \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.h new file mode 100644 index 0000000..bdb300c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorDoc.h @@ -0,0 +1,118 @@ +// CommunicatorDoc.h : interface of the CCommunicatorDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#include "OXDataCommunicator.h" + +class COXCommMsg; + +class CCommunicatorDoc : public CDocument +{ +protected: // create from serialization only + CCommunicatorDoc(); + DECLARE_DYNCREATE(CCommunicatorDoc) + +// Attributes +public: + +// Operations +public: + CString GetLocalAddress() const; + UINT GetLocalPort() const; + BOOL IsOpen(); + BOOL IsListening(); + BOOL IsBlocking(); + void CancelBlocking(); + + BOOL Listen(long nServerPort); + void Shutdown(); + void DisconnectClient(HCLIENT_COMMUNICATOR hClient); + BOOL Send(HCLIENT_COMMUNICATOR hClient, COXCommMsg* pCommMsg); + BOOL ConnectServer(CString sRemoteAddress, int nRemotePort, int nLocalPort); + BOOL SendServer(COXCommMsg* pCommMsg); + + void OnReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pCommunicator, int nErrorCode); + void OnReceiveDirect(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pCommunicator, int nErrorCode); + void OnReceiveHex(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pCommunicator, int nErrorCode); + + void OnClientCreate(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator); + void OnClientReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode); + void OnClientClose(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, int nErrorCode); + void OnServerReceive(DWORD nSize, int nErrorCode); + void OnServerClose(int nErrorCode); + + enum + { + NotifyAddClient = 1, + NotifyRemoveClient = 2, + NotifyRemoveAllClients =3, + NotifyAddData = 4 + }; + + class CHintData : public CObject + { + public: + HCLIENT_COMMUNICATOR m_hClient; + CString m_sClientAddress; + UINT m_nClientPort; + COXCommMsg* m_pCommMsg; + BYTE* m_pData; + UINT m_nDataLength; + CHintData() + : + m_hClient(0), + m_sClientAddress(""), + m_nClientPort(0), + m_pCommMsg(NULL), + m_pData(NULL), + m_nDataLength(0) + { + } + }; + + + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCommunicatorDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + + virtual BOOL IsModified(); + +protected: + CString m_sLocalAddress; + COXDataCommunicator m_dataCommunicator; + CWnd* m_pCancelWnd; + UINT m_nTimeOut; + + +// Implementation +public: + virtual ~CCommunicatorDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCommunicatorDoc) + afx_msg void OnSpy(); + afx_msg void OnCancel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + // Generated OLE dispatch map functions + //{{AFX_DISPATCH(CCommunicatorDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DISPATCH + DECLARE_DISPATCH_MAP() + DECLARE_INTERFACE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorInfo.rtf new file mode 100644 index 0000000..1caed0f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.cpp new file mode 100644 index 0000000..37c84fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.cpp @@ -0,0 +1,503 @@ +// CommunicatorView.cpp : implementation of the CCommunicatorView class +// + +#include "stdafx.h" +#include "Communicator.h" + +#include "CommunicatorDoc.h" +#include "CommunicatorView.h" +#include "SendDataDlg.h" +#include "OXBlob.h" + +#include // for OnIdleUpdateCmdUI +#include // For mutex support + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorView + +#pragma data_seg(".sdata") +// Store the usage count of this application so that multiple instances will +// cascade nicely on the screen +LONG nUsageCount = 0; +#pragma data_seg() + + +IMPLEMENT_DYNCREATE(CCommunicatorView, CFormView) + +BEGIN_MESSAGE_MAP(CCommunicatorView, CFormView) + //{{AFX_MSG_MAP(CCommunicatorView) + ON_BN_CLICKED(IDC_CONNECT_SERVER, OnConnectServer) + ON_BN_CLICKED(IDC_DISCONNECT_CLIENT, OnDisconnectClient) + ON_BN_CLICKED(IDC_DISCONNECT_SERVER, OnDisconnectServer) + ON_BN_CLICKED(IDC_LISTEN, OnListen) + ON_BN_CLICKED(IDC_SEND_CLIENT, OnSendClient) + ON_BN_CLICKED(IDC_SEND_SERVER, OnSendServer) + ON_BN_CLICKED(IDC_SHUTDOWN, OnShutdown) + ON_MESSAGE_VOID(WM_IDLEUPDATECMDUI, OnIdleUpdateCmdUI) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorView construction/destruction + +CCommunicatorView::CCommunicatorView() + : CFormView(CCommunicatorView::IDD) + { + //{{AFX_DATA_INIT(CCommunicatorView) + m_sLocalAddress = _T(""); + m_nLocalPort = 1000; + m_sRemoteAddress = _T(""); + m_nRemotePort = 1000; + //}}AFX_DATA_INIT + // TODO: add construction code here + + } + +CCommunicatorView::~CCommunicatorView() + { + } + +void CCommunicatorView::DoDataExchange(CDataExchange* pDX) + { + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCommunicatorView) + DDX_Control(pDX, IDC_CANCEL, m_wndCancel); + DDX_Control(pDX, IDC_LOCAL_PORT_LABEL, m_wndLocalPortLabel); + DDX_Control(pDX, IDC_SERVER_GROUP, m_wndServerGroup); + DDX_Control(pDX, IDC_REMOTE_ADDRESS_LABEL, m_wndRemoteAddressLabel); + DDX_Control(pDX, IDC_REMOTE_PORT_LABEL, m_wndRemotePortLabel); + DDX_Control(pDX, IDC_LOCAL_ADDRESS_LABEL, m_wndLocalAddressLabel); + DDX_Control(pDX, IDC_CLIENT_GROUP, m_wndClientGroup); + DDX_Control(pDX, IDC_CLIENT_ADDRESSES_LABEL, m_wndClientAddressLabel); + DDX_Control(pDX, IDC_SEND_SERVER, m_wndSendServer); + DDX_Control(pDX, IDC_DISCONNECT_SERVER, m_wndDisconnectServer); + DDX_Control(pDX, IDC_CONNECT_SERVER, m_wndConnectServer); + DDX_Control(pDX, IDC_REMOTE_PORT, m_wndRemotePort); + DDX_Control(pDX, IDC_REMOTE_ADDRESS, m_wndRemoteAddress); + DDX_Control(pDX, IDC_DISCONNECT_CLIENT, m_wndDisconnectClient); + DDX_Control(pDX, IDC_SEND_CLIENT, m_wndSendClient); + DDX_Control(pDX, IDC_SHUTDOWN, m_wndShutdown); + DDX_Control(pDX, IDC_LISTEN, m_wndListen); + DDX_Control(pDX, IDC_LOCAL_PORT, m_wndLocalPort); + DDX_Control(pDX, IDC_LOCAL_ADDRESS, m_wndLocalAddress); + DDX_Control(pDX, IDC_CLIENT_ADDRESSES, m_wndClientAddresses); + DDX_Control(pDX, IDC_RECEIVED_DATA, m_wndReceivedData); + DDX_Text(pDX, IDC_LOCAL_ADDRESS, m_sLocalAddress); + DDX_Text(pDX, IDC_LOCAL_PORT, m_nLocalPort); + DDX_Text(pDX, IDC_REMOTE_ADDRESS, m_sRemoteAddress); + DDX_Text(pDX, IDC_REMOTE_PORT, m_nRemotePort); + //}}AFX_DATA_MAP + } + +BOOL CCommunicatorView::PreCreateWindow(CREATESTRUCT& cs) + { + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFormView::PreCreateWindow(cs); + } + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorView diagnostics + +#ifdef _DEBUG +void CCommunicatorView::AssertValid() const + { + CFormView::AssertValid(); + } + +void CCommunicatorView::Dump(CDumpContext& dc) const + { + CFormView::Dump(dc); + } + +CCommunicatorDoc* CCommunicatorView::GetDocument() // non-debug version is inline + { + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCommunicatorDoc))); + return (CCommunicatorDoc*)m_pDocument; + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCommunicatorView message handlers + +void CCommunicatorView::OnConnectServer() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnConnectServer : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + UpdateData(TRUE); + // If remote address is not filled out, try a local connection + if (m_sRemoteAddress.IsEmpty()) + { + m_sRemoteAddress = GetDocument()->GetLocalAddress(); + UpdateData(FALSE); + } + // Do not use the specified local port, let winsockets pick one + if (!GetDocument()->ConnectServer(m_sRemoteAddress, m_nRemotePort, 0)) + AfxMessageBox(IDS_FAILED_CONNECT, MB_ICONEXCLAMATION); + m_nLocalPort = GetDocument()->GetLocalPort(); + UpdateData(FALSE); + } + +void CCommunicatorView::OnDisconnectClient() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnDisconnectClient : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + UINT nSelCount = m_wndClientAddresses.GetSelCount(); + if (0 < nSelCount) + { + int index; + int* rgSels = new int[nSelCount]; + m_wndClientAddresses.GetSelItems(nSelCount, rgSels); + for (index = (int)nSelCount - 1; 0 <= index; index--) + GetDocument()->DisconnectClient(m_wndClientAddresses.GetItemData(rgSels[index])); + delete rgSels; + } + } + +void CCommunicatorView::OnDisconnectServer() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnDisconnectServer : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + GetDocument()->Shutdown(); + } + +void CCommunicatorView::OnListen() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnListen : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + UpdateData(TRUE); + if (!GetDocument()->Listen(m_nLocalPort)) + AfxMessageBox(IDS_FAILED_LISTEN, MB_ICONEXCLAMATION); + } + +void CCommunicatorView::OnSendClient() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnSendClient : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + COXCommMsg* pCommMsg = new COXCommMsg; + + CSendDataDlg dlg(pCommMsg); + if (dlg.DoModal() == IDOK) + { + UINT nSelCount = m_wndClientAddresses.GetSelCount(); + if (0 < nSelCount) + { + int index; + int* rgSels = new int[nSelCount]; + m_wndClientAddresses.GetSelItems(nSelCount, rgSels); + for (index = 0; index < (int)nSelCount; index++) + GetDocument()->Send(m_wndClientAddresses.GetItemData(rgSels[index]), pCommMsg); + delete rgSels; + } + } + delete pCommMsg; + } + +void CCommunicatorView::OnSendServer() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnSendServer : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + COXCommMsg* pCommMsg = new COXCommMsg; + + CSendDataDlg dlg(pCommMsg); + if (dlg.DoModal() == IDOK) + GetDocument()->SendServer(pCommMsg); + + delete pCommMsg; + } + +void CCommunicatorView::OnShutdown() + { + if (GetDocument()->IsBlocking()) + { + TRACE(_T("CCommunicatorView::OnShutdown : Communicator is still blocking\n")); + MessageBeep(0xFFFF); + return; + } + + GetDocument()->Shutdown(); + } + +void CCommunicatorView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pSender); + CCommunicatorDoc::CHintData* pHintData = (CCommunicatorDoc::CHintData*)pHint; + CString sText; + int index; + switch(lHint) + { + case CCommunicatorDoc::NotifyAddClient: + // Add the client address to the list + sText.Format(_T("%i. %s (%i)"), pHintData->m_hClient, + (LPCTSTR)pHintData->m_sClientAddress, pHintData->m_nClientPort); + + index = m_wndClientAddresses.AddString(sText); + m_wndClientAddresses.SetItemData(index, pHintData->m_hClient); + // If nothing is selected, select this item + if (m_wndClientAddresses.GetSelCount() == 0) + m_wndClientAddresses.SetSel(index); + break; + case CCommunicatorDoc::NotifyRemoveClient: + // Remove the client address from the list + for (index = 0; index < m_wndClientAddresses.GetCount(); index++) + { + if ((int)m_wndClientAddresses.GetItemData(index) == pHintData->m_hClient) + m_wndClientAddresses.DeleteString(index); + } + // If nothing is selected, select the first one + if (m_wndClientAddresses.GetSelCount() == 0) + m_wndClientAddresses.SetSel(0); + break; + case CCommunicatorDoc::NotifyRemoveAllClients: + // Remove all the client address from the list + m_wndClientAddresses.ResetContent(); + break; + case CCommunicatorDoc::NotifyAddData: + // Show the received data + ShowData(pHintData); + break; + default: + break; + } + } + +void CCommunicatorView::ShowData(CCommunicatorDoc::CHintData* pHintData) + { + CString sText; + CString sValue; + if (pHintData->m_pCommMsg == NULL) + { + if (pHintData->m_nDataLength != 0) + sText.Format(_T("%i. (length = %i)\r\n"), + pHintData->m_hClient, pHintData->m_nDataLength); + else + sText.Format(_T("%i. (length = unknown)\r\n"), + pHintData->m_hClient); + AddText(sText); + return; + } + + sText.Format(_T("%i. Array of size %i\r\n"), + pHintData->m_hClient, pHintData->m_pCommMsg->GetSize()); + AddText(sText); + + COXVariant variant; + UINT nOleType; + UINT nType; + for (int index = 0; index < pHintData->m_pCommMsg->GetSize(); index++) + { + // Convert variant to string to visualize + variant = pHintData->m_pCommMsg->GetAt(index); + nOleType = V_VT(&variant); + for (nType = 0; + (nType < COXCommMsg::m_nArgumentTypesCount) && (nOleType != (UINT)COXCommMsg::m_types[nType]); + nType++) + ; + // ... Must have found the type + ASSERT(nType < COXCommMsg::m_nArgumentTypesCount); + + sValue.Empty(); + TRY + { + if (nOleType != COXCommMsg::ATBlob) + { + if (V_VT(&variant) == COXCommMsg::ATError) + // ... Variant is a union, just change the type + // oleVariant.lVal= oleVariant.scode ; + V_VT(&variant) = COXCommMsg::ATI4; + variant.ChangeType(COXCommMsg::ATStr); + sValue = V_BSTR(&variant); + } + else + { + ASSERT(nOleType == COXCommMsg::ATBlob); + CString sTempPath; + CString sTempFileName; + COXBlob blob; + VERIFY(::GetTempPath(_MAX_PATH, sTempPath.GetBuffer(_MAX_PATH)) != 0); + sTempPath.ReleaseBuffer(); + VERIFY(::GetTempFileName(sTempPath, _T("BLB"), 0, + sTempFileName.GetBuffer(_MAX_PATH)) != 0); + sTempFileName.ReleaseBuffer(); + blob = variant; + blob.WriteRaw(sTempFileName); + sValue.Format(_T(" (stored as %s)"), blob.GetSize(), sTempFileName); + } + } + END_TRY + sText.Format(_T("\t%i. (%s) %s\r\n"), + index + 1, + (LPCTSTR)COXCommMsg::m_typeNames[nType], + (LPCTSTR)sValue); + AddText(sText); + } + } + +void CCommunicatorView::AddText(LPCTSTR pszText) + { + LONG nWindowTextLength; + nWindowTextLength = m_wndReceivedData.GetWindowTextLength(); + m_wndReceivedData.SetSel(nWindowTextLength, nWindowTextLength); + m_wndReceivedData.ReplaceSel(pszText); + } + +void CCommunicatorView::OnInitialUpdate() + { + CFormView::OnInitialUpdate(); + + // Show local server name + m_sLocalAddress = GetDocument()->GetLocalAddress(); + UpdateData(FALSE); + + // Fit frame around view + ResizeParentToFit(FALSE); + + // Fit mainframe around frame, do this only once + static bMainFrameResized = FALSE; + if (!bMainFrameResized) + { + bMainFrameResized = TRUE; + + // Get the size of frame and main frame + CRect frameRect; + CRect mainFrameRect; + CRect mainFrameClientRect; + GetParentFrame()->GetWindowRect(frameRect); + AfxGetMainWnd()->GetWindowRect(mainFrameRect); + AfxGetMainWnd()->GetClientRect(mainFrameClientRect); + + // Resize the mainframe so that this view frame will completely fill the client area + mainFrameRect.right += frameRect.Width() - mainFrameClientRect.Width(); + mainFrameRect.bottom += frameRect.Height() - mainFrameClientRect.Height(); + + // Take other windows into account that also populate the main frames client area + CWnd* pChild; + CRect childRect; + pChild = AfxGetMainWnd()->GetWindow(GW_CHILD); + while (pChild != NULL) + { + // ... Skip the MDI frame window + if (pChild != GetParentFrame()->GetParent()) + { + pChild->GetWindowRect(childRect); + // Statusbar and buttonbar take up the entire width (or height) + // Use the smallest of the two + if (childRect.Height() < childRect.Width()) + mainFrameRect.bottom += childRect.Height(); + else + mainFrameRect.right += childRect.Width(); + } + pChild = pChild->GetWindow(GW_HWNDNEXT); + } + + // Position multiple instance next to each other + CMutex mutex(FALSE, _T("COMMUNICATOR_MOVE")); + // ... Lock the mutex, destructor will unlock + CSingleLock lock(&mutex, TRUE); + nUsageCount++; + + // If at most two instances are running + if (nUsageCount <= 2) + { + // Put main frame in top left corner (0,0) + mainFrameRect.right -= mainFrameRect.left; + mainFrameRect.bottom -= mainFrameRect.top; + mainFrameRect.left = 0; + mainFrameRect.top = 0; + + // Position it next to the other instance (if it exists) + mainFrameRect.left = mainFrameRect.right * (nUsageCount - 1); + mainFrameRect.right = mainFrameRect.right * nUsageCount; + } + + AfxGetMainWnd()->MoveWindow(mainFrameRect); + } + } + +void CCommunicatorView::OnIdleUpdateCmdUI() + { + BOOL bClientSelected = (0 < m_wndClientAddresses.GetSelCount()); + BOOL bOpen = GetDocument()->IsOpen(); + BOOL bServer = FALSE; + BOOL bClient = FALSE; + if (bOpen) + { + bServer = GetDocument()->IsListening(); + bClient = !bServer; + } + + // Conditionally disable controls + // Server + m_wndServerGroup. EnableWindow(!bOpen || bServer); + m_wndLocalAddressLabel. EnableWindow(!bOpen); + m_wndLocalAddress. EnableWindow(!bOpen); + m_wndLocalPortLabel. EnableWindow(!bOpen); + m_wndLocalPort. EnableWindow(!bOpen); + m_wndListen. EnableWindow(!bOpen); + m_wndShutdown. EnableWindow(bServer); + m_wndSendClient. EnableWindow(bServer && bClientSelected); + m_wndDisconnectClient. EnableWindow(bServer && bClientSelected); + m_wndClientAddressLabel.EnableWindow(bServer); + m_wndClientAddresses. EnableWindow(bServer); + + // Client + m_wndClientGroup. EnableWindow(!bOpen || bClient); + m_wndRemoteAddressLabel.EnableWindow(!bOpen); + m_wndRemoteAddress. EnableWindow(!bOpen); + m_wndRemotePortLabel. EnableWindow(!bOpen); + m_wndRemotePort. EnableWindow(!bOpen); + m_wndConnectServer. EnableWindow(!bOpen); + m_wndSendServer. EnableWindow(bClient); + m_wndDisconnectServer. EnableWindow(bClient); + + // Global + m_wndCancel. EnableWindow(bOpen); + } + +void CCommunicatorView::PostNcDestroy() + { + // Relase this instance count + CMutex mutex(FALSE, _T("COMMUNICATOR_MOVE")); + // ... Lock the mutex, destructor will unlock + CSingleLock lock(&mutex, TRUE); + nUsageCount--; + + CFormView::PostNcDestroy(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.h new file mode 100644 index 0000000..c916081 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/CommunicatorView.h @@ -0,0 +1,94 @@ +// CommunicatorView.h : interface of the CCommunicatorView class +// + +///////////////////////////////////////////////////////////////////////////// + +class CCommunicatorView : public CFormView +{ +protected: // create from serialization only + CCommunicatorView(); + DECLARE_DYNCREATE(CCommunicatorView) + +public: + //{{AFX_DATA(CCommunicatorView) + enum { IDD = IDD_COMMUNICATOR_FORM }; + CButton m_wndCancel; + CStatic m_wndLocalPortLabel; + CButton m_wndServerGroup; + CStatic m_wndRemoteAddressLabel; + CStatic m_wndRemotePortLabel; + CStatic m_wndLocalAddressLabel; + CButton m_wndClientGroup; + CStatic m_wndClientAddressLabel; + CButton m_wndSendServer; + CButton m_wndDisconnectServer; + CButton m_wndConnectServer; + CEdit m_wndRemotePort; + CEdit m_wndRemoteAddress; + CButton m_wndDisconnectClient; + CButton m_wndSendClient; + CButton m_wndShutdown; + CButton m_wndListen; + CEdit m_wndLocalPort; + CEdit m_wndLocalAddress; + CListBox m_wndClientAddresses; + CEdit m_wndReceivedData; + CString m_sLocalAddress; + int m_nLocalPort; + CString m_sRemoteAddress; + int m_nRemotePort; + //}}AFX_DATA + +// Attributes +public: + CCommunicatorDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCommunicatorView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + virtual void PostNcDestroy(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCommunicatorView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + void ShowData(CCommunicatorDoc::CHintData* pHintData); + void AddText(LPCTSTR pszText); + +// Generated message map functions +protected: + //{{AFX_MSG(CCommunicatorView) + afx_msg void OnConnectServer(); + afx_msg void OnDisconnectClient(); + afx_msg void OnDisconnectServer(); + afx_msg void OnListen(); + afx_msg void OnSendClient(); + afx_msg void OnSendServer(); + afx_msg void OnShutdown(); + afx_msg void OnIdleUpdateCmdUI(); + afx_msg void OnCancel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in CommunicatorView.cpp +inline CCommunicatorDoc* CCommunicatorView::GetDocument() + { return (CCommunicatorDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.cpp new file mode 100644 index 0000000..d1ad445 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.cpp @@ -0,0 +1,153 @@ +// HexView.cpp : implementation file +// + +#include "stdafx.h" +#include "Communicator.h" +#include "CommunicatorDoc.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHexView + +IMPLEMENT_DYNCREATE(CHexView, CEditView) + +CHexView::CHexView() + { + } + +CHexView::~CHexView() + { + } + + +BEGIN_MESSAGE_MAP(CHexView, CEditView) + //{{AFX_MSG_MAP(CHexView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHexView diagnostics + +#ifdef _DEBUG +void CHexView::AssertValid() const + { + CEditView::AssertValid(); + } + +void CHexView::Dump(CDumpContext& dc) const + { + CEditView::Dump(dc); + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CHexView message handlers + +void CHexView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pSender); + CCommunicatorDoc::CHintData* pHintData = (CCommunicatorDoc::CHintData*)pHint; + CString sText; + + if (lHint == CCommunicatorDoc::NotifyAddData) + { + sText.Format(_T("%i. Data length = 0x%X (%i)\r\n"), + pHintData->m_hClient, pHintData->m_nDataLength, pHintData->m_nDataLength); + AddText(sText); + + // Show the received data + if (pHintData->m_pData == NULL) + { + sText = _T("\t\r\n"); + AddText(sText); + return; + } + + BYTE* pData = pHintData->m_pData; + UINT nMaxIndex = pHintData->m_nDataLength; + UINT nIndex = 0; + CString sRaw; + CString sHex; + CString sHexTemp; + while (nIndex < nMaxIndex) + { + // Split in two parts (of 8 bytes) seperated by a space + sRaw.Empty(); + sHex.Empty(); + + // ... Add offset + sRaw.Format(_T("%4.4X "), nIndex); + + for (int nLoop = 0; nLoop < 2; nLoop++) + { + // Calculate 8 bytes + UINT nPartIndex = 0; + while (nPartIndex < 8 && nIndex < nMaxIndex) + { + if (isprint(pData[nIndex])) + sRaw += (char)pData[nIndex]; + else + sRaw += _T('.'); + sHexTemp.Format(_T("%2.2X "), pData[nIndex]); + sHex += sHexTemp; + nPartIndex++; + nIndex++; + } + + sRaw += _T(' '); + sHex += _T(' '); + } + + // Show the text + sText.Format(_T("%-24.24s|%s\r\n"), sRaw, sHex); + AddText(sText); + } + AddText(_T("\r\n")); + } + } + +void CHexView::AddText(LPCTSTR pszText) + { + LONG nWindowTextLength; + nWindowTextLength = GetEditCtrl().GetWindowTextLength(); + GetEditCtrl().SetSel(nWindowTextLength, nWindowTextLength); + GetEditCtrl().ReplaceSel(pszText); + } + + +BOOL CHexView::PreCreateWindow(CREATESTRUCT& cs) + { + BOOL bRet = CEditView::PreCreateWindow(cs); + cs.style |= ES_READONLY; + return bRet; + } + +void CHexView::OnInitialUpdate() + { + CEditView::OnInitialUpdate(); + + // Create a fixed size font + m_font.CreateFont( 0, // nHeight + 0, // nWidth + 0, // nEscapement + 0, // nOrientation + FW_DONTCARE, // nWeight + FALSE, // bItalic + FALSE, // bUnderline + 0, // cStrikeOut + DEFAULT_CHARSET, // nCharSet + OUT_DEFAULT_PRECIS, // nOutPrecision + CLIP_DEFAULT_PRECIS, // nClipPrecision + DEFAULT_QUALITY, // nQuality + FIXED_PITCH, // nPitchAndFamily + NULL); // lpszFacename + + GetEditCtrl().SetFont(&m_font, FALSE); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.h new file mode 100644 index 0000000..df0a2b5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/HexView.h @@ -0,0 +1,48 @@ +// HexView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CHexView view + +class CHexView : public CEditView +{ +protected: + CHexView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CHexView) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHexView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + CFont m_font; + + void AddText(LPCTSTR pszText); + virtual ~CHexView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions +protected: + //{{AFX_MSG(CHexView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.cpp new file mode 100644 index 0000000..fbacc89 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.cpp @@ -0,0 +1,128 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Communicator.h" +#include "CommunicatorDoc.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + //}}AFX_MSG_MAP +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; + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs +// cs.style &= ~WS_MAXIMIZEBOX; + cs.style |= WS_MAXIMIZE; + + cs.style &= ~WS_MINIMIZEBOX; + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::OnClose() + { + // Check whether there are documents that are still blocking + // (and thus have started a second message loop) + BOOL bBlocking = FALSE; + + POSITION pos; + CDocTemplate* pDocTemplate; + CCommunicatorDoc* pComDoc; + + // Get the one (and only) document template + pos = AfxGetApp()->GetFirstDocTemplatePosition(); + // ... Should have at least one template + ASSERT(pos != 0); + pDocTemplate = AfxGetApp()->GetNextDocTemplate(pos); + ASSERT(pDocTemplate != 0); + // ... Should have exactly one template + ASSERT(pos == 0); + + // Iterate all the documents + pos = pDocTemplate->GetFirstDocPosition(); + while (pos != NULL) + { + pComDoc = (CCommunicatorDoc*)pDocTemplate->GetNextDoc(pos); + ASSERT(pComDoc != 0); + ASSERT(pComDoc->IsKindOf(RUNTIME_CLASS(CCommunicatorDoc))); + if (pComDoc->IsBlocking()) + { + bBlocking = TRUE; + pComDoc->CancelBlocking(); + } + } + + // If blocking abort close and repost message + if (bBlocking) + { + TRACE(_T("CMainFrame::OnClose : Detected communicators that are still blocking, cancelling blocking and reposting WM_CLOSE\n")); + PostMessage(WM_CLOSE); + } + else + CMDIFrameWnd::OnClose(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.h new file mode 100644 index 0000000..92bf6f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/MainFrm.h @@ -0,0 +1,44 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.cpp new file mode 100644 index 0000000..0756524 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.cpp @@ -0,0 +1,87 @@ +// ========================================================================== +// Class Implementation : COXDataCommunicator +// ========================================================================== + +// Source file : OXDataCommunicator.cpp + +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXDataCommunicator.h" +#include "CommunicatorDoc.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXDataCommunicator, COXCommunicator) + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: +COXDataCommunicator::COXDataCommunicator(CCommunicatorDoc* pCommunicatorDoc, UINT nStreamBufferSize /* = 4096 */) + : + COXCommunicator(nStreamBufferSize), + m_pCommunicatorDoc(pCommunicatorDoc) + { + ASSERT_VALID(this); + ASSERT(pCommunicatorDoc != NULL); + } + +void COXDataCommunicator::OnClientCreate(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator) + { + m_pCommunicatorDoc->OnClientCreate(hClient, pClientCommunicator); + } + +void COXDataCommunicator::OnClientReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode) + { + m_pCommunicatorDoc->OnClientReceive(hClient, pClientCommunicator, nSize, nErrorCode); + } + +void COXDataCommunicator::OnClientClose(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, int nErrorCode) + { + m_pCommunicatorDoc->OnClientClose(hClient, pClientCommunicator, nErrorCode); + } + +void COXDataCommunicator::OnServerReceive(DWORD nSize, int nErrorCode) + { + m_pCommunicatorDoc->OnServerReceive(nSize, nErrorCode); + } + +void COXDataCommunicator::OnServerClose(int nErrorCode) + { + m_pCommunicatorDoc->OnServerClose(nErrorCode); + } + +#ifdef _DEBUG +void COXDataCommunicator::AssertValid() const + { + COXCommunicator::AssertValid(); + } + +void COXDataCommunicator::Dump(CDumpContext& dc) const + { + COXCommunicator::Dump(dc); + } +#endif //_DEBUG + +COXDataCommunicator::~COXDataCommunicator() + { + } + +// protected: + +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.h new file mode 100644 index 0000000..a5d6988 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/OXDataCommunicator.h @@ -0,0 +1,102 @@ +// ========================================================================== +// Class Specification : COXDataCommunicator +// ========================================================================== + +// Header file : OXDataCommunicator.h + +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXCommunicator + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXDATACOMMUNICATOR_H__ +#define __OXDATACOMMUNICATOR_H__ + +#include "OXCommunicator.h" + +class CCommunicatorDoc; + +class COXDataCommunicator : public COXCommunicator +{ +DECLARE_DYNAMIC(COXDataCommunicator) + +// Data members ------------------------------------------------------------- +public: + +protected: + CCommunicatorDoc* m_pCommunicatorDoc; + +private: + +// Member functions --------------------------------------------------------- +public: + + COXDataCommunicator(CCommunicatorDoc* pCommunicatorDoc, UINT nStreamBufferSize = 4096); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + + virtual void OnClientCreate(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator); + virtual void OnClientReceive(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode); + virtual void OnClientClose(HCLIENT_COMMUNICATOR hClient, COXCommunicator* pClientCommunicator, int nErrorCode); + + virtual void OnServerReceive(DWORD nSize, int nErrorCode); + virtual void OnServerClose(int nErrorCode); + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. +#endif + + virtual ~COXDataCommunicator(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + +protected: + +private: +}; + +#endif // __OXDATACOMMUNICATOR_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/SendDataDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/SendDataDlg.h new file mode 100644 index 0000000..5a5e19d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/SendDataDlg.h @@ -0,0 +1,42 @@ +// SendDataDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CSendDataDlg dialog + +#include "OXCommMsg.h" + +class CSendDataDlg : public CDialog +{ +// Construction +public: + CSendDataDlg(COXCommMsg* pCommMsg, CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSendDataDlg) + enum { IDD = IDD_SEND_DATA }; + CButton m_wndBrowse; + CListBox m_wndList; + CString m_sValue; + int m_nType; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSendDataDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + COXCommMsg* m_pCommMsg; + + // Generated message map functions + //{{AFX_MSG(CSendDataDlg) + afx_msg void OnAdd(); + afx_msg void OnBrowse(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.cpp new file mode 100644 index 0000000..6dd5774 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Communicator.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.h new file mode 100644 index 0000000..518dcc6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC socket extensions + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.rc2 new file mode 100644 index 0000000..3e20138 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Communicator.rc2 @@ -0,0 +1,13 @@ +// +// COMMUNICATOR.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/CommunicatorDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/CommunicatorDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/CommunicatorDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/resource.h new file mode 100644 index 0000000..13ee706 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/resource.h @@ -0,0 +1,66 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Communicator.rc +// +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDD_COMMUNICATOR_FORM 101 +#define IDP_SOCKETS_INIT_FAILED 104 +#define IDR_MAINFRAME 128 +#define IDR_COMMTYPE 129 +#define IDD_SEND_DATA 130 +#define IDS_INVALID_VALUE 130 +#define IDS_FAILED_LISTEN 131 +#define IDS_FAILED_CONNECT 132 +#define IDC_LOCAL_ADDRESS 1000 +#define IDC_LOCAL_PORT 1001 +#define IDC_CLIENT_ADDRESSES 1002 +#define IDC_SEND_CLIENT 1003 +#define IDC_DISCONNECT_CLIENT 1004 +#define IDC_RECEIVED_DATA 1005 +#define IDC_LISTEN 1006 +#define IDC_CANCEL 1007 +#define IDC_SHUTDOWN 1008 +#define IDC_EMPTY 1009 +#define IDC_LOCAL_ADDRESS_LABEL 1009 +#define IDC_NULL 1010 +#define IDC_LOCAL_PORT_LABEL 1010 +#define IDC_BOOL 1011 +#define IDC_CLIENT_ADDRESSES_LABEL 1011 +#define IDC_UI1 1012 +#define IDC_REMOTE_PORT 1012 +#define IDC_I2 1013 +#define IDC_CONNECT_SERVER 1013 +#define IDC_I4 1014 +#define IDC_DISCONNECT_SERVER 1014 +#define IDC_CY 1015 +#define IDC_SEND_SERVER 1015 +#define IDC_R4 1016 +#define IDC_REMOTE_ADDRESS 1016 +#define IDC_R8 1017 +#define IDC_SPY 1017 +#define IDC_BSTR 1018 +#define IDC_REMOTE_ADDRESS_LABEL 1018 +#define IDC_DATE 1019 +#define IDC_REMOTE_PORT_LABEL 1019 +#define IDC_ERROR 1020 +#define IDC_SERVER_GROUP 1020 +#define IDC_VALUE 1021 +#define IDC_CLIENT_GROUP 1021 +#define IDC_ADD 1022 +#define IDC_LIST 1023 +#define IDC_BINARY 1024 +#define IDC_BROWSE 1025 +#define ID_DESCRIPTION_FILE 61216 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32772 +#define _APS_NEXT_CONTROL_VALUE 1022 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/senddatadlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/senddatadlg.cpp new file mode 100644 index 0000000..7699015 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Communicator/senddatadlg.cpp @@ -0,0 +1,142 @@ +// SendDataDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Communicator.h" +#include "SendDataDlg.h" +#include "OXBlob.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSendDataDlg dialog + + +CSendDataDlg::CSendDataDlg(COXCommMsg* pCommMsg, CWnd* pParent /*=NULL*/) + : + CDialog(CSendDataDlg::IDD, pParent), + m_pCommMsg(pCommMsg) + { + //{{AFX_DATA_INIT(CSendDataDlg) + m_sValue = _T(""); + m_nType = 9; + //}}AFX_DATA_INIT + } + + +void CSendDataDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSendDataDlg) + DDX_Control(pDX, IDC_BROWSE, m_wndBrowse); + DDX_Control(pDX, IDC_LIST, m_wndList); + DDX_Text(pDX, IDC_VALUE, m_sValue); + DDX_Radio(pDX, IDC_EMPTY, m_nType); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CSendDataDlg, CDialog) + //{{AFX_MSG_MAP(CSendDataDlg) + ON_BN_CLICKED(IDC_ADD, OnAdd) + ON_BN_CLICKED(IDC_BROWSE, OnBrowse) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSendDataDlg message handlers + +void CSendDataDlg::OnAdd() + { + UINT nOleType = 0; + COXVariant oleVariant; + BOOL bSuccess = FALSE; + CString sValue; + + UpdateData(TRUE); + ASSERT((0 <= m_nType) && (m_nType < COXCommMsg::m_nArgumentTypesCount)); + nOleType = COXCommMsg::m_types[m_nType]; + + // Assign as string and then let OLE convert it + oleVariant = m_sValue; + long nFileLength = 0; + TRY + { + if (nOleType == COXCommMsg::ATBlob) + { + COXBlob blob; + bSuccess = blob.ReadRaw(m_sValue); + nFileLength = blob.GetSize(); + oleVariant = blob; + } + else if (nOleType != COXCommMsg::ATError) + { + oleVariant.ChangeType((VARTYPE)nOleType); + bSuccess = TRUE; + } + else + { + // Conversions to and from VT_ERROR is not available from OLE + // Use a VT_I4 instead + oleVariant.ChangeType(COXCommMsg::ATI4); + // ... Variant is a union, just change the type + // oleVariant.scode = oleVariant.lVal; + V_VT(&oleVariant) = (VARTYPE)nOleType; + bSuccess = TRUE; + } + } + END_TRY + + if (bSuccess) + { + m_pCommMsg->Add(oleVariant); + // Convert back to string to visualize + CString sText; + TRY + { + if (nOleType == COXCommMsg::ATBlob) + sText.Format(_T(""), nFileLength); + else + { + if (V_VT(&oleVariant) == COXCommMsg::ATError) + // ... Variant is a union, just change the type + // oleVariant.lVal= oleVariant.scode ; + V_VT(&oleVariant) = COXCommMsg::ATI4; + oleVariant.ChangeType(COXCommMsg::ATStr); + sText = V_BSTR(&oleVariant); + } + } + END_TRY + sValue.Format(_T("%i. (%s) %s"), + m_wndList.GetCount() + 1, + (LPCTSTR)COXCommMsg::m_typeNames[m_nType], + (LPCTSTR)sText); + m_wndList.AddString(sValue); + m_wndList.SetTopIndex(m_wndList.GetCount() - 1); + } + else + { + AfxMessageBox(IDS_INVALID_VALUE, MB_ICONEXCLAMATION); + } + } + +void CSendDataDlg::OnBrowse() + { + UpdateData(TRUE); + static TCHAR szFilter[] = _T("All Files (*.*) | *.* ||"); + CFileDialog fileDlg(TRUE, NULL, _T("*.*"), NULL, szFilter); + + if (fileDlg.DoModal() == IDOK) + { + m_sValue = fileDlg.GetPathName(); + // ... Set to Blob type by default + m_nType = 12; + UpdateData(FALSE); + } + + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.cpp new file mode 100644 index 0000000..2d11e20 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.cpp @@ -0,0 +1,162 @@ +// CgiHandler.cpp : implementation file +// + +#include "stdafx.h" +#include "CgiHandler.h" +#include "CgiToOleDrv.h" +#include "MailEngine.h" +#include "XString.h" + +#define MR_PROFILE _T("Profile") +#define MR_PASSWORD _T("Password") +#define MR_TO _T("To") +#define MR_SUBJECT _T("Subject") +#define MR_CONTENT _T("Content") +#define MR_ATTCOUNT _T("AttCount") +#define MR_ATTACHMENT _T("Attachment") + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCgiHandler + +IMPLEMENT_DYNCREATE(CCgiHandler, COXOwnThreadCmdTarget) + +CCgiHandler::CCgiHandler() +{ + EnableAutomation(); + EnableOwnThread(); + + AfxOleLockApp(); +} + +CCgiHandler::~CCgiHandler() +{ + // To terminate the application when all objects created with + // with OLE automation, the destructor calls AfxOleUnlockApp. + + AfxOleUnlockApp(); +} + + +void CCgiHandler::OnFinalRelease() +{ + // When the last reference for an automation object is released + // OnFinalRelease is called. The base class will automatically + // deletes the object. Add additional cleanup required for your + // object before calling the base class. + + COXOwnThreadCmdTarget::OnFinalRelease(); +} + + +BEGIN_MESSAGE_MAP(CCgiHandler, COXOwnThreadCmdTarget) + //{{AFX_MSG_MAP(CCgiHandler) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BEGIN_DISPATCH_MAP(CCgiHandler, COXOwnThreadCmdTarget) + //{{AFX_DISPATCH_MAP(CCgiHandler) + DISP_FUNCTION(CCgiHandler, "OnGet", OnGet, VT_EMPTY, VTS_DISPATCH VTS_BSTR) + DISP_FUNCTION(CCgiHandler, "OnPost", OnPost, VT_EMPTY, VTS_DISPATCH VTS_BSTR VTS_BSTR) + //}}AFX_DISPATCH_MAP +END_DISPATCH_MAP() + +// Note: we add support for IID_ICgiHandler to support typesafe binding +// from VBA. This IID must match the GUID that is attached to the +// dispinterface in the .ODL file. + +// {48452B96-D40F-11CF-AA2E-00AA00489A36} +static const IID IID_ICgiHandler = +{ 0x48452b96, 0xd40f, 0x11cf, { 0xaa, 0x2e, 0x0, 0xaa, 0x0, 0x48, 0x9a, 0x36 } }; + +BEGIN_INTERFACE_MAP(CCgiHandler, CCmdTarget) + INTERFACE_PART(CCgiHandler, IID_ICgiHandler, Dispatch) +END_INTERFACE_MAP() + +// {48452B97-D40F-11CF-AA2E-00AA00489A36} +IMPLEMENT_OLECREATE(CCgiHandler, "OXSENDMAIL.CGIHANDLER", 0x48452b97, 0xd40f, 0x11cf, 0xaa, 0x2e, 0x0, 0xaa, 0x0, 0x48, 0x9a, 0x36) + +///////////////////////////////////////////////////////////////////////////// +// CCgiHandler message handlers + +#include "MailEngine.h" + +void CCgiHandler::OnGet(LPDISPATCH pCgiObj, LPCTSTR sCommand) +{ + UNUSED(sCommand); + CCgiDispatchDrv cgiObj; + + cgiObj.AttachDispatch(pCgiObj, FALSE); + cgiObj.SetOutput(_T("\n\n")); + cgiObj.SetOutput(_T("

CGI Get Method is not supported !!

\n")); + cgiObj.SetOutput(_T("\n\n")); +} + + +void CCgiHandler::OnPost(LPDISPATCH pCgiObj, LPCTSTR sInputType, LPCTSTR sInputBuffer) +{ + UNUSED(sInputType); + UNUSED(sInputBuffer); + + CCgiDispatchDrv cgiObj; + CString sProfile; + CString sPassword; + CString sTo; + CString sSubject; + CString sContent; + COXString sAttCount; + int nAttCount; + CStringArray sAttachments; + short nLastError; + CString sOutputString; + COleVariant sInputPar; + + cgiObj.AttachDispatch(pCgiObj, FALSE); + + sInputPar = MR_PROFILE; + sProfile = cgiObj.GetInput(sInputPar); + sInputPar = MR_PASSWORD; + sPassword = cgiObj.GetInput(sInputPar); + sInputPar = MR_TO; + sTo = cgiObj.GetInput(sInputPar); + sInputPar = MR_SUBJECT; + sSubject = cgiObj.GetInput(sInputPar); + sInputPar = MR_CONTENT; + sContent = cgiObj.GetInput(sInputPar); + sInputPar = MR_ATTCOUNT; + sAttCount = cgiObj.GetInput(sInputPar); + nAttCount = sAttCount.GetInt(); + sInputPar = MR_ATTACHMENT; + for (int i=0 ; i")); + + BOOL bResult = theMailEngine.Send( + sProfile, + sPassword, + sTo, + sSubject, + sContent, + sAttachments, + nLastError); + + if (bResult) + { + sOutputString.Format(_T("

Mail sent successfully !!

\n")); + } + else + { + sOutputString.Format(_T("

Mail failed !!

\n")); + } + cgiObj.SetOutput(sOutputString); + + cgiObj.SetOutput(_T("")); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.h new file mode 100644 index 0000000..6b2a93b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/CgiHandler.h @@ -0,0 +1,65 @@ +// CgiHandler.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// HTML of the implementation of this sendmail utility +///////////////////////////////////////////////////////////////////////////// +//
+// +// +// +// +// +// +// +//
+// +// In stead of CgiToOle.exe you can use IsapiOle.dll in case of an ISAPI compliant HTTP server + +#include "OXOwnThreadCmdTarget.h" + + +///////////////////////////////////////////////////////////////////////////// +// CCgiHandler command target + +class CCgiHandler : public COXOwnThreadCmdTarget +{ + DECLARE_DYNCREATE(CCgiHandler) + + CCgiHandler(); // protected constructor used by dynamic creation + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCgiHandler) + public: + virtual void OnFinalRelease(); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CCgiHandler(); + + // Generated message map functions + //{{AFX_MSG(CCgiHandler) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() + DECLARE_OLECREATE(CCgiHandler) + + // Generated OLE dispatch map functions + //{{AFX_DISPATCH(CCgiHandler) + afx_msg void OnGet(LPDISPATCH pCgiObj, LPCTSTR sCommand); + afx_msg void OnPost(LPDISPATCH pCgiObj, LPCTSTR sInputType, LPCTSTR sInputBuffer); + //}}AFX_DISPATCH + DECLARE_DISPATCH_MAP() + DECLARE_INTERFACE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailCmd.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailCmd.h new file mode 100644 index 0000000..6fb2932 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailCmd.h @@ -0,0 +1,89 @@ +// +//////////////////////////////////////////////////////////////////////////////// +// +// Desciption : +// CMailCmd class + +// Remark: +// +// Prerequisites (necessary conditions): +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MAILCMD_H_ +#define __MAILCMD_H_ + +enum EMailCmd +{ + mcNothing = 0, + mcLogOn, + mcLogOff, + mcSend +}; + +class CMailCmd : public COXEngineCmd +{ +// Data Members +public: + EMailCmd eCmd; + +protected: + +private: + +// Member Functions +public: + CMailCmd(EMailCmd eC = mcNothing, BOOL bSynchrone = TRUE, COXDoneNotifier* pDoneNotifier = NULL) : + COXEngineCmd(bSynchrone, pDoneNotifier), + eCmd(eC) {} + virtual ~CMailCmd() {} + +protected: + +private: +}; + +class CMCLogOn: public CMailCmd +{ +public: + CString sProfile; + CString sPassword; + BOOL bResult; + + CMCLogOn(CString sProf, CString sPassw) : + CMailCmd(mcLogOn), + sProfile(sProf), + sPassword(sPassw), + bResult(FALSE) {} +}; + +class CMCLogOff: public CMailCmd +{ +public: + CMCLogOff() : + CMailCmd(mcLogOff) {} +}; + +class CMCSend: public CMailCmd +{ +public: + CString sRecipient; + CString sSubject; + CString sContent; + CStringArray sAttachments; + short nError; + + CMCSend(CString sRecip, + CString sSubj, + CString sCont, + const CStringArray& sAttatchs) : + CMailCmd(mcSend), + sSubject(sSubj), + sContent(sCont), + sRecipient(sRecip), + nError(0) { + sAttachments.Copy(sAttatchs);} +}; + + +#endif // __MAILCMD_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailEngine.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailEngine.cpp new file mode 100644 index 0000000..dad4ae2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailEngine.cpp @@ -0,0 +1,185 @@ +// MailEngine.cpp : implementation file +// + +#include "stdafx.h" +#include "MailEngine.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +short CMailEngine::defError = 0; + +CMailEngine theMailEngine; + +///////////////////////////////////////////////////////////////////////////// +// CMailEngine + +CMailEngine::CMailEngine() +{ +} + +CMailEngine::~CMailEngine() +{ +} + +BOOL CMailEngine::LogOn(CString sProfile, CString sPassword) +{ + BOOL bResult; + + CMCLogOn* pCmd = new CMCLogOn(sProfile, sPassword); + PostCommand(pCmd); + bResult = pCmd->bResult; + pCmd->Release(); + return bResult; +} + +void CMailEngine::LogOff() +{ + CMailCmd* pCmd = new CMCLogOff(); + PostCommand(pCmd); + pCmd->Release(); +} + +BOOL CMailEngine::IsLoggedOn() +{ + return m_sendMail.IsInitialized(); +} + +BOOL CMailEngine::Send(CString sProfile, + CString sPassword, + CString sRecipient, + CString sSubject, + CString sContent, + const CStringArray& sAttachments, + short& nError) +{ + CMailCmd* pCmd; + + pCmd = new CMCLogOn(sProfile, sPassword); + PostCommand(pCmd); + pCmd->Release(); + + pCmd = new CMCSend(sRecipient, + sSubject, + sContent, + sAttachments); + PostCommand(pCmd); + nError = ((CMCSend*)pCmd)->nError; + pCmd->Release(); + + return (nError == 0); +} + + +// protected: + +void CMailEngine::OnExecuteCmd(COXEngineCmd* pCmd) +{ + switch (((CMailCmd*) pCmd)->eCmd) + { + case mcLogOn: + OnLogOn(*((CMCLogOn*) pCmd)); + break; + case mcLogOff: + OnLogOff(*((CMCLogOff*) pCmd)); + break; + case mcSend: + OnSend(*((CMCSend*) pCmd)); + break; + default: + TRACE(_T("'CMailEngine::OnThreadEvent' Unknown command ! \n")); + ASSERT(FALSE); + break; + } +} + +void CMailEngine::OnThreadDestruction() +{ + COXThreadEngine::OnThreadDestruction(); + if (m_sendMail.IsInitialized()) + m_sendMail.Uninitialize(); +} + +void CMailEngine::OnLogOn(CMCLogOn& cmd) +{ + CString sProfile; +// HANDLE hToken; + + sProfile = m_sendMail.GetProfile(); + + if (sProfile != cmd.sProfile) + { + if (m_sendMail.IsInitialized()) + m_sendMail.Uninitialize(); + } + else if (m_sendMail.IsInitialized()) + { + cmd.bResult = TRUE; + return; + } + + +//LOGON32_LOGON_BATCH +//LOGON32_LOGON_INTERACTIVE +//LOGON32_LOGON_SERVICE + +/* if (!::LogonUser(_T("Kris"), _T("PERIDEV"), _T("poke725"), LOGON32_LOGON_BATCH, LOGON32_PROVIDER_DEFAULT, &hToken)) + { + DWORD dwResult = GetLastError(); + if (dwResult == ERROR_PRIVILEGE_NOT_HELD) + { + cmd.bResult = FALSE; + } + cmd.bResult = FALSE; + return; + } + if (!ImpersonateLoggedOnUser(hToken)) + { + cmd.bResult = FALSE; + return; + } +*/ + if (m_sendMail.Initialize(cmd.sProfile, cmd.sPassword)==FALSE) + { + cmd.bResult = FALSE; + return; + } + cmd.bResult = TRUE; +} + +void CMailEngine::OnLogOff(CMCLogOff& cmd) +{ + UNUSED(cmd); + if (m_sendMail.IsInitialized()) + m_sendMail.Uninitialize(); +} + +void CMailEngine::OnSend(CMCSend& cmd) +{ + CString sAttachments; + + if (m_sendMail.IsInitialized() == FALSE) + { + cmd.nError = MR_MMERR_LOGON; + return; + } + + COXSendMail::CMessage message; + + message.m_sSubject = cmd.sSubject; + message.m_sContent = cmd.sContent; + message.AddRecipient(cmd.sRecipient, COXSendMail::rtTO); + for (int i=0 ; i= m_sAttachments.GetSize()) + return FALSE; + strResult = m_sAttachments[nIndex]; + return strResult.AllocSysString(); +} + +BOOL CMailMessage::RemoveAttachment(short nIndex) +{ + if (nIndex >= m_sAttachments.GetSize()) + return FALSE; + m_sAttachments.RemoveAt(nIndex); + m_nAttachmentCount = (short)m_sAttachments.GetSize(); + return TRUE; +} + + +void CMailMessage::OnSubjectChanged() {} +void CMailMessage::OnContentChanged() {} +void CMailMessage::OnAttachmentCountChanged() {GetNotSupported();} +void CMailMessage::OnLastErrorChanged() {GetNotSupported();} +void CMailMessage::OnToChanged() {} +void CMailMessage::OnProfileChanged() {} +void CMailMessage::OnPasswordChanged() {} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailMessage.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailMessage.h new file mode 100644 index 0000000..2881640 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailMessage.h @@ -0,0 +1,91 @@ +// MailMessage.h : header file +// + + + +///////////////////////////////////////////////////////////////////////////// +// Visual Basic sample of the implementation of this ole object +///////////////////////////////////////////////////////////////////////////// +// Dim msg As Object +// Dim bResult As Boolean +// +// Set msg = CreateObject("OXSENDMAIL.MESSAGE") +// msg.Profile = "Kris" +// msg.Password = "" +// msg.To = "Kris" +// msg.Subject = "Hello to myself" +// msg.Content = "Hello and bye bye !!" +// bResult = msg.AddAttachment("c:\test.bmp") +// bResult = msg.Send() +// + +#include "OXOwnThreadCmdTarget.h" + + +///////////////////////////////////////////////////////////////////////////// +// CMailMessage command target + +class CMailEngine; + +class CMailMessage : public COXOwnThreadCmdTarget +{ +friend CMailEngine; + +DECLARE_DYNCREATE(CMailMessage) + +// Data Members +public: + +protected: + CStringArray m_sAttachments; + // See the OLE generated dispatch map functions in the function section below + +private: + +// Member Functions +public: + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMailMessage) + virtual void OnFinalRelease(); + //}}AFX_VIRTUAL + +protected: + CMailMessage(); // protected constructor used by dynamic creation + virtual ~CMailMessage(); + + // Generated message map functions + //{{AFX_MSG(CMailMessage) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() + DECLARE_OLECREATE(CMailMessage) + + // Generated OLE dispatch map functions + //{{AFX_DISPATCH(CMailMessage) + CString m_sSubject; + afx_msg void OnSubjectChanged(); + CString m_sContent; + afx_msg void OnContentChanged(); + short m_nAttachmentCount; + afx_msg void OnAttachmentCountChanged(); + short m_nLastError; + afx_msg void OnLastErrorChanged(); + CString m_sTo; + afx_msg void OnToChanged(); + CString m_sProfile; + afx_msg void OnProfileChanged(); + CString m_sPassword; + afx_msg void OnPasswordChanged(); + afx_msg BOOL AddAttachment(LPCTSTR sFilePatch); + afx_msg BSTR GetAttachment(short nIndex); + afx_msg BOOL RemoveAttachment(short nIndex); + afx_msg BOOL Send(); + //}}AFX_DISPATCH + DECLARE_DISPATCH_MAP() + DECLARE_INTERFACE_MAP() + +private: +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.SUP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.SUP new file mode 100644 index 0000000..0e8aaf8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.SUP @@ -0,0 +1,6 @@ +//SUPPRESSIONPROJ:MailSend +//VERSION:5.00 +//ENABLE:Yes +!include Mfc.sup +!include Rtl.sup + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.clw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.clw new file mode 100644 index 0000000..caef61f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.clw @@ -0,0 +1,124 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMailSendDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "mailsend.h" +LastPage=0 + +ClassCount=5 +Class1=CCgiHandler +Class2=CMailMessage +Class3=CMailSendApp +Class4=CAboutDlg +Class5=CMailSendDlg + +ResourceCount=4 +Resource1=IDD_ABOUTBOX (English (U.S.)) +Resource2=IDD_MAILSEND_DIALOG +Resource3=IDD_ABOUTBOX +Resource4=IDD_MAILSEND_DIALOG (English (Canada)) + +[CLS:CCgiHandler] +Type=0 +BaseClass=COXOwnThreadCmdTarget +HeaderFile=CgiHandler.h +ImplementationFile=CgiHandler.cpp + +[CLS:CMailMessage] +Type=0 +BaseClass=COXOwnThreadCmdTarget +HeaderFile=MailMessage.h +ImplementationFile=MailMessage.cpp + +[CLS:CMailSendApp] +Type=0 +BaseClass=CWinApp +HeaderFile=MailSend.h +ImplementationFile=MailSendDlg.cpp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=MailSendDlg.cpp +ImplementationFile=MailSendDlg.cpp + +[CLS:CMailSendDlg] +Type=0 +BaseClass=CDialog +HeaderFile=MailSendDlg.h +ImplementationFile=MailSendDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=IDC_BUTTON_REMOVEATTACHMENT + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=8 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 + +[DLG:IDD_MAILSEND_DIALOG] +Type=1 +Class=CMailSendDlg +ControlCount=15 +Control1=IDC_PROFILE,edit,1350631552 +Control2=IDC_PASSWORD,edit,1350631552 +Control3=IDC_ADDRESS,edit,1350631552 +Control4=IDC_SUBJECT,edit,1350631552 +Control5=IDC_CONTENT,edit,1352728580 +Control6=IDC_ATTACHMENT,edit,1350631552 +Control7=IDC_SEND_MAIL,button,1342242816 +Control8=IDC_ABOUT,button,1342242816 +Control9=IDCANCEL,button,1342242816 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=8 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 + +[DLG:IDD_MAILSEND_DIALOG (English (Canada))] +Type=1 +Class=CMailSendDlg +ControlCount=17 +Control1=IDC_PROFILE,edit,1350631552 +Control2=IDC_PASSWORD,edit,1350631552 +Control3=IDC_ADDRESS,edit,1350631552 +Control4=IDC_SUBJECT,edit,1350631552 +Control5=IDC_CONTENT,edit,1352728580 +Control6=IDC_SEND_MAIL,button,1342242816 +Control7=IDC_ABOUT,button,1342242816 +Control8=IDCANCEL,button,1342242816 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_LIST_ATTACHMENTS,listbox,1352728833 +Control16=IDC_BUTTON_ADDATTACHMENT,button,1342242816 +Control17=IDC_BUTTON_REMOVEATTACHMENT,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.cpp new file mode 100644 index 0000000..81c64fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.cpp @@ -0,0 +1,83 @@ +// MailSend.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "MailSend.h" +#include "MailSendDlg.h" +#include "MailEngine.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMailSendApp construction + +CMailSendApp::CMailSendApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMailSendApp object +CMailSendApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CMailSendApp initialization + +BOOL CMailSendApp::InitInstance() +{ + // Initialize OLE libraries + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OLE_INIT_FAILED); + return FALSE; + } + + // 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + // Register all OLE server (factories) as running. This enables the + // OLE libraries to create objects from other applications. + COleTemplateServer::RegisterAll(); + + theMailEngine.Initialize(); + + // Parse the command line to see if launched as OLE server + if (RunEmbedded() || RunAutomated()) + { + // Application was run with /Embedding or /Automation. Don't show the + // main window in this case. + return TRUE; + } + + // When a server application is launched stand-alone, it is a good idea + // to update the system registry in case it has been damaged. + COleObjectFactory::UpdateRegistryAll(); + + CMailSendDlg dlg; + m_pMainWnd = &dlg; + dlg.DoModal(); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CMailSendApp::ExitInstance() +{ + theMailEngine.Terminate(); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsp new file mode 100644 index 0000000..c6c6f2e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsp @@ -0,0 +1,337 @@ +# Microsoft Developer Studio Project File - Name="MailSend" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MailSend - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MailSend.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MailSend.mak" CFG="MailSend - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MailSend - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MailSend - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MailSend - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "MailSend - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "MailSend - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MailSend - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 mapi32.lib /nologo /subsystem:windows /machine:I386 /out:"MailSend.exe" + +!ELSEIF "$(CFG)" == "MailSend - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 mapi32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"MailSend.exe" + +!ELSEIF "$(CFG)" == "MailSend - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MailSend" +# PROP BASE Intermediate_Dir "MailSend" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 mapi32.lib /nologo /subsystem:windows /machine:I386 /out:"MailSend.exe" +# ADD LINK32 mapi32.lib /nologo /subsystem:windows /machine:I386 /out:"MailSend.exe" + +!ELSEIF "$(CFG)" == "MailSend - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MailSen0" +# PROP BASE Intermediate_Dir "MailSen0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 mapi32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"MailSend.exe" +# ADD LINK32 mapi32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"MailSend.exe" + +!ELSEIF "$(CFG)" == "MailSend - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MailSen1" +# PROP BASE Intermediate_Dir "MailSen1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 mapi32.lib /nologo /subsystem:windows /machine:I386 /out:"MailSend.exe" +# ADD LINK32 mapi32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"MailSend.exe" + +!ENDIF + +# Begin Target + +# Name "MailSend - Win32 Release" +# Name "MailSend - Win32 Debug" +# Name "MailSend - Win32 Release_Shared" +# Name "MailSend - Win32 Unicode_Debug" +# Name "MailSend - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\source\OXDispatchMarshaller.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXFinalReleaseWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\oxmdisp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXOwnThread.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXOwnThreadCmdTarget.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSendMail.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXThreadEngine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Xstring.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CgiHandler.cpp +# End Source File +# Begin Source File + +SOURCE=.\cgitooledrv.cpp +# End Source File +# Begin Source File + +SOURCE=.\MailEngine.cpp +# End Source File +# Begin Source File + +SOURCE=.\MailMessage.cpp +# End Source File +# Begin Source File + +SOURCE=.\MailSend.cpp +# End Source File +# Begin Source File + +SOURCE=.\MailSend.odl +# End Source File +# Begin Source File + +SOURCE=.\MailSend.rc +# End Source File +# Begin Source File + +SOURCE=.\MailSendDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\CgiHandler.h +# End Source File +# Begin Source File + +SOURCE=.\CgiToOleDrv.h +# End Source File +# Begin Source File + +SOURCE=.\MailCmd.h +# End Source File +# Begin Source File + +SOURCE=.\MailEngine.h +# End Source File +# Begin Source File + +SOURCE=.\MailMessage.h +# End Source File +# Begin Source File + +SOURCE=.\MailSend.h +# End Source File +# Begin Source File + +SOURCE=.\MailSendDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDispatchMarshaller.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFinalReleaseWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\oxmdisp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXOwnThread.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXOwnThreadCmdTarget.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSendMail.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXThreadEngine.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\XString.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\MailSend.ico +# End Source File +# Begin Source File + +SOURCE=.\res\MailSend.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsw new file mode 100644 index 0000000..e0fe28e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MailSend"=".\MailSend.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.h new file mode 100644 index 0000000..ff6104d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.h @@ -0,0 +1,38 @@ +// MailSend.h : main header file for the MAILSEND application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMailSendApp: +// See MailSend.cpp for the implementation of this class +// + +class CMailSendApp : public CWinApp +{ +public: + CMailSendApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMailSendApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CMailSendApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.odl b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.odl new file mode 100644 index 0000000..a8d5b4a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.odl @@ -0,0 +1,108 @@ +// MailSend.odl : type library source for MailSend.exe + +// This file will be processed by the Make Type Library (mktyplib) tool to +// produce the type library (MailSend.tlb). + +[ uuid(48452B61-D40F-11CF-AA2E-00AA00489A36), version(1.0) ] +library MailSend +{ + importlib("stdole32.tlb"); + + + // Primary dispatch interface for CMail + + [ uuid(48452B66-D40F-11CF-AA2E-00AA00489A36) ] + dispinterface IMail + { + properties: + // NOTE - ClassWizard will maintain property information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_PROP(CMail) + //}}AFX_ODL_PROP + + methods: + // NOTE - ClassWizard will maintain method information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_METHOD(CMail) + //}}AFX_ODL_METHOD + + }; + + // Class information for CMail + + [ uuid(48452B67-D40F-11CF-AA2E-00AA00489A36) ] + coclass MAIL + { + [default] dispinterface IMail; + }; + + // Primary dispatch interface for CMailMessage + + [ uuid(48452B86-D40F-11CF-AA2E-00AA00489A36) ] + dispinterface IMailMessage + { + properties: + // NOTE - ClassWizard will maintain property information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_PROP(CMailMessage) + [id(1)] BSTR Subject; + [id(2)] BSTR Content; + [id(3)] short AttachmentCount; + [id(4)] short LastError; + [id(5)] BSTR To; + [id(6)] BSTR Profile; + [id(7)] BSTR Password; + //}}AFX_ODL_PROP + + methods: + // NOTE - ClassWizard will maintain method information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_METHOD(CMailMessage) + [id(8)] boolean AddAttachment(BSTR sFilePath); + [id(9)] BSTR GetAttachment(short nIndex); + [id(10)] boolean RemoveAttachment(short nIndex); + [id(11)] boolean Send(); + //}}AFX_ODL_METHOD + + }; + + // Class information for CMailMessage + + [ uuid(48452B87-D40F-11CF-AA2E-00AA00489A36) ] + coclass CMailMessage + { + [default] dispinterface IMailMessage; + }; + + // Primary dispatch interface for CCgiHandler + + [ uuid(48452B96-D40F-11CF-AA2E-00AA00489A36) ] + dispinterface ICgiHandler + { + properties: + // NOTE - ClassWizard will maintain property information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_PROP(CCgiHandler) + //}}AFX_ODL_PROP + + methods: + // NOTE - ClassWizard will maintain method information here. + // Use extreme caution when editing this section. + //{{AFX_ODL_METHOD(CCgiHandler) + [id(1)] void OnGet(IDispatch* pCgiObj, BSTR sCommand); + [id(2)] void OnPost(IDispatch* pCgiObj, BSTR sInputType, BSTR sInputBuffer); + //}}AFX_ODL_METHOD + + }; + + // Class information for CCgiHandler + + [ uuid(48452B97-D40F-11CF-AA2E-00AA00489A36) ] + coclass CCgiHandler + { + [default] dispinterface ICgiHandler; + } + + + //{{AFX_APPEND_ODL}} +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.rc new file mode 100644 index 0000000..b3fb9e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSend.rc @@ -0,0 +1,269 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 253, 214 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About SendMail" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,13,18,20,20 + LTEXT "SendMail Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright © The Code Project 1997",IDC_STATIC,40,25,119, + 8 + DEFPUSHBUTTON "OK",IDOK,214,7,32,14,WS_GROUP + LTEXT "This application is an OLE server which offers a Message object that you can call (even from within NT services) to send a mail message via a MAPI compliant system.\nMessage OLE object: (OXSENDMAIL.MESSAGE)", + IDC_STATIC,37,45,189,34 + LTEXT "Properties:\n\tFrom \t\t\tstring\n\tTo\t\t\tstring\n\tSubject\t\t\tstring\n\tContent\t\t\tstring\n\tAttachmentCount\tinteger\n\tLastError\t\tlong", + IDC_STATIC,37,81,171,57 + LTEXT "Methods:\n\tBOOL AddAttachment ( path ) path is string\n\tstring GetAttachment ( index ) index is integer\n\tRemoveAttachment ( index )\n\tBOOL Send ()", + IDC_STATIC,37,138,188,43 + LTEXT "ALSO ACCESSIBLE WITH CGI AND ISAPI\nCheck the Readme.txt file.", + IDC_STATIC,37,185,189,19 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "MAILSEND MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "MAILSEND\0" + VALUE "LegalCopyright", "Copyright © 1996\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "MAILSEND.EXE\0" + VALUE "ProductName", "MAILSEND Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 207 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDP_OLE_INIT_FAILED "OLE initialization failed. Make sure that the OLE libraries are the correct version." + IDS_ABOUTBOX "&About MailSend..." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\MailSend.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\MailSend.ico" +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MAILSEND_DIALOG DIALOG DISCARDABLE 0, 0, 214, 252 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "MailSend sample" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_PROFILE,57,7,150,12,ES_AUTOHSCROLL + EDITTEXT IDC_PASSWORD,57,24,150,12,ES_AUTOHSCROLL + EDITTEXT IDC_ADDRESS,57,49,150,12,ES_AUTOHSCROLL + EDITTEXT IDC_SUBJECT,57,65,150,12,ES_AUTOHSCROLL + EDITTEXT IDC_CONTENT,57,82,150,39,ES_MULTILINE | WS_VSCROLL + PUSHBUTTON "Send message",IDC_SEND_MAIL,7,228,57,17 + PUSHBUTTON "About...",IDC_ABOUT,78,228,57,17 + PUSHBUTTON "Close",IDCANCEL,149,228,57,17 + LTEXT "Profile Name: ",IDC_STATIC,7,9,45,8 + LTEXT "Password: ",IDC_STATIC,7,26,36,8 + LTEXT "Address: ",IDC_STATIC,8,51,30,8 + LTEXT "Subject: ",IDC_STATIC,7,67,30,8 + LTEXT "Attachment: ",IDC_STATIC,7,130,41,8 + LTEXT "Content: ",IDC_STATIC,7,84,30,8 + LISTBOX IDC_LIST_ATTACHMENTS,56,131,151,87,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Add",IDC_BUTTON_ADDATTACHMENT,7,145,37,15 + PUSHBUTTON "Remove",IDC_BUTTON_REMOVEATTACHMENT,7,167,37,15 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_MAILSEND_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 207 + TOPMARGIN, 7 + BOTTOMMARGIN, 245 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\MailSend.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSendDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSendDlg.cpp new file mode 100644 index 0000000..2c69aef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/MailSendDlg.cpp @@ -0,0 +1,255 @@ +// MailSendDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "MailSend.h" +#include "MailSendDlg.h" +#include "MailEngine.h" + +#include "oxmdisp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CMailSendApp + +BEGIN_MESSAGE_MAP(CMailSendApp, CWinApp) + //{{AFX_MSG_MAP(CMailSendApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMailSendDlg dialog + +CMailSendDlg::CMailSendDlg(CWnd* pParent /*=NULL*/) + : CDialog(CMailSendDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CMailSendDlg) + m_sAddress = _T(""); + m_sContent = _T(""); + m_sPassword = _T(""); + m_sProfile = _T(""); + m_sSubject = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CMailSendDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMailSendDlg) + DDX_Control(pDX, IDC_LIST_ATTACHMENTS, m_lbAttachments); + DDX_Text(pDX, IDC_ADDRESS, m_sAddress); + DDX_Text(pDX, IDC_CONTENT, m_sContent); + DDX_Text(pDX, IDC_PASSWORD, m_sPassword); + DDX_Text(pDX, IDC_PROFILE, m_sProfile); + DDX_Text(pDX, IDC_SUBJECT, m_sSubject); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CMailSendDlg, CDialog) + //{{AFX_MSG_MAP(CMailSendDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_SEND_MAIL, OnSendMail) + ON_BN_CLICKED(IDC_ABOUT, OnAbout) + ON_BN_CLICKED(IDC_BUTTON_ADDATTACHMENT, OnButtonAddattachment) + ON_BN_CLICKED(IDC_BUTTON_REMOVEATTACHMENT, OnButtonRemoveattachment) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMailSendDlg message handlers + +BOOL CMailSendDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_sProfile=_T("Microsoft Outlook"); + m_sAddress=_T("info@theUltimateToolBox.com"); + m_sSubject=_T("Test Mail Send"); + m_sContent=_T("This is a message sent to check the MailSend sample functionality"); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CMailSendDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CMailSendDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CMailSendDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CMailSendDlg::OnSendMail() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + + CStringArray sAttachments; + for(int nIndex=0; nIndex + + + + + + + + + + +Info: + +HTTP: www.theUltimateToolbox.com + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.CPP new file mode 100644 index 0000000..c16f8f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.CPP @@ -0,0 +1,606 @@ +// ========================================================================== +// Class Implementation : CSendMail +// ========================================================================== + +// Source file : SendMail.cpp + +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "SendMail.h" + +#pragma warning(disable: 4228) +#include +#include +#include +#include + +#define USES_IID_IMAPIFolder +#define INITGUID +#include +#include +#pragma warning(default: 4228) + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define _countof(array) (sizeof(array)/sizeof(array[0])) + +///////////////////////////////////////////////////////////////////////////// +// MAPI implementation helpers and globals + +static BOOL IsMailAvail = (BOOL)-1; // start out not determined + +///////////////////////////////////////////////////////////////////////////// +// _AFX_MAIL_STATE + +class _AFX_MAIL_STATE : public CNoTrackObject +{ +public: + HINSTANCE m_hInstMail; // handle to MAPI32.DLL + virtual ~_AFX_MAIL_STATE(); +}; + +_AFX_MAIL_STATE::~_AFX_MAIL_STATE() +{ + if (m_hInstMail != NULL) + ::FreeLibrary(m_hInstMail); +} + +_AFX_MAIL_STATE* _afxMailState; +int nCount = 0; + +CSendMail::CSendMail() : + m_pMAPISession(NULL), + m_pAddressBook(NULL), + m_peidDefaultMDB(NULL), + m_cbeidDefaultMDB(0), + m_pDefaultMDB(NULL), + m_pRootFolder(NULL), + m_szRecipient(NULL), + m_uLogoffFlags(LOGOFF_ORDERLY), + m_szAttachData(NULL) +{ + if (nCount==0) + _afxMailState = new _AFX_MAIL_STATE; + nCount++; +} + + +CSendMail::~CSendMail() +{ + nCount--; + if (nCount==0) + delete _afxMailState; +} + + +CString CSendMail::GetReturnMsg(int nErr) +{ + CString sErrorMsg; + switch(nErr) + { + case SUCCESS_SUCCESS: + sErrorMsg = _T("Sending of Mail was succesful"); + break; + case MAPI_E_USER_ABORT: + sErrorMsg = _T("Sending of Mail has been aborted by user"); + break; + case MAPI_E_FAILURE: + sErrorMsg = _T("Sending of Mail was not succesful"); + break; + case MAPI_E_LOGIN_FAILURE: + sErrorMsg = _T("login failure"); + break; + case MAPI_E_DISK_FULL: + sErrorMsg = _T("Disk full"); + break; + case MAPI_E_INSUFFICIENT_MEMORY: + sErrorMsg = _T("not enough memory"); + break; + case MAPI_E_ACCESS_DENIED: + sErrorMsg = _T("access denied"); + break; + case MAPI_E_TOO_MANY_SESSIONS: + sErrorMsg = _T("too many sessions open"); + break; + case MAPI_E_TOO_MANY_FILES: + sErrorMsg = _T("too many open files"); + break; + case MAPI_E_TOO_MANY_RECIPIENTS: + sErrorMsg = _T("too many recipients specified"); + break; + case MAPI_E_ATTACHMENT_NOT_FOUND: + sErrorMsg = _T("attachment not found"); + break; + case MAPI_E_ATTACHMENT_OPEN_FAILURE: + sErrorMsg = _T("could not open attachment"); + break; + case MAPI_E_ATTACHMENT_WRITE_FAILURE: + sErrorMsg = _T("could not write attachment"); + break; + case MAPI_E_UNKNOWN_RECIPIENT: + sErrorMsg = _T("unknown recipient"); + break; + case MAPI_E_BAD_RECIPTYPE: + sErrorMsg = _T("unknown reciptype"); + break; + case MAPI_E_NO_MESSAGES: + sErrorMsg = _T("no messages"); + break; + case MAPI_E_INVALID_MESSAGE: + sErrorMsg = _T("invalid message"); + break; + case MAPI_E_TEXT_TOO_LARGE: + sErrorMsg = _T("text too large"); + break; + case MAPI_E_INVALID_SESSION: + sErrorMsg = _T("invalid session"); + break; + case MAPI_E_TYPE_NOT_SUPPORTED: + sErrorMsg = _T("type not supported"); + break; + case MAPI_E_AMBIG_RECIP: + sErrorMsg = _T("ambiguous recipiebt"); + break; + case MAPI_E_MESSAGE_IN_USE: + sErrorMsg = _T("message in use"); + break; + case MAPI_E_NETWORK_FAILURE: + sErrorMsg = _T("network failure"); + break; + case MAPI_E_INVALID_EDITFIELDS: + sErrorMsg = _T("invalid editfields"); + break; + case MAPI_E_INVALID_RECIPS: + sErrorMsg = _T("invalid recipients"); + break; + case MAPI_E_NOT_SUPPORTED: + sErrorMsg = _T("not supported request"); + break; + default: + sErrorMsg = _T("unknown error"); + break; + } + + return sErrorMsg; +} + +BOOL CSendMail::Initialize(CString sProfileName, CString sPassword) +{ + ASSERT_VALID(this); + HRESULT hResult; + + if (IsInitialized()) + Uninitialize(); + + // Initialize the MAPI libraries before calling ANY MAPI function + MAPIINIT_0 MAPIINIT = { 0, MAPI_NT_SERVICE | MAPI_MULTITHREAD_NOTIFICATIONS }; + hResult = MAPIInitialize(&MAPIINIT); + if (!FAILED (hResult)) + { + // Logon onto the message subsystem. We are going to ask the user to + // select a profile to log into. The UI for this will be provided by MAPI. + hResult = MAPILogonEx((ULONG)NULL, + sProfileName.GetBuffer(256), + sPassword.GetBuffer(256), + MAPI_NO_MAIL | MAPI_EXTENDED | MAPI_EXPLICIT_PROFILE /*| MAPI_USE_DEFAULT */| MAPI_NEW_SESSION, + &m_pMAPISession); + + sProfileName.ReleaseBuffer(); + sPassword.ReleaseBuffer(); + + if (!FAILED (hResult)) + { + // get the address book + // be sure to have the correct address book set as the default + // see the Addressing tab in the profile config control panel applet + hResult = m_pMAPISession->OpenAddressBook(NULL, NULL, 0, &m_pAddressBook); + if (!FAILED(hResult)) + { + if (InitializeMessageStore()) + { + // get the root folder + ULONG uObjType; + hResult = m_pDefaultMDB->OpenEntry(0, + NULL, + (LPIID)&IID_IMAPIFolder, + MAPI_MODIFY, + &uObjType, + (LPUNKNOWN *)&m_pRootFolder); + + if (!FAILED(hResult)) + { + m_sMAPIProfile = sProfileName; + return TRUE; + } + } + } + } + Uninitialize(); + } + else + MAPIUninitialize(); + return FALSE; +} + +BOOL CSendMail::IsInitialized() const +{ + return (m_pMAPISession!=NULL); +} + +void CSendMail::Uninitialize() +{ + if (m_pRootFolder != NULL) + { + m_pRootFolder->Release(); + m_pRootFolder = NULL; + } + + if (m_pDefaultMDB != NULL) + { + m_pDefaultMDB->StoreLogoff(&m_uLogoffFlags); + m_pDefaultMDB->Release(); + m_pDefaultMDB = NULL; + } + + if (m_peidDefaultMDB != NULL) + { + MAPIFreeBuffer(m_peidDefaultMDB); + m_peidDefaultMDB = NULL; + } + + if (m_pAddressBook != NULL) + { + m_pAddressBook->Release(); + m_pAddressBook = NULL; + } + + if (m_pMAPISession!=NULL) + { + ULONG ulUIParam = (ULONG)NULL; // null window handle + ULONG ulFlags = 0; + ULONG ulReserved = 0; + + m_pMAPISession->Logoff(ulUIParam, ulFlags, ulReserved); + m_pMAPISession->Release(); + m_pMAPISession = NULL; + MAPIUninitialize(); + } +} + +CString CSendMail::GetProfile() const +{ + CString sProfile; + + if (IsInitialized()) + sProfile = m_sMAPIProfile; + return sProfile; +} + +BOOL CSendMail::InitializeMessageStore() +{ + LPSRowSet pRow = NULL; + ULONG ulRow; + ULONG uRowCount; + HRESULT hResult; + LPMAPITABLE pStoresTable; + LPSPropValue pProps; + BOOL bFound; + + +// The order for this enumaration must match the order of the properties +// in the tag array below + enum + { + DEFAULT_STORE, + STORE_EID, + MSG_STORES_TABLE_PROPS // number columns in the proptagarray + }; + + SizedSPropTagArray (MSG_STORES_TABLE_PROPS, sptMsgStores) = + { + MSG_STORES_TABLE_PROPS, + { + PR_DEFAULT_STORE, + PR_ENTRYID, + } + }; + +///// end of local declarations + + m_cbeidDefaultMDB = 0; + m_peidDefaultMDB = NULL; + + +// first get a table of the message stores available + hResult = m_pMAPISession->GetMsgStoresTable (0, &pStoresTable); + if (FAILED(hResult)) + return FALSE; + + +// we only want the default store flag and the entry id + hResult = pStoresTable->SetColumns((LPSPropTagArray)&sptMsgStores, 0); + if (FAILED(hResult)) + return FALSE; + + pStoresTable->GetRowCount(0, &uRowCount); // one row corresponds to one MDB provider +// typically no one should have more than +// 6 or 7 MDB providers. + +// Get row(s) from the message stores table + hResult = pStoresTable->QueryRows(uRowCount, 0, &pRow); + if (FAILED(hResult)) + return FALSE; + + bFound = FALSE; +// loop through each row -- each row represents the properties of a message store + for (ulRow=0; ulRowcRows; ulRow++) + { + pProps = pRow->aRow[ulRow].lpProps; + + if (pProps[DEFAULT_STORE].Value.b == 1) // we found it! + { + + m_cbeidDefaultMDB = pProps[STORE_EID].Value.bin.cb; + hResult = MAPIAllocateBuffer(m_cbeidDefaultMDB, (LPVOID *)&m_peidDefaultMDB); + if (FAILED(hResult)) + return FALSE; + + memcpy(m_peidDefaultMDB, pProps[STORE_EID].Value.bin.lpb, m_cbeidDefaultMDB); + + bFound = TRUE; + } +/// else ignore the non-defaults + } + + if (bFound) + hResult = S_OK; + else + hResult = MAPI_E_NOT_FOUND; + + + +// clean up if neccessary + if (pRow != NULL) + FreeProws(pRow); + + if (pStoresTable != NULL) + pStoresTable->Release(); + + + if (FAILED(hResult)) // there was an error + return FALSE; + +// open the default message store + m_pDefaultMDB = NULL; + hResult = m_pMAPISession->OpenMsgStore ((ULONG)NULL, + m_cbeidDefaultMDB, + m_peidDefaultMDB, + NULL, + MDB_WRITE, + &m_pDefaultMDB); + if (FAILED(hResult)) + return FALSE; + + return TRUE; +} + +BOOL CSendMail::SendMapiMail(CString sTo, CString sSubject, CString sDescription, CString sAtt) +{ + LPMESSAGE pMessage; + HRESULT hResult; + + pMessage = ComposeMessage(sTo, + sSubject, + sDescription, + sAtt); + if (pMessage == NULL) + return FALSE; + + hResult = pMessage->SubmitMessage(FORCE_SUBMIT); + + if (pMessage != NULL) + pMessage->Release(); + + if (FAILED(hResult)) + return FALSE; + return TRUE; +} + + +//************************************************************* + + +LPMESSAGE CSendMail::ComposeMessage(LPCTSTR szRecipient, + LPCTSTR szSubject, + LPCTSTR szDescription, + LPCTSTR szAtt) +{ + HRESULT hrRet = 0; + LPMESSAGE pMessage = NULL; + SPropValue pMessageProps[5]; + LPADRLIST pAddressList = NULL; + LPSPropProblemArray pPropProblems; + + // create the message + hrRet = m_pRootFolder->CreateMessage(NULL, 0, &pMessage); + if (FAILED(hrRet)) + return NULL; + + // setup the properties + pMessageProps[0].ulPropTag = PR_MESSAGE_CLASS; + pMessageProps[0].Value.lpszA = "IPM.NOTE"; + + pMessageProps[1].ulPropTag = PR_PRIORITY; + pMessageProps[1].Value.l = 0; + + pMessageProps[2].ulPropTag = PR_SUBJECT; + pMessageProps[2].Value.lpszA = (LPTSTR) szSubject; + + pMessageProps[3].ulPropTag = PR_BODY; + pMessageProps[3].Value.lpszA = (LPTSTR) szDescription; + + // set the message submission time + SYSTEMTIME tSysTime; + FILETIME tSubmitTime; + GetSystemTime(&tSysTime); + SystemTimeToFileTime(&tSysTime, &tSubmitTime); // convert to file time + + pMessageProps[4].ulPropTag = PR_CLIENT_SUBMIT_TIME; + pMessageProps[4].Value.ft = tSubmitTime; + + + // build the recipients list + pAddressList = GetRecipient(szRecipient); + if (pAddressList) + { + // set the properties + hrRet = pMessage->SetProps(5, pMessageProps, &pPropProblems); + if (!FAILED(hrRet)) + { + // set the recipients to the message + hrRet = pMessage->ModifyRecipients(MODRECIP_ADD, pAddressList); + if (!FAILED(hrRet)) + { + // Create the attachment + AddAttachments(pMessage, szAtt); + hrRet = pMessage->SaveChanges(KEEP_OPEN_READWRITE); + } + } + + // GetRecipient allocates memory pointed to by pAddressList. + // use MAPIFreeBuffer to free memory after using it + // for modifying the recipients + MAPIFreeBuffer(pAddressList); + + if (!FAILED(hrRet)) + return pMessage; + } + + if (pMessage != NULL) + pMessage->Release(); + + return NULL; +} + + +LPADRLIST CSendMail::GetRecipient(LPCTSTR szRecipient) +{ + HRESULT hrRet; + LPADRLIST pAddressList; + +// allocate address list for one recipient + MAPIAllocateBuffer(sizeof(ADRLIST) + sizeof(ADRENTRY) * 1, + (LPVOID *) &pAddressList); +// allocate space for properties + MAPIAllocateBuffer(sizeof(SPropValue) * 2, + (LPVOID *) &(pAddressList->aEntries[0].rgPropVals) ); + +// set properties for address list + pAddressList->cEntries = 1; + pAddressList->aEntries[0].cValues = 2; + pAddressList->aEntries[0].rgPropVals[0].ulPropTag = PR_DISPLAY_NAME; + pAddressList->aEntries[0].rgPropVals[0].Value.lpszA = (LPTSTR) szRecipient; + pAddressList->aEntries[0].rgPropVals[1].ulPropTag = PR_RECIPIENT_TYPE; + pAddressList->aEntries[0].rgPropVals[1].Value.l = MAPI_TO; + + +// resolve the address + hrRet = m_pAddressBook->ResolveName(0, 0, NULL, pAddressList); + if (FAILED(hrRet)) + { + MAPIFreeBuffer(pAddressList); + pAddressList = NULL; + } + + return pAddressList; +} + +HRESULT CSendMail::AddAttachments(LPMESSAGE pMessage, LPCTSTR szAttachData) +{ + HRESULT hrRet; + UINT idx; + LPSTR szAttachment; + +// if there are no attachments, just return + if (szAttachData == NULL || _tcslen(szAttachData) == 0) + return 0; + + enum { REND_POS, PATH_NAME, ATT_METHOD, DISP_NAME, ATT_FILENAME, ATT_DIM}; + + SizedSPropTagArray(ATT_DIM , sptAttachTags) = + { ATT_DIM, + { PR_RENDERING_POSITION, PR_ATTACH_PATHNAME, + PR_ATTACH_METHOD, PR_DISPLAY_NAME, PR_ATTACH_FILENAME } + }; + SPropValue spvAttachProps[ATT_DIM]; + + +// Count the number of attachments in the AttachmentData + CString sAttachment; + int nIndex = 0; + if (!AfxExtractSubString(sAttachment, szAttachData, nIndex++, _T('|'))) + return 0; + while (!sAttachment.IsEmpty()) + { + + LPATTACH lpAttach = NULL; + ULONG ulAttachNum = 0; + szAttachment = sAttachment.GetBuffer(_MAX_PATH); + + hrRet = pMessage->CreateAttach(NULL, 0, &ulAttachNum, &lpAttach); + if (FAILED(hrRet)) + return hrRet; + + for(idx = 0; idx < ATT_DIM; ++idx) + { + spvAttachProps[idx].ulPropTag = sptAttachTags.aulPropTag[idx]; + spvAttachProps[idx].dwAlignPad = 0; + } + + +// Split the path of the attachment, so we can extract the filename +// to display under the attachment + TCHAR pszDrive[_MAX_DRIVE]; + TCHAR pszSubdir[_MAX_DIR]; + TCHAR pszBaseName[_MAX_FNAME]; + TCHAR pszExtender[_MAX_EXT]; + TCHAR pszFileName[_MAX_FNAME + _MAX_EXT]; + + _tsplitpath(szAttachment, pszDrive, pszSubdir, pszBaseName, pszExtender); + _tmakepath(pszFileName, NULL, NULL, pszBaseName, pszExtender); + + spvAttachProps[REND_POS].Value.l = -1; + spvAttachProps[PATH_NAME].Value.LPSZ = szAttachment; +/* + ATTACH_BY_REF_RESOLVE means the spooler will resolve the attachment into ATTACH_BY_VALUE + and place the attachment data in PR_ATTACH_DATA_BIN + */ + spvAttachProps[ATT_METHOD].Value.l = ATTACH_BY_REF_RESOLVE; + spvAttachProps[DISP_NAME].Value.LPSZ = pszFileName; + spvAttachProps[ATT_FILENAME].Value.LPSZ = pszFileName; + + hrRet = lpAttach->SetProps(ATT_DIM, spvAttachProps, NULL); + if (FAILED(hrRet)) + return hrRet; + + hrRet = lpAttach->SaveChanges(KEEP_OPEN_READWRITE); + if (FAILED(hrRet)) + return hrRet; + + sAttachment.ReleaseBuffer(); + szAttachment = NULL; + UlRelease(lpAttach); + + sAttachment.Empty(); + AfxExtractSubString(sAttachment, szAttachData, nIndex++, _T('|')); + } + + return hrRet; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.h new file mode 100644 index 0000000..ce6641b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/SendMail.h @@ -0,0 +1,90 @@ +// ========================================================================== +// Class Specification : CSendMail +// ========================================================================== + +// Header file : SendMail.h + +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// +// + +// Remark: +// *** +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __SENDMAIL_H__ +#define __SENDMAIL_H__ + +#include + +class CSendMail : public CObject +{ +protected: + + LPMAPISESSION m_pMAPISession; + LPADRBOOK m_pAddressBook; + LPENTRYID m_peidDefaultMDB; + ULONG m_cbeidDefaultMDB; + LPMDB m_pDefaultMDB; + LPMAPIFOLDER m_pRootFolder; + LPSTR m_szRecipient; + ULONG m_uLogoffFlags; + LPSTR m_szAttachData; + CString m_sMAPIProfile; + +public: + CSendMail(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + ~CSendMail(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + + + BOOL Initialize(CString sProfileName, CString sPassword = NULL); + BOOL IsInitialized() const; + void Uninitialize(); + CString GetProfile() const; + BOOL SendMapiMail(CString sTo, CString sSubject, CString sDescription, CString sAtt); + +protected: + CString GetReturnMsg(int nErr); + BOOL InitializeMessageStore(); + + + LPMESSAGE ComposeMessage(LPCTSTR szRecipient, LPCTSTR szSubject, LPCTSTR szDescription, LPCTSTR szAtt); + LPADRLIST GetRecipient(LPCTSTR szRecipient); + HRESULT AddAttachments(LPMESSAGE pMessage, LPCTSTR szAttachData); +}; + +#endif // __MAILTO_H__ +// ========================================================================== + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.cpp new file mode 100644 index 0000000..be1f304 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MailSend.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.h new file mode 100644 index 0000000..76b955a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/StdAfx.h @@ -0,0 +1,18 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for standard templates + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.cpp new file mode 100644 index 0000000..aa19718 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.cpp @@ -0,0 +1,102 @@ +// Machine generated IDispatch wrapper class(es) created with ClassWizard + +#include "stdafx.h" +#include "cgitooledrv.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + + +///////////////////////////////////////////////////////////////////////////// +// CCgiDispatchDrv properties + +///////////////////////////////////////////////////////////////////////////// +// CCgiDispatchDrv operations + +void CCgiDispatchDrv::SetOutput(LPCTSTR sOutput) +{ + static BYTE parms[] = + VTS_BSTR; + InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, + sOutput); +} + +CString CCgiDispatchDrv::GetInput(const VARIANT& vIndex) +{ + CString result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x2, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, + &vIndex); + return result; +} + +CString CCgiDispatchDrv::GetPathInfo() +{ + CString result; + InvokeHelper(0x3, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetScriptName() +{ + CString result; + InvokeHelper(0x4, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetAccepted() +{ + CString result; + InvokeHelper(0x5, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetRemoteAddress() +{ + CString result; + InvokeHelper(0x6, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetClientInfo(LPCTSTR sInfoKey) +{ + CString result; + static BYTE parms[] = + VTS_BSTR; + InvokeHelper(0x7, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, + sInfoKey); + return result; +} + +CString CCgiDispatchDrv::GetServerName() +{ + CString result; + InvokeHelper(0x8, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +short CCgiDispatchDrv::GetServerPort() +{ + short result; + InvokeHelper(0x9, DISPATCH_METHOD, VT_I2, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetServerProtocol() +{ + CString result; + InvokeHelper(0xa, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} + +CString CCgiDispatchDrv::GetServerSoftware() +{ + CString result; + InvokeHelper(0xb, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); + return result; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.h new file mode 100644 index 0000000..4de045e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/cgitooledrv.h @@ -0,0 +1,28 @@ +// Machine generated IDispatch wrapper class(es) created with ClassWizard +///////////////////////////////////////////////////////////////////////////// +// CCgiDispatchDrv wrapper class + +class CCgiDispatchDrv : public COleDispatchDriver +{ +public: + CCgiDispatchDrv() {} // Calls COleDispatchDriver default constructor + CCgiDispatchDrv(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} + CCgiDispatchDrv(const CCgiDispatchDrv& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} + +// Attributes +public: + +// Operations +public: + void SetOutput(LPCTSTR sOutput); + CString GetInput(const VARIANT& vIndex); + CString GetPathInfo(); + CString GetScriptName(); + CString GetAccepted(); + CString GetRemoteAddress(); + CString GetClientInfo(LPCTSTR sInfoKey); + CString GetServerName(); + short GetServerPort(); + CString GetServerProtocol(); + CString GetServerSoftware(); +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.rc2 new file mode 100644 index 0000000..15ac259 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/res/MailSend.rc2 @@ -0,0 +1,13 @@ +// +// MAILSEND.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/resource.h new file mode 100644 index 0000000..f5f0ef2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/MailSend/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MailSend.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDS_ABOUTBOX 101 +#define IDD_MAILSEND_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_SEND_MAIL 1002 +#define IDC_ABOUT 1003 +#define IDC_PROFILE 1004 +#define IDC_PASSWORD 1005 +#define IDC_ADDRESS 1006 +#define IDC_SUBJECT 1007 +#define IDC_LIST_ATTACHMENTS 1008 +#define IDC_CONTENT 1009 +#define IDC_BUTTON_ADDATTACHMENT 1010 +#define IDC_BUTTON_REMOVEATTACHMENT 1011 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1011 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.cpp new file mode 100644 index 0000000..bfa623a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.cpp new file mode 100644 index 0000000..be1919f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.cpp @@ -0,0 +1,91 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.h new file mode 100644 index 0000000..3b6ba60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/MainFrm.h @@ -0,0 +1,44 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.cpp new file mode 100644 index 0000000..8a5c6e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.cpp @@ -0,0 +1,113 @@ +#include "stdafx.h" +#include "OXDocMgr.h" +#include "OXWinApp.h" +#include "OXPrvDlg.h" + +IMPLEMENT_DYNAMIC(COXDocManager, CDocManager) + +static void AppendFilterSuffix(CString& filter, OPENFILENAME& ofn, + CDocTemplate* pTemplate, CString* pstrDefaultExt) +{ + ASSERT_VALID(pTemplate); + ASSERT_KINDOF(CDocTemplate, pTemplate); + + CString strFilterExt, strFilterName; + if (pTemplate->GetDocString(strFilterExt, CDocTemplate::filterExt) && + !strFilterExt.IsEmpty() && + pTemplate->GetDocString(strFilterName, CDocTemplate::filterName) && + !strFilterName.IsEmpty()) + { + // a file based document template - add to filter list +#ifndef _MAC + ASSERT(strFilterExt[0] == '.'); +#endif + if (pstrDefaultExt != NULL) + { + // set the default extension +#ifndef _MAC + *pstrDefaultExt = ((LPCTSTR)strFilterExt) + 1; // skip the '.' +#else + *pstrDefaultExt = strFilterExt; +#endif + ofn.lpstrDefExt = (LPTSTR)(LPCTSTR)(*pstrDefaultExt); + ofn.nFilterIndex = ofn.nMaxCustFilter + 1; // 1 based number + } + + // add to filter + filter += strFilterName; + ASSERT(!filter.IsEmpty()); // must have a file type name + filter += (TCHAR)'\0'; // next string please +#ifndef _MAC + filter += (TCHAR)'*'; +#endif + filter += strFilterExt; + filter += (TCHAR)'\0'; // next string please + ofn.nMaxCustFilter++; + } +} + +COXDocManager::COXDocManager() +{ +} + +BOOL COXDocManager::DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate) +{ + ASSERT(AfxGetApp()->IsKindOf(RUNTIME_CLASS(COXWinApp))); + + CFileDialog* pDlgFile = ((COXWinApp*) AfxGetApp())->NewFileDialog(bOpenFileDialog); + + CString title; + VERIFY(title.LoadString(nIDSTitle)); + + pDlgFile->m_ofn.Flags |= lFlags; + + CString strFilter; + CString strDefault; + if (pTemplate != NULL) + { + ASSERT_VALID(pTemplate); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, &strDefault); + } + else + { + // do for all doc template + POSITION pos = m_templateList.GetHeadPosition(); + BOOL bFirst = TRUE; + while (pos != NULL) + { + CDocTemplate* pTemplate = (CDocTemplate*)m_templateList.GetNext(pos); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, + bFirst ? &strDefault : NULL); + bFirst = FALSE; + } + } + + // append the "*.*" all files filter + CString allFilter; + VERIFY(allFilter.LoadString(AFX_IDS_ALLFILTER)); + strFilter += allFilter; + strFilter += (TCHAR)'\0'; // next string please +#ifndef _MAC + strFilter += _T("*.*"); +#else + strFilter += _T("****"); +#endif + strFilter += (TCHAR)'\0'; // last string + pDlgFile->m_ofn.nMaxCustFilter++; + + pDlgFile->m_ofn.lpstrFilter = strFilter; +#ifndef _MAC + pDlgFile->m_ofn.lpstrTitle = title; +#else + pDlgFile->m_ofn.lpstrPrompt = title; +#endif + pDlgFile->m_ofn.lpstrFile = fileName.GetBuffer(_MAX_PATH); + + BOOL bResult = pDlgFile->DoModal() == IDOK ? TRUE : FALSE; + fileName.ReleaseBuffer(); + + delete pDlgFile; + + return bResult; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.h new file mode 100644 index 0000000..4ea50fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXDocMgr.h @@ -0,0 +1,11 @@ +class COXDocManager : public CDocManager +{ + DECLARE_DYNAMIC(COXDocManager) +public: + + COXDocManager(); + + // helper for standard commdlg dialogs + virtual BOOL DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate); +}; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.H b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.H new file mode 100644 index 0000000..cdaa523 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.H @@ -0,0 +1,36 @@ + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp: +// +// + +class COXWinApp : public CWinApp +{ +DECLARE_DYNAMIC(COXWinApp) +// Data Members +public: + +protected: + +private: + +// Member Functions +public: + COXWinApp(); + void AddDocTemplate(CDocTemplate* pTemplate); + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog); + +protected: + +private: + + +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.cpp new file mode 100644 index 0000000..3eeb302 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/OXWinApp.cpp @@ -0,0 +1,36 @@ +#include "stdafx.h" +#include "OXWinApp.h" +#include "OXDocMgr.h" +#include "OXPrvDlg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp + + +IMPLEMENT_DYNAMIC(COXWinApp, CWinApp) + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp construction + +COXWinApp::COXWinApp() +{ +} + +void COXWinApp::AddDocTemplate(CDocTemplate* pTemplate) +{ + if (m_pDocManager == NULL) + m_pDocManager = new COXDocManager; + m_pDocManager->AddDocTemplate(pTemplate); +} + +CFileDialog* COXWinApp::NewFileDialog(BOOL bOpenFileDialog) +{ + return new CFileDialog(bOpenFileDialog); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.001 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.001 new file mode 100644 index 0000000..4210aef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.001 @@ -0,0 +1,338 @@ +# Microsoft Developer Studio Project File - Name="Preview" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Preview - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak" CFG="Preview - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Preview - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName ""$/Ultimate Toolbox MFC/Working/Code/Samples/graphics/preview", TEMAAAAA" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Preview - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Preview_" +# PROP BASE Intermediate_Dir ".\Preview_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Preview_" +# PROP Intermediate_Dir ".\Preview_" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview_" +# PROP BASE Intermediate_Dir "Preview_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Preview0" +# PROP BASE Intermediate_Dir "Preview0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview1" +# PROP BASE Intermediate_Dir "Preview1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ENDIF + +# Begin Target + +# Name "Preview - Win32 Release" +# Name "Preview - Win32 Debug" +# Name "Preview - Win32 Release_Shared" +# Name "Preview - Win32 Unicode_Debug" +# Name "Preview - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Source\Dir.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Dirlist.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\File.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Filelist.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBmpPrv.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPrvDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Path.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Pathiter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Xstring.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.CPP +# End Source File +# Begin Source File + +SOURCE=.\Preview.cpp +# End Source File +# Begin Source File + +SOURCE=.\Preview.rc +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBmpPrv.h +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPrvDlg.h +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.H +# End Source File +# Begin Source File + +SOURCE=.\Preview.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Preview.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Preview.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\PreviewDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\test.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.clw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.clw new file mode 100644 index 0000000..ebe3d03 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.clw @@ -0,0 +1,95 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CPreviewApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "preview.h" +LastPage=0 + +ClassCount=5 +Class1=CChildFrame +Class2=CMainFrame +Class3=CPreviewApp +Class4=CPreviewDoc +Class5=CMyPreviewView + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDR_PREVTYPE + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CPreviewApp] +Type=0 +BaseClass=COXWinApp +HeaderFile=Preview.h +ImplementationFile=Preview.cpp +Filter=N +VirtualFilter=AC +LastObject=CPreviewApp + +[CLS:CPreviewDoc] +Type=0 +BaseClass=CDocument +HeaderFile=PreviewDoc.h +ImplementationFile=PreviewDoc.cpp + +[CLS:CMyPreviewView] +Type=0 +BaseClass=CView +HeaderFile=PreviewView.h +ImplementationFile=PreviewView.cpp + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_APP_EXIT +Command4=ID_VIEW_STATUS_BAR +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_PREVTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_APP_EXIT +Command5=ID_VIEW_STATUS_BAR +Command6=ID_APP_ABOUT +CommandCount=6 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.cpp new file mode 100644 index 0000000..0e7d296 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.cpp @@ -0,0 +1,144 @@ +// Preview.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "Preview.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "PreviewDoc.h" +#include "PreviewView.h" +#include "OXBmpPrv.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp + +BEGIN_MESSAGE_MAP(CPreviewApp, COXWinApp) + //{{AFX_MSG_MAP(CPreviewApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp construction + +CPreviewApp::CPreviewApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CPreviewApp object + +CPreviewApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp initialization + +BOOL CPreviewApp::InitInstance() +{ + // 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + LoadStdProfileSettings(); // 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_PREVTYPE, + RUNTIME_CLASS(CPreviewDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CMyPreviewView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +CFileDialog* CPreviewApp::NewFileDialog(BOOL bOpenFileDialog) +{ + return new COXBmpFileDialog(bOpenFileDialog); +} + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CPreviewApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp commands + +int CPreviewApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return COXWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsp new file mode 100644 index 0000000..3eee0da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsp @@ -0,0 +1,337 @@ +# Microsoft Developer Studio Project File - Name="Preview" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Preview - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak" CFG="Preview - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Preview - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Preview - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Preview_" +# PROP BASE Intermediate_Dir ".\Preview_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Preview_" +# PROP Intermediate_Dir ".\Preview_" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview_" +# PROP BASE Intermediate_Dir "Preview_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Preview0" +# PROP BASE Intermediate_Dir "Preview0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview1" +# PROP BASE Intermediate_Dir "Preview1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ENDIF + +# Begin Target + +# Name "Preview - Win32 Release" +# Name "Preview - Win32 Debug" +# Name "Preview - Win32 Release_Shared" +# Name "Preview - Win32 Unicode_Debug" +# Name "Preview - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Source\Dir.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Dirlist.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\File.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Filelist.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Source\OXBmpPrv.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Source\OXPrvDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Path.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Pathiter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Xstring.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.CPP +# End Source File +# Begin Source File + +SOURCE=.\Preview.cpp +# End Source File +# Begin Source File + +SOURCE=.\Preview.rc +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBmpPrv.h +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPrvDlg.h +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.H +# End Source File +# Begin Source File + +SOURCE=.\Preview.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Preview.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Preview.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\PreviewDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\test.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsw new file mode 100644 index 0000000..f42c11c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Preview"=".\Preview.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.h new file mode 100644 index 0000000..27f8958 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.h @@ -0,0 +1,42 @@ +// Preview.h : main header file for the PREVIEW application +// + +#include "OXWinApp.h" + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp: +// See Preview.cpp for the implementation of this class +// + +class CPreviewApp : public COXWinApp +{ +public: + CPreviewApp(); + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPreviewApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CPreviewApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.rc new file mode 100644 index 0000000..d8fb376 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.rc @@ -0,0 +1,349 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "OXCommon.h" + +#include "afxres.h" +#include + +///////////////////////////////////////////////////////////////////////////// +#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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""OXCommon.h"" \r\n" + "\r\n" + "#include ""afxres.h""\r\n" + "#include \r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#include ""OXCommon.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Preview.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\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 DISCARDABLE "res\\Preview.ico" +IDR_PREVTYPE ICON DISCARDABLE "res\\PreviewDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About Preview...", ID_APP_ABOUT + END +END + +IDR_PREVTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About Preview...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "PREVIEW MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "PREVIEW\0" + VALUE "LegalCopyright", "Copyright © 1996\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "PREVIEW.EXE\0" + VALUE "ProductName", "PREVIEW Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Preview Demo" + IDR_PREVTYPE "\nPrev\nPreview\nBitmap Files (*.bmp)\n.BMP\nPreview.Document\nPrev Document" + ID_DESCRIPTION_FILE "previewInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Preview" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#include "OXCommon.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Preview.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.reg b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.reg new file mode 100644 index 0000000..3061861 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/Preview.reg @@ -0,0 +1,14 @@ +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\.BMP = Preview.Document +HKEY_CLASSES_ROOT\Preview.Document\shell\open\command = PREVIEW.EXE %1 +HKEY_CLASSES_ROOT\Preview.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\Preview.Document\shell\open\ddeexec\application = PREVIEW + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\Preview.Document = Prev Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.cpp new file mode 100644 index 0000000..7beb41d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.cpp @@ -0,0 +1,82 @@ +// PreviewDoc.cpp : implementation of the CPreviewDoc class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "PreviewDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc + +IMPLEMENT_DYNCREATE(CPreviewDoc, CDocument) + +BEGIN_MESSAGE_MAP(CPreviewDoc, CDocument) + //{{AFX_MSG_MAP(CPreviewDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc construction/destruction + +CPreviewDoc::CPreviewDoc() +{ + // TODO: add one-time construction code here + +} + +CPreviewDoc::~CPreviewDoc() +{ +} + +BOOL CPreviewDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc serialization + +void CPreviewDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc diagnostics + +#ifdef _DEBUG +void CPreviewDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CPreviewDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.h new file mode 100644 index 0000000..cb2d0c2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewDoc.h @@ -0,0 +1,44 @@ +// PreviewDoc.h : interface of the CPreviewDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CPreviewDoc : public CDocument +{ +protected: // create from serialization only + CPreviewDoc(); + DECLARE_DYNCREATE(CPreviewDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPreviewDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CPreviewDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CPreviewDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.cpp new file mode 100644 index 0000000..7dd2f84 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.cpp @@ -0,0 +1,91 @@ +// PreviewView.cpp : implementation of the CMyPreviewView class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "PreviewDoc.h" +#include "PreviewView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView + +IMPLEMENT_DYNCREATE(CMyPreviewView, CView) + +BEGIN_MESSAGE_MAP(CMyPreviewView, CView) + //{{AFX_MSG_MAP(CMyPreviewView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView construction/destruction + +CMyPreviewView::CMyPreviewView() +{ + // TODO: add construction code here + +} + +CMyPreviewView::~CMyPreviewView() +{ +} + +BOOL CMyPreviewView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView drawing + +void CMyPreviewView::OnDraw(CDC* pDC) +{ + CPreviewDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + pDC->TextOut(10,20,"Select Open from File Menu option To Preview a BMP file without opening it "); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView printing + + + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView diagnostics + +#ifdef _DEBUG +void CMyPreviewView::AssertValid() const +{ + CView::AssertValid(); +} + +void CMyPreviewView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CPreviewDoc* CMyPreviewView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPreviewDoc))); + return (CPreviewDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.h new file mode 100644 index 0000000..90bc04d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/PreviewView.h @@ -0,0 +1,51 @@ +// PreviewView.h : interface of the CMyPreviewView class +// +///////////////////////////////////////////////////////////////////////////// + +class CMyPreviewView : public CView +{ +protected: // create from serialization only + CMyPreviewView(); + DECLARE_DYNCREATE(CMyPreviewView) + +// Attributes +public: + CPreviewDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyPreviewView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMyPreviewView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CMyPreviewView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in PreviewView.cpp +inline CPreviewDoc* CMyPreviewView::GetDocument() + { return (CPreviewDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.cpp new file mode 100644 index 0000000..b55f25b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Preview.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.h new file mode 100644 index 0000000..49a2dde --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/previewInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/previewInfo.rtf new file mode 100644 index 0000000..4348053 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/previewInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.rc2 new file mode 100644 index 0000000..8669738 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Preview.rc2 @@ -0,0 +1,13 @@ +// +// PREVIEW.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/PreviewDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/PreviewDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/PreviewDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/resource.h new file mode 100644 index 0000000..a78edd0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Preview.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_PREVTYPE 129 +#define ID_DESCRIPTION_FILE 130 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/test.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/test.bmp new file mode 100644 index 0000000..2cbab35 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Preview/test.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDEMO.TXT b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDEMO.TXT new file mode 100644 index 0000000..235558e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDEMO.TXT @@ -0,0 +1,85 @@ +SEH - to - C++ exceptions +------------------------- + +The class COXSEHException implements the functionality to convert +Structured Exception Handling of WIN 32 to MFC C++ Exception Handling. +In this way you can catch the native exceptions of WIN 32 using TRY/CATCH or +try/catch. + +Now you can make your application very robust. It will never end with a cryptic +message and you will always be able to warn the user with a clear statement. + +To enable this feature you have only to call the static function +COXSEHException::EnableSEHTrapping(). From that moment on all WIN 32 +exceptions are converted to C++ exceptions : + COXSEHMemoryException + COXSEHMathException + COXSEHSpecialException + +Now you can catch access violations, numeric overflow, divide by zero and +other critical conditions. For some exceptions additional information is +provided. When an access violation occurs you can see whether it was a read +or write fault and which virtual memory address was accessed incorrectly. + +Look at the following example : + + COXSEHException::EnableSEHTrapping(); + TRY + { + // Use invalid memory address + int* pa = NULL; + *pa = 0; + } + CATCH(COXSEHMemoryException, px) + { + if (px->GetCause() == EXCEPTION_ACCESS_VIOLATION) + { + CString sMsg; + sMsg.Format("Access violation trapped with TRY, CATCH " + "while trying to %s at address 0x%8.8lx", + px->GetReadWriteFlag() ? "READ" : "WRITE", + px->GetAddress()); + AfxMessageBox(sMsg); + } + else + AfxMessageBox("Memory exception trapped with TRY, CATCH"); + } + END_CATCH + + +By default, Windows NT has all the Floating Point exceptions turned off and computations result in NAN or INFINITY rather than in an exception. +But this can be enabled by supplying TRUE as first parameter when enabling +the conversion. + + COXSEHException::EnableSEHTrapping(TRUE); + TRY + { + // Divide by zero + double x = 1.0; + double a = 0.0; + x = x / a; + } + CATCH(COXSEHMathException, px) + { + if (px->GetCause() == EXCEPTION_FLT_DIVIDE_BY_ZERO) + AfxMessageBox("Float divide by zero trapped with TRY, CATCH"); + else + AfxMessageBox("Other math exception trapped with TRY, CATCH"); + } + END_CATCH + +Because all of the exception classes used are derived from CException, +you can install a global handler that will trap all the exceptions. + TRY + { + // Start program + // ... + } + CATCH(CException, px) + { + // Handle the exception + if (px->IsKindOf(RUNTIME_CLASS(COXSEHMathException))) + // Handle math exceptions + // ... + } + END_CATCH diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.clw new file mode 100644 index 0000000..b473bbc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.clw @@ -0,0 +1,45 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSEHDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "sehdemo.h" +LastPage=0 + +ClassCount=2 +Class1=CSEHDemoApp +Class2=CSEHDemoDlg + +ResourceCount=1 +Resource1=IDD_SEHDEMO_DIALOG + +[CLS:CSEHDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SEHDemo.h +ImplementationFile=SEHDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CSEHDemoApp + +[CLS:CSEHDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=SEHDemoDlg.h +ImplementationFile=SEHDemoDlg.cpp + +[DLG:IDD_SEHDEMO_DIALOG] +Type=1 +Class=CSEHDemoDlg +ControlCount=8 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_TRAP,button,1342242819 +Control4=IDC_ACCESS_VIOLATION,button,1342242816 +Control5=IDC_ZERO_FLOAT,button,1342242816 +Control6=IDC_ZERO_INTEGER,button,1342242816 +Control7=IDC_TRAP_FL,button,1342242819 +Control8=IDC_BREAKPOINT,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.cpp new file mode 100644 index 0000000..65c46e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.cpp @@ -0,0 +1,96 @@ +// SEHDemo.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "SEHDemo.h" +#include "SEHDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoApp + +BEGIN_MESSAGE_MAP(CSEHDemoApp, CWinApp) + //{{AFX_MSG_MAP(CSEHDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoApp construction + +CSEHDemoApp::CSEHDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSEHDemoApp object + +CSEHDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoApp initialization + +BOOL CSEHDemoApp::InitInstance() +{ + // 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CSEHDemoDlg dlg; + m_pMainWnd = &dlg; + int 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; +} + + +int CSEHDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsp new file mode 100644 index 0000000..6c03b7c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsp @@ -0,0 +1,241 @@ +# Microsoft Developer Studio Project File - Name="SEHDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SEHDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SEHDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SEHDemo.mak" CFG="SEHDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SEHDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SEHDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SEHDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SEHDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SEHDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SEHDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SEHDemo.exe" + +!ELSEIF "$(CFG)" == "SEHDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SEHDemo.exe" + +!ELSEIF "$(CFG)" == "SEHDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SEHDemo_" +# PROP BASE Intermediate_Dir "SEHDemo_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SEHDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SEHDemo.exe" + +!ELSEIF "$(CFG)" == "SEHDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SEHDemo0" +# PROP BASE Intermediate_Dir "SEHDemo0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SEHDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"SEHDemo.exe" + +!ELSEIF "$(CFG)" == "SEHDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SEHDemo1" +# PROP BASE Intermediate_Dir "SEHDemo1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SEHDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"SEHDemo.exe" + +!ENDIF + +# Begin Target + +# Name "SEHDemo - Win32 Release" +# Name "SEHDemo - Win32 Debug" +# Name "SEHDemo - Win32 Release_Shared" +# Name "SEHDemo - Win32 Unicode_Debug" +# Name "SEHDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\source\OXSEH.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\SEHDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\SEHDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\SEHDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\SEHDemo.h +# End Source File +# Begin Source File + +SOURCE=.\SEHDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\SEHDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SEHDemo.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsw new file mode 100644 index 0000000..729fd12 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SEHDemo"=".\SEHDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.h new file mode 100644 index 0000000..3357501 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.h @@ -0,0 +1,40 @@ +// SEHDemo.h : main header file for the SEHDEMO application +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoApp: +// See SEHDemo.cpp for the implementation of this class +// + +class CSEHDemoApp : public CWinApp +{ +public: + CSEHDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSEHDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSEHDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.rc new file mode 100644 index 0000000..f827e7a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemo.rc @@ -0,0 +1,198 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SEHDEMO_DIALOG DIALOGEX 0, 0, 124, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "SEH Demo" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,122,50,14 + PUSHBUTTON "Cancel",IDCANCEL,67,122,50,14 + CONTROL "&Trap SEH exceptions",IDC_TRAP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,7,82,10 + PUSHBUTTON "&Access Violation",IDC_ACCESS_VIOLATION,7,42,110,13 + PUSHBUTTON "Divide &float by zero",IDC_ZERO_FLOAT,7,60,110,13 + PUSHBUTTON "Divide &integer by zero",IDC_ZERO_INTEGER,7,78,110,13 + CONTROL "Trap Floating &Point exceptions",IDC_TRAP_FL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,22,110,10 + PUSHBUTTON "&Breakpoint",IDC_BREAKPOINT,7,96,110,13 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SEHDEMO MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SEHDEMO\0" + VALUE "LegalCopyright", "Copyright © 1996\0" + VALUE "OriginalFilename", "SEHDEMO.EXE\0" + VALUE "ProductName", "SEHDEMO Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SEHDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 117 + TOPMARGIN, 7 + BOTTOMMARGIN, 136 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SEHDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\SEHDemo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About SEHDemo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "COXSEHExceptions demo" + ID_DESCRIPTION_FILE "sehDemoInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SEHDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.cpp new file mode 100644 index 0000000..84e2e7e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.cpp @@ -0,0 +1,246 @@ +// SEHDemoDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + + +#include "stdafx.h" +#include "utsampleabout.h" +#include "SEHDemo.h" +#include "SEHDemoDlg.h" +#include "OXSEH.h" +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoDlg dialog + +CSEHDemoDlg::CSEHDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSEHDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSEHDemoDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSEHDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSEHDemoDlg) + DDX_Control(pDX, IDC_TRAP_FL, m_wndFPTrap); + DDX_Control(pDX, IDC_TRAP, m_wndTrap); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSEHDemoDlg, CDialog) + //{{AFX_MSG_MAP(CSEHDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_ACCESS_VIOLATION, OnAccessViolation) + ON_BN_CLICKED(IDC_TRAP, OnTrap) + ON_BN_CLICKED(IDC_ZERO_FLOAT, OnZeroFloat) + ON_BN_CLICKED(IDC_ZERO_INTEGER, OnZeroInteger) + ON_BN_CLICKED(IDC_TRAP_FL, OnTrapFl) + ON_BN_CLICKED(IDC_BREAKPOINT, OnBreakpoint) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoDlg message handlers + +BOOL CSEHDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSEHDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSEHDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSEHDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSEHDemoDlg::OnAccessViolation() + { + TRY + { + // Use invalid virtual memory address + int* pa = (int*)0x123; + *pa = 0; + } + CATCH(COXSEHMemoryException, px) + { + if (px->GetCause() == EXCEPTION_ACCESS_VIOLATION) + if (px->IsInfoAvailable()) + { + CString sMsg; + sMsg.Format(_T("Access violation trapped with TRY, CATCH while trying to %s at address 0x%8.8lX"), + !px->GetReadWriteFlag() ? _T("READ") : _T("WRITE"), px->GetAddress()); + AfxMessageBox(sMsg); + } + else + AfxMessageBox(_T("Access violation trapped with TRY, CATCH")); + else + AfxMessageBox(_T("Unknown memory exception trapped with TRY, CATCH")); + } + END_CATCH + } + +void CSEHDemoDlg::OnZeroFloat() + { + TRY + { + // Divide by zero + double x = 1.0; + double a = 0.0; + x = x / a; + } + CATCH(COXSEHMathException, px) + { + if (px->GetCause() == EXCEPTION_FLT_DIVIDE_BY_ZERO) + AfxMessageBox(_T("Float divide by zero trapped with TRY, CATCH")); + else + AfxMessageBox(_T("Unknown math exception trapped with TRY, CATCH")); + } + END_CATCH + } + +void CSEHDemoDlg::OnZeroInteger() + { + TRY + { + // Divide by zero + int x = 1; + int a = 0; + x = x / a; + } + CATCH(COXSEHMathException, px) + { + if (px->GetCause() == EXCEPTION_INT_DIVIDE_BY_ZERO) + AfxMessageBox(_T("Integer divide by zero trapped with TRY, CATCH")); + else + AfxMessageBox(_T("Unknown math exception trapped with TRY, CATCH")); + } + END_CATCH + } + +void CSEHDemoDlg::OnBreakpoint() + { + TRY + { + // Debug break : This can only be catched when not running in debugger + DebugBreak(); + } + CATCH(COXSEHSpecialException, px) + { + if (px->GetCause() == EXCEPTION_BREAKPOINT) + AfxMessageBox(_T("Breakpoint trapped with TRY, CATCH")); + else + AfxMessageBox(_T("Unknown special exception trapped with TRY, CATCH")); + } + END_CATCH + } + +void CSEHDemoDlg::OnTrap() + { + if (m_wndTrap.GetCheck() & 0x0001) + if (m_wndFPTrap.GetCheck() & 0x0001) + COXSEHException::EnableSEHTrapping(TRUE); + else + COXSEHException::EnableSEHTrapping(FALSE); + else + COXSEHException::DisableSEHTrapping(); + } + +void CSEHDemoDlg::OnTrapFl() + { + // If already trapping : turn of temporary so we can change the FP parameter + if (COXSEHException::IsSEHTrappingEnabled()) + COXSEHException::DisableSEHTrapping(); + // (Re-)enable SEH trapping + if (m_wndFPTrap.GetCheck() & 0x0001) + COXSEHException::EnableSEHTrapping(TRUE); + else + COXSEHException::EnableSEHTrapping(FALSE); + // Make sure SEH is checked + m_wndTrap.SetCheck(0x0001); + } + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.h new file mode 100644 index 0000000..b76d888 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/SEHDemoDlg.h @@ -0,0 +1,44 @@ +// SEHDemoDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CSEHDemoDlg dialog + +class CSEHDemoDlg : public CDialog +{ +// Construction +public: + CSEHDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSEHDemoDlg) + enum { IDD = IDD_SEHDEMO_DIALOG }; + CButton m_wndFPTrap; + CButton m_wndTrap; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSEHDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CSEHDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAccessViolation(); + afx_msg void OnTrap(); + afx_msg void OnZeroFloat(); + afx_msg void OnZeroInteger(); + afx_msg void OnTrapFl(); + afx_msg void OnBreakpoint(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.cpp new file mode 100644 index 0000000..649dad2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SEHDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.h new file mode 100644 index 0000000..49a2dde --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.rc2 new file mode 100644 index 0000000..86bb686 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/res/SEHDemo.rc2 @@ -0,0 +1,13 @@ +// +// SEHDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/resource.h new file mode 100644 index 0000000..bde2fe9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/resource.h @@ -0,0 +1,28 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SEHDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SEHDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_TRAP 1001 +#define IDC_ACCESS_VIOLATION 1002 +#define IDC_ZERO_FLOAT 1003 +#define IDC_ZERO_INTEGER 1004 +#define IDC_TRAP_FL 1005 +#define IDC_BREAKPOINT 1006 +#define IDC_UNHANDLED 1007 + +// 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 1008 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/sehDemoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/sehDemoInfo.rtf new file mode 100644 index 0000000..3c522d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/SEHDemo/sehDemoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.cpp new file mode 100644 index 0000000..e281bc0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.cpp @@ -0,0 +1,67 @@ +#include "stdafx.h" +#include "Globals.h" + +CString GetAppDir() +{ + + LPTSTR clStr = GetCommandLine(); + LPTSTR buf; + CString string; + int loop; + + //create the temp buffer + buf = new TCHAR[ lstrlen(clStr) + 1 ]; + + //copy the command line and check to see if the first character is a quote + if(clStr[0] == '\"') + lstrcpy(buf,&clStr[1]); + else + lstrcpy(buf,clStr); + + + //check to see if the command line is empty + loop = 0; + if(lstrlen(buf) > 0){ + + loop = lstrlen(buf); + while(loop > 0){ + if(buf[loop]== _T('.')){ + break; + } + loop --; + } + while(loop > 0){ + if(buf[loop]== _T('\\')){ + buf[loop] = 0; + break; + } + loop --; + } + } + + if(loop == 0){ + + delete[] buf; + + //create the temp buffer + buf = new TCHAR[MAX_PATH + 1]; + + _tgetcwd(buf,255); + } + + string = buf; + + delete[] buf; + + return string; +} + +void PumpMessages() +{ + static MSG msg; + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.h new file mode 100644 index 0000000..8d5b4ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Globals.h @@ -0,0 +1,9 @@ +#ifndef __GLOBALS_H__INCLUDED +#define __GLOBALS_H__INCLUDED + +#include + +CString GetAppDir(); +void PumpMessages(); + +#endif \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.cpp new file mode 100644 index 0000000..5b10b9d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.cpp @@ -0,0 +1,107 @@ +// MainFrame.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Serial.h" + +#include "MainFrame.h" + +#include "SerialView.h" +#include "SendView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR // status line indicator +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + 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 + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if (!CFrameWnd::PreCreateWindow(cs)) + return FALSE; + + // Remove the "Untitled" from the caption + cs.style &= ~FWS_ADDTOTITLE; + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + UNREFERENCED_PARAMETER(lpcs); + + // Create a splitter on the frame where the upper pane is the "terminal" view + // and the lower view is the Send view. + if (!m_wndSplitter.CreateStatic(this, 2, 1)) + return FALSE; + + if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSerialView), CSize(0, 0), pContext)) + return FALSE; + + if (!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CSendView), CSize(0, 0), pContext)) + return FALSE; + + m_wndSplitter.SetRowInfo(0, 400, 0); + return TRUE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.h new file mode 100644 index 0000000..cbaef4e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/MainFrame.h @@ -0,0 +1,59 @@ +// MainFrame.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRAME_H__172F9582_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_MAINFRAME_H__172F9582_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CMainFrame : public CFrameWnd +{ +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// 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; + + CSplitterWnd m_wndSplitter; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRAME_H__172F9582_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.cpp new file mode 100644 index 0000000..7ec7381 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.cpp @@ -0,0 +1,113 @@ +// SendView.cpp : implementation file +// + +#include "stdafx.h" +#include "serial.h" +#include "SendView.h" + +#include "SerialDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSendView + +IMPLEMENT_DYNCREATE(CSendView, CEditView) + +CSendView::CSendView() +{ + m_font.m_hObject = NULL; +} + +CSendView::~CSendView() +{ + m_font.DeleteObject(); +} + +BOOL CSendView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + cs.style &= ~(ES_AUTOHSCROLL | WS_HSCROLL); // Enable word-wrapping + + return bPreCreated; +} + +BEGIN_MESSAGE_MAP(CSendView, CEditView) + //{{AFX_MSG_MAP(CSendView) + ON_WM_CHAR() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSendView drawing + +void CSendView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + CDocument* pDoc = GetDocument(); + // TODO: add draw code here +} + +///////////////////////////////////////////////////////////////////////////// +// CSendView diagnostics + +#ifdef _DEBUG +void CSendView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CSendView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CSerialDoc* CSendView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSerialDoc))); + return (CSerialDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSendView message handlers + + +void CSendView::OnInitialUpdate() +{ + CEditView::OnInitialUpdate(); + + // Create a new font for this view + if (m_font.m_hObject == NULL) + { + if (m_font.CreatePointFont(110, _T("Arial"))) + SetFont(&m_font); + } +} + +void CSendView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) +{ + CSerialDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // Route this message to the document class whereupon the keystroke will + // be send through to the receiving end. + if (pDoc != NULL) + { + for (UINT n = 0; n < nRepCnt; n++) + { + if (!pDoc->SendKeyDown(nChar)) + ; + } + } + + CEditView::OnChar(nChar, nRepCnt, nFlags); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.h new file mode 100644 index 0000000..275dac2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SendView.h @@ -0,0 +1,68 @@ +#if !defined(AFX_SENDVIEW_H__26E6D944_0616_11D2_88B2_0080C859A484__INCLUDED_) +#define AFX_SENDVIEW_H__26E6D944_0616_11D2_88B2_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// SendView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CSendView view + +class CSerialDoc; + +class CSendView : public CEditView +{ +protected: + CSendView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CSendView) + +// Attributes +public: + CSerialDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSendView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CSendView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CFont m_font; + + +// Generated message map functions +protected: + //{{AFX_MSG(CSendView) + afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in SerialView.cpp +inline CSerialDoc* CSendView::GetDocument() + { return (CSerialDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SENDVIEW_H__26E6D944_0616_11D2_88B2_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.cpp new file mode 100644 index 0000000..b15897b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.cpp @@ -0,0 +1,127 @@ +// Serial.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Serial.h" + +#include "MainFrame.h" +#include "SerialDoc.h" +#include "SerialView.h" + +#include "UTSampleAbout.h" + +#include "oxscfile.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSerialApp + +BEGIN_MESSAGE_MAP(CSerialApp, CWinApp) + //{{AFX_MSG_MAP(CSerialApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSerialApp construction + +CSerialApp::CSerialApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSerialApp object + +CSerialApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSerialApp initialization + +BOOL CSerialApp::InitInstance() +{ + // 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + // Change the registry key under which our settings are stored. + // 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(0); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CSerialDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CSerialView)); + AddDocTemplate(pDocTemplate); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CSerialApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialApp commands + +int CSerialApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsp new file mode 100644 index 0000000..c817ab3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsp @@ -0,0 +1,358 @@ +# Microsoft Developer Studio Project File - Name="Serial" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Serial - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Serial.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Serial.mak" CFG="Serial - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Serial - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Serial - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Serial - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Serial - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Serial - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Serial - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Serial.exe" + +!ELSEIF "$(CFG)" == "Serial - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Serial.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Serial - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Serial__" +# PROP BASE Intermediate_Dir "Serial__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Serial.exe" + +!ELSEIF "$(CFG)" == "Serial - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Serial_0" +# PROP BASE Intermediate_Dir "Serial_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Serial.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Serial.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Serial - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Serial_1" +# PROP BASE Intermediate_Dir "Serial_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Serial.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Serial.exe" + +!ENDIF + +# Begin Target + +# Name "Serial - Win32 Release" +# Name "Serial - Win32 Debug" +# Name "Serial - Win32 Release_Shared" +# Name "Serial - Win32 Unicode_Debug" +# Name "Serial - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OXCRCChk.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSCCFG.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSCEXCP.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSCFILE.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSCSTP.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\include\OXSERCOM.RC +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=..\..\source\OXSRLZR.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Globals.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrame.cpp +# End Source File +# Begin Source File + +SOURCE=.\SendView.cpp +# End Source File +# Begin Source File + +SOURCE=.\Serial.cpp +# End Source File +# Begin Source File + +SOURCE=.\Serial.rc +# End Source File +# Begin Source File + +SOURCE=.\SerialDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\SerialView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TimeoutDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\TransferDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Globals.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrame.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\oxcrcchk.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCRCChk.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSCCFG.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSCCNST.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\oxscexcp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\oxscfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSCSTP.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\Oxsercom.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\oxsrlzr.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SendView.h +# End Source File +# Begin Source File + +SOURCE=.\Serial.h +# End Source File +# Begin Source File + +SOURCE=.\SerialDoc.h +# End Source File +# Begin Source File + +SOURCE=.\SerialView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TimeoutDlg.h +# End Source File +# Begin Source File + +SOURCE=.\TransferDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Serial.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Serial.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\SerialDoc.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsw new file mode 100644 index 0000000..c5eb3bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Serial"=.\Serial.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.h new file mode 100644 index 0000000..7136521 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.h @@ -0,0 +1,51 @@ +// Serial.h : main header file for the SERIAL application +// + +#if !defined(AFX_SERIAL_H__172F957E_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_SERIAL_H__172F957E_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSerialApp: +// See Serial.cpp for the implementation of this class +// + +class CSerialApp : public CWinApp +{ +public: + CSerialApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSerialApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSerialApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERIAL_H__172F957E_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.rc b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.rc new file mode 100644 index 0000000..90b3304 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/Serial.rc @@ -0,0 +1,423 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Serial.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""oxsercom.rc"" // SerialComm class components\r\n" + "#include ""UTSampleAbout.rc"" // UT About box\r\n" + "#endif\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 DISCARDABLE "res\\Serial.ico" +IDR_SERIALTYPE ICON DISCARDABLE "res\\SerialDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Connect", IDM_CONNECT + MENUITEM "&Disconnect", IDM_DISCONNECT + MENUITEM SEPARATOR + MENUITEM "&Receive", IDM_RECEIVE + MENUITEM "&Send...", IDM_SEND + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Tools" + BEGIN + MENUITEM "Serial COMM Setup...", IDM_SERIAL_SETUP + MENUITEM "Set Timeouts...", IDM_SET_TIMEOUT + END + POPUP "&Help" + BEGIN + MENUITEM "&About Serial...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, 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_TIMEOUT DIALOG DISCARDABLE 0, 0, 190, 71 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Set Timout Values" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "ReadTimeout:",IDC_STATIC,7,7,71,8 + EDITTEXT IDC_TIMEOUT_RX,7,17,71,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Write Timeout:",IDC_STATIC,7,38,47,8 + EDITTEXT IDC_TIMEOUT_TX,7,50,71,14,ES_AUTOHSCROLL | ES_NUMBER + DEFPUSHBUTTON "OK",IDOK,133,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,133,24,50,14 + LTEXT "milliseconds",IDC_STATIC,82,22,42,9 + LTEXT "milliseconds",IDC_STATIC,82,55,42,9 +END + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 245, 89 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Serial" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,7,21,20 + LTEXT "Serial Communication Sample",IDC_STATIC,40,6,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 1997-98 The Code Project",IDC_STATIC,40, + 24,155,8 + DEFPUSHBUTTON "OK",IDOK,206,7,32,14,WS_GROUP + LTEXT "Ultimate Toolbox development kit",IDC_STATIC,40,15,106, + 8 + GROUPBOX "Contacting The Code Project",IDC_STATIC,7,37,231,42 + LTEXT "Phone",IDC_STATIC,16,49,22,8 + LTEXT "EMail",IDC_STATIC,16,58,18,8 + LTEXT "WWW",IDC_STATIC,16,67,23,8 + LTEXT "+1 (416) 642 1998",IDC_STATIC,50,49,123,8 + LTEXT "sales@theUltimateToolbox.com",IDC_STATIC,50,58,100,8 + LTEXT "www.theUltimateToolbox.com",IDC_STATIC,50,67,95,8 +END + +IDD_TRANSFER DIALOG DISCARDABLE 0, 0, 284, 74 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Transfering file..." +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "",IDC_TRANSFER_TEXT,7,7,270,19 + CONTROL "Progress1",IDC_TRANSFER_PROGRESS,"msctls_progress32", + WS_BORDER,7,34,270,14 + PUSHBUTTON "Cancel",IDCANCEL,227,53,50,14 + LTEXT "Press CANCEL at any time stop the transfer.",IDC_STATIC, + 7,58,199,9 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Serial MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Serial\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "Serial.EXE\0" + VALUE "ProductName", "Serial Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_TIMEOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 183 + VERTGUIDE, 78 + VERTGUIDE, 82 + TOPMARGIN, 7 + BOTTOMMARGIN, 64 + HORZGUIDE, 31 + END + + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 238 + TOPMARGIN, 7 + BOTTOMMARGIN, 82 + END + + IDD_TRANSFER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 277 + TOPMARGIN, 7 + BOTTOMMARGIN, 67 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Serial - An Ultimate Toolbox Sample Application" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Serial" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + ID_DESCRIPTION_FILE "SerialInfo.rtf" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDM_SERIAL_SETUP "Setup comm serial variables" + IDM_CONFIG_LOAD "Load a previously saved comm configuration." + IDM_CONFIG_SAVE "Save the current comm config as a new filename" + IDM_TIMEOUT "Set timeout values for reading and writing on the port" + IDM_FILE_READ "Reads an incoming file" + IDM_FILE_WRITE "Writes an outgoing file" + IDM_PURGE_RX "Purges the receive queue" + IDM_PURGE_TX "Purges the transmit queue" + IDM_OPEN "Opens the serial communication device" + IDM_CLOSE "Closes the serial communication device" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDM_CONNECT "Opens the serial communication device" + IDM_DISCONNECT "Closes the serial communication device" + IDM_RECEIVE "Reads incoming files" + IDM_SEND "Writes an outgoing file (sends)" + IDM_SET_TIMEOUT "Set timeout values for reading and writing on the port" + IDM_OPTIONS_RECEIVE "Automatically receive incoming files" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Serial.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "oxsercom.rc" // SerialComm class components +#include "UTSampleAbout.rc" // UT About box +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.cpp new file mode 100644 index 0000000..c4790d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.cpp @@ -0,0 +1,608 @@ +// SerialDoc.cpp : implementation of the CSerialDoc class +// + +#include "stdafx.h" +#include "Serial.h" +#include "SerialDoc.h" + +#include "MainFrame.h" +#include "SerialView.h" + +#include "TimeoutDlg.h" +#include "TransferDlg.h" + +#include "OXSCSTP.H" +#include "OXSCFILE.H" +#include "OXSCEXCP.H" + +#include "Globals.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +static TCHAR _szAllFilesFilter[] = _T("All Files (*.*)|*.*||"); + +typedef struct tagTHREADINFO +{ + COXSerialCommFile* pCommDevice; + HANDLE hEvent; + UINT msgOutput; + UINT msgBackspace; + HWND hWnd; +} THREADINFO, *PTHREADINFO, FAR* LPTHREADINFO; + + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc + +IMPLEMENT_DYNCREATE(CSerialDoc, CDocument) + +BEGIN_MESSAGE_MAP(CSerialDoc, CDocument) + //{{AFX_MSG_MAP(CSerialDoc) + ON_COMMAND(IDM_CONNECT, OnConnect) + ON_UPDATE_COMMAND_UI(IDM_CONNECT, OnUpdateConnect) + ON_COMMAND(IDM_DISCONNECT, OnDisconnect) + ON_UPDATE_COMMAND_UI(IDM_DISCONNECT, OnUpdateDisconnect) + ON_COMMAND(IDM_RECEIVE, OnReceive) + ON_UPDATE_COMMAND_UI(IDM_RECEIVE, OnUpdateReceive) + ON_COMMAND(IDM_SEND, OnSend) + ON_UPDATE_COMMAND_UI(IDM_SEND, OnUpdateSend) + ON_COMMAND(IDM_SERIAL_SETUP, OnSerialSetup) + ON_UPDATE_COMMAND_UI(IDM_SERIAL_SETUP, OnUpdateSerialSetup) + ON_COMMAND(IDM_SET_TIMEOUT, OnSetTimeout) + ON_UPDATE_COMMAND_UI(IDM_SET_TIMEOUT, OnUpdateSetTimeout) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc construction/destruction + +CSerialDoc::CSerialDoc() +{ + m_pCommFile = NULL; + m_pCommConfig = NULL; + + m_dwTxTimeout = + m_dwRxTimeout = 200L; + + m_pIncomingTextThread = NULL; +} + +CSerialDoc::~CSerialDoc() +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pIncomingTextThread != NULL) + { + m_pIncomingTextThread->ResumeThread(); + m_eventClose.SetEvent(); + ::WaitForSingleObject(m_pIncomingTextThread->m_hThread, INFINITE); + } + + if (m_pCommConfig != NULL) + { + delete m_pCommConfig; + m_pCommConfig = NULL; + } + + if (m_pCommFile != NULL) + { + delete m_pCommFile; + m_pCommFile = NULL; + } +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc serialization + +void CSerialDoc::Serialize(CArchive& ar) +{ + // CEditView contains an edit control which handles all serialization + ((CEditView*) m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc diagnostics + +#ifdef _DEBUG +void CSerialDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CSerialDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc helpers + +inline CSerialView* CSerialDoc::GetView() const +{ + // Returns a pointer to the "Terminal" view + + ASSERT_VALID(this); + ASSERT_VALID(AfxGetMainWnd()); + + POSITION pos = GetFirstViewPosition(); + + if (pos != NULL) + { + CSerialView* pView = (CSerialView*) GetNextView(pos); + ASSERT_VALID(pView); + ASSERT_KINDOF(CSerialView, pView); + + return pView; + } + + ASSERT(FALSE); + return NULL; +} + +BOOL CSerialDoc::SendKeyDown(UINT nChar) +{ + // If a connection is open SendKeyDown will send nChar to the receiving side's + // "Terminal" view. If the connection is closed, nothing happens. + // + // + + if (!m_pCommFile->IsOpen()) + return FALSE; + + if (nChar == VK_RETURN) + { + GetView()->Output(_T("\r\n")); + m_pCommFile->Write(_T("\r\n"), sizeof(_T("\r\n"))); + } + else if (nChar == VK_BACK) + { + GetView()->Backspace(); + m_pCommFile->Write(_T("\b"), sizeof(_T("\b"))); + } + else + { + GetView()->Output(_T("%c"), (char) nChar); + m_pCommFile->Write(&nChar, sizeof(nChar)); + } + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// Thread & Thread helper functions + +DWORD ReadEventBytesFromPort(COXSerialCommFile* pCommHandle, LPBYTE pbBuffer, DWORD dwLength) +{ + // + // pCommHandle - a pointer to a COXSerialCommFile object from which to receive + // pbBuffer - buffer to receive incoming data + // dwLength - size of pbBuffer + // + // + // This function will determine if there is any data to be read on pCommHandle, if + // there is it is read into pbBuffer. + + DWORD dwBytesToRead = 0; + + TRY + { + dwBytesToRead = pCommHandle->GetBytesToRead(); + + if (dwBytesToRead > dwLength) + dwBytesToRead = dwLength; + + return pCommHandle->Read(pbBuffer, dwBytesToRead); + } + CATCH(COXSerialCommException, e) + { + TRACE(_T("There was an error trying to read from the COMM port.\n")); + + e->ReportError(MB_OK | MB_ICONSTOP); + } + END_CATCH + + return 0; +} + +UINT IncomingTextThread(LPVOID pParam) +{ + // + // pParam - pointer to THREADINFO structure + // + // This thread will monitor incoming data. Any incoming data is sent to the + // "Terminal" window as output text. + // + // This thread is suspended and resumed to minimize overhead. + + PTHREADINFO pInfo = NULL; + pInfo = (PTHREADINFO) pParam; + + if (pInfo == NULL) + return (UINT)-1; + + //////////////////////////////////////////////////////////////////////////// + // Monitor incoming data + + BYTE bBuffer[256]; + DWORD dwBytesRead = 0; + + while (WaitForSingleObject(pInfo->hEvent, 0) != WAIT_OBJECT_0) + { + bBuffer[0] = 0; + dwBytesRead = ReadEventBytesFromPort(pInfo->pCommDevice, bBuffer, sizeof(bBuffer)); + ASSERT(dwBytesRead <= sizeof(bBuffer)); + + if (dwBytesRead > 0) + { + if (bBuffer[0] == _T('\b')) + SendMessage(pInfo->hWnd, pInfo->msgBackspace, 0, 0); + else + SendMessage(pInfo->hWnd, pInfo->msgOutput, 0, (LPARAM) bBuffer); + } + } + + delete pInfo; + + return 0; +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc overrides + +BOOL CSerialDoc::SaveModified() +{ + return TRUE; // don't allow saving +} + +BOOL CSerialDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + ((CEditView*) m_viewList.GetHead())->SetWindowText(NULL); + + + // + // Create the COXSerialCommFile and COXSerialCommConfig objects + // + ASSERT(m_pCommConfig == NULL); + if (m_pCommConfig == NULL && (m_pCommConfig = new COXSerialCommConfig()) == NULL) + { + TRACE(_T("Unable to allocate new COXSerialCommConfig object\n")); + return -1; + } + ASSERT_VALID(m_pCommConfig); + + ASSERT(m_pCommFile == NULL); + if (m_pCommFile == NULL && (m_pCommFile = new COXSerialCommFile()) == NULL) + { + TRACE(_T("Unable to allocate new COXSerialCommFile object\n")); + return -1; + } + ASSERT_VALID(m_pCommFile); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialDoc message handlers + +void CSerialDoc::OnConnect() +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + return; + + // + // Attempt to make a connection + // + COXSerialCommException e; + if (!m_pCommFile->Open(*m_pCommConfig, &e)) + { + TRACE(_T("Unable to open serial communication device\n")); + + TCHAR szBuffer[256]; + + e.GetErrorMessage(szBuffer, sizeof(szBuffer)); + GetView()->Output(szBuffer); + GetView()->Output(_T("\r\n")); + + return; + } + else + { + // + // setup which events we want to recieve on this comm port + // + DWORD dwEventMask; + if (m_pCommFile->GetCommMask(dwEventMask)) + { + dwEventMask |= EV_RXCHAR; + VERIFY(m_pCommFile->SetCommMask(dwEventMask)); + } + else + { + GetView()->Output(_T("Error (#%d): Unable to set event states on %s.\r\n"), ::GetLastError(), m_pCommConfig->GetCommName()); + } + + GetView()->Output(_T("A serial connection has been established on port %s.\r\n"), m_pCommConfig->GetCommName()); + } + + // + // Create the new thread (if not created before); If the user has already connected + // before we resume the suspended thread. + // + if (m_pIncomingTextThread == NULL) + { + PTHREADINFO pInfo = new THREADINFO; + if (pInfo == NULL) + return; + + pInfo->hEvent = (HANDLE) m_eventClose; + pInfo->pCommDevice = m_pCommFile; + pInfo->msgOutput = IDM_OUTPUT; + pInfo->msgBackspace = IDM_BACKSPACE; + pInfo->hWnd = GetView()->GetSafeHwnd(); + + m_pIncomingTextThread = AfxBeginThread(IncomingTextThread, pInfo, THREAD_PRIORITY_IDLE); + } + else + { + // Thread already exists, resume it + ASSERT_VALID(m_pIncomingTextThread); + m_pIncomingTextThread->ResumeThread(); + } +} + +void CSerialDoc::OnUpdateConnect(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(m_pCommFile->IsOpen() == FALSE); +} + +void CSerialDoc::OnDisconnect() +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + ASSERT_VALID(m_pIncomingTextThread); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + return; + + // + // Close the communications port and suspend the IncomingTextThread + // (the thread is closed in the destructor) + // + m_pIncomingTextThread->SuspendThread(); + + m_pCommFile->Close(); + GetView()->Output(_T("The communication port has been closed.\r\n")); +} + +void CSerialDoc::OnUpdateDisconnect(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(m_pCommFile->IsOpen()); +} + +void CSerialDoc::OnReceive() +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + ASSERT_VALID(m_pIncomingTextThread); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + { + GetView()->Output(_T("Invalid handles, unable to read.\r\n")); + return; + } + + ASSERT(m_pCommFile->IsOpen() == TRUE); + + // + // Clear the send and receive queues + m_pCommFile->PurgeRx(); + m_pCommFile->PurgeTx(); + + GetView()->Output(_T("Waiting for incoming files...\r\n")); + + CTransferDlg dlg; + + // Setup the transfer dialog + // + dlg.m_bSending = FALSE; + dlg.m_pCommFile = m_pCommFile; + dlg.m_pFile = NULL; + + ///////////////// + // Suspend the incoming Text thread + m_pIncomingTextThread->SuspendThread(); + + // + // Show the dialog + // (the dialog will automatically terminate when the transfer is done) + // + if (dlg.DoModal() == IDCANCEL) + { + m_pCommFile->PurgeTx(); + m_pCommFile->PurgeRx(); + GetView()->Output(_T("Receive file cancelled by user.\r\n")); + } + else + { + GetView()->Output(dlg.m_sMessage); + } + + ///////////////// + // Resume the incoming Text thread + m_pIncomingTextThread->ResumeThread(); +} + +void CSerialDoc::OnUpdateReceive(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(m_pCommFile->IsOpen()); +} + +void CSerialDoc::OnSend() +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + ASSERT_VALID(m_pIncomingTextThread); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + { + GetView()->Output(_T("Invalid handles, unable to write.\r\n")); + return; + } + + ASSERT(m_pCommFile->IsOpen() == TRUE); + + // + // Purge the incoming and outgoing queues + // + m_pCommFile->PurgeRx(); + m_pCommFile->PurgeTx(); + + // + // Prompt the user for the file to send + // + CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _szAllFilesFilter); + if (dlg.DoModal() == IDOK) + { + ///////////////// + // Suspend the Incoming text thread + m_pIncomingTextThread->SuspendThread(); + + CFile f; + if (f.Open(dlg.GetPathName(), CFile::modeRead)) + { + GetView()->Output(_T("Sending file %s which is %d bytes long; "), dlg.GetPathName(), f.GetLength()); + + CTransferDlg tdlg; + + // + // setup the transfer dialog + // + tdlg.m_sMessage.Format(_T("Waiting for other side to confirm transfer")); + tdlg.m_sFilename = dlg.GetFileName(); + tdlg.m_pCommFile = m_pCommFile; + tdlg.m_pFile = &f; + tdlg.m_bSending = TRUE; + + // + // Show the dialog + // + if (tdlg.DoModal() == IDCANCEL) + { + m_pCommFile->PurgeTx(); + m_pCommFile->PurgeRx(); + GetView()->Output(_T("Transfer cancelled.\r\n")); + } + else + { + GetView()->Output(tdlg.m_sMessage); + } + } + else + GetView()->Output(_T("Error: Unable to send; There was an error opening the file.\r\n")); + + ///////////////// + // Resume the Incoming Text Thread + m_pIncomingTextThread->ResumeThread(); + } +} + +void CSerialDoc::OnUpdateSend(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(m_pCommFile->IsOpen()); +} + +void CSerialDoc::OnSerialSetup() +{ + ASSERT_VALID(m_pCommConfig); + + if (m_pCommConfig != NULL) + { + // + // Allow the user to edit COMM properties + // + // COXSerialCommConfig takes care of data validation + m_pCommConfig->DoConfigDialog(); + } +} + +void CSerialDoc::OnUpdateSerialSetup(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(!m_pCommFile->IsOpen()); +} + +void CSerialDoc::OnSetTimeout() +{ + ASSERT_VALID(m_pCommConfig); + + if (m_pCommConfig != NULL) + { + // + // Allow user to change Send/Receive timeouts by showing the CTimeoutDlg + // dialog. + // + CTimeoutDlg dlg; + + dlg.m_dwRxTimeout = m_dwRxTimeout; + dlg.m_dwTxTimeout = m_dwTxTimeout; + + if (dlg.DoModal() == IDOK) + { + m_dwRxTimeout = dlg.m_dwRxTimeout; + m_dwTxTimeout = dlg.m_dwTxTimeout; + GetView()->Output(_T("Timeout values set to Rx: %d, Tx: %d.\r\n"), m_dwRxTimeout, m_dwTxTimeout); + } + } +} + +void CSerialDoc::OnUpdateSetTimeout(CCmdUI* pCmdUI) +{ + ASSERT_VALID(m_pCommFile); + ASSERT_VALID(m_pCommConfig); + + if (m_pCommFile == NULL || m_pCommConfig == NULL) + pCmdUI->Enable(FALSE); + else + pCmdUI->Enable(!m_pCommFile->IsOpen()); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.h new file mode 100644 index 0000000..a6f83a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialDoc.h @@ -0,0 +1,83 @@ +// SerialDoc.h : interface of the CSerialDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SERIALDOC_H__172F9584_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_SERIALDOC_H__172F9584_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class COXSerialCommConfig; +class COXSerialCommFile; +class CSerialView; + +class CSerialDoc : public CDocument +{ +protected: // create from serialization only + CSerialDoc(); + DECLARE_DYNCREATE(CSerialDoc) + +// Attributes +public: + CSerialView* GetView() const; + BOOL SendKeyDown(UINT nChar); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSerialDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + protected: + virtual BOOL SaveModified(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSerialDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXSerialCommFile* m_pCommFile; + COXSerialCommConfig* m_pCommConfig; + + DWORD m_dwTxTimeout; + DWORD m_dwRxTimeout; + + CEvent m_eventClose; + + CWinThread* m_pIncomingTextThread; + +// Generated message map functions +protected: + //{{AFX_MSG(CSerialDoc) + afx_msg void OnConnect(); + afx_msg void OnUpdateConnect(CCmdUI* pCmdUI); + afx_msg void OnDisconnect(); + afx_msg void OnUpdateDisconnect(CCmdUI* pCmdUI); + afx_msg void OnReceive(); + afx_msg void OnUpdateReceive(CCmdUI* pCmdUI); + afx_msg void OnSend(); + afx_msg void OnUpdateSend(CCmdUI* pCmdUI); + afx_msg void OnSerialSetup(); + afx_msg void OnUpdateSerialSetup(CCmdUI* pCmdUI); + afx_msg void OnSetTimeout(); + afx_msg void OnUpdateSetTimeout(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERIALDOC_H__172F9584_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialInfo.rtf new file mode 100644 index 0000000..d27b19a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.cpp new file mode 100644 index 0000000..4ce29fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.cpp @@ -0,0 +1,190 @@ +// SerialView.cpp : implementation of the CSerialView class +// + +#include "stdafx.h" +#include "Serial.h" + +#include "SerialDoc.h" +#include "SerialView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSerialView + +IMPLEMENT_DYNCREATE(CSerialView, CEditView) + +BEGIN_MESSAGE_MAP(CSerialView, CEditView) + //{{AFX_MSG_MAP(CSerialView) + ON_WM_CTLCOLOR_REFLECT() + //}}AFX_MSG_MAP + ON_MESSAGE(IDM_OUTPUT, OnOutput) + ON_MESSAGE(IDM_BACKSPACE, OnBackspace) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSerialView construction/destruction + +CSerialView::CSerialView() +{ + m_font.m_hObject = NULL; + + // Assign custom colours for the view + m_clrText = RGB(255, 255, 255); // while + m_clrBkgnd = RGB(0, 0, 128); // blue + m_brBkgnd.CreateSolidBrush(m_clrBkgnd); +} + +CSerialView::~CSerialView() +{ + if (m_font.m_hObject != NULL) + m_font.DeleteObject(); +} + +BOOL CSerialView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + cs.style &= ~(ES_AUTOHSCROLL | WS_HSCROLL); // Enable word-wrapping + + return bPreCreated; +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialView drawing + +void CSerialView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + CSerialDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CSerialView diagnostics + +#ifdef _DEBUG +void CSerialView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CSerialView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CSerialDoc* CSerialView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSerialDoc))); + return (CSerialDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSerialView message handlers + +void CSerialView::OnInitialUpdate() +{ + CEditView::OnInitialUpdate(); + + GetEditCtrl().SetReadOnly(TRUE); + + // + // Create the font for this view + // + if (m_font.m_hObject == NULL) + { + if (m_font.CreatePointFont(95, _T("Fixedsys"))) + SetFont(&m_font); + } + + // Output some text + Output(_T("Serial - An Ultimate Toolbox Sample Application\r\n")); + Output(_T("Copyright 1998 by The Code Project - http://www.theUltimateToolbox.com\r\n")); + Output(_T("----------------------------------------------------------\r\n\r\n\r\n")); +} + +HBRUSH CSerialView::CtlColor(CDC* pDC, UINT nCtlColor) +{ + UNREFERENCED_PARAMETER(nCtlColor); + + // + // Use custom colours to paint the control + // + pDC->SetTextColor(m_clrText); + pDC->SetBkColor(m_clrBkgnd); + return m_brBkgnd; +} + +void CSerialView::Output(LPCTSTR pszOutput, ...) +{ + // + // void Output(LPCTSTR pszOutput, ...) + // + // Outputs a formatted string to the edit window + // + // IN + // pszOutput: A format-control string. + // + // OUT + // none + // + // RETURN + // none + + int nLength = GetEditCtrl().GetWindowTextLength(); + TCHAR szBuffer[1024]; + + va_list argptr; + + va_start(argptr, pszOutput); + _vstprintf(szBuffer, pszOutput, argptr); + va_end(argptr); + GetEditCtrl().SetSel(nLength, nLength); + GetEditCtrl().ReplaceSel(szBuffer); +} + +void CSerialView::Backspace() +{ + int nLength = GetEditCtrl().GetWindowTextLength(); + + GetEditCtrl().SetReadOnly(FALSE); + GetEditCtrl().SetSel(nLength - 1, nLength); + GetEditCtrl().Clear(); + GetEditCtrl().SetReadOnly(TRUE); +} + +LONG CSerialView::OnOutput(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + + // + // This message is sent from the IncomingTextThread function + // on receipt of an incoming character notification. The + // character (string) is pointed to by lParam + Output((LPCTSTR) lParam); + return 0; +} + +LONG CSerialView::OnBackspace(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + // + // This message is sent from the IncomingTextThread function + // on receipt of an incoming character notification. The + // character is always the backspace character + Backspace(); + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.h new file mode 100644 index 0000000..9902b8c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/SerialView.h @@ -0,0 +1,78 @@ +// SerialView.h : interface of the CSerialView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SERIALVIEW_H__172F9586_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_SERIALVIEW_H__172F9586_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define IDM_OUTPUT (WM_USER + 100) +#define IDM_BACKSPACE (WM_USER + 101) + +class CSerialDoc; + +class CSerialView : public CEditView +{ +protected: // create from serialization only + CSerialView(); + DECLARE_DYNCREATE(CSerialView) + +// Attributes +public: + CSerialDoc* GetDocument(); + +// Operations +public: + void Output(LPCTSTR pszOutput, ...); + void Backspace(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSerialView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSerialView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CFont m_font; + CBrush m_brBkgnd; + + COLORREF m_clrText; + COLORREF m_clrBkgnd; + + +// Generated message map functions +protected: + afx_msg LONG OnOutput(WPARAM wParam, LPARAM lParam); + afx_msg LONG OnBackspace(WPARAM wParam, LPARAM lParam); + + //{{AFX_MSG(CSerialView) + afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in SerialView.cpp +inline CSerialDoc* CSerialView::GetDocument() + { return (CSerialDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERIALVIEW_H__172F9586_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.cpp new file mode 100644 index 0000000..28e1767 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Serial.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.h new file mode 100644 index 0000000..fd4017d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__172F9580_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_STDAFX_H__172F9580_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__172F9580_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.cpp new file mode 100644 index 0000000..05abfd8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.cpp @@ -0,0 +1,82 @@ +// TimeoutDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Serial.h" +#include "TimeoutDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTimeoutDlg dialog + + +CTimeoutDlg::CTimeoutDlg(CWnd* pParent /*=NULL*/) + : CDialog(CTimeoutDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTimeoutDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + + m_dwRxTimeout = + m_dwTxTimeout = 0; +} + + +void CTimeoutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTimeoutDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTimeoutDlg, CDialog) + //{{AFX_MSG_MAP(CTimeoutDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTimeoutDlg message handlers + +void CTimeoutDlg::OnOK() +{ + UpdateData(TRUE); + CString sBuffer; + + // + // Retreive the dialog data + // + GetDlgItemText(IDC_TIMEOUT_RX, sBuffer); + m_dwRxTimeout = _ttol(sBuffer); + + GetDlgItemText(IDC_TIMEOUT_TX, sBuffer); + m_dwTxTimeout = _ttol(sBuffer); + + CDialog::OnOK(); +} + +BOOL CTimeoutDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // + // Set the dialog data + // + TCHAR szBuffer[20]; + _ltot(m_dwRxTimeout, szBuffer, 10); + SetDlgItemText(IDC_TIMEOUT_RX, szBuffer); + + _ltot(m_dwTxTimeout, szBuffer, 10); + SetDlgItemText(IDC_TIMEOUT_TX, szBuffer); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.h new file mode 100644 index 0000000..a24e55b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TimeoutDlg.h @@ -0,0 +1,49 @@ +#if !defined(AFX_TIMEOUTDLG_H__172F958D_051F_11D2_88B0_0080C859A484__INCLUDED_) +#define AFX_TIMEOUTDLG_H__172F958D_051F_11D2_88B0_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// TimeoutDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CTimeoutDlg dialog + +class CTimeoutDlg : public CDialog +{ +// Construction +public: + CTimeoutDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTimeoutDlg) + enum { IDD = IDD_TIMEOUT }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + DWORD m_dwRxTimeout; + DWORD m_dwTxTimeout; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTimeoutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTimeoutDlg) + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TIMEOUTDLG_H__172F958D_051F_11D2_88B0_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.cpp new file mode 100644 index 0000000..cce634f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.cpp @@ -0,0 +1,398 @@ +// TransferDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "serial.h" +#include "TransferDlg.h" + +#include "OXSCFILE.H" +#include "OXCRCCHK.H" + +#include "Globals.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define IDM_START_SENDING (WM_USER + 10) +#define IDM_START_RECEIVING (WM_USER + 11) + +//#define __USE_MESSAGES +// +// Uncomment the above directive if you wish MESSAGE-ing between the two +// sides enabled. Obviosly a "Real" protocol would implement such a device but this +// application is only intended as a sample and hence does not cover advanced +// topics like synchronization. Popular protocols are Z-modem, Y-modem, and X-modem. +// +// +#define MESSAGE_TYPE UINT +#define MESSAGE_SIZE sizeof(UINT) +#define MESSAGE_NONE (0x0000) +#define MESSAGE_CANCEL (0x0001) +#define MESSAGE_STOPPED (0x0002) +#define MESSAGE_WANTSEND (0x0004) +#define MESSAGE_OKAYSEND (0x0008) + +///////////////////////////////////////////////////////////////////////////// +// CTransferDlg dialog + +CTransferDlg::CTransferDlg(CWnd* pParent /*=NULL*/) + : CDialog(CTransferDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTransferDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + + m_pFile = NULL; + m_pCommFile = NULL; + + m_bSending = TRUE; + m_bCancelPressed = FALSE; +} + +void CTransferDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTransferDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CTransferDlg, CDialog) + //{{AFX_MSG_MAP(CTransferDlg) + //}}AFX_MSG_MAP + ON_MESSAGE(IDM_START_SENDING, OnStartSending) + ON_MESSAGE(IDM_START_RECEIVING, OnStartReceiving) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTransferDlg message handlers + +BOOL CTransferDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + SetDlgItemText(IDC_TRANSFER_TEXT, m_sMessage); + + // + // Start either Receivng or Sending data + // + if (m_bSending) + PostMessage(IDM_START_SENDING); + else + PostMessage(IDM_START_RECEIVING); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LONG CTransferDlg::OnStartReceiving(WPARAM, LPARAM) +{ + // + // + // This function (message handler) will begin receiving data on the + // COMM port. This function is not multi-threaded, instead it uses + // the global PumpMessages function to maintain the Applications message + // pump. This function should be implemented as another thread, but, as + // mentioned before, this is left up to you to implement. + // + // The function will wait for incoming data to appear in the Receive queue. + // Once data is found it begins receiving it by first, reading the filesize, + // next the filename, and then the file checksum. After all this + // the file is read in 1024 chunks until complete. Again, this is a very simple + // protocol. You should investigate Z-modem, Y-modem and other popular + // protocols. + // + // The file checksum is only checked once at the end of the transmission. This is + // done for simplicity. Idealy, you would check the checksum of each transmitted + // packet. Thus, if the checksum of a packed failed you could simply ask to have + // it transmitted instead of having the whole file re-transmitted (as the case + // would be in this scenario). + // + // On completion, CDialog::OnOK or CDialog::OnCancel is called to close the dialog + // window. + // + + ASSERT_VALID(m_pCommFile); + + if (m_pCommFile == NULL) + { + CDialog::OnCancel(); + return -1; + } + ShowWindow(SW_SHOW); + + CString sNewFilename = GetAppDir(); + CFile f; + BYTE bBuffer[1024]; + UINT nBytesReceived = 0; + UINT nTotalBytesReceived = 0; + + DWORD dwFileSize; + TCHAR szFilename[MAX_PATH]; + DWORD dwChecksum; + + TRY + { + // Wait + m_sMessage.Format(_T("Waiting for incoming files...")); + SetDlgItemText(IDC_TRANSFER_TEXT, m_sMessage); + + while (m_pCommFile->IsRxQueueEmpty() && !m_bCancelPressed) + { + PumpMessages(); + } + + if (m_bCancelPressed) + { + CDialog::OnCancel(); + return 0; + } + + // first: read the filesize + m_pCommFile->Read(&dwFileSize, sizeof(dwFileSize)); + + // second: read the filename + m_pCommFile->Read(szFilename, sizeof(szFilename)); + + // display message about incoming file + m_sMessage.Format(_T("file %s (%d bytes long) detected.\r\n"), szFilename, dwFileSize); + SetDlgItemText(IDC_TRANSFER_TEXT, m_sMessage); + + // third: read the checksum + m_pCommFile->Read(&dwChecksum, sizeof(dwChecksum)); + + CProgressCtrl* pProg = (CProgressCtrl*) GetDlgItem(IDC_TRANSFER_PROGRESS); + ASSERT_VALID(pProg); + + pProg->SetRange(0, 100); + pProg->SetPos(0); + + // fourth: read the incoming data (streamed into a file object) + sNewFilename += _T('\\'); + sNewFilename += szFilename; + if (!f.Open(sNewFilename, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite | CFile::shareDenyRead)) + { + m_sMessage.Format(_T("Error: Unable to create the new file.")); + } + else + { + TRY + { + // + // Keep reading the file until either the user cancels or + // the file has finsihed. + // + while ((nTotalBytesReceived < dwFileSize) && !m_bCancelPressed) + { + nBytesReceived = m_pCommFile->Read(bBuffer, sizeof(bBuffer)); + nTotalBytesReceived += nBytesReceived; + + m_sMessage.Format(_T("%s\n%d of %d bytes received."), sNewFilename, nTotalBytesReceived, dwFileSize); + SetDlgItemText(IDC_TRANSFER_TEXT, m_sMessage); + + f.Write(bBuffer, nBytesReceived); + + pProg->SetPos(((nTotalBytesReceived * 100 / (UINT) dwFileSize))); + PumpMessages(); + } + + if (m_bCancelPressed) + { +#ifdef __USE_MESSAGES + // the transfer has been cancelled; wait for the other side to + // acknowledge receipt of this message + MESSAGE_TYPE message = MESSAGE_CANCEL; + m_pCommFile->Write(&message, MESSAGE_SIZE); + do + { + m_pCommFile->Read(&message, MESSAGE_SIZE); + } + while (message != MESSAGE_STOPPED); +#endif + + m_sMessage.Format(_T("Transfer was cancelled\r\n")); + + CDialog::OnCancel(); + return 0; + } + + f.Close(); + } + CATCH(CFileException, e) + { + TCHAR szError[256]; + e->GetErrorMessage(szError, sizeof(szError)); + + m_sMessage.Format(_T("Error: %s\r\n"), szError); + } + END_CATCH + } + } + CATCH(COXSerialCommException, e) + { + m_sMessage.Format(_T("An Exception occurred (%d)\r\n"), e->m_cause); + } + END_CATCH + + // perform simple integrity check on the file + if (nTotalBytesReceived == dwFileSize) + { + COXCheckSum32 checksum; + DWORD dwNewChecksum; + TRY + { + dwNewChecksum = checksum.CalculateFile(sNewFilename); + TRACE(_T("%s has checksum of %d\n"), sNewFilename, dwNewChecksum); + } + CATCH(CFileException, e) + { + m_sMessage.Format(_T("%s successfully received\r\nChecksum test failed.\r\n"), sNewFilename); + CDialog::OnOK(); + return 0; + } + END_CATCH + + if (dwChecksum == dwNewChecksum) + { + m_sMessage.Format(_T("%s successfully received\r\nFile passed integrity check (%d)\r\n"), sNewFilename, dwNewChecksum); + } + else + { + m_sMessage.Format(_T("%s successfully received\r\nFile failed integrity check (remote:%d; local:%d)\r\n"), sNewFilename, dwChecksum, dwNewChecksum); + } + } + else + { + m_sMessage.Format(_T("%s was not properly received (%d bytes not received)\r\n"), sNewFilename, dwFileSize - nTotalBytesReceived); + } + + + CDialog::OnOK(); + + return 0; +} + +LONG CTransferDlg::OnStartSending(WPARAM, LPARAM) +{ + // + // + // The function will begin sending the file over the COMM port. It assumes that + // the awaiting client is ready to receive. Really however, A + // "Are you ready to receive" message should be send to the client to ensure + // the transfer works properly. In this application if the user isn't waiting to + // receive a file, the data will appear in his/her "Terminal" window. + // + // This function should run in a thread. Instead, for simplicity's sake it uses the + // simple PumpMessage function to maintain the application's message pump. + // + // See CTransferDlg::OnStartReceiving for more information about the protocol used + // to transfer files. + // + + ASSERT_VALID(m_pFile); + ASSERT_VALID(m_pCommFile); + + if (m_pFile == NULL || m_pCommFile == NULL || m_sFilename.IsEmpty()) + { + CDialog::OnCancel(); + return -1; + } + + ShowWindow(SW_SHOW); + + CProgressCtrl* pProg = (CProgressCtrl*) GetDlgItem(IDC_TRANSFER_PROGRESS); + ASSERT_VALID(pProg); + + DWORD dwTotal = 0; + DWORD dwCount = 0; + + // CFile object m_pFile already open + COXCheckSum32 checksum; + DWORD dwChecksum; + TRY + { + // calculate the file checksum + dwChecksum = checksum.CalculateFile(m_pFile); + m_pFile->SeekToBegin(); + + TRACE(_T("%s has checksum of %d\n"), m_sFilename, dwChecksum); + } + CATCH(CFileException, e) + { + m_sMessage.Format(_T("Fatal Error: Unable to calculate file checksum\r\n")); + TRACE(_T("Unable to calculate file checksum\r\n")); + return -1; + } + END_CATCH + + BYTE bBuffer[1024]; + TCHAR szFilename[MAX_PATH]; + + lstrcpy(szFilename, (LPCTSTR) m_sFilename); + + // first: send number of bytes this file is + DWORD dwFileSize = m_pFile->GetLength(); + m_pCommFile->Write(&dwFileSize, sizeof(DWORD)); + + // second: send filename + m_pCommFile->Write(&szFilename, sizeof(szFilename)); + + // third: send checksum + m_pCommFile->Write(&dwChecksum, sizeof(dwChecksum)); + + pProg->SetRange(0, 100); + pProg->SetPos(0); + + // fourth: write the file + while ((dwCount = m_pFile->Read(bBuffer, sizeof(bBuffer))) != 0 && !m_bCancelPressed) + { + dwTotal += dwCount; + m_pCommFile->Write(bBuffer, dwCount); + + m_sMessage.Format(_T("%s\n%d of %d bytes sent"), m_sFilename, dwTotal, dwFileSize); + SetDlgItemText(IDC_TRANSFER_TEXT, m_sMessage); + + pProg->SetPos(((dwTotal * 100 / dwFileSize))); + +#ifdef __USE_MESSAGES + m_pCommFile->Read(&message, MESSAGE_SIZE); + if (message == MESSAGE_CANCEL) + { + m_bCancelPressed = TRUE; + message = MESSAGE_STOPPED; + m_pCommFile->Write(&message, MESSAGE_SIZE); + break; + } +#endif + + PumpMessages(); + } + +#ifdef __USE_MESSAGES + if (message == MESSAGE_CANCEL) + m_sMessage.Format(_T("Other side cancelled transfer; %d of %d bytes sent\r\n"), dwTotal, dwFileSize); + else + m_sMessage.Format(_T("Finished. Successfully sent %d byte(s).\r\n"), dwTotal); +#else + m_sMessage.Format(_T("Finished. Successfully sent %d byte(s).\r\n"), dwTotal); +#endif + + if (m_bCancelPressed) + CDialog::OnCancel(); + else + CDialog::OnOK(); + + return 0; +} + +void CTransferDlg::OnCancel() +{ + // User has pressed the cancel button; Disable the button and set + // flag + // + m_bCancelPressed = TRUE; + GetDlgItem(IDCANCEL)->EnableWindow(FALSE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.h new file mode 100644 index 0000000..c152b21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/TransferDlg.h @@ -0,0 +1,63 @@ +#if !defined(AFX_TRANSFERDLG_H__26E6D945_0616_11D2_88B2_0080C859A484__INCLUDED_) +#define AFX_TRANSFERDLG_H__26E6D945_0616_11D2_88B2_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// TransferDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CTransferDlg dialog + +class COXSerialCommFile; + +class CTransferDlg : public CDialog +{ +// Construction +public: + CTransferDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTransferDlg) + enum { IDD = IDD_TRANSFER }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + +protected: + BOOL m_bCancelPressed; + +public: + CString m_sFilename; + CString m_sMessage; + + COXSerialCommFile* m_pCommFile; + + CFile* m_pFile; + + BOOL m_bSending; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTransferDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + afx_msg LONG OnStartSending(WPARAM, LPARAM); + afx_msg LONG OnStartReceiving(WPARAM, LPARAM); + + // Generated message map functions + //{{AFX_MSG(CTransferDlg) + virtual BOOL OnInitDialog(); + virtual void OnCancel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TRANSFERDLG_H__26E6D945_0616_11D2_88B2_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.rc2 new file mode 100644 index 0000000..bffa808 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/Serial.rc2 @@ -0,0 +1,13 @@ +// +// SERIAL.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/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/SerialDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/SerialDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/res/SerialDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/resource.h new file mode 100644 index 0000000..a7315ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/samples/Serial/resource.h @@ -0,0 +1,42 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Serial.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_SERIALTYPE 129 +#define IDD_TIMEOUT 130 +#define IDD_TRANSFER 132 +#define IDC_TIMEOUT_RX 1000 +#define IDC_TIMEOUT_TX 1001 +#define IDC_TRANSFER_PROGRESS 1004 +#define IDC_TRANSFER_TEXT 1005 +#define IDM_SERIAL_SETUP 32771 +#define IDM_CONFIG_LOAD 32772 +#define IDM_CONFIG_SAVE 32773 +#define IDM_TIMEOUT 32774 +#define IDM_FILE_READ 32776 +#define IDM_FILE_WRITE 32777 +#define IDM_PURGE_RX 32780 +#define IDM_PURGE_TX 32781 +#define IDM_OPEN 32782 +#define IDM_CLOSE 32783 +#define IDM_CONNECT 32785 +#define IDM_DISCONNECT 32786 +#define IDM_RECEIVE 32788 +#define IDM_SEND 32789 +#define IDM_SET_TIMEOUT 32790 +#define IDM_OPTIONS_RECEIVE 32791 +#define ID_DESCRIPTION_FILE 61204 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32792 +#define _APS_NEXT_CONTROL_VALUE 1006 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/BDIFCALC.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/BDIFCALC.CPP new file mode 100644 index 0000000..728611d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/BDIFCALC.CPP @@ -0,0 +1,2120 @@ +// ========================================================================== +// Class Implementation : COXBinDiffCalculator +// ========================================================================== + +// Source file : bdifcalc.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "bdifcalc.h" // class specification +#include "progress.h" // progress bar +#include "oxdflhdr.h" // file header + +#include + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXBinDiffCalculator, CObject) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +const double COXBinDiffCalculator::m_cMinMeanChunkLen = 20.0; +const double COXBinDiffCalculator::m_cMaxMeanChunkLen = 80.0; +const double COXBinDiffCalculator::m_cBigChunkLen = 500.0; +const TCHAR* COXBinDiffCalculator::m_cFileHeader = TEXT("BinDiff0001"); + +// If m_cDropEOL is TRUE, cr and lf are not allowed to function as delimiters +const BOOL COXBinDiffCalculator::m_cDropEOL = FALSE; + +const DWORD COXBinDiffCalculator::m_cBufSiz = 128; +const WORD COXBinDiffCalculator::m_cMinMatchLen = 6; +// ... Must be >= m_cMinMatchLen +const WORD COXBinDiffCalculator::m_cMinEqualRunLen = (COXBinDiffCalculator::m_cMinMatchLen+4); + +// Tag values. A tag value is encoded in the 4 lowest bits of a tag byte. +// The 4 high bits of the tag byte are used for encoding a value 0-15. +const BYTE COXBinDiffCalculator::m_cTagSmallDiff = 0; +const BYTE COXBinDiffCalculator::m_cTagMediumDiff = 1; +const BYTE COXBinDiffCalculator::m_cTagLargeDiff = 2; +const BYTE COXBinDiffCalculator::m_cTagSmallNearCopy = 3; +const BYTE COXBinDiffCalculator::m_cTagMediumNearCopy = 4; +const BYTE COXBinDiffCalculator::m_cTagLargeNearCopy = 5; +const BYTE COXBinDiffCalculator::m_cTagSmallDistantCopy = 6; +const BYTE COXBinDiffCalculator::m_cTagMediumDistantCopy = 7; +const BYTE COXBinDiffCalculator::m_cTagLargeDistantCopy = 8; +const BYTE COXBinDiffCalculator::m_cTagSmallFarCopy = 9; +const BYTE COXBinDiffCalculator::m_cTagMediumFarCopy = 0x0A; +const BYTE COXBinDiffCalculator::m_cTagLargeFarCopy = 0x0B; +// ... Tags 0x0C,0x0D,0x0E unused. +const BYTE COXBinDiffCalculator::m_cTagEOF = 0x0F; + +// Maximum values encodable by different tags. +// 4-bit value (0-15) is used to encode a value 1 - m_cSmallSize; +// 12-bit value (0-4095) is used to encode a value m_cSmallSize+1 - m_cMediumSize; +// 20-bit value (0-1048575) is used to encode a value m_cMediumSize+1 - m_cLargeSize; +const DWORD COXBinDiffCalculator::m_cSmallSize = 16L; +const DWORD COXBinDiffCalculator::m_cMediumSize = (4096L + COXBinDiffCalculator::m_cSmallSize); +const DWORD COXBinDiffCalculator::m_cLargeSize = (1048576L + COXBinDiffCalculator::m_cMediumSize); + +// Maximum file positions encodable in 2 or 3 bytes +const DWORD COXBinDiffCalculator::m_cNearDistance = 0xFFFFL; +const DWORD COXBinDiffCalculator::m_cDistantDistance = 0xFFFFFF; + +const DWORD COXBinDiffCalculator::m_cMaxStrLen = 255; + + +// Data members ------------------------------------------------------------- +// protected: + // COXDiffProgress* m_pProgressBar; + // --- Pointer to the progress bar (may be derived from COXDiffProgress) + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXBinDiffCalculator::COXBinDiffCalculator() + : +#if ! BDEXTR + m_LstFreeTreeNode(NULL), + m_LstFreeMatchBlock(NULL), +#endif /* ! BDEXTR */ + m_pProgressBar(NULL) + { + m_pProgressBar = new COXDiffProgress; + } + +#if ! BDEXTR +void COXBinDiffCalculator::SubtractFiles(LPCTSTR orgFilNam, LPCTSTR derivedFilNam, LPCTSTR diffFilNam, + COXDiffFileHeader* pHeader) + { + CStdioFile OrgFil; + CStdioFile DerivedFil; + CStdioFile DiffFil; + + if (!DiffFil.Open(diffFilNam, CFile:: modeCreate | CFile::modeReadWrite | CFile::typeBinary)) + { + CString errMsg; + + errMsg = TEXT("Cannot open file "); + errMsg += diffFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + } + + if (!OrgFil.Open(orgFilNam, CFile::modeRead | CFile::typeBinary | CFile::shareDenyWrite)) + { + CString errMsg; + + errMsg = TEXT("Cannot open file "); + errMsg += orgFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + } + + + if (!DerivedFil .Open(derivedFilNam, CFile::modeRead | CFile::typeBinary | CFile::shareDenyWrite)) + { + CString errMsg; + + errMsg = TEXT("Cannot open file "); + errMsg += derivedFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + } + + SubtractFiles(&OrgFil, &DerivedFil, &DiffFil, pHeader); + + OrgFil.Close(); + DerivedFil.Close(); + DiffFil.Close(); + } + +void COXBinDiffCalculator::SubtractFiles(CFile* pOrgFil, CFile* pDerivedFil, CFile* pDiffFil, + COXDiffFileHeader* pHeader) + { + COXTreeNode* pOrgTreeRoot = NULL; + int delim; + COXMatchBlock* pMatchLst = NULL; + LONG size; + LONG orgSum; + LONG orgSize; + LONG derivedSum; + LONG derivedSize; + + // if no special header was specified, suplly a default header + BOOL bDefHeader(FALSE); + if (pHeader == NULL) + { + pHeader = new COXDiffFileHeader(m_cFileHeader); + bDefHeader = TRUE; + } + DWORD nBeginHeaderPos = pDiffFil->GetPosition(); + pHeader->WriteHeader(pDiffFil); + DWORD nEndHeaderPos = pDiffFil->GetPosition(); + + orgSize = pOrgFil->GetLength(); + size = derivedSize = pDerivedFil->GetLength(); + + // Write dummy check-data; gets rewritten at end of this procedure + WriteLongNBytes(0L,pDiffFil,4); + WriteLongNBytes(0L,pDiffFil,4); + WriteLongNBytes(0L,pDiffFil,4); + WriteLongNBytes(0L,pDiffFil,4); + + orgSum = 0; + derivedSum = 0; + + // Dummy block + { + if (size == 0) + { + int byte; + BYTE helpByte; + // ... EOF on diff fil + pDiffFil->Write(&m_cTagEOF, 1); + // ... Adjust checksum + do + { + if (pOrgFil->Read(&helpByte, 1) == 1) + byte = helpByte; + else + byte = EOF; + if (byte != EOF) + { + orgSum += byte; + } + } while (byte != EOF); + } + else + { + // Find suitable delimiter + delim = FindDelimiter(pOrgFil,m_cMinMeanChunkLen,m_cMaxMeanChunkLen); + if (delim < 0) + delim = 0; + // Build indexed position tree + pOrgTreeRoot = BuildTree(pOrgFil,delim,orgSum); + + // Match files + pMatchLst = MatchFiles(pOrgTreeRoot,pOrgFil,pDerivedFil,delim,derivedSum); + + // Write diff file + DumpDiff(pMatchLst,pDerivedFil,pDiffFil); + } + } + + if (pMatchLst != NULL) + DeleteMatchBlocks(pMatchLst); + + if (pOrgTreeRoot != NULL) + DeleteTreeNode(pOrgTreeRoot); + + + // MSDOS has no resource fork: encode extra EOF + pDiffFil->Write(&m_cTagEOF, 1); + + // Adjust the check-data + pDiffFil->Seek(nEndHeaderPos - nBeginHeaderPos, CFile::begin); + + WriteLongNBytes(orgSize,pDiffFil,4); + WriteLongNBytes(orgSum,pDiffFil,4); + WriteLongNBytes(derivedSize,pDiffFil,4); + WriteLongNBytes(derivedSum,pDiffFil,4); + + if (bDefHeader) + delete pHeader; + } +#endif /* ! BDEXTR */ + +void COXBinDiffCalculator::AddFiles(LPCTSTR orgFilNam, LPCTSTR derivedFilNam, LPCTSTR diffFilNam, + COXDiffFileHeader* pHeader) + { + CStdioFile OrgFil; + CStdioFile DerivedFil; + CFile DiffFil; + CFileException* pFileEx = new CFileException; + if (!DiffFil.Open(diffFilNam, CFile::modeRead | CFile::typeBinary | CFile::shareDenyWrite, pFileEx)) + { + CString errMsg; + errMsg = TEXT("Cannot open file "); + errMsg += diffFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + THROW(pFileEx); + } + + if (!OrgFil.Open(orgFilNam, CFile::modeRead | CFile::typeBinary | CFile::shareDenyWrite, pFileEx)) + { + CString errMsg; + + errMsg = TEXT("Cannot open file "); + errMsg += orgFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + THROW(pFileEx); + } + + if (!DerivedFil.Open(derivedFilNam, CFile:: modeCreate | CFile::modeReadWrite | CFile::typeBinary, pFileEx)) + { + CString errMsg; + + errMsg =TEXT(" Cannot open file "); + errMsg += derivedFilNam; + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(errMsg); + THROW(pFileEx); + } + +#ifdef WIN32 + pFileEx->Delete(); +#else + delete pFileEx; +#endif + + AddFiles(&OrgFil, &DerivedFil, &DiffFil, pHeader); + + DerivedFil.Close(); + OrgFil.Close(); + DiffFil.Close(); + + } + +void COXBinDiffCalculator::AddFiles(CFile* pOrgFil, CFile* pDerivedFil, CFile* pDiffFil, + COXDiffFileHeader* pHeader) + { + int c; + BYTE helpByte; + LONG blockLen; + LONG blockPos; + int tag; + LONG derivedSize; + LONG derivedSum; + LONG orgSize; + LONG orgSum; + LONG checkDerivedSize; + LONG checkDerivedSum; + LONG checkOrgSize; + LONG checkOrgSum; + LONG prevDiffPos; + LONG diffPos; + LONG curPos; + + BOOL bDefHeader(FALSE); + TRY + { + // if no special header was specified, suplly a default header + if (pHeader == NULL) + { + pHeader = new COXDiffFileHeader(m_cFileHeader); + bDefHeader = TRUE; + } + + pHeader->ReadHeader(pDiffFil); + } + CATCH_ALL(e) + { + ASSERT(m_pProgressBar != NULL); + if (bDefHeader) + delete pHeader; + m_pProgressBar->Abort(TEXT("Incorrect difference header")); + THROW_LAST(); + } + END_CATCH_ALL + + // Read sizes and checksums of original and updated file + checkOrgSize = ReadLongNBytes(pDiffFil,4); + checkOrgSum = ReadLongNBytes(pDiffFil,4); + orgSize = 0; + orgSum = 0; + checkDerivedSize = ReadLongNBytes(pDiffFil,4); + checkDerivedSum = ReadLongNBytes(pDiffFil,4); + derivedSize = 0; + derivedSum = 0; + + { + orgSize += pOrgFil->GetLength(); + + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Init(0,pOrgFil->GetLength(),TEXT("Checking:")); + curPos = 0; + c = EOF; + while (pOrgFil->Read(&helpByte, 1) == 1) + { + c = helpByte; + if ((curPos & 0xFFF) == 0) + if (!m_pProgressBar->Adjust(curPos)) + m_pProgressBar->Abort(TEXT("Aborting")); + orgSum += c; + curPos++; + } + pOrgFil->Seek(0L, CFile::begin); + m_pProgressBar->Close(); + + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Init(0,pDiffFil->GetLength(),TEXT("Apply diff:")); + tag = 0; + prevDiffPos = 0; + diffPos = 0; + while (tag != m_cTagEOF && pDiffFil->Read(&helpByte, 1) == 1) + { + c = helpByte; + diffPos++; + + // Adjust bar every 256 bytes + if (diffPos - prevDiffPos > 0xFF) + { + if (!m_pProgressBar->Adjust(diffPos)) + m_pProgressBar->Abort(TEXT("Aborting")); + prevDiffPos = diffPos; + } + + tag = c & 0x0F; + switch (tag) + { + case m_cTagSmallDiff: + blockLen = (c >> 4) + 1; + CopyFileChars(blockLen,pDiffFil,pDerivedFil,derivedSum); + diffPos += blockLen; + derivedSize += blockLen; + break; + case m_cTagMediumDiff: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cSmallSize + 1; + CopyFileChars(blockLen,pDiffFil,pDerivedFil,derivedSum); + diffPos += blockLen; + derivedSize += blockLen; + } + break; + case m_cTagLargeDiff: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = (blockLen << 8) | c; + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cMediumSize + 1; + } + CopyFileChars(blockLen,pDiffFil,pDerivedFil,derivedSum); + diffPos += blockLen; + derivedSize += blockLen; + } + break; + case m_cTagSmallNearCopy: + blockLen = (c >> 4) + 1; + blockPos = ReadLongNBytes(pDiffFil,2); + diffPos += 2; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + break; + case m_cTagMediumNearCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cSmallSize + 1; + blockPos = ReadLongNBytes(pDiffFil,2); + diffPos += 2; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + break; + case m_cTagLargeNearCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = (blockLen << 8) | c; + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cMediumSize + 1; + blockPos = ReadLongNBytes(pDiffFil,2); + diffPos += 2; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + } + break; + case m_cTagSmallDistantCopy: + blockLen = (c >> 4) + 1; + blockPos = ReadLongNBytes(pDiffFil,3); + diffPos += 3; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + break; + case m_cTagMediumDistantCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cSmallSize + 1; + blockPos = ReadLongNBytes(pDiffFil,3); + diffPos += 3; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + break; + case m_cTagLargeDistantCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = (blockLen << 8) | c; + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cMediumSize + 1; + blockPos = ReadLongNBytes(pDiffFil,3); + diffPos += 3; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + } + break; + case m_cTagSmallFarCopy: + blockLen = (c >> 4) + 1; + blockPos = ReadLongNBytes(pDiffFil,4); + diffPos += 4; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + break; + case m_cTagMediumFarCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cSmallSize + 1; + blockPos = ReadLongNBytes(pDiffFil,4); + diffPos += 4; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + break; + case m_cTagLargeFarCopy: + blockLen = (c >> 4); + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = (blockLen << 8) | c; + if (pDiffFil->Read(&helpByte, 1) == 1) + c = helpByte; + else + c = EOF; + diffPos++; + if (c != EOF) + { + blockLen = ((blockLen << 8) | c) + m_cMediumSize + 1; + blockPos = ReadLongNBytes(pDiffFil,4); + diffPos += 4; + pOrgFil->Seek(blockPos, CFile::begin); + CopyFileChars(blockLen,pOrgFil,pDerivedFil,derivedSum); + derivedSize += blockLen; + } + } + break; + case m_cTagEOF: + break; + default: + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(TEXT("Unknown tag in diff file - possibly created by a more recent BinDiff")); + break; + } + } + + m_pProgressBar->Close(); + + if (bDefHeader) + delete pHeader; + + } // End of dummy block + + if (orgSize != checkOrgSize || orgSum != checkOrgSum) + { + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(TEXT("Original file is not the file the diff was created with.")); + } + + if (derivedSize != checkDerivedSize || derivedSum != checkDerivedSum) + { + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Abort(TEXT("CRC failure : New derived file is corrupt.\nPatch file could be invalid")); + } + } + +void COXBinDiffCalculator::ReplaceProgressBar(COXDiffProgress* pProgressBar) + { + // ... Should already have a progress bar + ASSERT(m_pProgressBar != NULL); + // ... Not allowed to replace by an empty one + ASSERT(pProgressBar != NULL); + delete m_pProgressBar; + m_pProgressBar = pProgressBar; + } + +#ifdef _DEBUG +void COXBinDiffCalculator::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + } + +void COXBinDiffCalculator::AssertValid() const + { + CObject::AssertValid(); + } +#endif + +COXBinDiffCalculator::~COXBinDiffCalculator() + { + // ... Should always have a progress bar + ASSERT(m_pProgressBar != NULL); + delete m_pProgressBar; + + if (m_LstFreeTreeNode != NULL) + DeleteTreeNode(m_LstFreeTreeNode); + + DeleteMatchBlocks(m_LstFreeMatchBlock); + } + +// protected: +void COXBinDiffCalculator::DeleteTreeNode(COXTreeNode* pTreeNode) + // --- In : pTreeNode : The tree node to delete + // --- Out : + // --- Returns : + // --- Effect : recursive function. First deletes its children then deletes itself + { + ASSERT(pTreeNode != NULL); + + if (pTreeNode->pGE != NULL) + DeleteTreeNode(pTreeNode->pGE); + + if (pTreeNode->pLT != NULL) + DeleteTreeNode(pTreeNode->pLT); + + delete pTreeNode; + pTreeNode = NULL; + } + +void COXBinDiffCalculator::CopyFileChars(LONG count, CFile* pInFile, CFile* pOutFile, LONG& sum) + // --- In : count : The number of bytes to copy + // pInFile : The input file + // pOutFile : The output file + // sum : The previous checksum + // --- Out : sum :The checksum after to bytes are copied + // --- Returns : + // --- Effect : Copies the specified number of bytes from the in file + // to the out file and adjusts the checksum + { + const UINT nBufferLength = 2048; + BYTE pBuffer[nBufferLength + 1]; + UINT nLengthToRead; + UINT nLengthRead; + BYTE* pByte; + BYTE* pLastByte; + + while (0 < count) + { + // Copy the bytes + nLengthToRead = nBufferLength < (UINT)count ? nBufferLength : (UINT)count; + nLengthRead = pInFile->Read(pBuffer, nLengthToRead); + if (nLengthRead == 0) + AfxThrowFileException(CFileException::endOfFile); + + pOutFile->Write(pBuffer, nLengthRead); + count -= nLengthRead; + // Add all the bytes together (for checksum) + pByte = pBuffer; + pLastByte = &pBuffer[nLengthRead - 1]; + while(pByte <= pLastByte) + sum += *(pByte++); + } + } + +LONG COXBinDiffCalculator::ReadLongNBytes(CFile* pFile,int n) + // --- In : pFile : The input file + // n : The number of bytes to read + // --- Out : + // --- Returns : The number represented by those bytes + // --- Effect : It is expected that the MOST SIGNIFICANT bytes come FIRST + { + LONG x; + BYTE byte; + + x = 0; + while (n > 0) + { + if (pFile->Read(&byte, 1) == 1) + x = (x << 8) | byte; + else + { + n = 0; + TRACE(_T("COXBinDiffCalculator::ReadLongNBytes : EOF Encountered while reading long\n")); + AfxThrowFileException(CFileException::endOfFile); + } + n--; + } + + return x; + } + + +#if ! BDEXTR +void COXBinDiffCalculator::WriteLongNBytes(LONG x, CFile* pFile,int n) + // --- In : x : The long number to write + // pFile : The output file + // n : The number of bytes to write + // --- Out : + // --- Returns : + // --- Effect : It is expected that the MOST SIGNIFICANT bytes come FIRST + // Writes the specified number (x) as a number of bytes (n) + // to the output file + { + BYTE byte = 0; + while (n > 4) + { + pFile->Write(&byte, 1); + n--; + } + + if (n == 4) + { + byte = BYTE((x >> 24) & 0xFF); + pFile->Write(&byte, 1); + n--; + } + + if (n == 3) + { + byte = BYTE((x >> 16) & 0xFF); + pFile->Write(&byte, 1); + n--; + } + + if (n == 2) + { + byte = BYTE((x >> 8) & 0xFF); + pFile->Write(&byte, 1); + n--; + } + + if (n == 1) + { + byte = BYTE(x & 0xFF); + pFile->Write(&byte, 1); + } + } + +void COXBinDiffCalculator::ScanFile(CFile* pFile, COXByteAttribs* byteTable) + // --- In : pFile : input file + // byteTable : table to store statistical info in + // --- Out : byteTable : table with statistical info + // --- Returns : + // --- Effect : Makes a statistical scan of the specified file + // Scans file and for each byte 0-255, calculate + // mean distance and standard deviation of the distances + // between occurences of these bytes: + // + // E.g. look at byte b in the file: + // + // ------b---------b-----b-----------b------b-----b---- + // < d1 >< d2 >< d3 >< d4 >< d5 >< d6 > + // < 7 >< 10 >< 6 >< 12 >< 7 >< 6 > + // The mean and std.dev. are calculated on distances d1,d2,... for byte b. + { + int byte; + BYTE helpByte; + DWORD curPos; + DWORD dist; + COXByteAttribs* pByteAttribs; + double dDist; + + // Initialize tables + pByteAttribs = byteTable; + for (byte = 0; byte < 256; byte++) + { + pByteAttribs->lastPos = -1L; + pByteAttribs->sum = 0L; + pByteAttribs->sumSquares = 0.0; + pByteAttribs->mean = 0.0; + pByteAttribs->stdDev = 0.0; + pByteAttribs->cnt = 0L; + pByteAttribs++; + } + + // Scan through file + pFile->Seek(0L,CFile::begin); + curPos = 0L; + do + { + // Adjust progress bar every 4 K bytes + if ((curPos & 0xFFF) == 0) + if (!m_pProgressBar->Adjust(curPos)) + m_pProgressBar->Abort(TEXT("Aborting")); + + if (pFile->Read(&helpByte, 1) == 1) + byte = helpByte; + else + byte = EOF; + if (byte != EOF) + { + pByteAttribs = &byteTable[byte]; + // ... Calculate distance from last occurrence of this byte + dDist = dist = curPos - pByteAttribs->lastPos; + // ... Remember this byte's position + pByteAttribs->lastPos = curPos; + pByteAttribs->sum += dist; + pByteAttribs->sumSquares += dDist * dDist; + + // ...cnt contains the number of occurrences + pByteAttribs->cnt++; + } + curPos++; + } while (byte != EOF); + + // Calculate mean and standard deviation for all bytes. + pByteAttribs = byteTable; + for (byte = 0; byte < 256; byte++) + { + // Make byte 'occur' just after EOF + dDist = dist = curPos - pByteAttribs->lastPos; + pByteAttribs->sum += dist; + pByteAttribs->sumSquares += dDist*dDist; + pByteAttribs->cnt++; + + // Calculate mean. Bytes that did not occur get mean equal to FILE size + pByteAttribs->mean = + (double) pByteAttribs->sum / (double) pByteAttribs->cnt; + + // Calculate standard deviation. We could also use the variance + // but I like the std. dev. more. + pByteAttribs->stdDev = + sqrt(pByteAttribs->sumSquares / (double) pByteAttribs->cnt + - pByteAttribs->mean*pByteAttribs->mean); + + pByteAttribs++; + } + + } + +int COXBinDiffCalculator::FindDelimiter(CFile* pFile, double minMeanChunkLen, double maxMeanChunkLen) + // --- In : pFile : input file + // byteTable + // --- Out : + // --- Returns : + // --- Effect : Analyze open file and determine a suitable delimiter + // for chopping the file into chunks. + // This routine changes the current file position. + { + int byte; + int bestByte; + COXByteAttribs byteTable[256]; + LONG filSiz; + + filSiz = pFile->GetLength(); + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Init(0L,filSiz,TEXT("Pass 1 of 3:")); + + ScanFile(pFile,byteTable); + + // Determine best byte + bestByte = -1; + while (bestByte == -1 + && maxMeanChunkLen < m_cBigChunkLen + && maxMeanChunkLen < filSiz) + { + COXByteAttribs* pByteAttribs; + COXByteAttribs* pBestByteAttribs; + + pByteAttribs = byteTable; + pBestByteAttribs = NULL; + for (byte = 0; byte < 256; byte++) + { +#if m_cDropEOL + if (byte != '\015' && byte != '\012') +#endif + { + // Check if chunk length is between minMeanLen and maxMeanLen. + if (pByteAttribs->mean >= minMeanChunkLen && + pByteAttribs->mean <= maxMeanChunkLen) + { + if (bestByte == -1) + { + bestByte = byte; + pBestByteAttribs = pByteAttribs; + } + else + { + // Compare stddev: if it is lower, + // the byte is better + if (pBestByteAttribs->stdDev > pByteAttribs->stdDev) + { + bestByte = byte; + pBestByteAttribs = pByteAttribs; + } + } + } + } + pByteAttribs++; + } + // Increase allowable chunk length for the case no acceptable delimiter was + // found: we will loop then + maxMeanChunkLen += 50; + } + + m_pProgressBar->Close(); + + return(bestByte); + + } + +COXBinDiffCalculator::COXTreeNode* COXBinDiffCalculator::NewTreeNode() + // --- In : + // --- Out : + // --- Returns : The new tree node + // --- Effect : Create a new tree node or reuse one of the free list + { + COXTreeNode* pTreeNode; + + if (m_LstFreeTreeNode == NULL) + { + pTreeNode = new COXTreeNode(); + } + else + { + pTreeNode = m_LstFreeTreeNode; + m_LstFreeTreeNode = m_LstFreeTreeNode->pGE; + } + + pTreeNode->filPos = 0L; + pTreeNode->pGE = NULL; + pTreeNode->pLT = NULL; + + return(pTreeNode); + } + +void COXBinDiffCalculator::FreeTreeNode(COXTreeNode* pTreeNode) + // --- In : pTreeNode : The node to free + // --- Out : + // --- Returns : + // --- Effect : Releases a tree node by putting on the free list + { + pTreeNode->pGE = m_LstFreeTreeNode; + m_LstFreeTreeNode = pTreeNode; + } + +int COXBinDiffCalculator::CmpNode(COXTreeNode* pNode1, CFile* pFil1, COXTreeNode* pNode2, + CFile* pFil2, int delim, LONG* pEqualLen) + // --- In : pNode1 : + // pFil1 : + // pNode2 : + // pFil2 : + // delim : The chopping character + // pEqualLen : Number of equal characters encountered. + // --- Out : + // --- Returns : -1, 0, 1 if <, = , >. + // --- Effect : Compare two tree nodes + // Every tree node has m_cMinMatchLen characters of + // the file buffered within the node: first compare these + // If all these characters are equal, read characters from + // the associated files and compare these. + // If the nodes are different, set equalLen to the + // number of equal characters encountered. + { + LONG pos1; + BYTE buf1[m_cBufSiz]; + BYTE* p1; + LONG pos2; + BYTE buf2[m_cBufSiz]; + BYTE* p2; + int result; + LONG l; + + pos1 = pNode1->filPos; + pos2 = pNode2->filPos; + // ... -2 means: not yet defined + result = -2; + *pEqualLen = 0; + + // First compare the m_cMinMatchLen buffered bytes from both nodes + p1 = pNode1->bytes; + p2 = pNode2->bytes; + l = 0; + while (l < m_cMinMatchLen && *p1 == *p2 && *p1 != delim /* && *p2 != delim */) + { + p1++; + p2++; + l++; + (*pEqualLen)++; + } + + if (l == m_cMinMatchLen) + { + // If no difference was found, we will have to compare both files from + // m_cMinMatchLen bytes after pos1 and pos2. + pos1 += m_cMinMatchLen; + pos2 += m_cMinMatchLen; + } + else if (*p1 == delim && *p2 != delim) + { + result = -1; // node 1 < node 2 because node 1 is shorter + } + else if (*p2 == delim && *p1 != delim) + { + result = 1; // node 2 < node 1 because node 2 is shorter + } + else if (*p1 == *p2 && *p1 == delim) + { + result = 0; // node 1 == node 2: both end in a delimiter at the same time + } + else if (*p1 < *p2) + { + result = -1; // node 1 < node 2 because a different character found + } + else if (*p2 < *p1) + { + result = 1; // node 2 < node 1 because a different character found + } + + // If result is -2, no difference was found in the buffered bytes. Start + // reading bytes from the files in chuncks of m_cBufSiz bytes. + if (result == -2) + { + do + { + // Read a buffer from file 1. Pad file with delimiter after eof. + pFil1->Seek(pos1,CFile::begin); + l = pFil1->Read(buf1,(UINT)m_cBufSiz); + if (l < m_cBufSiz) + buf1[l] = BYTE(delim); + // Read a buffer from file 2. Pad file with delimiter after eof. + pFil2->Seek(pos2,CFile::begin); + l = pFil2->Read(buf2,(UINT)m_cBufSiz); + if (l < m_cBufSiz) + buf2[l] = BYTE(delim); + + // Compare buffers + p1 = buf1; + p2 = buf2; + l = 0; + while (l < m_cBufSiz && *p1 == *p2 && *p1 != delim /* && *p2 != delim */) + { + p1++; + p2++; + l++; + (*pEqualLen)++; + } + + // If no difference was found: set file positions to read new buffers + if (l == m_cBufSiz) + { + pos1 += m_cBufSiz; + pos2 += m_cBufSiz; + } + else if (*p1 == delim && *p2 != delim) + { + result = -1; /* node 1 < node 2 */ + } + else if (*p2 == delim && *p1 != delim) + { + result = 1; /* node 2 < node 1 */ + } + else if (*p1 == *p2 && *p1 == delim) + { + result = 0; /* node 1 == node 2 */ + } + else if (*p1 < *p2) + { + result = -1; + } + else if (*p2 < *p1) + { + result = 1; + } + } while (result == -2); + } + return(result); + } + +void COXBinDiffCalculator::FindBestMatch(COXTreeNode* pOrgTreeRoot, + COXTreeNode** ppOrgTreeNode, CFile* pOrgFil, COXTreeNode* pDerivedTreeNode, + CFile* pDerivedFil, int delim, LONG* pMatchLen) + // --- In : pOrgTreeRoot : + // ppOrgTreeNode : + // pOrgFil : + // pDerivedTreeNode : + // pDerivedFil : + // delim : + // pMatchLen : + // --- Out : + // --- Returns : + // --- Effect : From a tree with root node pOrgTreeRoot, find the node + // pOrgTreeNode that best matches pDerivedTreeNode. + // Also find length of match. + { + int direction; + COXTreeNode* pNode; + LONG equalLen; + + // Find best location from tree + *ppOrgTreeNode = NULL; + pNode = pOrgTreeRoot; + *pMatchLen = 0L; + + // Descend tree and remember node with longest match + while (pNode != NULL) + { + direction = CmpNode(pDerivedTreeNode,pDerivedFil,pNode,pOrgFil,delim,&equalLen); + + // Remember match if length is greater than previous best + if (equalLen > *pMatchLen) + { + *pMatchLen = equalLen; + *ppOrgTreeNode = pNode; + } + + if (direction == -1) + { + pNode = pNode->pLT; + } + else if (direction == 1) + { + pNode = pNode->pGE; + } + else /* Node is equal: stop search */ + { + pNode = NULL; + } + } + } + +void COXBinDiffCalculator::AddTreeNode(COXTreeNode** ppTreeRoot, CFile* pFile, + int delim, COXTreeNode* pNewNode) + // --- In : ppTreeRoot : Root of the tree + // pFile : + // delim : + // pNewNode : The new node to add + // --- Out : + // --- Returns : + // --- Effect : Add new node to index tree and linked list. + { + COXTreeNode* pNode; + COXTreeNode* pPrvNode; + int cmp=0; + LONG equalLen; + + // Find location in tree + pNode = *ppTreeRoot; + pPrvNode = NULL; + while (pNode != NULL) + { + pPrvNode = pNode; + cmp = CmpNode(pNewNode,pFile,pNode,pFile,delim,&equalLen); + if (cmp == -1) + { + pNode = pNode->pLT; + } + else if (cmp == 1) + { + pNode = pNode->pGE; + } + else // There is an equal node: stop looking + { + pNode = NULL; + } + } + + if (pPrvNode == NULL) + { + *ppTreeRoot = pNewNode; + } + else + { + if (cmp == -1) + { + pPrvNode->pLT = pNewNode; + } + else if (cmp == 1) + { + pPrvNode->pGE = pNewNode; + } + else + { + FreeTreeNode(pNewNode); + } + } + } + +COXBinDiffCalculator::COXTreeNode* COXBinDiffCalculator::BuildTree(CFile* pFile, int delim, LONG& OrgSum) + // --- In : pFile : + // delim : + // OrgSum + // --- Out : OrgSum + // --- Returns : + // --- Effect : Build index tree: divide file in chunks by using the delimiter. + // We also create chunks of strings that contain m_cMinMatchLen + // or more equal bytes. + { + COXTreeNode* pTreeRoot; + COXTreeNode* pNewNode; + COXTreeNode* pEqualRunNode; + int byte; + BYTE helpByte; + int prevByte; + LONG equalByteCnt; + LONG curPos; + LONG prevPos; + LONG len; + BYTE* pByte; + + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Init(0L,pFile->GetLength(),TEXT("Pass 2 of 3:")); + + pTreeRoot = NULL; + + curPos = 0; + prevPos = 0; + do + { + if (curPos - prevPos > 0x3FF) + { + if (!m_pProgressBar->Adjust(curPos)) + m_pProgressBar->Abort(TEXT("Aborting")); + prevPos = curPos; + } + + // Restore file position (because it is destroyed by CmpNode) + pFile->Seek(curPos,CFile::begin); + + // Prepare new node + pNewNode = NewTreeNode(); + + len = 0; + pNewNode->filPos = curPos; + pByte = pNewNode->bytes; + byte = -1; + equalByteCnt = 0; + do + { + prevByte = byte; + if (pFile->Read(&helpByte, 1) == 1) + { + byte = helpByte; + if (byte == prevByte) + { + equalByteCnt++; + } + else + { + // No need to check for m_cMinEqualRunLen or more equal bytes here; + // if they were here, they will be added to the tree anyhow. This + // loop only executes at most m_cMinMatchLen times. + equalByteCnt = 1; + } + OrgSum += byte; + *(pByte++) = BYTE(byte); + } + else + { + byte = EOF; + *(pByte++) = BYTE(delim); + } + + len++; + } while (len < m_cMinMatchLen && byte != delim && byte != EOF); + + while (byte != delim && byte != EOF) + { + prevByte = byte; + if (pFile->Read(&helpByte, 1) == 1) + { + byte = helpByte; + if (byte == prevByte) + { + equalByteCnt++; + } + else + { + // Check for LONG runs of equal bytes, and add these to + // the tree also. + if (equalByteCnt >= m_cMinEqualRunLen) + { + pEqualRunNode = NewTreeNode(); + // Buffered characters consists of m_cMinMatchLen equal bytes + memset(pEqualRunNode->bytes,prevByte,m_cMinMatchLen); + // Calculate position of start of run + pEqualRunNode->filPos = curPos + len - equalByteCnt; + AddTreeNode(&pTreeRoot,pFile,delim,pEqualRunNode); + pFile->Seek(curPos+len+1,CFile::begin); // Restore file position + } + equalByteCnt = 1; + } + OrgSum += byte; + } + else + byte = EOF; + len++; + } + + AddTreeNode(&pTreeRoot,pFile,delim,pNewNode); + curPos += len; + } while (byte != EOF); + + m_pProgressBar->Close(); + + return(pTreeRoot); + } + +void COXBinDiffCalculator::ExtendMatch(LONG& OrgFilPos, CFile* pOrgFil, + LONG& DerivedFilPos, CFile* pDerivedFil, LONG& MatchLen) + // --- In : OrgFilPos : + // pOrgFil : + // DerivedFilPos : + // pDerivedFil : + // MatchLen : + // --- Out : OrgFilPos : + // DerivedFilPos : + // MatchLen : + // --- Returns : + // --- Effect : Extend match in two directions, ignoring delimiters: + // if there is a match of length n at position p and p', + // it can be changed into a match of length n+m+q + // at position p - m and p' - m + // + // < m >< n >< q > + // p + // ...aaazzzzzzzzxxxxxxxxxxxyyyyyyyccccccccccccccccc (pOrgFil) + // ...bbbzzzzzzzzxxxxxxxxxxxyyyyyyyddddddddddddddddd (pDerivedFil) + // p' + { + BYTE buf1[m_cBufSiz]; + BYTE buf2[m_cBufSiz]; + int l; + LONG step; + BOOL isDone; + BYTE* p1; + BYTE* p2; + LONG endPos1, endPos2; + + // First, try to read forward and extend match toward the end + isDone = FALSE; + endPos1 = OrgFilPos + MatchLen; + endPos2 = DerivedFilPos + MatchLen; + while (! isDone) + { + step = m_cBufSiz; + pOrgFil->Seek(endPos1,CFile::begin); + // ... Eventually shrink step if pOrgFil is too short + step = (UINT)pOrgFil->Read(buf1,(UINT)step); + + pDerivedFil->Seek(endPos2,CFile::begin); + // ... Eventually shrink step if derivedFil is too short + step = (UINT)pDerivedFil->Read(buf2,(UINT)step); + + // ...step < m_cBufSiz if one of the files at eof: stop comparing + isDone = (step < m_cBufSiz); + + // ... Prepare endPos1 and endPos2 for reading next buffer + endPos1 += step; + endPos2 += step; + + p1 = buf1; + p2 = buf2; + while (*p1 == *p2 && step > 0) + { + p1++; + p2++; + step--; + MatchLen++; + } + + // ... step > 0 if *p1 != *p2 found: stop comparing + isDone = isDone || step > 0; + } + + // Second, try to read backwards and extend the match towards the file start. + // Stop extending if orgFilPos or derivedFilPos equal 0. + isDone = FALSE; + while (OrgFilPos > 0 && DerivedFilPos > 0 && ! isDone) + { + // Try to step m_cBufSiz bytes back. If orgFilPos or derivedFilPos is + // less than that, reduce the step size accordingly. + step = m_cBufSiz; + if (OrgFilPos < step) + step = OrgFilPos; + if (DerivedFilPos < step) + step = DerivedFilPos; + + // ...Jump back 'step' bytes and read two buffers of 'step' bytes. + (OrgFilPos) -= step; + pOrgFil->Seek(OrgFilPos,CFile::begin); + pOrgFil->Read(buf1,(UINT)step); + + DerivedFilPos -= step; + pDerivedFil->Seek(DerivedFilPos,CFile::begin); + pDerivedFil->Read(buf2,(UINT)step); + + // ... Put pointers at the end of the buffers + p1 = buf1 + step - 1; + p2 = buf2 + step - 1; + + // ...Run backwards until a difference found or at start of buffer + l = (int)step; + while (*p1 == *p2 && l > 0) + { + p1--; + p2--; + l--; + // Adjust matchLen for each matched byte. + MatchLen++; + } + + isDone = (l > 0); + + // Adjust orgFilPos and derivedFilPos: add length of unequal part of buffer + OrgFilPos += l; + DerivedFilPos += l; + } + } + +void COXBinDiffCalculator::DeleteMatchBlocks(COXMatchBlock* pBlock) + { + COXMatchBlock* pMatchBlock = pBlock; + COXMatchBlock* pMatchBlockNext; + + while(pMatchBlock != NULL) + { + pMatchBlockNext = pMatchBlock->pNxt; + delete pMatchBlock; + pMatchBlock = pMatchBlockNext; + } + } + +COXBinDiffCalculator::COXMatchBlock* COXBinDiffCalculator::NewMatchBlock(void) + // --- In : + // --- Out : + // --- Returns : The new match block + // --- Effect : Create a new match block or reuse one of the free list + { + COXMatchBlock* pMatchBlock; + + if (m_LstFreeMatchBlock == NULL) + { + pMatchBlock = new COXMatchBlock(); + } + else + { + pMatchBlock = m_LstFreeMatchBlock; + m_LstFreeMatchBlock = m_LstFreeMatchBlock->pNxt; + } + + pMatchBlock->orgFilPos = 0L; + pMatchBlock->len = 0L; + pMatchBlock->derivedFilPos = 0L; + pMatchBlock->pNxt = NULL; + + return(pMatchBlock); + } + +void COXBinDiffCalculator::FreeMatchBlock(COXBinDiffCalculator::COXMatchBlock* pMatchBlock) + // --- In : pMatchBlock : Block to release + // --- Out : + // --- Returns : The new match block + // --- Effect : Release a match block: put on the free list + { + pMatchBlock->pNxt = m_LstFreeMatchBlock; + m_LstFreeMatchBlock = pMatchBlock; + } + +void COXBinDiffCalculator::AddMatch(COXBinDiffCalculator::COXTreeNode* pOrgTreeNode, + CFile* pOrgFil, COXBinDiffCalculator::COXTreeNode* pDerivedTreeNode, + CFile* pDerivedFil, LONG matchLen, COXBinDiffCalculator::COXMatchBlock** ppMatchLst) + // --- In : pOrgTreeNode : + // pOrgFil : + // pDerivedTreeNode : + // pDerivedFil : + // matchLen : + // ppMatchLst : + // --- Out : + // --- Returns : + // --- Effect : Add new match between pOrgTreeNode and pDerivedTreeNode, + // with length matchlen. If the match is LONG enough + // (after extending): add it to the list of matches. + // The list of matches is kept in order of increasing + // starting position in derivedFil. + // If a new match is added that is completely part of + // an existing match, it is dropped. + // If a new match is added that encloses one or more existing + // matches, the enclosed matches are dropped, and the new one + // is added. + // The resulting list will only contain matches with different + // derivedFilPos values: if there would be two equal derivedFilPos + // values, one of the two blocks would enclose the other and + // would have been dropped. + { + LONG orgFilPos, derivedFilPos; + LONG distance; + COXMatchBlock* pMatchBlock; + COXMatchBlock* pPrvMatchBlock; + COXMatchBlock* pNxtMatchBlock; + BOOL dropNewMatch; + + orgFilPos = pOrgTreeNode->filPos; + derivedFilPos = pDerivedTreeNode->filPos; + + // Pass 1: check if there are matchblocks that enclose the new match + // (relative to derivedFil), in a way that they are an expansion of this + // new match block. This saves us expanding this block, because after + // expansion, it would be the same as the overlapping block. + // This is done by checking the distance between the positions for + // orgFil and derivedFil: if the larger block and the smaller block have + // the same distance, and the smaller block is part of the larger + // one, the smaller will expand to be equal to the larger one. + + distance = orgFilPos - derivedFilPos; + + pMatchBlock = *ppMatchLst; + dropNewMatch = FALSE; + while (pMatchBlock != NULL + && pMatchBlock->derivedFilPos <= derivedFilPos + && ! dropNewMatch) + { + dropNewMatch = + ( + // ...pMatchBlock->derivedFilPos <= derivedFilPos + // && Already tested in while condition + derivedFilPos <= pMatchBlock->derivedFilPos + pMatchBlock->len + && + pMatchBlock->distance == distance + ); + pMatchBlock = pMatchBlock->pNxt; + } + + if (! dropNewMatch) + { + ExtendMatch(orgFilPos,pOrgFil,derivedFilPos,pDerivedFil,matchLen); + + if (matchLen >= m_cMinMatchLen) + { + // Pass 2: check if there are matchblocks that enclose the new match + // (relative to derivedFil). + pMatchBlock = *ppMatchLst; + while (pMatchBlock != NULL + && pMatchBlock->derivedFilPos <= derivedFilPos + && ! dropNewMatch) + { + dropNewMatch = + ( + // pMatchBlock->derivedFilPos <= derivedFilPos + // && Already tested in while condition */ + derivedFilPos+matchLen <= + pMatchBlock->derivedFilPos + pMatchBlock->len + ); + pMatchBlock = pMatchBlock->pNxt; + } + + if (! dropNewMatch) + { + // Pass 3: drop all matchblocks from list that are enclosed by the new one + pMatchBlock = *ppMatchLst; + pPrvMatchBlock = NULL; + while (pMatchBlock != NULL) + { + pNxtMatchBlock = pMatchBlock->pNxt; + //... Check if pMatchBlock completely enclosed by new match + if + ( + derivedFilPos <= pMatchBlock->derivedFilPos + && + pMatchBlock->derivedFilPos + pMatchBlock->len <= + derivedFilPos+matchLen + ) + { + // ...If completely enclosed: remove from list + if (pPrvMatchBlock == NULL) + { + *ppMatchLst = pNxtMatchBlock; + } + else + { + pPrvMatchBlock->pNxt = pNxtMatchBlock; + } + FreeMatchBlock(pMatchBlock); + } + else + { + pPrvMatchBlock = pMatchBlock; + } + pMatchBlock = pNxtMatchBlock; + } + + // Pass 4: Find location to add match to list; keep list sorted on + // derivedFilPos. + pNxtMatchBlock = *ppMatchLst; + pPrvMatchBlock = NULL; + while (pNxtMatchBlock != NULL + && pNxtMatchBlock->derivedFilPos < derivedFilPos) + { + pPrvMatchBlock = pNxtMatchBlock; + pNxtMatchBlock = pNxtMatchBlock->pNxt; + } + + // Add new match + pMatchBlock = NewMatchBlock(); + pMatchBlock->orgFilPos = orgFilPos; + pMatchBlock->derivedFilPos = derivedFilPos; + pMatchBlock->distance = distance; + pMatchBlock->len = matchLen; + pMatchBlock->pNxt = pNxtMatchBlock; + if (pPrvMatchBlock == NULL) + { + *ppMatchLst = pMatchBlock; + } + else + { + pPrvMatchBlock->pNxt = pMatchBlock; + } + } + } + } + } + +void COXBinDiffCalculator::ShrinkMatchList(COXBinDiffCalculator::COXMatchBlock** ppMatchLst) + // --- In : ppMatchLst + // --- Out : + // --- Returns : + // --- Effect : Clean up the list of matches: shrink overlapping matches + // and drop those that become too short + { + COXMatchBlock* pMatchBlock; + COXMatchBlock* pPrvMatchBlock; + COXMatchBlock* pNxtMatchBlock; + LONG distance; + + pPrvMatchBlock = NULL; + pMatchBlock = *ppMatchLst; + while (pMatchBlock != NULL) + { + pNxtMatchBlock = pMatchBlock->pNxt; + if (pNxtMatchBlock != NULL) + { + // ... distance is maximal length of pMatchBlock without overlap + distance = pNxtMatchBlock->derivedFilPos - pMatchBlock->derivedFilPos; + // ... Shrink block if too long + if (distance < pMatchBlock->len) + { + pMatchBlock->len = distance; + } + } + // Drop blocks that become too short. + if (pMatchBlock->len < m_cMinMatchLen) + { + if (pPrvMatchBlock == NULL) + { + *ppMatchLst = pNxtMatchBlock; + } + else + { + pPrvMatchBlock->pNxt = pNxtMatchBlock; + } + FreeMatchBlock(pMatchBlock); + } + else + { + pPrvMatchBlock = pMatchBlock; + } + + pMatchBlock = pNxtMatchBlock; + } + } + +COXBinDiffCalculator::COXMatchBlock* COXBinDiffCalculator::MatchFiles( + COXBinDiffCalculator::COXTreeNode* pOrgTreeRoot,CFile* pOrgFil, + CFile* pDerivedFil, int delim, LONG& DerivedSum) + // --- In : pOrgTreeRoot : + // pOrgFil : + // pDerivedFil : + // delim : + // DerivedSum + // --- Out : DerivedSum + // --- Returns : The matched block + // --- Effect : Compare chunks from file 2 with tree from file 1 + { + COXTreeNode* pOrgTreeNode; + LONG matchLen; + COXMatchBlock* pMatchLst; + int byte; + BYTE helpByte; + int prevByte; + LONG curPos; + LONG prevPos; + COXTreeNode treeNode; + COXTreeNode equalRunNode; + LONG len; + LONG equalByteCnt; + BYTE* pByte; + + ASSERT(m_pProgressBar != NULL); + m_pProgressBar->Init(0L,pDerivedFil->GetLength(),TEXT("Pass 3 of 3:")); + + pMatchLst = NULL; + + curPos = 0; + prevPos = 0; + do + { + if (curPos - prevPos > 0x3FF) + { + if (!m_pProgressBar->Adjust(curPos)) + m_pProgressBar->Abort(TEXT("Aborting")); + prevPos = curPos; + } + + // Restore FILE position (destroyed by FindBestMatch below) + pDerivedFil->Seek(curPos,CFile::begin); + + // Buffer some characters from the file. + len = 0; + treeNode.filPos = curPos; + pByte = treeNode.bytes; + byte = -1; + equalByteCnt = 0; + do + { + prevByte = byte; + if (pDerivedFil->Read(&helpByte, 1) == 1) + { + byte = helpByte; + if (byte == prevByte) + { + equalByteCnt++; + } + else + { + // No need to check for m_cMinMatchLen or more equal bytes here; + // if they were here, they will be checked against the tree + // anyhow. This loop only executes at most m_cMinMatchLen times. + equalByteCnt = 1; + } + DerivedSum += byte; + *(pByte++) = BYTE(byte); + } + else + { + byte = EOF; + *(pByte++) = BYTE(delim); + } + len++; + } while (len < m_cMinMatchLen && byte != delim && byte != EOF); + + while (byte != delim && byte != EOF) + { + prevByte = byte; + if (pDerivedFil->Read(&helpByte, 1) == 1) + { + byte = helpByte; + if (byte == prevByte) + { + equalByteCnt++; + } + else + { + // Check for LONG runs of equal bytes, and check these against + // the tree also. + if (equalByteCnt >= m_cMinEqualRunLen) + { + // ... Buffered characters consists of m_cMinMatchLen equal bytes + memset(equalRunNode.bytes,prevByte,m_cMinMatchLen); + // ...Calculate position of start of run + equalRunNode.filPos = curPos + len - equalByteCnt; + // Search best match in original tree + FindBestMatch(pOrgTreeRoot,&pOrgTreeNode,pOrgFil, + &equalRunNode,pDerivedFil, + delim,&matchLen); + + if (pOrgTreeNode != NULL) + { + // Add match to list of matches + AddMatch(pOrgTreeNode,pOrgFil, + &equalRunNode,pDerivedFil, + matchLen,&pMatchLst); + } + pDerivedFil->Seek(curPos+len+1, CFile::begin); /* Restore file position */ + } + // Reset equal byte count to 1. + equalByteCnt = 1; + } + DerivedSum += byte; + } + else + byte = EOF; + len++; + } + curPos += len; + + // Search best match in original tree + FindBestMatch(pOrgTreeRoot,&pOrgTreeNode,pOrgFil, + &treeNode,pDerivedFil, + delim,&matchLen); + + if (pOrgTreeNode != NULL) + { + // Add match to list of matches + AddMatch(pOrgTreeNode,pOrgFil, + &treeNode,pDerivedFil, + matchLen,&pMatchLst); + } + + } while (byte != EOF); + + // Remove overlapping matches + ShrinkMatchList(&pMatchLst); + + m_pProgressBar->Close(); + + return(pMatchLst); + } + +void COXBinDiffCalculator::DumpDiff(COXBinDiffCalculator::COXMatchBlock* pMatchLst, CFile* pDerivedFil, CFile* pDiffFil) + // --- In : pMatchLst : + // pDerivedFil : + // pDiffFil : + // --- Out : + // --- Returns : + // --- Effect : Write diff file + { + COXMatchBlock* pMatchBlock; + LONG len, pos; + LONG blockPos; + LONG writeLen; + LONG blockLen; + LONG codeLen; + LONG filSiz; + LONG nextPos; + BYTE byte; + + filSiz = pDerivedFil->GetLength(); + + // Descend match block list. Resulting FILE is a series of matches and + // non-matches between original FILE and derived FILE. + pMatchBlock = pMatchLst; + len = filSiz; + pos = 0; + + // Repeat until all bytes of derivedFil have been checked + while (len > 0) + { + // Get next matching position from match block. If there is none, + // set nextPos beyond eof on derived file. + // If there are unmatched bytes between the last position written + // and the next position, write them to the diff file. + // Possibly there are no unmatched bytes (nextPos == pos), in case + // of consecutive match blocks. + nextPos = pMatchBlock != NULL ? pMatchBlock->derivedFilPos : filSiz; + if (nextPos > pos) + { + // There are unmatched bytes: write one or more block of unmatched bytes + // from derivedFil + pDerivedFil->Seek(pos,CFile::begin); + writeLen = nextPos - pos; + while (writeLen > 0) + { + // If remaining block is small, use tag for small + // blocks (1 tag/length byte) + if (writeLen <= m_cSmallSize) + { + blockLen = writeLen; + codeLen = blockLen - 1; /* Encode length 1-m_cSmallSize by subtr. 1 */ + // ... codeLen: 4 bit value + // ... bit 3-0 | Tag + byte = BYTE((codeLen << 4) | m_cTagSmallDiff); + pDiffFil->Write(&byte, 1); + } + // If remaining block is medium size use tag for + // medium blocks (2 tag/length bytes) + else if (writeLen <= m_cMediumSize) + { + blockLen = writeLen; + // ... Encode length m_cSmallSize+1 - m_cMediumSize by subtr. m_cSmallSize+1 + codeLen = blockLen - m_cSmallSize - 1; + // ... codeLen: 12 bit value + // ... bit 11-8 | Tag + byte = BYTE(((codeLen >> 4) & 0xF0) | m_cTagMediumDiff); + pDiffFil->Write(&byte, 1); + // ... bit 7-0 + byte = BYTE((codeLen ) & 0xFF); + pDiffFil->Write(&byte, 1); + } + else + { + // If remaining block is large: write a large block, + // and then re-check the remaining length + if (writeLen > m_cLargeSize) + { + blockLen = m_cLargeSize; + } + else + { + blockLen = writeLen; + } + // ... Encode length m_cMediumSize+1 - m_cLargeSize by subtracting m_cMediumSize+1 + codeLen = blockLen - m_cMediumSize - 1; + // ... codeLen: 20 bit value + // ... bit 19-16 | Tag + byte = BYTE(((codeLen >> 12) & 0xF0) | m_cTagLargeDiff); + pDiffFil->Write(&byte, 1); + // ... bit 15-8 + byte = BYTE((codeLen >> 8) & 0xFF); + pDiffFil->Write(&byte, 1); + // ... bit 7-0 + byte = BYTE((codeLen ) & 0xFF); + pDiffFil->Write(&byte, 1); + } + + writeLen -= blockLen; + len -= blockLen; + + while (blockLen > 0) + { + pDerivedFil->Read(&byte, 1); + pDiffFil->Write(&byte, 1); + blockLen--; + } + } + pos = nextPos; + } + + // Write block of matching bytes: encode them as a count and a file position + // in the original file. + if (pMatchBlock != NULL) + { + blockPos = pMatchBlock->orgFilPos; + writeLen = pMatchBlock->len; + while (writeLen > 0) + { + if (writeLen <= m_cSmallSize) + { + blockLen = writeLen; + codeLen = blockLen - 1; + if (blockPos <= m_cNearDistance) + { + // ... codeLen: 4 bit value + // ... bit 3-0 | Tag + byte = BYTE((codeLen << 4) | m_cTagSmallNearCopy); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 16 bit value + WriteLongNBytes(blockPos,pDiffFil,2); + } + else if (blockPos <= m_cDistantDistance) + { + // ... codeLen: 4 bit value + // ... bit 3-0 | Tag + byte = BYTE((codeLen << 4) | m_cTagSmallDistantCopy); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 24 bit value + WriteLongNBytes(blockPos,pDiffFil,3); + } + else + { + // ... codeLen: 4 bit value + // ... bit 3-0 | Tag + byte = BYTE((codeLen << 4) | m_cTagSmallFarCopy); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 32 bit value + WriteLongNBytes(blockPos,pDiffFil,4); + } + } + else if (writeLen <= m_cMediumSize) + { + blockLen = writeLen; + codeLen = blockLen - m_cSmallSize - 1; + if (blockPos <= m_cNearDistance) + { + // ... codeLen: 12 bit value + // ... bit 11-8 | Tag + byte = BYTE(((codeLen >> 4) & 0xF0) | m_cTagMediumNearCopy); + pDiffFil->Write(&byte, 1); + // ... bit 7-0 + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 16 bit value + WriteLongNBytes(blockPos,pDiffFil,2); + } + else if (blockPos <= m_cDistantDistance) + { + // ... codeLen: 12 bit value + // ... bit 11-8 | Tag + byte = BYTE(((codeLen >> 4) & 0xF0) |m_cTagMediumDistantCopy); + pDiffFil->Write(&byte, 1); + // ... bit 7-0 + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 24 bit value + WriteLongNBytes(blockPos,pDiffFil,3); + } + else + { + // ... codeLen: 12 bit value + // ... bit 11-8 | Tag + byte = BYTE(((codeLen >> 4) & 0xF0) | m_cTagMediumFarCopy); + pDiffFil->Write(&byte, 1); + // ... bit 7-0 + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + // ... blockPos: 32 bit value + WriteLongNBytes(blockPos,pDiffFil,4); + } + } + else + { + if (writeLen > m_cLargeSize) + { + blockLen = m_cLargeSize; + } + else + { + blockLen = writeLen; + } + codeLen = blockLen - m_cMediumSize - 1; + if (blockPos <= m_cNearDistance) + { + /* codeLen: 20 bit value */ + /* bit 19-16 | Tag */ + byte = BYTE(((codeLen >> 12) & 0xF0) | m_cTagLargeNearCopy); + pDiffFil->Write(&byte, 1); + /* bit 15-8 */ + byte = BYTE((codeLen >> 8) & 0xFF); + pDiffFil->Write(&byte, 1); + /* bit 7-0 */ + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + /* blockPos: 16 bit value */ + WriteLongNBytes(blockPos,pDiffFil,2); + } + else if (blockPos <= m_cDistantDistance) + { + /* codeLen: 20 bit value */ + /* bit 19-16 | Tag */ + byte = BYTE(((codeLen >> 12) & 0xF0) | m_cTagLargeDistantCopy); + pDiffFil->Write(&byte, 1); + /* bit 15-8 */ + byte = BYTE((codeLen >> 8) & 0xFF); + pDiffFil->Write(&byte, 1); + /* bit 7-0 */ + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + /* blockPos: 24 bit value */ + WriteLongNBytes(blockPos,pDiffFil,3); + } + else + { + /* codeLen: 20 bit value */ + /* bit 19-16 | Tag */ + byte = BYTE(((codeLen >> 12) & 0xF0) | m_cTagLargeFarCopy); + pDiffFil->Write(&byte, 1); + /* bit 15-8 */ + byte = BYTE((codeLen >> 8) & 0xFF); + pDiffFil->Write(&byte, 1); + /* bit 7-0 */ + byte = BYTE((codeLen) & 0xFF); + pDiffFil->Write(&byte, 1); + + /* blockPos: 32 bit value */ + WriteLongNBytes(blockPos,pDiffFil,4); + } + } + writeLen -= blockLen; + + // ... A bug that was present in the previous version (if writeLen > m_cLargeSize) + // is corrected by the following line + blockPos += blockLen; + + len -= blockLen; + pos += blockLen; + } + pMatchBlock = pMatchBlock->pNxt; + } + } + pDiffFil->Write(&m_cTagEOF, 1); + } + +#endif // ! BDEXTR + +// private: +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBlob.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBlob.cpp new file mode 100644 index 0000000..537f305 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBlob.cpp @@ -0,0 +1,156 @@ +// ========================================================================== +// Class Implementation : COXBlob +// ========================================================================== + +// Source file : OXBlob.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXBlob.h" + +#include // For CLongBinary + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// Definition of static functions +IMPLEMENT_DYNAMIC(COXBlob, CByteArray); + +// Data members ------------------------------------------------------------- +// protected: +// private: + +// Member functions --------------------------------------------------------- +// public: +COXBlob::COXBlob(const CLongBinary& lbSrc) + : + CByteArray() + { + SetSize(lbSrc.m_dwDataLength); + ASSERT((lbSrc.m_dwDataLength == 0) || (GetData() != NULL)); + BYTE* pData = (BYTE*)::GlobalLock(lbSrc.m_hData); + ASSERT(pData != NULL); + memcpy(GetData(), pData, lbSrc.m_dwDataLength); + ::GlobalUnlock(lbSrc.m_hData); + } + +COXBlob& COXBlob::operator=(const CLongBinary& lbSrc) + { + SetSize(lbSrc.m_dwDataLength); + ASSERT((lbSrc.m_dwDataLength == 0) || (GetData() != NULL)); + BYTE* pData = (BYTE*)::GlobalLock(lbSrc.m_hData); + ASSERT(pData != NULL); + memcpy(GetData(), pData, lbSrc.m_dwDataLength); + ::GlobalUnlock(lbSrc.m_hData); + return *this; + } + + +BOOL COXBlob::ReadRaw(LPCTSTR pszPath) + { + CFileStatus fileStatus; + if (!CFile::GetStatus(pszPath, fileStatus)) + { + TRACE(_T("COXBlob::ReadRaw : Specified file does not exist (%s)\n"), pszPath); + return FALSE; + } + + // Read as a only dimensional array of unsigned bytes + BOOL bSuccess = TRUE; + + // Fill with the actual data + SetSize(fileStatus.m_size); + TRY + { + CFile file(pszPath, CFile::modeRead | CFile::shareDenyNone); + file.Read(GetData(), fileStatus.m_size); + file.Close(); + } + CATCH(CFileException, px) + { + TRACE(_T("COXBlob::ReadRaw : Catching File exception\n")); + bSuccess = FALSE; + } + END_CATCH + + if (!bSuccess) + // Clean up after failure + RemoveAll(); + + return bSuccess; + } + +BOOL COXBlob::WriteRaw(LPCTSTR pszPath) + { + BOOL bSuccess = TRUE; + + TRY + { + CFile file(pszPath, CFile::modeWrite | CFile::modeCreate | CFile::shareDenyWrite); + file.Write(GetData(), GetSize()); + file.Close(); + } + CATCH(CFileException, px) + { + TRACE(_T("COXBlob::WriteRaw : Catching File exception\n")); + bSuccess = FALSE; + } + END_CATCH + + return bSuccess;; + } + +// protected: +BOOL COXBlob::CopyVariant(LPCVARIANT pSrc) + // --- In : pSrc : Pointer to the source variant + // --- Out : + // --- Returns : Whether it succeeded or not + // --- Effect : Copies the contents of the source variant to this blob object + // The supported types are VT_EMPTY and 1-dim (VT_UI1 | VT_ARRAY) + { + if (V_VT(pSrc) == VT_EMPTY) + { + // Empty variant, just clear the blob + RemoveAll(); + return TRUE; + } + + if (V_VT(pSrc) != (VT_UI1 | VT_ARRAY) || + SafeArrayGetDim(V_ARRAY(pSrc)) != 1) + { + TRACE(_T("COXBlob::CopyVariant : Input variant not a one dimensional array of bytes.\n")); + return FALSE; + } + + DWORD lSize; + long lLower, lUpper; + void* pDest; + + // ... Make sure that it is an array of BYTEs + ASSERT(SafeArrayGetElemsize(V_ARRAY(pSrc)) == 1); + // ... Get the lower and upper bound + COXVariant::CheckError(SafeArrayGetLBound(V_ARRAY(pSrc), 1, &lLower)); + COXVariant::CheckError(SafeArrayGetUBound(V_ARRAY(pSrc), 1, &lUpper)); + lSize = (DWORD)(lUpper - lLower + 1); + // ... Get a pointer to the actual data and copy it + COXVariant::CheckError(SafeArrayAccessData(V_ARRAY(pSrc), &pDest)); + SetSize(lSize); + memcpy(GetData(), pDest, lSize); + COXVariant::CheckError(SafeArrayUnaccessData(V_ARRAY(pSrc))); + + return TRUE; + } + +// private: +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBmpPrv.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBmpPrv.cpp new file mode 100644 index 0000000..1f265fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXBmpPrv.cpp @@ -0,0 +1,158 @@ +// ========================================================================== +// Class Implementation : COXBmpFileDialog +// ========================================================================== + +// Source file : oxbmpprv.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "OXCommon.h" +#include "oxbmpprv.h" // class specification +#include "path.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: + + +IMPLEMENT_DYNAMIC(COXBmpFileDialog, COXPreviewDialog) + + +COXBmpFileDialog::COXBmpFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName, + DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) + : COXPreviewDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd) + { + } + +COXBmpFileDialog::~COXBmpFileDialog() + { + } + +#ifndef WIN32 +int COXBmpFileDialog::DoModal() +{ + ASSERT_VALID(this); + ASSERT(CFileDialog::m_ofn.Flags & OFN_ENABLEHOOK); + ASSERT(CFileDialog::m_ofn.lpfnHook != NULL); // can still be a user hook + + BOOL bResult; + + CFileDialog::m_ofn.hwndOwner = PreModal(); + if (m_bOpenFileDialog) + bResult = ::GetOpenFileName(&(CFileDialog::m_ofn)); + else + bResult = ::GetSaveFileName(&(CFileDialog::m_ofn)); + PostModal(); + + return bResult ? IDOK : IDCANCEL; +} +#endif + +// protected: + +void COXBmpFileDialog::OnNewFileSelect(const CString& sFilename) + { + COXPathSpec pathPreview(sFilename); + + if (!sFilename.IsEmpty() && + pathPreview.Exists() && + pathPreview.GetExtender().CompareNoCase(_T("bmp")) == 0) + { + m_dib.Read(pathPreview.GetPath()); + } + else + { + m_dib.Empty(); + } + } + +void COXBmpFileDialog::OnPaintPreview(CDC* pDC, const CRect& paintRect) +{ + if (m_dib.IsEmpty()) + { + // Paint space of dib with current selected brush +#ifdef WIN32 + pDC->FillRect(paintRect, pDC->GetCurrentBrush()); +#else + CBrush* pBrush = (CBrush*)pDC->SelectStockObject(HOLLOW_BRUSH); + pDC->SelectObject(pBrush); + pDC->FillRect(paintRect, pBrush); +#endif + pDC->MoveTo(paintRect.left, paintRect.top); + pDC->LineTo(paintRect.right, paintRect.bottom); + pDC->MoveTo(paintRect.right, paintRect.top); + pDC->LineTo(paintRect.left, paintRect.bottom); + } + else + { + CRect dibRect; + CSize dibSize; + dibSize = m_dib.GetSize(); + dibRect.SetRect(0,0, dibSize.cx, dibSize.cy); + + CPalette* pPalette = m_dib.GetPalette(); + if (pPalette != NULL) + { + CPalette* pOldPalette=pDC->SelectPalette(pPalette, FALSE); + pDC->RealizePalette(); + pDC->SelectPalette(pOldPalette, FALSE); + } + + m_dib.Paint(pDC, paintRect, dibRect); + } +} + +void COXBmpFileDialog::OnDoRealizePalette(CWnd* pFocusWnd) +{ + UINT nColorsChanged = 0; + + CPalette* pPalette = m_dib.GetPalette(); + if (pPalette != NULL) + { + CClientDC appDC(this); + + // bForceBackground flag is FALSE only if pFocusWnd != this (this dialog) + CPalette* oldPalette = appDC.SelectPalette(pPalette, pFocusWnd != this); + if (oldPalette != NULL) + { + nColorsChanged = appDC.RealizePalette(); + appDC.SelectPalette(oldPalette, TRUE); + } + else + { + TRACE(_T("\tSelectPalette failed in COXBmpFileDialog::OnDoRealizePalette\n")); + return; + } + } + + if (nColorsChanged != 0) + { + m_preview.Invalidate(FALSE); + } +} + + +// private: + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdLne.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdLne.cpp new file mode 100644 index 0000000..39ee084 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdLne.cpp @@ -0,0 +1,101 @@ +// ========================================================================== +// Class Implementation : COXCommandLine +// ========================================================================== + +// Source file : OXCmdLne.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include +#include "OXCmdLne.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXCommandLine, CObject) + +#define new DEBUG_NEW + +void COXCommandLine::Tokenize(LPTSTR pszCmdLine) + { + LPTSTR delimiters = _T(" =\r\n"); + CString token; + LPCTSTR curTok = _tcstok(pszCmdLine, delimiters); + while (curTok != NULL) + { + if (*curTok == _T('\'') || *curTok == _T('"')) + { + TCHAR quote[2]; + *quote = *curTok; + quote[1] = 0; + LPTSTR pLastToken = _tcsrchr(curTok, quote[0]); + if (pLastToken != curTok) + { + *pLastToken = '\0'; + token = (curTok + 1); + curTok = token; + } + else + { + token = (curTok + 1); + token += _T(" "); + curTok = _tcstok(NULL, quote); + token += curTok; + curTok = token; + } + } + + m_Tokens.Add(curTok); + m_NumTokens++; + curTok = _tcstok(NULL, delimiters); + } + + // A sentinel + m_Tokens.Add(_T("|")); + } + +COXCommandLine::COXCommandLine(LPCSTR psczCmdLine) + { + CString sCmdLine(psczCmdLine); + m_Tokens.RemoveAll(); + m_NumTokens = 0; + Tokenize(sCmdLine.GetBuffer(0)); + + sCmdLine.ReleaseBuffer(); + } + +#ifdef WIN32 +COXCommandLine::COXCommandLine(LPCWSTR psczCmdLine) + { + CString sCmdLine(psczCmdLine); + m_Tokens.RemoveAll(); + m_NumTokens = 0; + Tokenize(sCmdLine.GetBuffer(0)); + + sCmdLine.ReleaseBuffer(); + } + +#endif + +COXCommandLine::COXCommandLine(CStdioFile* pInfile) + { + m_Tokens.RemoveAll(); + m_NumTokens = 0; + TCHAR ReadLine[256]; + while (pInfile->ReadString(ReadLine, 256) != NULL) + Tokenize(ReadLine); + } + +COXCommandLine::~COXCommandLine() + { + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpd.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpd.cpp new file mode 100644 index 0000000..1503cb9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpd.cpp @@ -0,0 +1,74 @@ +// ========================================================================== +// Class Implementation : COXCommandOptionDesc +// ========================================================================== + +// Source file : OXCmdOpd.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// +// Example: +// BOOL CMyApp::InitInstance() +// { +// COXCommandOptionDesc codOption1(_T("RUN"), 0, _T("Automatically run sumpn")); +// COXCommandOptionDesc codOption2(_T("EMF"), COD_ARGOK | COD_REP_LAST, _T("Gimme a file")); +// } +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXCmdOpd.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXCommandOptionDesc, CObject) + +#define new DEBUG_NEW + +COXCommandOptionDesc::COXCommandOptionDesc() + { + } + +COXCommandOptionDesc::COXCommandOptionDesc(LPCTSTR psczOptionName, int iFlags, + LPCTSTR psczDescription, + LPCTSTR psczAbbr /* = _T("") */) + : m_sOptionName(psczOptionName), + m_nFlags(iFlags), + m_sDescription(psczDescription), + m_sAbbr(psczAbbr) + { + m_sOptionName.MakeUpper(); + m_sAbbr.MakeUpper(); + } + +COXCommandOptionDesc::COXCommandOptionDesc(const COXCommandOptionDesc& OptDescSrc) + : m_sOptionName(OptDescSrc.m_sOptionName), + m_nFlags(OptDescSrc.m_nFlags), + m_sDescription(OptDescSrc.m_sDescription), + m_sAbbr(OptDescSrc.m_sAbbr) + { + } + +COXCommandOptionDesc& COXCommandOptionDesc::operator=(const COXCommandOptionDesc& OptDescSrc) +{ + if(this==&OptDescSrc) + return *this; + + m_sOptionName = OptDescSrc.m_sOptionName; + m_nFlags = OptDescSrc.m_nFlags; + m_sDescription = OptDescSrc.m_sDescription; + m_sAbbr = OptDescSrc.m_sAbbr; + + return *this; +} + +COXCommandOptionDesc::~COXCommandOptionDesc() + { + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpt.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpt.cpp new file mode 100644 index 0000000..962028e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdOpt.cpp @@ -0,0 +1,476 @@ +// ========================================================================== +// Class Implementation : COXCommandOptions +// ========================================================================== + +// Source file : OXCmdOpt.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXCmdOpt.h" +#include "OXCmdlex.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXCommandOptions, CObject) + +#define new DEBUG_NEW + +COXCommandOptions::COXCommandOptions() + { + } + +COXCommandOptions::~COXCommandOptions() + { + for (int i = m_CmdOptDescList.GetSize() - 1; i >= 0 ; i--) + { + delete m_CmdOptDescList[i]; + } + + ResetMaps(); + } + +void COXCommandOptions::ResetMaps() + { + POSITION pos = m_Values.GetStartPosition(); + CString sKey; + CObject* pVal; + while (pos != NULL) + { + m_Values.GetNextAssoc(pos, sKey, pVal); + delete pVal; + } + + m_Values.RemoveAll(); + m_AbbrMap.RemoveAll(); + } + +void COXCommandOptions::Add(COXCommandOptionDesc* pOptionDesc) + { + BOOL bInserted = FALSE; + COXCommandOptionDesc* pNewOptDesc = new COXCommandOptionDesc(*pOptionDesc); + + for (int i = 0; i < m_CmdOptDescList.GetSize(); i++) + { + CString sArrayElement = ((COXCommandOptionDesc*)(m_CmdOptDescList[i]))->GetOptName(); + CString sNewElement = pNewOptDesc->GetOptName(); + // Insert with longest GetOptName's first + // assume this makes a difference to the order of the AbbrMap ??? + if (sNewElement.GetLength() >= sArrayElement.GetLength()) + { + bInserted = TRUE; + m_CmdOptDescList.InsertAt(i, pNewOptDesc, 1); + break; + } + } + + if (!bInserted) + m_CmdOptDescList.Add(pNewOptDesc); + } + +void COXCommandOptions::Add(LPCTSTR pszcOptionName, int iFlags, + LPCTSTR pszcDescription, LPCTSTR pszcAbbr /* = _T("") */) + { + COXCommandOptionDesc Cod(pszcOptionName, iFlags, pszcDescription, pszcAbbr); + Add(&Cod); + } + +BOOL COXCommandOptions::Remove(LPCTSTR pszcOption) + { + CString sOption = pszcOption; + sOption.MakeUpper(); + CObject* pTmp = NULL; + + // what kind of option is it? + if (m_Values.Lookup(sOption, pTmp)) + { + // delete the list of values associated with this option + delete (CMapStringToString*)pTmp; + } + + // Remove the entry from the values list + m_Values.RemoveKey(sOption); + + // Remove the entry from the abbreviations list + m_AbbrMap.RemoveKey(sOption); + + BOOL bFound(FALSE); + for (int i = 0; i < m_CmdOptDescList.GetSize(); i++) + { + COXCommandOptionDesc* pOpt = (COXCommandOptionDesc*)m_CmdOptDescList[i]; + if (pOpt->GetOptName() == sOption) + { + delete pOpt; + m_CmdOptDescList.RemoveAt(i); + bFound = TRUE; + break; + } + } + + return bFound; + } + +// walk through CmdOptDescList, gathering .GetOptName() abbreviations +void COXCommandOptions::BuildAbbrTable() + { + CStringArray Abbray; // Abbreviation Array :-) + CUIntArray Indaray; // Index Array + CStringArray Clash; // Clash array + + // Initialize Abbray with complete option names (and Indaray with pointers) + // This array is size sorted because CmdOptDescList is size sorted + for (int i = 0; i < m_CmdOptDescList.GetSize(); i++) + { + Abbray.Add(((COXCommandOptionDesc*)(m_CmdOptDescList[i]))->GetOptName()); + Indaray.Add(i); + CString sReqAbbr = ((COXCommandOptionDesc*)(m_CmdOptDescList[i]))->GetOptAbbr(); + if (sReqAbbr.GetLength()) + { + Abbray.Add(sReqAbbr); + Indaray.Add(i); + } + } + + // Now walk through AbbrMap extending it as we go with abbreviations + int iAbbr; + for (iAbbr = 0;iAbbr < Abbray.GetSize(); iAbbr++) + { + CString sAbbr = Abbray[iAbbr]; + // Abbr is the name already in the map + int iNewAbbrLength = sAbbr.GetLength() - 1; + if (iNewAbbrLength) + { // No zero length abbreviations + // NewAbbr is the name we are trying to add to map + CString sNewAbbr = sAbbr.GetBufferSetLength(iNewAbbrLength); + + // See if sNewAbbr is unique (ignoring all the entries we've already processed) + BOOL bUnique = TRUE; + + int iCmp; + for (iCmp = iAbbr+ 1; iCmp < Abbray.GetSize(); iCmp++) + { + // Is sNewAbbr an abbreviation of sCmp? + // Assumes that Left() returns all characters (without + // complaint) in the case that Left() is passed a number + // larger than the string length. + CString sCmp = Abbray.GetAt(iCmp).Left(sNewAbbr.GetLength()); + + if (sCmp == sNewAbbr) + { + // sNewAbbr is not unique ... abandon it + bUnique = FALSE; + break; + } + } + // Did we previously find a clash that's a substring of sNewAbbr + if (bUnique) + { + for (int iClash = 0; iClash < Clash.GetSize(); iClash++) + { + CString sCmp = Clash.GetAt(iClash); + if (sCmp == sNewAbbr) + { + bUnique = FALSE; + break; + } + } + } + + if (bUnique) + { + Abbray.Add(sNewAbbr); + Indaray.Add(Indaray[iAbbr]); + } + else + { + Clash.Add(sNewAbbr); + } + } + } + + ASSERT(Abbray.GetSize() == Indaray.GetSize()); + + // Hmmm, this will freak if user calls this twice ... handle that case -tab + ASSERT(m_AbbrMap.GetCount() == 0); + + // Now Build AbbrMap from Abbray and Indaray + for (int j = 0; j < Abbray.GetSize(); j++) + { + m_AbbrMap.SetAt(Abbray[j], m_CmdOptDescList[Indaray[j]]); + } + } + +// Construct array of actual parameters based on command line +CString COXCommandOptions::ParseCmdLine(COXCommandLine& cl, CStringList* pRestList /* = NULL */) + { + CString sReturn; + + // Clear all previous maps and rebuild afterwards + ResetMaps(); + BuildAbbrTable(); + + int iNumArgs = cl.GetNumArgs(); + for (int iArg = 0; iArg < iNumArgs; iArg++) + { + if ((cl[iArg][0] == _T('-')) || (cl[iArg][0] == _T('/'))) + { + CString sToken = cl[iArg].Mid(1); + sToken.MakeUpper(); + COXCommandOptionDesc* Opt = (COXCommandOptionDesc*)m_AbbrMap[sToken]; + + if (Opt != NULL) + { // Valid switch or abbreviation + CObject* pTmp = NULL; + BOOL bIsAlreadyThere = m_Values.Lookup(Opt->GetOptName(), pTmp); + if (bIsAlreadyThere && (!Opt->IsRepeatable())) + { + TCHAR msg[80]; + _stprintf(msg, _T("%s can only be specified once\r\n"), sToken); + TRACE(msg); + THROW(new COXCommandLineException(msg, this)); + } + else if (bIsAlreadyThere && Opt->ReturnsFirstRep()) + { + // It's already there ... do nothing + } + else + { + // Either it's not already there or it is already + // there and repetitions are allowed + + // Assign new value to insert to sValue + if (!Opt->TakesArg()) + { + m_Values[Opt->GetOptName()] = new CStringList; + } + else if (Opt->ReturnsAssociative()) + { + if (iArg + 2 > iNumArgs - 1) + { + TCHAR msg[80]; + _stprintf(msg, _T("%s requires 2 arguments\r\n"), Opt->GetOptName()); + TRACE(msg); + THROW(new COXCommandLineException(msg, this)); + } + + CMapStringToString* assocmap; + if (!m_Values.Lookup(Opt->GetOptName(), pTmp)) + { + assocmap = new CMapStringToString; + m_Values[Opt->GetOptName()] = assocmap; + } + else + { + assocmap = (CMapStringToString*)pTmp; + } + + CString sKey = cl[++iArg]; + (*assocmap)[sKey] = cl[++iArg]; + } + else if (Opt->ReturnsArray()) + { + if (iArg + 1 > iNumArgs - 1) + { + TCHAR msg[80]; + _stprintf(msg, _T("%s requires an argument\r\n"), Opt->GetOptName()); + TRACE(msg); + THROW(new COXCommandLineException(msg, this)); + } + + CStringList* pVals; + if (!m_Values.Lookup(Opt->GetOptName(), pTmp)) + { + pVals = new CStringList; + m_Values[Opt->GetOptName()] = pVals; + } + else + { + pVals = (CStringList*)pTmp; + } + + pVals->AddTail(cl[++iArg]); + } + else + { + // It's not already there and we expect an argument + + if ((cl[iArg + 1] == _T("|")) || (cl[iArg + 1][0] == _T('-')) || (cl[iArg + 1][0] == _T('/'))) + { + TCHAR msg[80]; + _stprintf(msg, _T("%s requires an argument\r\n"), Opt->GetOptName()); + TRACE(msg); + THROW(new COXCommandLineException(msg, this)); + } + + CObject* pTmp; + if (m_Values.Lookup(Opt->GetOptName(), pTmp)) + { + delete pTmp; + } + + CStringList* pVals = new CStringList; + pVals->AddTail(cl[++iArg]); + m_Values[Opt->GetOptName()] = pVals; + } + } + + } + else + { + TCHAR msg[80]; + _stprintf(msg, _T("%s is not a valid switch\r\n"), sToken); + TRACE(msg); + THROW(new COXCommandLineException(msg, this)); + } + } + else + { + if (pRestList != NULL) + { + ASSERT(pRestList->IsKindOf(RUNTIME_CLASS(CStringList))); + pRestList->AddTail(cl[iArg]); + } + + sReturn += cl[iArg] + _T(" "); + } + } + + // Glue the remaining strings back together + while (iArg < cl.GetNumArgs()) + { + sReturn += cl[iArg++] + _T(" "); + } + + return sReturn; + } + +const COXCommandOptionDesc* COXCommandOptions::GetOptionObject(LPCTSTR psczOption) const + { + CString sOption(psczOption); + sOption.MakeUpper(); + BOOL bFound(FALSE); + COXCommandOptionDesc* pOpt = NULL; + for (int i = 0; i < m_CmdOptDescList.GetSize(); i++) + { + pOpt = (COXCommandOptionDesc*)m_CmdOptDescList[i]; + if (pOpt->GetOptName() == sOption) + { + bFound = TRUE; + break; + } + } + + return bFound ? pOpt : NULL; + } + +BOOL COXCommandOptions::IsEnabled(LPCTSTR pszcOption) const + { + CString sOption = pszcOption; + sOption.MakeUpper(); + CObject* pTmp; + return (m_Values.Lookup(sOption, pTmp)); + } + +CString COXCommandOptions::GetValue(LPCTSTR pszcOption) const + { + CString sOption = pszcOption; + sOption.MakeUpper(); + COXCommandOptionDesc* pOpt = NULL; + CObject* pTmp = NULL; + + m_AbbrMap.Lookup(sOption, pTmp); + pOpt = (COXCommandOptionDesc*)pTmp; + ASSERT(pOpt != NULL && !pOpt->ReturnsArray() && !pOpt->ReturnsAssociative()); + CStringList* pList; + if (m_Values.Lookup(sOption, pTmp)) + { + pList = (CStringList*)pTmp; + + return pList->GetHead(); + } + else + { + return _T(""); + } + } + +const CStringList* COXCommandOptions::GetValues(LPCTSTR pszcOption) const + { + CString sOption = pszcOption; + sOption.MakeUpper(); + COXCommandOptionDesc* pOpt = NULL; + CObject* pTmp = NULL; + + m_AbbrMap.Lookup(sOption, pTmp); + pOpt = (COXCommandOptionDesc*)pTmp; + ASSERT(pOpt != NULL && pOpt->ReturnsArray()); + if (m_Values.Lookup(sOption, pTmp)) + { + return (CStringList*)pTmp; + } + else + { + return NULL; + } + } + +const CMapStringToString* COXCommandOptions::GetAssocPairs(LPCTSTR pszcOption) const + { + CString sOption = pszcOption; + sOption.MakeUpper(); + COXCommandOptionDesc* pOpt = NULL; + CObject* pTmp = NULL; + + m_AbbrMap.Lookup(sOption, pTmp); + pOpt = (COXCommandOptionDesc*)pTmp; + ASSERT(pOpt != NULL && pOpt->ReturnsAssociative()); + if (m_Values.Lookup(sOption, pTmp)) + { + return (CMapStringToString*)pTmp; + } + else + { + return NULL; + } + } + +CString COXCommandOptions::Usage(LPCTSTR pszcMsg) const + { + CString sMsg(pszcMsg); + + sMsg += _T("\n"); + + CString sLine; + for (int i = 0; i < m_CmdOptDescList.GetSize(); i++) + { + COXCommandOptionDesc* pOpt = (COXCommandOptionDesc*)m_CmdOptDescList[i]; + CString sAbbr = pOpt->GetOptAbbr(); + if (sAbbr.GetLength() != 0) + { + CString sTmp(_T("(-")); + sTmp += sAbbr; + sTmp += _T(")"); + sAbbr = sTmp; + } + + _stprintf(sLine.GetBuffer(100), _T("-%s\t%s\t%s\n"), pOpt->GetOptName(), sAbbr, pOpt->GetDescription()); + sLine.ReleaseBuffer(); + sMsg += sLine; + } + + return sMsg; + } + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdlEx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdlEx.cpp new file mode 100644 index 0000000..f70c42c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCmdlEx.cpp @@ -0,0 +1,96 @@ +// ========================================================================== +// Class Implementation : COXCommandLineException +// ========================================================================== + +// Source file : oxcmdlex.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "oxcmdlex.h" // class specification +#include "oxcmdopt.h" + +#ifdef WIN32 + #include "wincon.h" // for AllocConsole call +#endif + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC( COXCommandLineException, CException ); + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: +COXCommandLineException::COXCommandLineException(LPCTSTR pszcError, + COXCommandOptions* pCmdOpt /* = NULL */) + { + if (pCmdOpt != NULL) + { + ASSERT(pCmdOpt->IsKindOf(RUNTIME_CLASS(COXCommandOptions))); + m_sErrMsg = pCmdOpt->Usage(pszcError); + } + else + m_sErrMsg = pszcError; + } + +BOOL COXCommandLineException::GetErrorMessage(LPTSTR lpszError, UINT nMaxError, + UINT* /* pnHelpContext */ /* = NULL */) + { + ASSERT(lpszError != NULL && AfxIsValidString(lpszError, nMaxError)); + + lstrcpyn(lpszError, m_sErrMsg, nMaxError); + + return TRUE; + } + +BOOL COXCommandLineException::WriteToStdErr() + { +#ifdef WIN32 + DWORD written; + HANDLE StdErr = GetStdHandle(STD_ERROR_HANDLE); + if (StdErr == INVALID_HANDLE_VALUE) + { + if (AllocConsole()) + StdErr = GetStdHandle(STD_ERROR_HANDLE); + else + return FALSE; + } + + if (StdErr != INVALID_HANDLE_VALUE) + { + WriteFile(StdErr, m_sErrMsg, m_sErrMsg.GetLength(), &written, 0); + return TRUE; + } + + return FALSE; +#else + fprintf(stderr, m_sErrMsg); + return TRUE; +#endif + } + +// protected: + +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommMsg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommMsg.cpp new file mode 100644 index 0000000..80f3a34 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommMsg.cpp @@ -0,0 +1,127 @@ +// ========================================================================== +// Class Implementation : COXCommMsg +// ========================================================================== + +// Source file : OXCommMsg.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXCommMsg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +// ... Skip templated base class +IMPLEMENT_DYNAMIC(COXCommMsg, CObject) + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +COXCommMsg::EOXArgumentTypes COXCommMsg::m_types[COXCommMsg::m_nArgumentTypesCount] = + { + COXCommMsg::ATEmpty, + COXCommMsg::ATNull, + COXCommMsg::ATBool, + COXCommMsg::ATUI1, + COXCommMsg::ATI2, + COXCommMsg::ATI4, + COXCommMsg::ATCy, + COXCommMsg::ATR4, + COXCommMsg::ATR8, + COXCommMsg::ATStr, + COXCommMsg::ATDate, + COXCommMsg::ATError, + COXCommMsg::ATBlob + }; + +LPCTSTR COXCommMsg::m_typeNames[COXCommMsg::m_nArgumentTypesCount] = + { + _T("Empty"), + _T("Null"), + _T("Bool"), + _T("UI1"), + _T("I2"), + _T("I4"), + _T("Cy"), + _T("R4"), + _T("R8"), + _T("Str"), + _T("Date"), + _T("Error"), + _T("Blob") + }; + +WORD COXCommMsg::m_nMagicNumber = 0x01FE; +WORD COXCommMsg::m_nVariantType = 0x0001; + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: +COXCommMsg::COXCommMsg() + { + ASSERT_VALID(this); + } + +void COXCommMsg::Serialize(CArchive& ar) + { + // First write magic number + if (ar.IsLoading()) + { + WORD nMagicNumber; + WORD nType; + ar >> nMagicNumber; + if (nMagicNumber != m_nMagicNumber) + { + TRACE(_T("COXCommMsg::Serialize : Magic number is invalid, throwing CArchiveException\n")); + AfxThrowArchiveException(CArchiveException::badClass); + } + ar >> nType; + if (nType != m_nVariantType) + { + TRACE(_T("COXCommMsg::Serialize : Type is invalid, throwing CArchiveException\n")); + AfxThrowArchiveException(CArchiveException::badClass); + } + } + else + { + ar << m_nMagicNumber; + ar << m_nVariantType; + } + + // Call base class implementation + CArray::Serialize(ar); + } + +#ifdef _DEBUG +void COXCommMsg::AssertValid() const + { + CArray::AssertValid(); + } + +void COXCommMsg::Dump(CDumpContext& dc) const + { + CArray::Dump(dc); + } +#endif //_DEBUG + +COXCommMsg::~COXCommMsg() + { + } + +// protected: +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommunicator.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommunicator.cpp new file mode 100644 index 0000000..4fc1060 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXCommunicator.cpp @@ -0,0 +1,573 @@ +// ========================================================================== +// Class Implementation : COXCommunicator +// ========================================================================== + +// Source file : OXCommunicator.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXCommunicator.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXCommunicator, CSocket) + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +HCLIENT_COMMUNICATOR COXCommunicator::m_nLastUsedHandle = 0; +CMap COXCommunicator::m_TimerToCommunicator; + +// Data members ------------------------------------------------------------- +// protected: + // COXCommunicator* m_pMasterCommunicator; + // --- The master communicator to which events should be routed + // Null if this communicator does not have a master + + // CMap m_connections; + // --- Map from the client communicator objects to their handle + + // CSocketFile* m_pFile; + // --- Socket file used for communication. This will be constructed when the + // communication is executed for the first time + + // CArchive* m_pInStream; + // CArchive* m_pOutStream; + // --- In (load) and out (store) stream used on top of m_pFile + + // HWND m_hCancelWindow; + // --- Handle of the window which messages will be dispatch during a blocking call + + // UINT m_nTimeOut; + // --- Time out value of a blocking call + + // UINT m_nTimerID; + // --- ID of the timer used to notify of a time out + +// private: + +// Member functions --------------------------------------------------------- +// public: +COXCommunicator::COXCommunicator(UINT nStreamBufferSize /* = 4096 */, + COXCommunicator* pMasterCommunicator /* = NULL */) + : + m_nStreamBufferSize(nStreamBufferSize), + m_pMasterCommunicator(pMasterCommunicator), + m_pFile(NULL), + m_pInStream(NULL), + m_pOutStream(NULL), + m_nTimerID(0), + m_hCancelWindow(NULL), + m_nTimeOut(0) + { + ASSERT_VALID(this); + } + +HCLIENT_COMMUNICATOR COXCommunicator::GetClientHandle(COXCommunicator* pClientCommunicator) + { + HCLIENT_COMMUNICATOR hClientCommunicator; + if (m_connections.Lookup(pClientCommunicator, hClientCommunicator)) + return hClientCommunicator; + else + { + TRACE(_T("COXCommunicator::GetClientHandle : Client communicator not found, returning 0\n")); + return (HCLIENT_COMMUNICATOR)0; + } + } + +COXCommunicator* COXCommunicator::GetClientCommunicator(HCLIENT_COMMUNICATOR hClient) + { + COXCommunicator* pCommunicator; + HCLIENT_COMMUNICATOR hClientCommunicator; + POSITION pos; + pos = m_connections.GetStartPosition(); + while (pos != NULL) + { + m_connections.GetNextAssoc(pos, pCommunicator, hClientCommunicator); + if (hClient == hClientCommunicator) + return pCommunicator; + } + TRACE(_T("COXCommunicator::GetClientCommunicator : Handle not found, returning NULL\n")); + return NULL; + } + +void COXCommunicator::Initialize(UINT uTimeOut /* = 10000 */, CWnd* pCancelWnd /* = NULL */) + { + SetTimeOut(uTimeOut); + SetCancelWindow(pCancelWnd); + } + +void COXCommunicator::SetCancelWindow(CWnd* pWnd) + { + m_hCancelWindow = pWnd->GetSafeHwnd(); + } + +void COXCommunicator::SetTimeOut(UINT uTimeOut) + { + m_nTimeOut = uTimeOut; + } + +BOOL COXCommunicator::IsOpen() + { + return (m_hSocket != INVALID_SOCKET); + } + +BOOL COXCommunicator::IsListening() + { + BOOL bListening; + int nSize = sizeof(bListening); + if (GetSockOpt(SO_ACCEPTCONN, &bListening, &nSize)) + return bListening; + else + { + TRACE(_T("COXCommunicator::IsListening : Could not get the listening state\n")); + return FALSE; + } + } + +BOOL COXCommunicator::IsBlocking() + { + return (m_pbBlocking != NULL) && *m_pbBlocking; + } + +BOOL COXCommunicator::AreAnyBlocking() + { + BOOL bBlocking; + // Get the blocking state of this communicator + bBlocking = IsBlocking(); + + // Get the blocking state of all clients + COXCommunicator* pCommunicator; + HCLIENT_COMMUNICATOR hDummy; + POSITION pos; + pos = m_connections.GetStartPosition(); + while (!bBlocking && (pos != NULL)) + { + m_connections.GetNextAssoc(pos, pCommunicator, hDummy); + bBlocking = pCommunicator->IsBlocking(); + } + + return bBlocking; + } + +void COXCommunicator::CancelAllBlockingCalls() + { + // Cancel blocking call of this communicator + CancelBlockingCall(); + + // Cancel blocking call of all clients + COXCommunicator* pCommunicator; + HCLIENT_COMMUNICATOR hDummy; + POSITION pos; + pos = m_connections.GetStartPosition(); + while (pos != NULL) + { + m_connections.GetNextAssoc(pos, pCommunicator, hDummy); + pCommunicator->CancelBlockingCall(); + } + } + +DWORD COXCommunicator::GetMaxReadable() + { + DWORD nNumberReadable; + if (IOCtl(FIONREAD, &nNumberReadable)) + return nNumberReadable; + else + { + TRACE(_T("COXCommunicator::GetMaxReadable : Function IOCtl() failed, returning 0\n")); + return 0; + } + } + +CArchive* COXCommunicator::GetInStream() + { + if (m_pFile == NULL) + m_pFile = new CSocketFile(this); + if (m_pInStream == NULL) + m_pInStream = new CArchive(m_pFile,CArchive::load, m_nStreamBufferSize); + return m_pInStream; + } + +CArchive* COXCommunicator::GetOutStream() + { + if (m_pFile == NULL) + m_pFile = new CSocketFile(this); + if (m_pOutStream == NULL) + m_pOutStream = new CArchive(m_pFile,CArchive::store, m_nStreamBufferSize); + return m_pOutStream; + } + + +void COXCommunicator::OnClientCreate(HCLIENT_COMMUNICATOR /* hClient */, COXCommunicator* /* pClientCommunicator */) + { + // Do nothing by default + } + +void COXCommunicator::OnClientReceive(HCLIENT_COMMUNICATOR /* hClient */, COXCommunicator* /* pClientCommunicator */, DWORD /* nSize */, int /* nErrorCode */) + { + // Do nothing by default + } + +void COXCommunicator::OnClientClose(HCLIENT_COMMUNICATOR /* hClient */, COXCommunicator* /* pClientCommunicator */, int /* nErrorCode */) + { + // Do nothing by default + } + +void COXCommunicator::OnClientDestroy(HCLIENT_COMMUNICATOR /* hClient */, COXCommunicator* /* pClientCommunicator */) + { + // Do nothing by default + } + +void COXCommunicator::OnServerReceive(DWORD /* nSize */, int /* nErrorCode */) + { + // Do nothing by default + } + +void COXCommunicator::OnServerClose(int /* nErrorCode */) + { + // Do nothing by default + } + +BOOL COXCommunicator::OnMessagePending() + { + // NOTE : When the function returns + // TRUE : Allow user-interface updates (pThread->OnIdle(-1);) + // FALSE : No work to do -- allow CPU to sleep (WaitMessage();) + + MSG msg; + // Check for messages for the cancel window and + // timer message and WM_QUIT + if( ((m_hCancelWindow != NULL) && ::PeekMessage(&msg, m_hCancelWindow, NULL, NULL, PM_REMOVE)) || + ::PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE) || + ::PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE) ) + { + // Abort loop on WM_QUIT + if (msg.message == WM_QUIT) + { + // ... Cancel the current blocking call + TRACE(_T("COXCommunicator::OnMessagePending : WM_QUIT detected, reposting")); + CancelBlockingCall(); + AfxPostQuitMessage(0); + // ... No need for idle time processing + return FALSE; + } + // Pump message + if (!AfxGetThread()->PreTranslateMessage(&msg)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + // ... No need for idle time processing + return FALSE; + }; + // Call base class implementation (will process WM_PAINT) + return CSocket::OnMessagePending(); + } + +BOOL COXCommunicator::Accept(CAsyncSocket& rConnectedSocket, + SOCKADDR* lpSockAddr /* = NULL */, int* lpSockAddrLen /* = NULL */) + { + BOOL bRet; + // ... Start a new timer if necessary + CreateTimer(); + bRet = CSocket::Accept(rConnectedSocket, lpSockAddr, lpSockAddrLen); + CloseTimer(); + return bRet; + } + +int COXCommunicator::Receive(void* lpBuf, int nBufLen, int nFlags /* = 0 */) + { + int nRet; + // ... Start a new timer if necessary + CreateTimer(); + nRet = CSocket::Receive(lpBuf, nBufLen, nFlags); + CloseTimer(); + return nRet; + } + +int COXCommunicator::Send(const void* lpBuf, int nBufLen, int nFlags /* = 0 */) + { + int nRet; + // ... Start a new timer if necessary + CreateTimer(); + nRet = CSocket::Send(lpBuf, nBufLen, nFlags); + CloseTimer(); + return nRet; + } + +void COXCommunicator::Close() + { + // First close all the client connectiosn + COXCommunicator* pCommunicator; + HCLIENT_COMMUNICATOR hClientCommunicator; + POSITION pos; + pos = m_connections.GetStartPosition(); + while (pos != NULL) + { + m_connections.GetNextAssoc(pos, pCommunicator, hClientCommunicator); + pCommunicator->Close(); + OnClientDestroy(hClientCommunicator, pCommunicator); + delete pCommunicator; + } + m_connections.RemoveAll(); + + // ... Start a new timer if necessary + CreateTimer(); + CSocket::Close(); + CloseTimer(); + } + +#ifdef _DEBUG +void COXCommunicator::AssertValid() const + { + CSocket::AssertValid(); + } + +void COXCommunicator::Dump(CDumpContext& dc) const + { + CSocket::Dump(dc); + } +#endif //_DEBUG + +COXCommunicator::~COXCommunicator() + { + COXCommunicator* pCommunicator; + HCLIENT_COMMUNICATOR hClientCommunicator; + POSITION pos; + pos = m_connections.GetStartPosition(); + while (pos != NULL) + { + m_connections.GetNextAssoc(pos, pCommunicator, hClientCommunicator); + OnClientDestroy(hClientCommunicator, pCommunicator); + delete pCommunicator; + } + m_connections.RemoveAll(); + + // Clean everything up + delete m_pOutStream; + delete m_pInStream; + delete m_pFile; + + // If we still have a timer running, stop it now + if (m_nTimerID != 0) + StopTimer(m_nTimerID); + } + +// protected: +void COXCommunicator::OnAccept(int nErrorCode) + // --- In : nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Creates a new client socket and accepts the call + { + CSocket::OnAccept(nErrorCode); + + COXCommunicator* pCommunicator = new COXCommunicator(m_nStreamBufferSize, this); + + if (Accept(*pCommunicator)) + { + // Inherit timeout and cancel window from parent + pCommunicator->Initialize(m_nTimeOut, CWnd::FromHandle(m_hCancelWindow)); + m_connections.SetAt(pCommunicator, ++m_nLastUsedHandle); + OnClientCreate(m_nLastUsedHandle, pCommunicator); + } + else + delete pCommunicator; + } + +void COXCommunicator::OnReceive(int nErrorCode) + // --- In : nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies the master communicator or calls the notification function + { + CSocket::OnReceive(nErrorCode); + if (m_pMasterCommunicator != NULL) + m_pMasterCommunicator->OnNotifyReceive(this, GetMaxReadable(), nErrorCode); + else + OnServerReceive(GetMaxReadable(), nErrorCode); + } + +void COXCommunicator::OnClose(int nErrorCode) + // --- In : nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Notifies the master communicator or calls the notification function + { + CSocket::OnClose(nErrorCode); + if (m_pMasterCommunicator != NULL) + m_pMasterCommunicator->OnNotifyClose(this, nErrorCode); + else + OnServerClose(nErrorCode); + // The other connection has closed its socket, we close ours as well + Close(); + } + +void COXCommunicator::OnNotifyReceive(COXCommunicator* pClientCommunicator, DWORD nSize, int nErrorCode) + // --- In : pClientCommunicator : The client communicator from which the notification originates + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Handles a notification of a client communicatorNotifies the master communicator or calls the notification function + { + HCLIENT_COMMUNICATOR hClientCommunicator; + VERIFY(m_connections.Lookup(pClientCommunicator, hClientCommunicator)); + OnClientReceive(hClientCommunicator, pClientCommunicator, nSize, nErrorCode); + } + +void COXCommunicator::OnNotifyClose(COXCommunicator* pClientCommunicator, int nErrorCode) + // --- In : pClientCommunicator : The client communicator from which the notification originates + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Handles a notification of a client communicatorNotifies the master communicator or calls the notification function + { + HCLIENT_COMMUNICATOR hClientCommunicator; + VERIFY(m_connections.Lookup(pClientCommunicator, hClientCommunicator)); + OnClientClose(hClientCommunicator, pClientCommunicator, nErrorCode); + } + +void COXCommunicator::OnNotifyKill(COXCommunicator* pClientCommunicator, int /* nErrorCode */) + // --- In : pClientCommunicator : The client communicator from which the notification originates + // nErrorCode : The most recent error code of the communicator + // --- Out : + // --- Returns : + // --- Effect : Handles a notification of a client communicatorNotifies the master communicator or calls the notification function + { + HCLIENT_COMMUNICATOR hClientCommunicator; + VERIFY(m_connections.Lookup(pClientCommunicator, hClientCommunicator)); + OnClientDestroy(hClientCommunicator, pClientCommunicator); + // Delete client connection (has already been closed) + ASSERT(pClientCommunicator->IsOpen()); + m_connections.RemoveKey(pClientCommunicator); + delete pClientCommunicator; + } + +void COXCommunicator::CreateTimer() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Starts a new timer and stores the timer id + { + // ... Start new timer + ASSERT(m_nTimerID == 0); + if (m_nTimeOut != 0) + m_nTimerID = StartTimer(this, m_nTimeOut); + } + +void COXCommunicator::CloseTimer() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Closes the started timer (if any) + { + // ... Stop previous timer if still running + if (m_nTimerID != 0) + StopTimer(m_nTimerID); + m_nTimerID = 0; + } + +UINT COXCommunicator::StartTimer(COXCommunicator* pCommunicator, UINT nTimeOut) + // --- In : pCommunicator : The communicator that requests a timer + // nTimeOut : The time out in milli seconds + // --- Out : + // --- Returns : The timer id of the started timer + // --- Effect : Starts a new timer and registers the specified communicator + { + ASSERT(nTimeOut != 0); + // ... Should not yet have a timer + ASSERT(pCommunicator->m_nTimerID == 0); + + UINT nTimerID; + // ... Start timer + nTimerID = ::SetTimer(NULL, 0, nTimeOut, TimerProc); + if (nTimerID == 0) + AfxThrowResourceException(); + // ... Store mapping from timer ID to object + m_TimerToCommunicator.SetAt(nTimerID, pCommunicator); + return nTimerID; + } + +void COXCommunicator::StopTimer(UINT nTimerID) + // --- In : nTimerID + // --- Out : + // --- Returns : + // --- Effect : Stops the specified timer + { + // ... Remove mapping from timer ID to object + m_TimerToCommunicator.RemoveKey(nTimerID); + // ... Stop timer + ::KillTimer(NULL, nTimerID); + } + +VOID CALLBACK COXCommunicator::TimerProc(HWND /* hWnd */, UINT /* nMsg */, UINT nTimerID, DWORD /* dwTime */) + // --- In : hWnd : + // nMsg : + // nTimerID : + // dwTime) + // --- Out : + // --- Returns : + // --- Effect : Function that handles a timed out timer + // It will cancel the blocking call of the associated communicator +{ + ASSERT(nTimerID != 0); + // Warn object that started the timer + COXCommunicator* pCommunicator; + if (m_TimerToCommunicator.Lookup(nTimerID, pCommunicator)) + { + TRACE(_T("COXCommunicator::TimerProc : Time out reached, cancelling blocking call ...\n")); + pCommunicator->CancelBlockingCall(); + pCommunicator->m_nTimerID = 0; + } + // Stop the timer + StopTimer(nTimerID); +} + +BOOL COXCommunicator::ConnectHelper(const SOCKADDR* lpSockAddr, int nSockAddrLen) + // Same as base class but with a timer + { + BOOL bRet; + // ... Start a new timer if necessary + CreateTimer(); + bRet = CSocket::ConnectHelper(lpSockAddr, nSockAddrLen); + CloseTimer(); + return bRet; + } + +int COXCommunicator::ReceiveFromHelper(void* lpBuf, int nBufLen, + SOCKADDR* lpSockAddr, int* lpSockAddrLen, int nFlags) + // Same as base class but with a timer + { + int nRet; + // ... Start a new timer if necessary + CreateTimer(); + nRet = CSocket::ReceiveFromHelper(lpBuf, nBufLen, lpSockAddr, lpSockAddrLen, nFlags); + CloseTimer(); + return nRet; + } + +int COXCommunicator::SendToHelper(const void* lpBuf, int nBufLen, + const SOCKADDR* lpSockAddr, int nSockAddrLen, int nFlags) + // Same as base class but with a timer + { + int nRet; + // ... Start a new timer if necessary + CreateTimer(); + nRet = CSocket::SendToHelper(lpBuf, nBufLen, lpSockAddr, nSockAddrLen, nFlags); + CloseTimer(); + return nRet; + } + +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDFlHdr.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDFlHdr.cpp new file mode 100644 index 0000000..106fdb4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDFlHdr.cpp @@ -0,0 +1,160 @@ +// ========================================================================== +// Class Implementation : COXDiffFileHeader +// ========================================================================== + +// Header file : OXDFlHdr.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + + +#include "stdafx.h" +#include "oxdflhdr.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXDiffFileHeader, CObject) + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXDiffFileHeader::COXDiffFileHeader(CString sSignature) + : m_sSignText(sSignature) + { + } + +CString COXDiffFileHeader::GetSignature() const + { + return m_sSignText; + } + +void COXDiffFileHeader::ReadHeader(CFile* pFile) + { + ASSERT_VALID(pFile); + + CArchive readArchive(pFile, CArchive::load); + + Read(readArchive); + readArchive.Close(); + } + +void COXDiffFileHeader::WriteHeader(CFile* pFile) + { + ASSERT_VALID(pFile); + + CArchive writeArchive(pFile, CArchive::store | CArchive::bNoFlushOnDelete); + Write(writeArchive); + + writeArchive.Flush(); + writeArchive.Close(); + } + +void COXDiffFileHeader::Serialize(CArchive& ar) + { + ASSERT_VALID(this); + if (ar.IsStoring()) + Write(ar); + else + Read(ar); + ASSERT_VALID(this); + } + +void COXDiffFileHeader::Read(CArchive& ar, BOOL bReportLogicalErrors /* = TRUE */) +{ + ASSERT_VALID(this); + char pszSignature[255 + 1]; + + + if (ar.Read(pszSignature, m_sSignText.GetLength()) != (UINT)m_sSignText.GetLength()) + { + TRACE(_T("*** COXDiffFileHeader::Read : End Of File reached while reading signature\n")); + AfxThrowArchiveException(CArchiveException::endOfFile); + } + pszSignature[m_sSignText.GetLength()] = '\0'; + + // ... Transfering to data members + CString sSignature = CString(pszSignature); + if (sSignature != m_sSignText) + { + TRACE(_T("*** COXDiffFileHeader::Read : Invalid signature\n")); + if (bReportLogicalErrors) + AfxThrowArchiveException(CArchiveException::badSchema); + } + + ASSERT_VALID(this); +} + +void COXDiffFileHeader::Write(CArchive& ar) + { + ASSERT_VALID(this); + + ar.Write((LPCTSTR)m_sSignText, m_sSignText.GetLength()); + + ASSERT_VALID(this); + } + +COXDiffFileHeader::COXDiffFileHeader(const COXDiffFileHeader& HdrSrc) + { + ASSERT_VALID(&HdrSrc); + + m_sSignText = HdrSrc.m_sSignText; + ASSERT_VALID(this); + } + +COXDiffFileHeader& COXDiffFileHeader::operator=(const COXDiffFileHeader& HdrSrc) + { + ASSERT_VALID(this); + ASSERT_VALID(&HdrSrc); + + if(this==&HdrSrc) + return *this; + + m_sSignText = HdrSrc.m_sSignText; + ASSERT_VALID(this); + + return *this; + } + + +COXDiffFileHeader::~COXDiffFileHeader() + { + } + +// protected: + +// private: + +// Diagnostics --------------------------------------------------------------- +#ifdef _DEBUG +void COXDiffFileHeader::AssertValid() const + { + CObject::AssertValid(); + } + +void COXDiffFileHeader::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + + dc << "\nm_sSignText : " << m_sSignText << "\n"; + } +#endif //_DEBUG + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDispatchMarshaller.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDispatchMarshaller.cpp new file mode 100644 index 0000000..7056fba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXDispatchMarshaller.cpp @@ -0,0 +1,90 @@ +// ========================================================================== +// Class Implementation : COXDispatchMarshaller +// ========================================================================== + +// Source file : OXDispatchMarshaller.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXDispatchMarshaller.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +const LARGE_INTEGER bZero = {0,0}; + +COXDispatchMarshaller::COXDispatchMarshaller() : + m_pStream(NULL), + m_hMutexEvent(NULL) +{ + HRESULT hr; + + m_hMutexEvent = CreateEvent(NULL,FALSE,TRUE,NULL); + // create an IStream to be used for marshalling new objects between + // the worker and the CClassFactory + hr = CreateStreamOnHGlobal(NULL, TRUE, &m_pStream); + if (hr!=S_OK) + m_pStream=NULL; +} + +COXDispatchMarshaller::~COXDispatchMarshaller() +{ + if (m_pStream != NULL) + m_pStream->Release(); + CloseHandle(m_hMutexEvent); +} + +HRESULT COXDispatchMarshaller::Marshal(IDispatch* pDisp) +{ + HRESULT hResult; + + WaitForSingleObject(m_hMutexEvent, INFINITE); + hResult = m_pStream->Seek(bZero, STREAM_SEEK_SET, NULL); + if (hResult==S_OK) + { + hResult = CoMarshalInterface(m_pStream, + IID_IDispatch, + pDisp, + MSHCTX_INPROC, + NULL, + MSHLFLAGS_NORMAL); + if (hResult==S_OK) + { + // pDisp is now referenced by its marshal-data in vpstmMarshalling. + // we release our local reference here so the unmarshaller will + // have the sole reference. a common mistake is to forget this + // release and end up with orphaned objects in the server. + pDisp->Release(); + } + } + return hResult; +} + +HRESULT COXDispatchMarshaller::Unmarshal(void** pDisp) +{ + HRESULT hResult; + + ASSERT(WaitForSingleObject(m_hMutexEvent, 0)==WAIT_TIMEOUT); + hResult = m_pStream->Seek(bZero, STREAM_SEEK_SET, NULL); + if (hResult==S_OK) + hResult = CoUnmarshalInterface(m_pStream, IID_IDispatch, pDisp); + SetEvent(m_hMutexEvent); + return hResult; +} + +BOOL COXDispatchMarshaller::CheckStream() +{ + return (m_pStream!=NULL); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXFinalReleaseWnd.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXFinalReleaseWnd.cpp new file mode 100644 index 0000000..c20808c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXFinalReleaseWnd.cpp @@ -0,0 +1,62 @@ +// ========================================================================== +// Class Implementation : COXFinalReleaseWnd +// ========================================================================== + +// Source file : OXFinalReleaseWnd.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXFinalReleaseWnd.h" +#include "OXOwnThread.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +// Static members +// m_sClassName is a static member so that it can be used for the registration +// of all the COXFinalReleaseWnd objects in the same process space +CString COXFinalReleaseWnd::m_sClassName; + +///////////////////////////////////////////////////////////////////////////// +// COXFinalReleaseWnd + +COXFinalReleaseWnd::COXFinalReleaseWnd(COXOwnThread* pOwnThread) : + m_pOwnThread(pOwnThread) +{ + if (m_sClassName.IsEmpty()) + m_sClassName = AfxRegisterWndClass(0); + CreateEx(0, m_sClassName, _T("OwnThreadFinalReleaseWnd"),0,0,0,0,0,NULL,NULL); +} + +COXFinalReleaseWnd::~COXFinalReleaseWnd() +{ +} + +BEGIN_MESSAGE_MAP(COXFinalReleaseWnd, CWnd) + ON_MESSAGE(WMOX_FINAL_RELEASE, OnObjectFinalRelease) +END_MESSAGE_MAP() + +LONG COXFinalReleaseWnd::OnObjectFinalRelease(UINT, LONG) +// --- In : none +// --- Out : none +// --- Returns : always zero +// --- Effect : calls the OnFinalRelease function of our parent COXOwnThread object +{ + m_pOwnThread->OnFinalRelease(); + return 0; +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXMetafileViewer.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXMetafileViewer.cpp new file mode 100644 index 0000000..d45f250 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXMetafileViewer.cpp @@ -0,0 +1,135 @@ +// OXMetafileViewer.cpp : implementation file +// + +#include "stdafx.h" +#include "OXMetafileViewer.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +IMPLEMENT_DYNAMIC(COXMetafileViewer, COXScrollWnd) + + +///////////////////////////////////////////////////////////////////////////// +// COXMetafileViewer + +COXMetafileViewer::COXMetafileViewer() +{ + SetSmoothScrolling(TRUE); +} + +COXMetafileViewer::~COXMetafileViewer() +{ + m_MetaFile.CloseFile(); +} + + +BEGIN_MESSAGE_MAP(COXMetafileViewer, COXScrollWnd) + //{{AFX_MSG_MAP(COXMetafileViewer) + ON_WM_PAINT() + ON_WM_ERASEBKGND() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// COXMetafileViewer message handlers + + + +void COXMetafileViewer::OnPaint() +{ + CPaintDC dc(this); // device context for painting + + // TODO: Add your message handler code here + OnPrepareDC(&dc); + + // get the size of image + CRect rect; + GetClientRect(rect); + CSize sizeMetafileSize=GetMetafileSize(); + rect.right=rect.left+sizeMetafileSize.cx; + rect.bottom=rect.top+sizeMetafileSize.cy; + CRect rectPaint=rect; + // transform coordinates of boundary rectangle + // taking into account current zoom level + NormalToScaled(&rectPaint); + + /// + DrawMetafile(&dc,rectPaint); + + // Do not call COXScrollWnd::OnPaint() for painting messages +} + +BOOL COXMetafileViewer::OnEraseBkgnd(CDC* pDC) +{ + // TODO: Add your message handler code here and/or call default + + ASSERT_VALID(pDC); + + CRect rect; + GetClientRect(rect); + CBrush brush(::GetSysColor(COLOR_WINDOW)); + pDC->FillRect(rect,&brush); + + return TRUE; +} + +BOOL COXMetafileViewer::LoadFile(LPCTSTR lpszPathName) +{ + if(m_MetaFile.LoadFile(lpszPathName)!=NULL) + return InitializeImage(); + else + return FALSE; +} + + +BOOL COXMetafileViewer::LoadResource(UINT nIDResource, + CString strResType/*=_T("METAFILE")*/) +{ + if(m_MetaFile.LoadFile(nIDResource,strResType)!=NULL) + return InitializeImage(); + else + return FALSE; +} + +BOOL COXMetafileViewer::InitializeImage(const CSize& sizePage/*=CSize(10,10)*/, + const CSize& sizeLine/*=CSize(1,1)*/) +{ + CSize sizeMetafileSize=GetMetafileSize(); + SetScrollSizes(MM_TEXT,sizeMetafileSize,sizePage,sizeLine); + SetZoomAlign(ZA_CENTER); + + if(IsAlwaysFitWindow()) + ZoomToWindow(); + else + RedrawWindow(); + + return TRUE; +} + + +BOOL COXMetafileViewer::DrawMetafile(CDC* pDC, const CRect& rectDest) +{ + // set neccessary map mode + int oldMapMode; + oldMapMode=pDC->SetMapMode(MM_TEXT); + + CRect rect=rectDest; + BOOL bSuccess=m_MetaFile.PlayFile(pDC,&rect); + + pDC->SetMapMode(oldMapMode); + + return bSuccess; +} + +CSize COXMetafileViewer::GetMetafileSize() +{ + return m_MetaFile.GetSize(); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThread.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThread.cpp new file mode 100644 index 0000000..2a0f04a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThread.cpp @@ -0,0 +1,284 @@ +// ========================================================================== +// Class Implementation : COXOwnThread +// ========================================================================== + +// Source file : OXOwnThread.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXOwnThread.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// Remarks about the protected data members +// BOOL m_bHasOwnThread; // if the own thread is enabled or not +// HANDLE m_hCreatedEvent; // event for synchronisation during thread startup +// HANDLE m_hThreadEvent; // see 'SetThreadEvent' and 'OnThreadEvent' functions +// HANDLE m_hEndEvent; // event for synchronisation during thread cleanup +// HRESULT m_hCreateResult; // result value of the creation of the own thread +// LPUNKNOWN m_pMarshalledPunk; // the marshalled object pointer; to be passed to the Owner thread +// BOOL m_bEndThread; // ends the Own thread when set to TRUE +// DWORD m_nOwnerThreadID; // ThreadID of the owner thread (thread that created the object) +// DWORD m_nOwnThreadID; // ThreadID of the Own thread +// COXDispatchMarshaller +// m_dispatchMarshaller; // Encapsulation of the marshal stream +// COXFinalReleaseWnd +// m_finalReleaseWnd; // Helper window for re-routing the releasing of the object from +// // the Own thread to the Owner thread +// +// // The COXFinalReleaseWnd must be able to call a protected member function +// // of this COXOwnThread object in order to release this object +// friend COXFinalReleaseWnd; + + +///////////////////////////////////////////////////////////////////////////// +// COXOwnThread + +COXOwnThread::COXOwnThread() : + m_hCreatedEvent(NULL), + m_hThreadEvent(NULL), + m_hEndEvent(NULL), + m_pMarshalledPunk(NULL), + m_bEndThread(FALSE), + m_nOwnerThreadID(0), + m_nOwnThreadID(0), +#pragma warning(disable : 4355) // turn off the + m_finalReleaseWnd(this), +#pragma warning (default : 4355) // Turn the warning back on + m_bHasOwnThread(FALSE) +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : Constructs the object and retrieves the thread ID of the Owners thread +// in order to be able to re-route later the releasing from the Own thread +// back to the Owners Thread. +{ + m_nOwnerThreadID = AfxGetThread()->m_nThreadID; +} + +COXOwnThread::~COXOwnThread() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : Destructs the object and waits until the own thread is terminated +{ + // The destructor can only be called from the same thread + // that called the constructor ! + ASSERT(AfxGetThread()->m_nThreadID==m_nOwnerThreadID); + m_finalReleaseWnd.DestroyWindow(); + EndThread(); + if (m_hCreatedEvent) CloseHandle(m_hCreatedEvent); + if (m_hThreadEvent) CloseHandle(m_hThreadEvent); + if (m_hEndEvent) CloseHandle(m_hEndEvent); +} + +BOOL COXOwnThread::EnableOwnThread() +{ + // This function can only be called from the same thread + // that called the constructor ! + ASSERT(AfxGetThread()->m_nThreadID==m_nOwnerThreadID); + + if (m_dispatchMarshaller.CheckStream() && m_finalReleaseWnd.m_hWnd) + { + + m_hCreatedEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + m_hThreadEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + m_hEndEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + + AfxBeginThread(StartThread, this); + + WaitForSingleObject(m_hCreatedEvent, INFINITE); + if (m_hCreateResult==S_OK) + { + // unmarshal an IUnknown from the scratch stream. if unmarshalling + // fails, it takes care of releasing the object inside the marshal-data + HRESULT hr = m_dispatchMarshaller.Unmarshal((void **)&m_pMarshalledPunk); + if (hr==S_OK) + m_bHasOwnThread = TRUE; + else + { + m_bEndThread=TRUE; + SetThreadEvent(); + WaitForSingleObject(m_hEndEvent, INFINITE); + } + } + } +#ifdef _DEBUG + if (!m_bHasOwnThread) + TRACE(_T("Can't enable own thread in 'COXOwnThreadCmdTarget::EnableOwnThread' \n'OLE_NO_OWNTRHEAD'-macro defined !\n")); +#endif + return m_bHasOwnThread; +} + +BOOL COXOwnThread::HasOwnThread() +{ + return m_bHasOwnThread; +} + +BOOL COXOwnThread::FinalReleaseRouter() +{ + if (AfxGetThread()->m_nThreadID==m_nOwnerThreadID) + return FALSE; + else if (AfxGetThread()->m_nThreadID==m_nOwnThreadID) + { + if (m_finalReleaseWnd.m_hWnd) + m_finalReleaseWnd.PostMessage(WMOX_FINAL_RELEASE); + } +#ifdef _DEBUG + else + { + ASSERT(FALSE); + TRACE(_T("Call from an illegal thread !\n")); + } +#endif + return TRUE; +} + +void COXOwnThread::SetThreadEvent() +{ + SetEvent(m_hThreadEvent); +} + +// protected function + +void COXOwnThread::Run() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : this function keeps the Own thread running until m_bEndThread is set +// to TRUE. +{ + MSG msg; + + m_nOwnThreadID = AfxGetThread()->m_nThreadID; + + // initialize COM + m_hCreateResult = CoInitialize(NULL); + if (m_hCreateResult==S_OK) + { + m_hCreateResult = m_dispatchMarshaller.Marshal(GetIDispatch(FALSE)); + SetEvent(m_hCreatedEvent); + + // apartment message/event loop + // (see SDK documentation for MsgWaitForMultipleObjects) + // here worker message loops last forever. in situations without a + // static number of worker threads, the loop could easily be terminated by + // WM_QUITs sent from the main thread which might manage the worker thread + // pool more carefully. + + if (m_hCreateResult==S_OK) + { + DWORD dwWaitResult; + + while (!m_bEndThread) + { + // wait for any message sent or posted to this queue + // or for one of the passed handles to become signaled + dwWaitResult = MsgWaitForMultipleObjects(1, &m_hThreadEvent, FALSE, INFINITE, QS_ALLINPUT); + + // result tells us the type of event we have: + // a message or a signaled handle + + // if there are one or more messages in the queue ... + if (dwWaitResult == (WAIT_OBJECT_0 + 1)) + { + // dispatch all of the messages in this next loop + // (here is where we'd check for WM_QUITs to end this + // worker thread if we wanted to) + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + DispatchMessage(&msg); + } + else if (!m_bEndThread) + OnThreadEvent(); + } + } + } + else + SetEvent(m_hCreatedEvent); + OnThreadDestroy(); + CoUninitialize(); + SetEvent(m_hEndEvent); +} + +UINT __cdecl COXOwnThread::StartThread(LPVOID pOwnThread) +// --- In : pOwnThread: the this pointer passed by the creating of the thread +// --- Out : none +// --- Returns : always zero +// --- Effect : this is a static function so we pass the control to a non static function (Run) +{ + ((COXOwnThread*) pOwnThread)->Run(); + return 0; +} + +LPUNKNOWN COXOwnThread::GetInterfaceHook(const void*) +// --- In : none +// --- Out : none +// --- Returns : the marshalled IDispatch handle if the call is done by the Owner thread +// --- Effect : This is a first chance hook function. +// If the call is done by the Own thread we return NULL (in this case +// we don't want to hook). If the call is done by the Owner thread +// we return the marshalled IDispatch handle. +{ + if (m_bHasOwnThread) + { + if (AfxGetThread()->m_nThreadID==m_nOwnerThreadID) + return m_pMarshalledPunk; +#ifdef _DEBUG + else if (AfxGetThread()->m_nThreadID!=m_nOwnThreadID) + { + ASSERT(FALSE); + TRACE(_T("Call from an illegal thread !\n")); + } +#endif + } + return NULL; +} + +void COXOwnThread::EndThread() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : This function is called by the destructor and ends +// the own thread. +{ + if (HasOwnThread()) + { + m_bEndThread=TRUE; + SetThreadEvent(); + WaitForSingleObject(m_hEndEvent, INFINITE); + } +} + +void COXOwnThread::OnThreadEvent() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : You can override this function, if you want to let the +// Own thread handle some specific things. +// If you call the SetThreadEvent from within the Owner thread +// then this notification will be handled by the Own thread. +{ +} + +void COXOwnThread::OnThreadDestroy() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : You can override this function, if you have some things +// to be cleaned up by the own thread. +{ +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThreadCmdTarget.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThreadCmdTarget.cpp new file mode 100644 index 0000000..7a4b5b5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXOwnThreadCmdTarget.cpp @@ -0,0 +1,93 @@ +// ========================================================================== +// Class Implementation : COXOwnThreadCmdTarget +// ========================================================================== + +// Source file : OXOwnThreadCmdTarget.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXOwnThreadCmdTarget.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNCREATE(COXOwnThreadCmdTarget, CCmdTarget) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// COXOwnThreadCmdTarget + + +COXOwnThreadCmdTarget::COXOwnThreadCmdTarget() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : constructs the object +{ +} + +COXOwnThreadCmdTarget::~COXOwnThreadCmdTarget() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : destructs the object +{ +} + +void COXOwnThreadCmdTarget::OnFinalRelease() +// --- In : none +// --- Out : none +// --- Returns : nothing +// --- Effect : will re-route the call if necessary +// It is important that the destruction of the object is done +// by the same thread that constructed the object. +// There for 'FinalReleaseRouter' will check if the call is made by +// the Owner thread or by the Own thread; +// In case it is made by the Own thread the call is re-routed and +// OnFinalRelease returns immediately +{ + if (FinalReleaseRouter()) + return; + CCmdTarget::OnFinalRelease(); +} + +LPDISPATCH COXOwnThreadCmdTarget::GetIDispatch(BOOL bAddRef) +{ + return CCmdTarget::GetIDispatch(bAddRef); +} + +BEGIN_MESSAGE_MAP(COXOwnThreadCmdTarget, CCmdTarget) + //{{AFX_MSG_MAP(COXOwnThreadCmdTarget) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BEGIN_DISPATCH_MAP(COXOwnThreadCmdTarget, CCmdTarget) + //{{AFX_DISPATCH_MAP(COXOwnThreadCmdTarget) + //}}AFX_DISPATCH_MAP +END_DISPATCH_MAP() + + +LPUNKNOWN COXOwnThreadCmdTarget::GetInterfaceHook(const void* CIID) +// --- In : Class ID of the wanted interface +// --- Out : none +// --- Returns : The interface handle +// --- Effect : Re-routes this function to the COXOwnThread base class +// which will determine to hook the marshalled IDispatch handle +// in case this call is done by the Owner thread +{ + return COXOwnThread::GetInterfaceHook(CIID); +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXPrvDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXPrvDlg.cpp new file mode 100644 index 0000000..2d76bcf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXPrvDlg.cpp @@ -0,0 +1,309 @@ +// ========================================================================== +// Class Implementation : COXPreviewDialog +// ========================================================================== + +// Source file : OXPrvDlg.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "OXCommon.h" +#include +#include "OXPrvDlg.h" // class specification +#include "path.h" + +#define MORE_THAN_ONE 0xffff + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + + +// Data members ------------------------------------------------------------- +// protected: + +COXPreviewDialog::COXPreview::COXPreview() +{ +} + +void COXPreviewDialog::COXPreview::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) +{ + CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC); + CRect rect(lpDrawItemStruct->rcItem); + + ((COXPreviewDialog*)GetParent())->OnPaintPreview(pDC, rect); +} + + +// private: + +// Member functions --------------------------------------------------------- +// public: + + +IMPLEMENT_DYNAMIC(COXPreviewDialog, CFileDialog) + + +COXPreviewDialog::COXPreviewDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, + LPCTSTR lpszFileName, DWORD dwFlags, + LPCTSTR lpszFilter, CWnd* pParentWnd) + : CFileDialog( bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, + lpszFilter, pParentWnd), + m_bPreview(FALSE), + m_bPrevPreview(FALSE) +{ + m_ofn.hInstance = AfxGetResourceHandle(); +#ifdef WIN32 + SetTemplate(_T("PREVIEWFILEOPEN"), _T("PREVIEWFILEOPEN95")); +#else + m_ofn.lpTemplateName = _T("PREVIEWFILEOPEN"); + m_ofn.Flags |= OFN_ENABLETEMPLATE; +#endif +} + +COXPreviewDialog::~COXPreviewDialog() +{ +} + +BEGIN_MESSAGE_MAP(COXPreviewDialog, CFileDialog) + ON_BN_CLICKED(IDC_PREVIEW, OnPreview) + ON_WM_PALETTECHANGED() + ON_WM_ACTIVATE() +END_MESSAGE_MAP() + +void COXPreviewDialog::DoDataExchange(CDataExchange* pDX) +{ + CFileDialog::DoDataExchange(pDX); + + DDX_Control(pDX, IDC_PREVIEW_FRAME, m_previewFrame); + DDX_Control(pDX, IDC_PREVIEW_WND, m_preview); + DDX_Check(pDX, IDC_PREVIEW, m_bPreview); +} + +// protected: +void COXPreviewDialog::OnNewFileSelect(const CString& /* sFilename */) +{ +} + +void COXPreviewDialog::OnPaintPreview(CDC* /* pDC */, const CRect& /* paintRect */) +{ +} + +void COXPreviewDialog::OnDoRealizePalette(CWnd* /* pFocusWnd */) +{ +} + +void COXPreviewDialog::OnLBSelChangedNotify(UINT /* nIDBox */, UINT /* iCurSel */, UINT /* nCode */) + // Notification for Windows 3.1 , Win32s, and Windows NT 3.51 +{ +#ifdef WIN32 + ASSERT(IsWin95() == FALSE); + if (IsWin95()) + return; +#endif + + CListBox fileLB; + int nFileCount = 0; + COXPathSpec pathPreview; + CWnd* pPreview = NULL; + CWnd* pFileList = NULL; + CWnd* pDirStatic = NULL; + + pPreview = GetDlgItem(IDC_PREVIEW); + pFileList = GetDlgItem(lst1); + if (pFileList != NULL) + { + fileLB.Attach(pFileList->m_hWnd); + nFileCount = fileLB.GetSelCount(); + } + + if (nFileCount > 1 && pPreview != NULL) + { + m_bPreview = FALSE; + pPreview->EnableWindow(FALSE); + } + else + pPreview->EnableWindow(TRUE); + + if (nFileCount == 1) + { + CString sDir; + CString sFileName; + int nIndex; + int nNum = 0; + + pDirStatic = GetDlgItem(stc1); + if (pDirStatic != NULL) +#ifdef WIN32 + nNum = pDirStatic->GetWindowText(sDir.GetBuffer(MAX_PATH), MAX_PATH); +#else + nNum = pDirStatic->GetWindowText(sDir.GetBuffer(_MAX_PATH), _MAX_PATH); +#endif + sDir.ReleaseBuffer(); + fileLB.GetSelItems(1, &nIndex); + fileLB.GetText(nIndex, sFileName); + pathPreview.SetDirectory(sDir); + pathPreview.SetFileName(sFileName); + m_sSelectedFile = pathPreview.GetPath(); + } + else + m_sSelectedFile.Empty(); + + fileLB.Detach(); + + UpdateData(FALSE); + + CheckFileSelection(); +} + + +void COXPreviewDialog::OnPreview() +{ + UpdateData(TRUE); + CheckFileSelection(); +} + +void COXPreviewDialog::CheckFileSelection() +{ + CString sFile; + + if ((m_sPrevSelectedFile.CompareNoCase(m_sSelectedFile) != 0) || + (m_bPrevPreview != m_bPreview)) + { + if (m_bPreview) + sFile = m_sSelectedFile; + + OnNewFileSelect(sFile); + UpdateData(FALSE); + + if (!m_sSelectedFile.IsEmpty() && m_bPreview) + { + m_preview.ShowWindow(SW_SHOW); + m_preview.Invalidate(FALSE); + } + else if (m_preview.m_hWnd) + m_preview.ShowWindow(SW_HIDE); + + m_sPrevSelectedFile = m_sSelectedFile; + m_bPrevPreview = m_bPreview; + } +} + +#ifdef WIN32 + +void COXPreviewDialog::OnFileNameChange() + // Notification for Windows 95 and Windows NT 4.0 +{ + ASSERT(IsWin95()); + if (!IsWin95()) + return; + + HWND hPreview; + int nFileCount; + CString sPreviewFile; + COXPathSpec pathPreview; + + GetDlgItem(IDC_PREVIEW, &hPreview); + + sPreviewFile = GetFilePath(); + pathPreview.SetPath(sPreviewFile); + if (sPreviewFile.IsEmpty()) + nFileCount = 0; + else if (pathPreview.Exists()) + nFileCount = 1; + else + nFileCount = MORE_THAN_ONE; + + if (nFileCount>1) + { + m_bPreview = FALSE; + ::EnableWindow(hPreview, FALSE); + } + else + ::EnableWindow(hPreview, TRUE); + + if (nFileCount==1) + m_sSelectedFile = pathPreview.GetPath(); + else + m_sSelectedFile.Empty(); + + UpdateData(FALSE); + + CheckFileSelection(); +} + +BOOL COXPreviewDialog::IsWin95() +{ + static BOOL bFound = FALSE; + static BOOL bWin95 = FALSE; + + if (!bFound) + { + OSVERSIONINFO info; + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + GetVersionEx(&info); + bFound = TRUE; + if (info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS || + (info.dwPlatformId == VER_PLATFORM_WIN32_NT && info.dwMajorVersion >= 4)) + bWin95 = TRUE; + } + + return bWin95; +} + +CString COXPreviewDialog::GetFilePath() const +{ + ASSERT(::IsWindow(m_hWnd)); + ASSERT(m_ofn.Flags & OFN_EXPLORER); + + CString strResult; + if (GetParent()->SendMessage(CDM_GETFILEPATH, (WPARAM)MAX_PATH, (LPARAM)strResult.GetBuffer(MAX_PATH)) < 0) + strResult.Empty(); + else + strResult.ReleaseBuffer(); + + return strResult; +} + +#endif + +// private: + + + +BOOL COXPreviewDialog::OnInitDialog() +{ + CFileDialog::OnInitDialog(); + + m_preview.ShowWindow(SW_HIDE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void COXPreviewDialog::OnPaletteChanged(CWnd* pFocusWnd) +{ + OnDoRealizePalette(pFocusWnd); +} + +void COXPreviewDialog::OnActivate(UINT nState, CWnd* /* pWndOther */, + BOOL /* bMinimized */) +{ + if (nState == WA_CLICKACTIVE || nState == WA_ACTIVE) + OnDoRealizePalette(this); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultObj.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultObj.cpp new file mode 100644 index 0000000..523e456 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultObj.cpp @@ -0,0 +1,214 @@ +// ========================================================================== +// Class Implementation : COXResultObj +// ========================================================================== + +// Source file : OXResultObj.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXResultObj.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXResultObj, CObject) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXResultObj::COXResultObj() + : + m_defaultPart() + { + ASSERT_VALID(this); + } + +COXResultObj::COXResultObj(const COXResultPart& resultPart) + : + m_defaultPart(resultPart) + { + ASSERT_VALID(&resultPart); + ASSERT_VALID(this); + } + +COXResultObj::COXResultObj(const COXResultObj& result) + : + m_defaultPart() + { + ASSERT_VALID(&result); + // ... This object is still empty, so appending the specified object + // is the same as copying it + Append(result); + ASSERT_VALID(this); + } + +COXResultObj& COXResultObj::operator=(const COXResultObj& result) + { + ASSERT_VALID(&result); + + if(this==&result) + return *this; + + // Empty the object and append the specified object + Empty(); + Append(result); + + ASSERT_VALID(this); + return *this; + } + +void COXResultObj::operator+=(const COXResultPart& resultPart) + { + ASSERT_VALID(this); + Add(resultPart); + ASSERT_VALID(this); + } + +void COXResultObj::operator+=(const COXResultObj& result) + { + ASSERT_VALID(&result); + Append(result); + ASSERT_VALID(this); + } + +COXResultPart& COXResultObj::GetDefaultPart() + { + ASSERT_VALID(this); + ASSERT_VALID(&m_defaultPart); + return m_defaultPart; + } + +COXResultPart COXResultObj::GetDefaultPart() const + { + ASSERT_VALID(this); + ASSERT_VALID(&m_defaultPart); + return m_defaultPart; + } + +void COXResultObj::SetDefaultPart(const COXResultPart& defaultPart) + { + ASSERT_VALID(this); + ASSERT_VALID(&defaultPart); + m_defaultPart = defaultPart; + ASSERT_VALID(this); + } + +void COXResultObj::Empty() + { + ASSERT_VALID(this); + RemoveAll(); + ASSERT_VALID(this); + } + +BOOL COXResultObj::IsEmpty() const + { + ASSERT_VALID(this); + return (GetSize() == 0); + } + +COXResultPart& COXResultObj::GetMostSeverePart() + { + ASSERT_VALID(this); + if (IsEmpty()) + { + // ... Trying to directly access an item while the list is empty, + // returning default part + return m_defaultPart; + } + + ASSERT(!IsEmpty()); + COXResultPart* pResultItem = &ElementAt(0); + for (int nIndex = 1; nIndex < GetSize(); nIndex++) + { + if (ElementAt(nIndex).GetSeverityEx() > pResultItem->GetSeverityEx()) + pResultItem = &ElementAt(nIndex); + } + + ASSERT_VALID(this); + ASSERT_KINDOF(COXResultPart, pResultItem); + ASSERT_VALID(pResultItem); + return *pResultItem; + } + +COXResultPart COXResultObj::GetMostSeverePart() const + { + ASSERT_VALID(this); + if (IsEmpty()) + { + // ... Trying to directly access an item while the list is empty, + // returning default item + return m_defaultPart; + } + + COXResultPart resultPart; + ASSERT(!IsEmpty()); + resultPart = GetAt(0); + for (int nIndex = 1; nIndex < GetSize(); nIndex++) + { + if (GetAt(nIndex).GetSeverityEx() > resultPart.GetSeverityEx()) + resultPart = GetAt(nIndex); + } + + ASSERT_VALID(this); + ASSERT_KINDOF(COXResultPart, &resultPart); + ASSERT_VALID(&resultPart); + return resultPart; + } + +COXResultPart* COXResultObj::operator->() + { + return &GetMostSeverePart(); + } + +void COXResultObj::Serialize(CArchive& ar) + { + ASSERT_VALID(this); + + // Call base class implementation first + CObject::Serialize(ar); + + // ... No extra members to serialize + + ASSERT_VALID(this); + } + +#ifdef _DEBUG +void COXResultObj::AssertValid() const + { + CObject::AssertValid(); + ASSERT_VALID(&m_defaultPart); + } + +void COXResultObj::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + } +#endif //_DEBUG + +COXResultObj::~COXResultObj() + { + } + +// protected: +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultPart.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultPart.cpp new file mode 100644 index 0000000..86542c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXResultPart.cpp @@ -0,0 +1,504 @@ +// ========================================================================== +// Class Implementation : COXResultPart +// ========================================================================== + +// Source file : OXResultPart.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXResultPart.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_SERIAL(COXResultPart, CObject, 1 | VERSIONABLE_SCHEMA) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +static TCHAR szUnknownError[] = _T("*** Unknown Error ***"); + +// --- Use the user default language for message retrieval +DWORD COXResultPart::m_dwLangID = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT); + +// Data members ------------------------------------------------------------- +// protected: + // COleDateTime m_creationTime; + // --- The timestamp that was made when this return items was created + + // HRESULT m_resultCode; + // --- The actual result code (actually a LONG) + + // CString m_sResultMessage; + // --- A message specifying the result + + // DWORD m_dwExtra; + // --- An extra data member to store user data + + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXResultPart::COXResultPart() + { + Initialize(); + ASSERT_VALID(this); + } + +COXResultPart::COXResultPart(HRESULT resultCode, ...) + { + va_list args; + + va_start(args, resultCode); + InitializeEx(resultCode, &args); + va_end(args); + + ASSERT_VALID(this); + } + +COXResultPart::COXResultPart(LPCTSTR pszModuleName, HRESULT resultCode, ...) + { + ASSERT(pszModuleName == NULL || AfxIsValidString(pszModuleName)); + va_list args; + + va_start(args, resultCode); + InitializeEx(pszModuleName, resultCode, &args); + va_end(args); + + ASSERT_VALID(this); + } + +BOOL COXResultPart::Initialize() + { + // ... Object does not have to be valid before this call + m_creationTime = COleDateTime::GetCurrentTime(); + m_resultCode = 0; + m_sResultMessage.Empty(); + m_dwExtra = 0; + + ASSERT_VALID(this); + return TRUE; + } + +BOOL COXResultPart::Initialize(HRESULT resultCode, ...) + { + // ... Object does not have to be valid before this call + va_list args; + + va_start(args, resultCode); + BOOL bSuccess = InitializeEx(resultCode, &args); + va_end(args); + + ASSERT_VALID(this); + return bSuccess; + } + +BOOL COXResultPart::Initialize(LPCTSTR pszModuleName, HRESULT resultCode, ...) + { + ASSERT(pszModuleName == NULL || AfxIsValidString(pszModuleName)); + // ... Object does not have to be valid before this call + va_list args; + + va_start(args, resultCode); + BOOL bSuccess = InitializeEx(pszModuleName, resultCode, &args); + va_end(args); + + ASSERT_VALID(this); + return bSuccess; + } + +BOOL COXResultPart::InitializeSpecial(LPCTSTR pszModuleName, DWORD dwResultCode, ...) + { + ASSERT(pszModuleName == NULL || AfxIsValidString(pszModuleName)); + // ... Object does not have to be valid before this call + va_list args; + + va_start(args, dwResultCode); + BOOL bSuccess = InitializeExSpecial(pszModuleName, dwResultCode, &args); + va_end(args); + + ASSERT_VALID(this); + return bSuccess; + } + +COXResultPart::COXResultPart(const COXResultPart& resultItem) + : + m_creationTime( resultItem.m_creationTime), + m_resultCode( resultItem.m_resultCode), + m_sResultMessage( resultItem.m_sResultMessage), + m_dwExtra( resultItem.m_dwExtra) + { + ASSERT_VALID(&resultItem); + ASSERT_VALID(this); + } + +HRESULT COXResultPart::GetResultCode() const + { + ASSERT_VALID(this); + return m_resultCode; + } + +void COXResultPart::SetResultCode(HRESULT resultCode) + { + ASSERT_VALID(this); + m_resultCode = resultCode; + ASSERT_VALID(this); + } + +CString COXResultPart::GetResultMessage() const + { + ASSERT_VALID(this); + return m_sResultMessage; + } + +void COXResultPart::SetResultMessage(CString sResultMessage) + { + ASSERT_VALID(this); + m_sResultMessage = sResultMessage; + ASSERT_VALID(this); + } + +void COXResultPart::AppendMessage(CString sMessage) + { + ASSERT_VALID(this); + m_sResultMessage += sMessage; + ASSERT_VALID(this); + } + +CString COXResultPart::BuildExtendedMessage() const + { + CString sExtendedMessage; + CString sMsg; + + sMsg.Format(_T("Creation time : %s\n"), m_creationTime.Format()); + sExtendedMessage += sMsg; + + sMsg.Format(_T("Code : 0x%8.8X (%1.1X.%1.1X.%1.1X.%1.1X.%1.1X.%3.3X.%4.4X)\n"), + m_resultCode, + HRESULT_SEVERITY(m_resultCode), // S - Severity - indicates success/fail + (((m_resultCode) >> 30) & 0x1), // R - reserved - NT's second severity bit + (((m_resultCode) >> 29) & 0x1), // C - reserved - NT's C field + (((m_resultCode) >> 28) & 0x1), // N - reserved - indicate a mapped NT status value + (((m_resultCode) >> 27) & 0x1), // r - reserved - message ids for display strings. + HRESULT_FACILITY(m_resultCode), // Facility - is the facility code + HRESULT_CODE(m_resultCode)); // Code - is the facility's status code + sExtendedMessage += sMsg; + + sMsg.Format(_T("Message : %s\n"), m_sResultMessage); + sExtendedMessage += sMsg; + + // Show extra data only when not 0 + if (m_dwExtra != 0) + { + sMsg.Format(_T("Extra data : %u = 0x%8.8X\n"), m_dwExtra, m_dwExtra); + sExtendedMessage += sMsg; + } + + return sExtendedMessage; + } + +COleDateTime COXResultPart::GetTimeStamp() const + { + return m_creationTime; + } + +void COXResultPart::SetTimeStamp(COleDateTime creationTime) + { + ASSERT(creationTime.GetStatus() == COleDateTime::valid); + ASSERT_VALID(this); + m_creationTime = creationTime; + ASSERT_VALID(this); + } + +DWORD COXResultPart::GetExtraData() const + { + ASSERT_VALID(this); + return m_dwExtra; + } + +void COXResultPart::SetExtraData(DWORD dwExtra) + { + ASSERT_VALID(this); + m_dwExtra = dwExtra; + ASSERT_VALID(this); + } + +COXResultPart& COXResultPart::operator=(const COXResultPart& resultItem) + { + if(this==&resultItem) + return *this; + + ASSERT_VALID(&resultItem); + m_creationTime = resultItem.m_creationTime; + m_resultCode = resultItem.m_resultCode; + m_sResultMessage = resultItem.m_sResultMessage; + m_dwExtra = resultItem.m_dwExtra; + ASSERT_VALID(this); + return *this; + } + +BOOL COXResultPart::Succeeded() const + { + ASSERT_VALID(this); + return SUCCEEDED(m_resultCode); + } + +BOOL COXResultPart::Failed() const + { + ASSERT_VALID(this); + return FAILED(m_resultCode); + } + +WORD COXResultPart::GetCode() const + { + ASSERT_VALID(this); + return (WORD)HRESULT_CODE(m_resultCode); + } + +WORD COXResultPart::GetFacility() const + { + ASSERT_VALID(this); + return (WORD)HRESULT_FACILITY(m_resultCode); + } + +WORD COXResultPart::GetSeverity() const + { + ASSERT_VALID(this); + return (WORD)HRESULT_SEVERITY(m_resultCode); + } + +WORD COXResultPart::GetSeverityEx() const + { + ASSERT_VALID(this); + return (WORD)((m_resultCode >> 30) & 0x3); + } + +void COXResultPart::Serialize(CArchive& ar) + { + ASSERT_VALID(this); + + // Call base class implementation first + CObject::Serialize(ar); + + // Then serailze members + if (ar.IsLoading()) + { + ar >> m_creationTime; + ar >> m_resultCode; + ar >> m_sResultMessage; + ar >> m_dwExtra; + } + else + { + ar << m_creationTime; + ar << m_resultCode; + ar << m_sResultMessage; + ar << m_dwExtra; + } + + ASSERT_VALID(this); + } + +#ifdef _DEBUG +void COXResultPart::AssertValid() const + { + CObject::AssertValid(); + ASSERT(m_creationTime.GetStatus() != COleDateTime::invalid); + } + +void COXResultPart::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + dc << "\nm_creationTime : " << m_creationTime; + dc << "\nm_resultCode : " << m_resultCode; + dc << "\nm_sResultMessage : " << m_sResultMessage; + dc << "\nm_dwExtra : " << m_dwExtra; + dc << "\n"; + } +#endif //_DEBUG + +COXResultPart::~COXResultPart() + { + } + +// protected: +BOOL COXResultPart::InitializeEx(HRESULT resultCode, va_list* pArgs) + // --- In : resultCode : Result code to use + // pArgs : Optional parameters used to build the message + // --- Out : + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result part object with the specified + // resultcode + // The appropriate message is retrieved from resource + // and for this the optional parameters may be used + { + // ... Object does not have to be valid before this call + m_creationTime = COleDateTime::GetCurrentTime(); + if (HRESULT_FACILITY(resultCode) == 0) + // ... No facility specified, we assume WIN32 code + m_resultCode = HRESULT_FROM_WIN32(resultCode); + else + m_resultCode = resultCode; + m_sResultMessage.Empty(); + m_dwExtra = 0; + BOOL bSuccess = RetrieveResultMessage(_T(""), m_resultCode, pArgs, m_sResultMessage); + + ASSERT_VALID(this); + return bSuccess; + } + +BOOL COXResultPart::InitializeEx(LPCTSTR pszModuleName, HRESULT resultCode, va_list* pArgs) + // --- In : pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // pArgs : Optional parameters used to build the message + // --- Out : + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result part object with the specified + // resultcode + // The appropriate message is retrieved from resource + // and for this the optional parameters may be used + { + ASSERT(pszModuleName == NULL || AfxIsValidString(pszModuleName)); + // ... Object does not have to be valid before this call + m_creationTime = COleDateTime::GetCurrentTime(); + if (HRESULT_FACILITY(resultCode) == 0) + // ... No facility specified, we assume WIN32 code + m_resultCode = HRESULT_FROM_WIN32(resultCode); + else + m_resultCode = resultCode; + m_sResultMessage.Empty(); + m_dwExtra = 0; + BOOL bSuccess = RetrieveResultMessage(CString(pszModuleName), m_resultCode, pArgs, m_sResultMessage); + + ASSERT_VALID(this); + return bSuccess; + } + +BOOL COXResultPart::InitializeExSpecial(LPCTSTR pszModuleName, DWORD dwResultCode, va_list* pArgs) + // --- In : pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // pArgs : Optional parameters used to build the message + // --- Out : + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result part object with the specified + // resultcode + // The appropriate message is retrieved from resource + // and for this the optional parameters may be used + { + ASSERT(pszModuleName == NULL || AfxIsValidString(pszModuleName)); + // ... Object does not have to be valid before this call + m_creationTime = COleDateTime::GetCurrentTime(); + m_resultCode = dwResultCode; + m_sResultMessage.Empty(); + m_dwExtra = 0; + BOOL bSuccess = RetrieveSpecialMessage(CString(pszModuleName), dwResultCode, pArgs, m_sResultMessage); + + ASSERT_VALID(this); + return bSuccess; + } + +BOOL COXResultPart::RetrieveSpecialMessage(CString sModuleName, DWORD dwResultCode, + va_list* pArgs, CString& sResultMessage) + // --- In : pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // pARgs : Optional parameters used to build the message + // --- Out : sResultMessage : The resulting message + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result part with the specified result + { + LPTSTR pszMsgBuf = NULL; + BOOL bUnknown = FALSE; + DWORD dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE; + HMODULE hModule = NULL; + + // ... Get the module handle if a module name is specified + if (!sModuleName.IsEmpty()) + { + hModule = ::GetModuleHandle(sModuleName); + dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS; + if (hModule == NULL) + TRACE(_T("COXResultPart::RetrieveResultMessage : Module '%s' not found\n"), (LPCTSTR)sModuleName); + } + + // ... Get the actual message + if (::FormatMessage(dwFlags, hModule, dwResultCode, m_dwLangID, + (LPTSTR)&pszMsgBuf, 0, pArgs) == 0) + { + TRACE2("COXResultPart::RetrieveResultMessage : No message was found for result code %i == 0x%8.8X\n", + dwResultCode, dwResultCode); + pszMsgBuf = szUnknownError; + bUnknown = TRUE; + } + sResultMessage = pszMsgBuf; + + // ... Clean up + if (!bUnknown) + LocalFree(pszMsgBuf); + + return !bUnknown; + } + +BOOL COXResultPart::RetrieveResultMessage(CString sModuleName, HRESULT resultCode, + va_list* pArgs, CString& sResultMessage) + // --- In : pszModuleName : Name of the module containing the message resource + // resultCode : Result code to use + // pARgs : Optional parameters used to build the message + // --- Out : sResultMessage : The resulting message + // --- Returns : Whether the message could be retrieved successfully + // --- Effect : Initializes a result part with the specified result + { + LPTSTR pszMsgBuf = NULL; + BOOL bUnknown = FALSE; + DWORD dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE; + HMODULE hModule = NULL; + + // ... Remove the facility part if FACILITY_WIN32 + if (HRESULT_FACILITY(resultCode) == FACILITY_WIN32) + { + resultCode = HRESULT_CODE(resultCode); + dwFlags &= ~FORMAT_MESSAGE_FROM_HMODULE; + } + + // ... Get the module handle if a module name is specified + if (!sModuleName.IsEmpty()) + { + hModule = ::GetModuleHandle(sModuleName); + dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE; + if (hModule == NULL) + TRACE(_T("COXResultPart::RetrieveResultMessage : Module '%s' not found\n"), (LPCTSTR)sModuleName); + } + + // ... Get the actual message + if (::FormatMessage(dwFlags, hModule, resultCode, m_dwLangID, + (LPTSTR)&pszMsgBuf, 0, pArgs) == 0) + { + TRACE2("COXResultPart::RetrieveResultMessage : No message was found for result code %i == 0x%8.8X\n", + resultCode, resultCode); + pszMsgBuf = szUnknownError; + bUnknown = TRUE; + } + sResultMessage = pszMsgBuf; + + // ... Clean up + if (!bUnknown) + LocalFree(pszMsgBuf); + + return !bUnknown; + } + +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCCFG.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCCFG.CPP new file mode 100644 index 0000000..ceba9a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCCFG.CPP @@ -0,0 +1,214 @@ +// ========================================================================== +// Class Implementation : COXSerialCommConfig +// ========================================================================== + +// Source file : oxsccfg.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +//////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXSCCFG.H" +#include "OXSCSTP.H" +#include "OXSRLZR.H" +#include "OXSCCNST.H" + +//private headers +#include "OXRSERCM.H" + +IMPLEMENT_SERIAL(COXSerialCommConfig, CObject, 1) + + +COXSerialCommConfig::COXSerialCommConfig() : +m_nPortId(0), +m_nBaudRate(CBR_9600), +m_nByteSize(8), +m_nParity(NOPARITY), +m_nStopBits(ONESTOPBIT), +m_eFlowControl(NONE), +m_nSizeReceivingQueue(DefaultSizeReceivingQueue), +m_nSizeTransmissionQueue(DefaultSizeTransmissionQueue), +m_nCdTimeout(DefaultCdTimeout), +m_nCtsTimeout(DefaultCtsTimeout), +m_nDsrTimeout(DefaultDsrTimeout) + { + } + +COXSerialCommConfig::COXSerialCommConfig(COXSerialCommConfig& config) + { + m_nPortId=config.m_nPortId; + m_nBaudRate=config.m_nBaudRate; + m_nByteSize=config.m_nByteSize; + m_nParity=config.m_nParity; + m_nStopBits=config.m_nStopBits; + m_eFlowControl=config.m_eFlowControl; + + m_nSizeReceivingQueue=config.m_nSizeReceivingQueue; + m_nSizeTransmissionQueue=config.m_nSizeTransmissionQueue; + m_nCdTimeout=config.m_nCdTimeout; + + m_nCtsTimeout=config.m_nCtsTimeout; + m_nDsrTimeout=config.m_nDsrTimeout; + } + +CString COXSerialCommConfig::GetCommName() const + { + CString sComX; + +// sComX.Format(_T("COM%c"), (char) (m_nPortId + '1')); + sComX.Format(_T("COM%d"), m_nPortId+1); + return sComX; + } + +int COXSerialCommConfig::DoConfigDialog(CString sTitle /* = NULL */) + { + int nResult; + COXSerialCommSetup dlg(sTitle); + + dlg.m_config = *this; + if ((nResult = dlg.DoModal()) == IDOK) + *this = dlg.m_config; + return nResult; + } + +BOOL COXSerialCommConfig::IsPortAvailable() const + { + CString sComX; + HANDLE hCommDevice; + +/* if (m_nPortId > 8) + return FALSE;*/ +// sComX.Format(_T("COM%c"), (char)m_nPortId + '1'); + sComX.Format(_T("COM%d"), m_nPortId+1); + if ((hCommDevice =::CreateFile(sComX, + GENERIC_READ | + GENERIC_WRITE, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | + FILE_FLAG_SEQUENTIAL_SCAN, + NULL)) + != INVALID_HANDLE_VALUE) + { + CloseHandle(hCommDevice); + return TRUE; + } + TRACE1("COXSerialCommConfig::IsPortAvailable(): port %s unavailable",sComX); + return FALSE; + } + +BOOL COXSerialCommConfig::Load(CString sFileName) + { + COXSerializer serializer; + BOOL bRetVal = TRUE; + + if (sFileName.IsEmpty()) + sFileName.LoadString(IDS_DEFAULTFILE); + VERIFY(serializer.Initialize(sFileName, this)); + if (!serializer.Load(FALSE)) + { + if (serializer.m_fileException.m_cause == CFileException::fileNotFound) + { + CString sString; + sString.Format(IDS_MSG_DEFAULT_CONFIG, GetCommName()); + AfxMessageBox(sString, MB_OK | MB_ICONINFORMATION); + } + else + { + if (!serializer.Load()) + { + CString sString; + sString.Format(IDS_MSG_BAD_CONFIG, GetCommName()); + AfxMessageBox(sString, MB_OK | MB_ICONINFORMATION); + bRetVal = FALSE; + } + } + serializer.Save(); + } + return bRetVal; + } + +BOOL COXSerialCommConfig::Save(CString sFileName) + { + COXSerializer serializer; + BOOL bRetVal = TRUE; + + if (sFileName.IsEmpty()) + sFileName.LoadString(IDS_DEFAULTFILE); + VERIFY(serializer.Initialize(sFileName,this)); + if (!serializer.Save()) + { + CString sString; + sString.Format(IDS_MSG_NO_SAVE, GetCommName()); + AfxMessageBox(sString, MB_OK | MB_ICONINFORMATION); + bRetVal = FALSE; + } + return bRetVal; + } + +COXSerialCommConfig& COXSerialCommConfig::operator = (const COXSerialCommConfig& config) + { + m_nPortId = config.m_nPortId; + m_nBaudRate = config.m_nBaudRate; + m_nByteSize = config.m_nByteSize; + m_nParity= config.m_nParity; + m_nStopBits = config.m_nStopBits; + m_eFlowControl = config.m_eFlowControl; + + m_nSizeReceivingQueue = config.m_nSizeReceivingQueue; + m_nSizeTransmissionQueue = config.m_nSizeTransmissionQueue; + m_nCdTimeout = config.m_nCdTimeout; + m_nCtsTimeout = config.m_nCtsTimeout; + m_nDsrTimeout = config.m_nDsrTimeout; + + return *this; + } + +// protected: + +void COXSerialCommConfig::Serialize(CArchive& ar) +// --- In: ar: the archive this object has to serialize to or from +// --- Out: none +// --- Returns: none +// --- Effect: reading or writing to the archive depending of +// the read/write state of the archive + { + CObject::Serialize(ar); + + if (ar.IsStoring()) + { + ar << m_nPortId; + ar << (WORD)m_nBaudRate; + ar << m_nByteSize; + ar << m_nParity; + ar << m_nStopBits; + ar << (WORD)m_eFlowControl; + ar << (WORD)m_nSizeReceivingQueue; + ar << (WORD)m_nSizeTransmissionQueue; + ar << (WORD)m_nCdTimeout; + ar << (WORD)m_nCtsTimeout; + ar << (WORD)m_nDsrTimeout; + } + else + { + ar >> m_nPortId; + WORD tmp; + ar >> tmp; m_nBaudRate = (UINT) tmp; + ar >> m_nByteSize; + ar >> m_nParity; + ar >> m_nStopBits; + ar >> tmp; m_eFlowControl = (EFlowControl) tmp; + ar >> tmp; m_nSizeReceivingQueue = (UINT) tmp; + ar >> tmp; m_nSizeTransmissionQueue = (UINT) tmp; + ar >> tmp; m_nCdTimeout = (UINT) tmp; + ar >> tmp; m_nCtsTimeout = (UINT) tmp; + ar >> tmp; m_nDsrTimeout = (UINT) tmp; + } + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCEXCP.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCEXCP.CPP new file mode 100644 index 0000000..c9c46c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCEXCP.CPP @@ -0,0 +1,119 @@ +#include "stdafx.h" +#include "OXSCEXCP.H" +#include "OXRSERCM.H" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define new DEBUG_NEW + +#ifdef _DEBUG +// character strings to use for dumping COXSerialCommException + +static const LPCTSTR rgszCOXSerialCommExceptionCause[] = + { + _T("none"), + _T("notAvailable"), + _T("breakDetect"), + _T("rxTimeout"), + _T("ctsTimeout"), + _T("dsrTimeout"), + _T("cdTimeout"), + _T("frameError"), + _T("parityError"), + _T("overrunError"), + _T("rxQueueOverflow"), + _T("txQueueFull"), + _T("wmQuitReceived"), + _T("ioError"), + _T("modeError") + }; +static const TCHAR szUnknown[] = _T("unknown"); +#endif + +COXSerialCommException::COXSerialCommException(int cause /*= none*/, LPCTSTR lpszSerialCommName /* = NULL */) : +CFileException(CFileException::generic, -1, lpszSerialCommName), +m_ext_cause(cause) + { + } + +COXSerialCommException::COXSerialCommException(COXSerialCommException& other) : + CFileException(other.m_cause, -1, m_strFileName), + m_ext_cause(other.m_ext_cause) + { + } + +COXSerialCommException& COXSerialCommException::operator = (const COXSerialCommException& other) + { + m_cause = other.m_cause; + m_ext_cause = other.m_ext_cause; + m_lOsError = other.m_lOsError; + m_strFileName = other.m_strFileName; + return *this; + } + + +BOOL COXSerialCommException::GetErrorMessage(LPTSTR lpszError, UINT nMaxError, + PUINT pnHelpContext) + { + ASSERT(lpszError != NULL && AfxIsValidString(lpszError, nMaxError)); + + if (pnHelpContext != NULL) + *pnHelpContext = m_ext_cause + IDS_SERIAL_NONE; + + // we can use CString here; archive errors aren't caused + // by being out of memory. + + CString sMessage; + CString sSerialCommName = m_strFileName; + if (sSerialCommName.IsEmpty()) + sSerialCommName.LoadString(IDS_SERIAL_NONAME); + AfxFormatString1(sMessage, + m_ext_cause + IDS_SERIAL_NONE, sSerialCommName); + lstrcpyn(lpszError, sMessage, nMaxError); + + return TRUE; + } + + + ///////////////////////////////////////////////////////////////////////////// + // CArchiveException + +#ifdef _DEBUG +void COXSerialCommException::Dump(CDumpContext& dc) const + { + CFileException::Dump(dc); + + dc << _T(" m_ext_cause = "); + if (m_ext_cause >= 0 && m_ext_cause < (sizeof(rgszCOXSerialCommExceptionCause)/sizeof(LPCTSTR))) + dc << rgszCOXSerialCommExceptionCause[m_ext_cause]; + else + dc << szUnknown; + + dc << _T("\n"); + } +#endif //_DEBUG + +void AFXAPI AfxThrowSerialCommException(int cause, + LPCTSTR lpszSerialCommName /* = NULL */) + { +#ifdef _DEBUG + LPCTSTR lpsz; + if (cause >= 0 && cause < (sizeof(rgszCOXSerialCommExceptionCause)/sizeof(LPCTSTR))) + lpsz = rgszCOXSerialCommExceptionCause[cause]; + else + lpsz = szUnknown; + TRACE1("COXSerialComm exception: %hs.\n", lpsz); + +#endif //_DEBUG + + THROW(new COXSerialCommException(cause, lpszSerialCommName)); + } + +IMPLEMENT_DYNAMIC(COXSerialCommException, CException) + +///////////////////////////////////////////////////////////////////////////// + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCFILE.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCFILE.CPP new file mode 100644 index 0000000..86ccb50 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCFILE.CPP @@ -0,0 +1,458 @@ +// ========================================================================== +// Class Implementation : COXSerialCommFile +// ========================================================================== + +// Source file : oxscfile.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXSCFILE.H" +#include "OXSCCNST.H" + + +//private headers +#include "OXRSERCM.H" + + +COXSerialCommFile::COXSerialCommFile() : +m_hCommDevice(NULL) + { + m_bCloseOnDelete = TRUE; + } + +COXSerialCommFile::~COXSerialCommFile() + { + if (m_hCommDevice) + Close(); + } + +BOOL COXSerialCommFile::Open(const COXSerialCommConfig& config, + COXSerialCommException* pException /* = NULL */) + { + if (pException) + { + pException->m_ext_cause = COXSerialCommException::none; + pException->m_strFileName = config.GetCommName(); + } + + if (m_hCommDevice) + Close(); + + if (!config.IsPortAvailable()) + { + if (pException) + pException->m_ext_cause = COXSerialCommException::notAvailable; + return FALSE; + } + + VERIFY ( (m_hCommDevice =::CreateFile(config.GetCommName(), + GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL)) != + INVALID_HANDLE_VALUE); + + if (m_hCommDevice == INVALID_HANDLE_VALUE) + { + if (pException) + pException->m_ext_cause = COXSerialCommException::notAvailable; + return FALSE; + } + + ::SetupComm(m_hCommDevice, config.m_nSizeReceivingQueue, + config.m_nSizeTransmissionQueue); + + DCB dcb; + ::GetCommState(m_hCommDevice, &dcb); + dcb.BaudRate = config.m_nBaudRate; + dcb.ByteSize = config.m_nByteSize; + dcb.Parity = config.m_nParity; + dcb.StopBits = config.m_nStopBits; + dcb.fBinary = TRUE; + dcb.fParity = TRUE; + dcb.fNull = FALSE; + if (config.m_eFlowControl == COXSerialCommConfig::HARDWARE) + { + dcb.fOutxCtsFlow = TRUE; + dcb.fOutxDsrFlow = TRUE; + dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; + dcb.fDsrSensitivity = TRUE; + dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; + } + else + { + dcb.fOutxCtsFlow = FALSE; + dcb.fOutxDsrFlow = FALSE; + dcb.fDtrControl = DTR_CONTROL_ENABLE; + dcb.fDsrSensitivity = FALSE; + dcb.fRtsControl = RTS_CONTROL_ENABLE; + } + dcb.XonLim = 1; + dcb.XoffLim = (WORD)(config.m_nSizeReceivingQueue / 2); + if (config.m_eFlowControl == COXSerialCommConfig::XON_XOFF) + { + dcb.fOutX = TRUE; + dcb.fInX = TRUE; + } + else + { + dcb.fOutX = FALSE; + dcb.fInX = FALSE; + } + dcb.fAbortOnError = TRUE; + + VERIFY ( ::SetCommState(m_hCommDevice, &dcb) != FALSE ); + COMSTAT tmp; + + + GetCommException(tmp); + SetTimeouts(config.m_nDsrTimeout, config.m_nCtsTimeout); + + PurgeRx(); + PurgeTx(); + + m_strFileName = config.GetCommName(); + + return TRUE; + } + +BOOL COXSerialCommFile::SetTimeouts(DWORD dwRxTimeout/*=5000*/, DWORD dwTxTimeout/*=5000*/) + { + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::SetTimeouts': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + + COMMTIMEOUTS commTimeOuts ; + commTimeOuts.ReadIntervalTimeout = dwRxTimeout; + commTimeOuts.ReadTotalTimeoutMultiplier = 1; + commTimeOuts.ReadTotalTimeoutConstant = dwRxTimeout; + commTimeOuts.WriteTotalTimeoutMultiplier = 1; + commTimeOuts.WriteTotalTimeoutConstant = dwTxTimeout; + + SetCommTimeouts( m_hCommDevice, &commTimeOuts ) ; + return TRUE; + } + + +void COXSerialCommFile::Close() + { + if (m_hCommDevice) + { + PurgeRx(); + PurgeTx(); + CloseHandle(m_hCommDevice); + m_hCommDevice = NULL; + } + } + +UINT COXSerialCommFile::Read( void* lpBuf, UINT nCount ) + { + DWORD dwByteRead = 0; + + if (m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::Read': NULL handle !")); + ASSERT(FALSE); + return 0; + } + + if (!ReadFile(m_hCommDevice, lpBuf, nCount, &dwByteRead, NULL)) + { + if (GetLastError() == ERROR_HANDLE_EOF) + AfxThrowSerialCommException(COXSerialCommException::rxTimeout, m_strFileName); + else + { + COMSTAT comstat; + AfxThrowSerialCommException(GetCommException(comstat), m_strFileName); + } + } +/* else + { + if (dwByteRead != (DWORD)nCount) + { + AfxThrowSerialCommException(COXSerialCommException::rxTimeout, m_strFileName); + } + } +*/ + return dwByteRead; + } + +void COXSerialCommFile::Write( const void* lpBuf, UINT nCount ) + { + DWORD dwByteWritten; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::Write': NULL handle !")); + ASSERT(FALSE); + return; + } + + WriteFile(m_hCommDevice, lpBuf, nCount, &dwByteWritten, NULL); + if (dwByteWritten != nCount) + { + COMSTAT tmp; + AfxThrowSerialCommException(GetCommException(tmp), m_strFileName); + } + } + +void COXSerialCommFile::PurgeRx() + { + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::PurgeRx': NULL handle !")); + ASSERT(FALSE); + return; + } + PurgeComm(m_hCommDevice, PURGE_RXABORT | PURGE_RXCLEAR); + } + +void COXSerialCommFile::PurgeTx() + { + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::PurgeTx': NULL handle !")); + ASSERT(FALSE); + return; + } + PurgeComm(m_hCommDevice, PURGE_TXABORT | PURGE_TXCLEAR); + } + +BOOL COXSerialCommFile::IsTxQueueEmpty() const + { + COMSTAT comstat; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::IsTxQueueEmpty': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommException(comstat); + return (comstat.cbOutQue == 0) ? TRUE : FALSE; + } + +BOOL COXSerialCommFile::IsRxQueueEmpty() const + { + COMSTAT comstat; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::IsRxQueueEmpty': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommException(comstat); + return (comstat.cbInQue == 0) ? TRUE : FALSE; + } + +void COXSerialCommFile::SetDTR(BOOL bValue) + { + int nFunction; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::SetDTR': NULL handle !")); + ASSERT(FALSE); + return; + } + nFunction = (bValue == TRUE) ? SETDTR : CLRDTR; + ::EscapeCommFunction(m_hCommDevice, nFunction); + } + +void COXSerialCommFile::SetRTS(BOOL bValue) + { + int nFunction; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::SetRTS': NULL handle !")); + ASSERT(FALSE); + return; + } + nFunction = (bValue == TRUE) ? SETRTS : CLRRTS; + ::EscapeCommFunction(m_hCommDevice, nFunction); + } + +BOOL COXSerialCommFile::GetCTS() const + { + DWORD dwPortStatus; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::GetCTS': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommModemStatus(m_hCommDevice, &dwPortStatus); + return ( (dwPortStatus & MS_CTS_ON) ? TRUE : FALSE); + } + +BOOL COXSerialCommFile::GetDSR() const + { + DWORD dwPortStatus; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::GetDSR': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommModemStatus(m_hCommDevice, &dwPortStatus); + return ( (dwPortStatus & MS_DSR_ON) ? TRUE : FALSE); + } + +BOOL COXSerialCommFile::GetCD() const + { + DWORD dwPortStatus; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::GetCD': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommModemStatus(m_hCommDevice, &dwPortStatus); + return ( (dwPortStatus & MS_RLSD_ON) ? TRUE : FALSE); + } + +BOOL COXSerialCommFile::GetRI() const + { + DWORD dwPortStatus; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::GetRI': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + GetCommModemStatus(m_hCommDevice, &dwPortStatus); + return ( (dwPortStatus & MS_RING_ON) ? TRUE : FALSE); + } + +COXSerialCommException::VALUE COXSerialCommFile::GetCommException(COMSTAT& comstat) const + { + COXSerialCommException::VALUE exception = COXSerialCommException::none; + DWORD dwError = 0; + + if ( m_hCommDevice == NULL ) + { + TRACE(_T("'COXSerialCommFile::GetCommException': NULL handle !")); + ASSERT(FALSE); + return COXSerialCommException::ioError; + } + + VERIFY (::ClearCommError(m_hCommDevice, &dwError, &comstat)); + if (dwError != 0) + { + if (dwError & CE_RXPARITY) + exception = COXSerialCommException::parityError; + else if (dwError & CE_OVERRUN) + exception = COXSerialCommException::overrunError; + else if (dwError & CE_FRAME) + exception = COXSerialCommException::frameError; + else if (dwError & CE_BREAK) + exception = COXSerialCommException::breakDetect; + else if (dwError & CE_IOE) + exception = COXSerialCommException::ioError; + else if (dwError & CE_MODE) + exception = COXSerialCommException::modeError; + else if (dwError & CE_RXOVER) + exception = COXSerialCommException::rxQueueOverflow; + else if (dwError & CE_TXFULL) + exception = COXSerialCommException::txQueueFull; + else + exception = COXSerialCommException::none; + } + return exception; + } + + +BOOL COXSerialCommFile::SetCommMask(const DWORD dwEventMask) +{ + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::SetCommMask': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + + return ::SetCommMask(m_hCommDevice, dwEventMask); +} + +BOOL COXSerialCommFile::GetCommMask(DWORD& dwEventMask) const +{ + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::GetCommMask': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + + return ::GetCommMask(m_hCommDevice, &dwEventMask); +} + +BOOL COXSerialCommFile::GetCommProperties(LPCOMMPROP lpCommProp) const +{ + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::GetCommProperties': NULL handle !")); + ASSERT(FALSE); + return FALSE; + } + + return ::GetCommProperties(m_hCommDevice, lpCommProp); +} + +UINT COXSerialCommFile::GetBytesToRead() const +{ + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::GetBytesToRead': NULL handle !")); + ASSERT(FALSE); + return 0; + } + + COXSerialCommException::VALUE exception = COXSerialCommException::none; + + COMSTAT cs; + ::ZeroMemory((void*)&cs,sizeof(cs)); + if ((exception = GetCommException(cs)) != COXSerialCommException::none) + { + AfxThrowSerialCommException(exception, m_strFileName); + return 0; + } + + return cs.cbInQue; +} + +UINT COXSerialCommFile::GetBytesToWrite() const +{ + if (m_hCommDevice == NULL) + { + TRACE(_T("'COXSerialCommFile::GetBytesToWrite': NULL handle !")); + ASSERT(FALSE); + return 0; + } + + COXSerialCommException::VALUE exception = COXSerialCommException::none; + + COMSTAT cs; + ::ZeroMemory((void*)&cs,sizeof(cs)); + if ((exception = GetCommException(cs)) != COXSerialCommException::none) + { + AfxThrowSerialCommException(exception, m_strFileName); + return 0; + } + + return cs.cbOutQue; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCSTP.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCSTP.CPP new file mode 100644 index 0000000..15d5570 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSCSTP.CPP @@ -0,0 +1,312 @@ +// ========================================================================== +// Class Implementation : COXSerialCommSetup +// ========================================================================== + +// Source file : oxscstp.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXSCSTP.H" +#include "OXSCCNST.H" + +COXSerialCommSetup::COXSerialCommSetup(CString sTitle /*= _T("")*/, CWnd* pParent /*=NULL*/) + : CDialog(COXSerialCommSetup::IDD, pParent), + m_sCommTitle(sTitle) + { + //{{AFX_DATA_INIT(COXSerialCommSetup) + m_sBaudRate = _T(""); + m_sDataBit = _T(""); + m_sParity = _T(""); + m_sPort = _T(""); + m_sStopBit = _T(""); + m_sFlowControl = _T(""); + //}}AFX_DATA_INIT + } + +void COXSerialCommSetup::DoDataExchange(CDataExchange* pDX) + { + if (!pDX->m_bSaveAndValidate) + { // if loading + m_sPort = _T("Com x"); + m_sPort.SetAt(4, (TCHAR)(m_config.m_nPortId + _T('1'))); + m_sBaudRate = BaudRateToString(m_config.m_nBaudRate); + m_sDataBit = _T("x"); + m_sDataBit.SetAt(0, (TCHAR)(m_config.m_nByteSize + _T('0'))); + m_sParity = ParityToString(m_config.m_nParity); + m_sStopBit = (m_config.m_nStopBits == ONESTOPBIT) ? _T("1") : _T("2"); + m_sFlowControl = FlowControlToString(m_config.m_eFlowControl); + } + + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COXSerialCommSetup) + DDX_CBString(pDX, IDC_BAUDRATE, m_sBaudRate); + DDX_CBString(pDX, IDC_DATABIT, m_sDataBit); + DDX_CBString(pDX, IDC_PARITY, m_sParity); + DDX_CBString(pDX, IDC_PORT, m_sPort); + DDX_CBString(pDX, IDC_STOPBIT, m_sStopBit); + DDX_CBString(pDX, IDC_FLOWCONTROL, m_sFlowControl); + //}}AFX_DATA_MAP + + if (pDX->m_bSaveAndValidate) + { // if saving + m_config.m_nPortId = (BYTE) (m_sPort[4] - _T('1')); + m_config.m_nBaudRate = BaudRateToVal(m_sBaudRate); + m_config.m_nByteSize = (BYTE) (m_sDataBit[0] - _T('0')); + m_config.m_nParity = ParityToVal(m_sParity); + m_config.m_nStopBits = (m_sStopBit == _T("1")) ? (BYTE)ONESTOPBIT : (BYTE)TWOSTOPBITS; + m_config.m_eFlowControl = FlowControlToVal(m_sFlowControl); + } + } + +BEGIN_MESSAGE_MAP(COXSerialCommSetup, CDialog) +//{{AFX_MSG_MAP(COXSerialCommSetup) +//}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +BOOL COXSerialCommSetup::OnInitDialog() + { + CDialog::OnInitDialog(); + + if (!m_sCommTitle.IsEmpty()) + SetWindowText(m_sCommTitle); + + CenterWindow(); + return TRUE; + } + +void COXSerialCommSetup::OnOK() + { + if (UpdateData(TRUE)) + { + if (!m_config.IsPortAvailable()) + { + AfxMessageBox(IDS_MSG_NO_PORT_AVAILABLE, MB_OK | MB_ICONSTOP); + CWnd* pPort = GetDlgItem(IDC_PORT); ASSERT (pPort != NULL); + pPort->SetFocus(); + } + else + CDialog::OnOK(); + } + } + +CString COXSerialCommSetup::BaudRateToString(UINT nVal) + { + CString sString; + + if (HIBYTE(nVal) != 0xff) + { + sString.Format(_T("%d"), nVal); + } + else + { + switch (nVal) + { + case CBR_110: + sString.LoadString(IDS_110); + break; + case CBR_300: + sString.LoadString(IDS_300); + break; + case CBR_600: + sString.LoadString(IDS_600); + break; + case CBR_1200: + sString.LoadString(IDS_1200); + break; + case CBR_2400: + sString.LoadString(IDS_2400); + break; + case CBR_4800: + sString.LoadString(IDS_4800); + break; + case CBR_9600: + sString.LoadString(IDS_9600); + break; + case CBR_14400: + sString.LoadString(IDS_14400); + ASSERT(FALSE); // not to be used (win3.1 bug!) + break; + case CBR_19200: + sString.LoadString(IDS_19200); + break; + case CBR_38400: + sString.LoadString(IDS_38400); + break; + case CBR_56000: + sString.LoadString(IDS_56000); + break; +#ifdef WIN32 + case CBR_57600: + sString.LoadString(IDS_57600); + break; + case CBR_115200: + sString.LoadString(IDS_115200); + break; +#endif + case CBR_128000: + sString.LoadString(IDS_128000); + break; + case CBR_256000: + sString.LoadString(IDS_256000); + break; + default: + sString.LoadString(IDS_9600); + ASSERT(FALSE); + break; + } + } + return sString; + } + +CString COXSerialCommSetup::ParityToString(BYTE nVal) + { + CString sString; + + switch (nVal) + { + case NOPARITY: + sString.LoadString(IDS_NOPARITY); + break; + case ODDPARITY: + sString.LoadString(IDS_ODD); + break; + case EVENPARITY: + sString.LoadString(IDS_EVEN); + break; + case MARKPARITY: + sString.LoadString(IDS_MARK); + break; + case SPACEPARITY: + sString.LoadString(IDS_SPACE); + break; + default: + sString.LoadString(IDS_EVEN); + ASSERT(FALSE); + break; + } + return sString; + } + +CString COXSerialCommSetup::FlowControlToString(COXSerialCommConfig::EFlowControl eVal) + { + CString sString; + + switch (eVal) + { + case COXSerialCommConfig::NONE: + sString.LoadString(IDS_NONE); + break; + case COXSerialCommConfig::HARDWARE: + sString.LoadString(IDS_HARDWARE); + break; + case COXSerialCommConfig::XON_XOFF: + sString.LoadString(IDS_XONXOFF); + break; + default: + sString.LoadString(IDS_NONE); + ASSERT(FALSE); + break; + } + return sString; + } + +UINT COXSerialCommSetup::BaudRateToVal(CString sString) + { + CString sTemp; + UINT nRetVal; + + sTemp.LoadString(IDS_14400); + if (sString == sTemp) + nRetVal = 14400; // to avoid windows 3.1 bug! + else { + if (sTemp.LoadString(IDS_110) && sString == sTemp) + nRetVal = CBR_110; + else if (sTemp.LoadString(IDS_300) && sString == sTemp) + nRetVal = CBR_300; + else if (sTemp.LoadString(IDS_600) && sString == sTemp) + nRetVal = CBR_600; + else if (sTemp.LoadString(IDS_1200) && sString == sTemp) + nRetVal = CBR_1200; + else if (sTemp.LoadString(IDS_2400) && sString == sTemp) + nRetVal = CBR_2400; + else if (sTemp.LoadString(IDS_4800) && sString == sTemp) + nRetVal = CBR_4800; + else if (sTemp.LoadString(IDS_9600) && sString == sTemp) + nRetVal = CBR_9600; + else if (sTemp.LoadString(IDS_14400) && sString == sTemp) + nRetVal = CBR_14400; + else if (sTemp.LoadString(IDS_19200) && sString == sTemp) + nRetVal = CBR_19200; + else if (sTemp.LoadString(IDS_38400) && sString == sTemp) + nRetVal = CBR_38400; + else if (sTemp.LoadString(IDS_56000) && sString == sTemp) + nRetVal = CBR_56000; +#ifdef WIN32 + else if (sTemp.LoadString(IDS_57600) && sString == sTemp) + nRetVal = CBR_57600; + else if (sTemp.LoadString(IDS_115200) && sString == sTemp) + nRetVal = CBR_115200; +#endif + else if (sTemp.LoadString(IDS_128000) && sString == sTemp) + nRetVal = CBR_128000; + else if (sTemp.LoadString(IDS_256000) && sString == sTemp) + nRetVal = CBR_256000; + else + { + ASSERT(FALSE); + nRetVal = CBR_9600; + } + } + return nRetVal; + } + +BYTE COXSerialCommSetup::ParityToVal(CString sString) + { + CString sTemp; + BYTE nRetVal; + + if (sTemp.LoadString(IDS_NOPARITY) && sString == sTemp) + nRetVal = NOPARITY; + else if (sTemp.LoadString(IDS_ODD) && sString == sTemp) + nRetVal = ODDPARITY; + else if (sTemp.LoadString(IDS_EVEN) && sString == sTemp) + nRetVal = EVENPARITY; + else if (sTemp.LoadString(IDS_MARK) && sString == sTemp) + nRetVal = MARKPARITY; + else if (sTemp.LoadString(IDS_SPACE) && sString == sTemp) + nRetVal = SPACEPARITY; + else + { + ASSERT(FALSE); + nRetVal = EVENPARITY; + } + return nRetVal; + } + +COXSerialCommConfig::EFlowControl COXSerialCommSetup::FlowControlToVal(CString sString) + { + CString sTemp; + COXSerialCommConfig::EFlowControl eRetVal; + + if (sTemp.LoadString(IDS_NONE) && sString == sTemp) + eRetVal = COXSerialCommConfig::NONE; + else if (sTemp.LoadString(IDS_HARDWARE) && sString == sTemp) + eRetVal = COXSerialCommConfig::HARDWARE; + else if (sTemp.LoadString(IDS_XONXOFF) && sString == sTemp) + eRetVal = COXSerialCommConfig::XON_XOFF; + else + { + ASSERT(0); + eRetVal = COXSerialCommConfig::NONE; + } + return eRetVal; + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSEH.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSEH.cpp new file mode 100644 index 0000000..33fb217 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSEH.cpp @@ -0,0 +1,342 @@ +// ========================================================================== +// Class Implementation : COXSEHException +// ========================================================================== + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXSEH.h" + +#if (0 < OXSEH_USE_FP) +#include +#endif + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXSEHException, CException) +IMPLEMENT_DYNAMIC(COXSEHMemoryException, COXSEHException) +IMPLEMENT_DYNAMIC(COXSEHMathException, COXSEHException) +IMPLEMENT_DYNAMIC(COXSEHSpecialException, COXSEHException) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +CThreadLocal COXSEHException::m_pSEHState; + +// Data members ------------------------------------------------------------- +// protected: + // _EXCEPTION_POINTERS* m_pEP; + // --- The information about the SEH (See the Win32 API GetExceptionCode()) + + // class COXSEHState + // --- Helper class to organize data per thread + + // BOOL m_bSEHTrapping; + // --- Whether SEH translation is enabled + + // BOOL m_bFPTrapping; + // --- Whether FP exceptions are enabled + + // int m_nPreviousFPControl; + // --- The state of the FPU control word before the FP exceptions were enabled (otherwise 0) + // int m_nFPControlMask; + // --- The new state of the FPU control word when the FP exceptions are enabled + + // _se_translator_function m_pfPreviousTranslator; + // --- The translator that was installed before this one + + // static CThreadLocal m_pSEHState; + // --- The access pointer-object (like smart-pointer) to the different objects. + // The object associated with the current thread will be used. +// private: + +// Member functions --------------------------------------------------------- +// public: +void COXSEHException::EnableSEHTrapping(BOOL bTrapFP /* = FALSE */) + { + // Should not invoke this function twice without an intermediate call to + // DisableSEHTrapping() ! + // Thes states are organized on a per-thread base + ASSERT(!m_pSEHState->m_bSEHTrapping); + ASSERT(!m_pSEHState->m_bFPTrapping); + +#if (0 < OXSEH_USE_FP) + if (bTrapFP) + { + // To trap floating point exceptions under WIN32, we must use _controlfp(). + int cw = ::_controlfp(0,0); + m_pSEHState->m_nPreviousFPControl = cw; + cw &= ~m_pSEHState->m_nFPControlMask; + ::_controlfp(cw, _MCW_EM); + m_pSEHState->m_bFPTrapping = TRUE; + } +#else + // For this class to use FP exceptions, define OXSEH_USE_FP as 1 + ASSERT(!bTrapFP); +#endif // OXSEH_USE_FP + + // To use C++ Exception handling (try, catch) for structured exceptions, + // install a function to redirect them to C++ catch handlers. + m_pSEHState->m_pfPreviousTranslator = _set_se_translator(MapSEHToCPPExceptions); + m_pSEHState->m_bSEHTrapping = TRUE; + } + +void COXSEHException::DisableSEHTrapping() + { + // Should not invoke this finction without a previos call to EnsableSEHTrapping() ! + ASSERT(m_pSEHState->m_bSEHTrapping); + +#if (0 < OXSEH_USE_FP) + if (m_pSEHState->m_bFPTrapping) + { + // Reset to the previous trapping state + _clearfp(); + ::_controlfp(m_pSEHState->m_nPreviousFPControl, (unsigned int)~0); + m_pSEHState->m_bFPTrapping = FALSE; + } +#endif // OXSEH_USE_FP + + // Re-install the previous C++ exception translator + // The return code must be our mapping function ! + VERIFY(MapSEHToCPPExceptions == _set_se_translator (m_pSEHState->m_pfPreviousTranslator)); + m_pSEHState->m_bSEHTrapping = FALSE; + } + +BOOL COXSEHException::IsSEHTrappingEnabled() + { + return m_pSEHState->m_bSEHTrapping; + } + +BOOL COXSEHException::IsSEHFPTrappingEnabled() + { + return m_pSEHState->m_bFPTrapping; + } + +COXSEHException::COXSEHException(EXCEPTION_POINTERS* pEP /* = NULL */) + : + m_pEP(pEP) + { + } + +UINT COXSEHException::GetCause() + { + if (m_pEP != NULL) + return m_pEP->ExceptionRecord->ExceptionCode; + else + { + TRACE0("COXSEHException::GetCause : Exception pointers not available, returning 0\n"); + return 0; + } + } + +#ifdef _DEBUG +void COXSEHException::Dump(CDumpContext& dc) const + { + CException::Dump(dc); + dc << _T("\nm_pEP : ") << (void*)m_pEP; + if (m_pEP != NULL) + dc << _T("\n\t with cause : ") << m_pEP->ExceptionRecord->ExceptionCode; + } + +void COXSEHException::AssertValid() const + { + CException::AssertValid(); + } +#endif + +COXSEHException::~COXSEHException() + { + } + +// COXSEHMemoryException ----------------------------------------------------- +COXSEHMemoryException::COXSEHMemoryException(EXCEPTION_POINTERS* pEP /* = NULL */) + : + COXSEHException(pEP) + { + } + +BOOL COXSEHMemoryException::IsInfoAvailable() + { + return (m_pEP != NULL) && (2 <= m_pEP->ExceptionRecord->NumberParameters); + } + +BOOL COXSEHMemoryException::GetReadWriteFlag() + { + if (IsInfoAvailable()) + return m_pEP->ExceptionRecord->ExceptionInformation[0]; + else + { + TRACE0("COXSEHException::GetReadWriteFlag : Exception information available, returning FALSE\n"); + return FALSE; + } + } + +DWORD COXSEHMemoryException::GetAddress() + { + if (IsInfoAvailable()) + return m_pEP->ExceptionRecord->ExceptionInformation[1]; + else + { + TRACE0("COXSEHException::GetAddress : Exception information available, returning FALSE\n"); + return FALSE; + } + } + +#ifdef _DEBUG +void COXSEHMemoryException::Dump(CDumpContext& dc) const + { + COXSEHException::Dump(dc); + if ((m_pEP != NULL) && (2 <= m_pEP->ExceptionRecord->NumberParameters)) + { + dc << _T("\n\t with Read/Write flag : ") << m_pEP->ExceptionRecord->ExceptionInformation[0]; + dc << _T("\n\t for memory adress : ") << m_pEP->ExceptionRecord->ExceptionInformation[1]; + } + } + +void COXSEHMemoryException::AssertValid() const + { + COXSEHException::AssertValid(); + } +#endif + +COXSEHMemoryException::~COXSEHMemoryException() + { + } + +// COXSEHMathException ----------------------------------------------------- +COXSEHMathException::COXSEHMathException(EXCEPTION_POINTERS* pEP /* = NULL */) + : + COXSEHException(pEP) + { + } + +#ifdef _DEBUG +void COXSEHMathException::Dump(CDumpContext& dc) const + { + COXSEHException::Dump(dc); + } + +void COXSEHMathException::AssertValid() const + { + COXSEHException::AssertValid(); + } +#endif + +COXSEHMathException::~COXSEHMathException() + { + } + +// COXSEHSpecialException ----------------------------------------------------- +COXSEHSpecialException::COXSEHSpecialException(EXCEPTION_POINTERS* pEP /* = NULL */) + : + COXSEHException(pEP) + { + } + +#ifdef _DEBUG +void COXSEHSpecialException::Dump(CDumpContext& dc) const + { + COXSEHException::Dump(dc); + } + +void COXSEHSpecialException::AssertValid() const + { + COXSEHException::AssertValid(); + } +#endif + +COXSEHSpecialException::~COXSEHSpecialException() + { + } + +// protected: +void __cdecl COXSEHException::MapSEHToCPPExceptions(UINT uCode, EXCEPTION_POINTERS* pEP) + // --- In : uCode : See the Win32 API GetExceptionCode() + // pEP : See the Win32 API GetExceptionInformation() + // --- Out : + // --- Returns : + // --- Effect : This function is called when a SEH is thrown + // It converts it to a C++ exception + { + if ( (uCode == EXCEPTION_ACCESS_VIOLATION) || + (uCode == EXCEPTION_DATATYPE_MISALIGNMENT) || + (uCode == EXCEPTION_ARRAY_BOUNDS_EXCEEDED) || + (uCode == EXCEPTION_STACK_OVERFLOW) || + (uCode == EXCEPTION_INVALID_DISPOSITION) || + (uCode == EXCEPTION_IN_PAGE_ERROR) || + (uCode == EXCEPTION_GUARD_PAGE) ) + { + TRACE1("COXSEHException::MapSEHToCPPExceptions : Translating to COXSEHMemoryException : 0x%lx\n", uCode); + THROW(new COXSEHMemoryException(pEP)); + } + else if ( (uCode == EXCEPTION_FLT_DENORMAL_OPERAND) || + (uCode == EXCEPTION_FLT_DIVIDE_BY_ZERO) || + (uCode == EXCEPTION_FLT_INEXACT_RESULT) || + (uCode == EXCEPTION_FLT_INVALID_OPERATION) || + (uCode == EXCEPTION_FLT_OVERFLOW) || + (uCode == EXCEPTION_FLT_STACK_CHECK) || + (uCode == EXCEPTION_FLT_UNDERFLOW) || + (uCode == EXCEPTION_FLT_STACK_CHECK) || + (uCode == EXCEPTION_INT_DIVIDE_BY_ZERO) || + (uCode == EXCEPTION_INT_OVERFLOW) ) + { + TRACE1("COXSEHException::MapSEHToCPPExceptions : Translating to COXSEHMathException : 0x%lx\n", uCode); + +#if (0 < OXSEH_USE_FP) + ASSERT(m_pSEHState->m_bFPTrapping); + // Make sure the exception flags in the floating-point status word is cleared + // The return value (the FP status word) is ignored, because it identifies the + // type of exception, but we already know that (through uCode) + _clearfp(); + + // Empty the FPU stack + // One way to do this by calling pop directly, but then we + // have to know how many elements are on the stack + // double dummy; + // _asm + // { + // fstp dummy; + // } + + // Another solution is to reset the FPU, + // but then we have to re-enable the exception trapping + int cw = ::_controlfp(0,0); + _fpreset(); + ::_controlfp(cw, _MCW_EM); +#endif // OXSEH_USE_FP + + THROW(new COXSEHMathException(pEP)); + } + else if ( (uCode == EXCEPTION_BREAKPOINT) || + (uCode == EXCEPTION_SINGLE_STEP) || + (uCode == EXCEPTION_PRIV_INSTRUCTION) || + (uCode == EXCEPTION_ILLEGAL_INSTRUCTION) || + (uCode == EXCEPTION_NONCONTINUABLE_EXCEPTION) ) + { + TRACE1("COXSEHException::MapSEHToCPPExceptions : Translating to COXSEHSpecialException : 0x%lx\n", uCode); + THROW(new COXSEHSpecialException(pEP)); + } + else + { + TRACE1("COXSEHException::MapSEHToCPPExceptions : Translating to COXSEHException : 0x%lx\n", uCode); + THROW(new COXSEHException(pEP)); + } + } + + +// private: + +// Message handlers --------------------------------------------------------- + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSPtr.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSPtr.cpp new file mode 100644 index 0000000..d41c2bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSPtr.cpp @@ -0,0 +1,30 @@ +// ========================================================================== +// Template Implementation : COXSPtr +// ========================================================================== + +// Source file : OXSPtr.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +///////////////////////////////////////////////////////////////////////////// +#include "stdafx.h" +#include "OXSPtr.h" + +// ////////////////////////////////////////////////////////////////////////// +// Definition of static variables + +// Define the only valid COXObjectCreator object +OX_CLASS_DECL COXObjectCreator NEW_OBJECT; + +#if defined(_DEBUG) && !defined(DISABLE_SMART_CHECK) +// Use a global object that keeps track of smart pointers and +// that will be used for debugging purposes +COXSmartWatcher smartWatcher; +#endif + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSRLZR.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSRLZR.CPP new file mode 100644 index 0000000..76ed362 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSRLZR.CPP @@ -0,0 +1,174 @@ +// ========================================================================== +// Class Implementation : COXSerializer +// ========================================================================== + +// Source file : oxsrlzr.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXSRLZR.H" + +#ifdef _DEBUG + #undef THIS_FILE + static char BASED_CODE THIS_FILE[] = __FILE__; + #define new DEBUG_NEW +#endif + +static TCHAR BASED_CODE MsgOutOfMemory[]= _T("Out of Memory!"); +static TCHAR BASED_CODE no_resource_string_available[] = _T("RC error: No RESSERLZR.RC file found"); + +COXSerializer::COXSerializer() : + m_bInitialized(FALSE), + m_pObject(NULL) +{ +} + +COXSerializer::~COXSerializer() +{ +} + +BOOL COXSerializer::Initialize(CString sFileName, CObject* pObject) +{ + if (pObject == NULL) + { + TRACE0("COXSerializer::Initialize: pObject argument can't be NULL"); + ASSERT(FALSE); + return FALSE; + } + ASSERT_VALID(pObject); + if (pObject->IsSerializable() == FALSE) + return FALSE; + + m_fileException.m_cause = CFileException::none; + m_fileException.m_lOsError = 0L; + m_archiveException.m_cause = CArchiveException::none; + m_bMemoryException = FALSE; + + m_bInitialized = TRUE; + m_sFileName = sFileName; + m_pObject = pObject; + return TRUE; +} + +BOOL COXSerializer::Load(BOOL bDisplayException) +{ + CFile file; + CArchive* pArchive=NULL; + + if (m_bInitialized==FALSE) + return FALSE; + + m_fileException.m_cause = CFileException::none; + m_fileException.m_lOsError = 0L; + m_archiveException.m_cause = CArchiveException::none; + m_bMemoryException = FALSE; + + if (!file.Open(m_sFileName, CFile::modeRead | CFile::typeBinary | + CFile::shareExclusive, &m_fileException)) + { + if (bDisplayException) + m_fileException.ReportError(); + return FALSE; + } + TRY + { + pArchive = new CArchive(&file, CArchive::load); + m_pObject->Serialize(*pArchive); + delete pArchive; + file.Close(); + } + CATCH (CMemoryException, e) + { + m_bMemoryException = TRUE; + delete pArchive; + if (bDisplayException) + AfxMessageBox(MsgOutOfMemory); + return FALSE; + } + AND_CATCH (CArchiveException, e) + { + m_archiveException.m_cause = e->m_cause; + if (bDisplayException) + e->ReportError(); + delete pArchive; + return FALSE; + } + AND_CATCH (CFileException, e) + { + m_fileException.m_cause = e->m_cause; + m_fileException.m_lOsError = e->m_lOsError; + if (bDisplayException) + e->ReportError(); + delete pArchive; + return FALSE; + } + END_CATCH + + return TRUE; +} + +BOOL COXSerializer::Save(BOOL bDisplayException) +{ + CFile file; + CArchive* pArchive=NULL; + + if (m_bInitialized==FALSE) + return FALSE; + m_fileException.m_cause = CFileException::none; + m_fileException.m_lOsError = 0L; + m_archiveException.m_cause = CArchiveException::none; + m_bMemoryException = FALSE; + + if (!file.Open(m_sFileName, CFile::modeCreate | CFile::modeWrite | + CFile::typeBinary | CFile::shareExclusive, + &m_fileException)) + { + if (bDisplayException) + m_fileException.ReportError(); + return FALSE; + } + TRY + { + pArchive = new CArchive(&file, CArchive::store); + m_pObject->Serialize(*pArchive); + delete pArchive; + file.Close(); + } + CATCH (CMemoryException, e) + { + m_bMemoryException = TRUE; + delete pArchive; + if (bDisplayException) + AfxMessageBox(MsgOutOfMemory); + return FALSE; + } + AND_CATCH (CArchiveException, e) + { + m_archiveException.m_cause = e->m_cause; + if (bDisplayException) + e->ReportError(); + delete pArchive; + return FALSE; + } + AND_CATCH (CFileException, e) + { + m_fileException.m_cause = e->m_cause; + m_fileException.m_lOsError = e->m_lOsError; + if (bDisplayException) + e->ReportError(); + delete pArchive; + return FALSE; + } + END_CATCH + + return(TRUE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSendMail.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSendMail.CPP new file mode 100644 index 0000000..e02f617 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXSendMail.CPP @@ -0,0 +1,857 @@ +// ========================================================================== +// Class Implementation : COXSendMail +// ========================================================================== + +// Source file : SendMail.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "OXSendMail.h" + +#pragma warning(disable: 4228) +#include +#include +#include +#include + +#define USES_IID_IMAPIFolder +#define INITGUID +#include +#include +#pragma warning(default: 4228) + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +COXSendMail::CMessage::CMessage() +{ +} + +COXSendMail::CMessage::~CMessage() +{ + int i; + + for (i=0 ; isName = sRecipient; + pRecipient->eType = eType; + m_recipients.Add(pRecipient); +} + +void COXSendMail::CMessage::AddAttachment(CString sAttachment, EAttachmentType eType, CString sOleDocument /*= _T("")*/) +{ + SAttachment* pAttachment = new SAttachment; + + pAttachment->sPath = sAttachment; + pAttachment->eType = eType; + pAttachment->sOleDocument = sOleDocument; + m_attachments.Add(pAttachment); +} + + +#ifndef OX_MAPI_DIRECT + +COXSendMail::COXSendMail() +{ +} + +COXSendMail::~COXSendMail() +{ + if (IsInitialized()) + Uninitialize(); +} + + +BOOL COXSendMail::Initialize(CString sProfileName, CString sPassword) +{ + ASSERT_VALID(this); + + LPMAPISESSION pMAPISession; + HRESULT hResult; + BOOL bMAPIInitialized = FALSE; + BOOL bResult = TRUE; + + TRY + { + MAPIINIT_0 MAPIINIT = { 0, MAPI_NT_SERVICE | MAPI_MULTITHREAD_NOTIFICATIONS }; + hResult = MAPIInitialize(&MAPIINIT); + if (FAILED (hResult)) + return FALSE; + + bMAPIInitialized = TRUE; + + hResult = MAPILogonEx( + (ULONG)NULL, + sProfileName.GetBuffer(256), + sPassword.GetBuffer(256), + MAPI_LOGON_UI | MAPI_NO_MAIL | MAPI_EXTENDED | MAPI_EXPLICIT_PROFILE | MAPI_NEW_SESSION, + &pMAPISession); + + sProfileName.ReleaseBuffer(); + sPassword.ReleaseBuffer(); + + if (FAILED (hResult)) + { + MAPIUninitialize(); + return FALSE; + } + + if (m_objSession.m_lpDispatch == NULL) + { + if (m_objSession.CreateDispatch(_T("MAPI.Session")) == FALSE) + { + MAPIUninitialize(); + bResult = FALSE; + } + } + if (bResult) + m_objSession.SetMapiobject(pMAPISession); + } + CATCH_ALL(e) + { + if (bMAPIInitialized) + MAPIUninitialize(); + bResult = FALSE; + } + END_CATCH_ALL + + if (bResult) + m_sMAPIProfile = sProfileName; + return bResult; +} + +BOOL COXSendMail::IsInitialized() +{ + if (m_objSession.m_lpDispatch) + if (m_objSession.GetMapiobject() != NULL) + return TRUE; + return FALSE; +} + +void COXSendMail::Uninitialize() +{ + TRY + { + ASSERT(m_objSession.m_lpDispatch); + if (m_objSession.m_lpDispatch) + m_objSession.Logoff(); + } + CATCH_ALL(e) + { + } + END_CATCH_ALL + m_objSession.ReleaseDispatch(); + MAPIUninitialize(); +} + +CString COXSendMail::GetProfile() +{ + CString sProfile; + + if (IsInitialized()) + sProfile = m_sMAPIProfile; + return sProfile; +} + +BOOL COXSendMail::SendMessage(CMessage& message) +{ + COXMMessage objMessage; + COXMRecipient objOneRecip; + COXMAttachment objAttachment; + ASSERT(m_objSession.m_lpDispatch); + + if (m_objSession.m_lpDispatch == NULL) + return FALSE; + + TRY + { + // create new message and set subject and content + objMessage = m_objSession.GetOutbox().GetMessages().Add(); + objMessage.SetSubject(message.m_sSubject); + objMessage.SetText(message.m_sContent); + + // set the recipients + for (int i=0 ; isName); + switch (message.m_recipients[i]->eType) + { + case rtCC: + objOneRecip.SetType(oxmrtCc); + break; + case rtBCC: + objOneRecip.SetType(oxmrtBcc); + break; + default: + objOneRecip.SetType(oxmrtTo); + } + objOneRecip.Resolve(FALSE); + } + + // add the attachments + for (i=0 ; isPath; + _tsplitpath(sAttachment, pszDrive, pszSubdir, pszBaseName, pszExtender); + _tmakepath(sAttachment.GetBuffer(_MAX_PATH), NULL, NULL, pszBaseName, pszExtender); + sAttachment.ReleaseBuffer(); + + objAttachment = objMessage.GetAttachments().Add(sAttachment); + objAttachment.SetName(sAttachment); + objAttachment.SetType((EOXMAttachmentType) message.m_attachments[i]->eType); + objAttachment.ReadFromFile(message.m_attachments[i]->sPath); + } + + // send the message + objMessage.Send(); + } + CATCH_ALL(e) + { + return FALSE; + } + END_CATCH_ALL + + return TRUE; + +} + +#endif + + + +CString COXSendMail::GetReturnMsg(int nErr) +{ + CString sErrorMsg; + switch(nErr) + { + case SUCCESS_SUCCESS: + sErrorMsg = _T("Sending of Mail was succesful"); + break; + case MAPI_E_USER_ABORT: + sErrorMsg = _T("Sending of Mail has been aborted by user"); + break; + case MAPI_E_FAILURE: + sErrorMsg = _T("Sending of Mail was not succesful"); + break; + case MAPI_E_LOGIN_FAILURE: + sErrorMsg = _T("login failure"); + break; + case MAPI_E_DISK_FULL: + sErrorMsg = _T("Disk full"); + break; + case MAPI_E_INSUFFICIENT_MEMORY: + sErrorMsg = _T("not enough memory"); + break; + case MAPI_E_ACCESS_DENIED: + sErrorMsg = _T("access denied"); + break; + case MAPI_E_TOO_MANY_SESSIONS: + sErrorMsg = _T("too many sessions open"); + break; + case MAPI_E_TOO_MANY_FILES: + sErrorMsg = _T("too many open files"); + break; + case MAPI_E_TOO_MANY_RECIPIENTS: + sErrorMsg = _T("too many recipients specified"); + break; + case MAPI_E_ATTACHMENT_NOT_FOUND: + sErrorMsg = _T("attachment not found"); + break; + case MAPI_E_ATTACHMENT_OPEN_FAILURE: + sErrorMsg = _T("could not open attachment"); + break; + case MAPI_E_ATTACHMENT_WRITE_FAILURE: + sErrorMsg = _T("could not write attachment"); + break; + case MAPI_E_UNKNOWN_RECIPIENT: + sErrorMsg = _T("unknown recipient"); + break; + case MAPI_E_BAD_RECIPTYPE: + sErrorMsg = _T("unknown reciptype"); + break; + case MAPI_E_NO_MESSAGES: + sErrorMsg = _T("no messages"); + break; + case MAPI_E_INVALID_MESSAGE: + sErrorMsg = _T("invalid message"); + break; + case MAPI_E_TEXT_TOO_LARGE: + sErrorMsg = _T("text too large"); + break; + case MAPI_E_INVALID_SESSION: + sErrorMsg = _T("invalid session"); + break; + case MAPI_E_TYPE_NOT_SUPPORTED: + sErrorMsg = _T("type not supported"); + break; + case MAPI_E_AMBIG_RECIP: + sErrorMsg = _T("ambiguous recipiebt"); + break; + case MAPI_E_MESSAGE_IN_USE: + sErrorMsg = _T("message in use"); + break; + case MAPI_E_NETWORK_FAILURE: + sErrorMsg = _T("network failure"); + break; + case MAPI_E_INVALID_EDITFIELDS: + sErrorMsg = _T("invalid editfields"); + break; + case MAPI_E_INVALID_RECIPS: + sErrorMsg = _T("invalid recipients"); + break; + case MAPI_E_NOT_SUPPORTED: + sErrorMsg = _T("not supported request"); + break; + default: + sErrorMsg = _T("unknown error"); + break; + } + + return sErrorMsg; +} + + + + + + +///////////////////////////////////////////////////////////////////////////// +// The Extended MAPI alternative + + + +#ifdef OX_MAPI_DIRECT +///////////////////////////////////////////////////////////////////////////// +// MAPI implementation helpers and globals + +#define _countof(array) (sizeof(array)/sizeof(array[0])) + +static BOOL IsMailAvail = (BOOL)-1; // start out not determined + +// _AFX_MAIL_STATE + +class OX_CLASS_DECL _AFX_MAIL_STATE : public CNoTrackObject +{ +public: + HINSTANCE m_hInstMail; // handle to MAPI32.DLL + virtual ~_AFX_MAIL_STATE(); +}; + +_AFX_MAIL_STATE::~_AFX_MAIL_STATE() +{ + if (m_hInstMail != NULL) + ::FreeLibrary(m_hInstMail); +} + +_AFX_MAIL_STATE* _afxMailState; +int nCount = 0; + + + +COXSendMail::COXSendMail() : + m_pMAPISession(NULL), + m_pAddressBook(NULL), + m_peidDefaultMDB(NULL), + m_cbeidDefaultMDB(0), + m_pDefaultMDB(NULL), + m_pRootFolder(NULL), + m_szRecipient(NULL), + m_uLogoffFlags(LOGOFF_ORDERLY), + m_szAttachData(NULL) +{ + if (nCount==0) + _afxMailState = new _AFX_MAIL_STATE; + nCount++; +} + + +COXSendMail::~COXSendMail() +{ + if (IsInitialized()) + Uninitialize(); + + nCount--; + if (nCount==0) + delete _afxMailState; +} + +BOOL COXSendMail::Initialize(CString sProfileName, CString sPassword) +{ + ASSERT_VALID(this); + + HRESULT hResult; + + if (IsInitialized()) + Uninitialize(); + + // Initialize the MAPI libraries before calling ANY MAPI function + MAPIINIT_0 MAPIINIT = { 0, MAPI_NT_SERVICE | MAPI_MULTITHREAD_NOTIFICATIONS }; + hResult = MAPIInitialize(&MAPIINIT); + if (!FAILED (hResult)) + { + // Logon onto the message subsystem. We are going to ask the user to + // select a profile to log into. The UI for this will be provided by MAPI. + hResult = MAPILogonEx((ULONG)NULL, + sProfileName.GetBuffer(256), + sPassword.GetBuffer(256), + MAPI_NO_MAIL | MAPI_EXTENDED | MAPI_EXPLICIT_PROFILE /*| MAPI_USE_DEFAULT */| MAPI_NEW_SESSION, + &m_pMAPISession); + + sProfileName.ReleaseBuffer(); + sPassword.ReleaseBuffer(); + + if (!FAILED (hResult)) + { + // get the address book + // be sure to have the correct address book set as the default + // see the Addressing tab in the profile config control panel applet + hResult = m_pMAPISession->OpenAddressBook(NULL, NULL, 0, &m_pAddressBook); + if (!FAILED(hResult)) + { + if (InitializeMessageStore()) + { + // get the root folder + ULONG uObjType; + hResult = m_pDefaultMDB->OpenEntry(0, + NULL, + (LPIID)&IID_IMAPIFolder, + MAPI_MODIFY, + &uObjType, + (LPUNKNOWN *)&m_pRootFolder); + + if (!FAILED(hResult)) + { + m_sMAPIProfile = sProfileName; + return TRUE; + } + } + } + } + Uninitialize(); + } + else + MAPIUninitialize(); + return FALSE; +} + +BOOL COXSendMail::IsInitialized() +{ + return (m_pMAPISession!=NULL); +} + +void COXSendMail::Uninitialize() +{ + if (m_pRootFolder != NULL) + { + m_pRootFolder->Release(); + m_pRootFolder = NULL; + } + + if (m_pDefaultMDB != NULL) + { + m_pDefaultMDB->StoreLogoff(&m_uLogoffFlags); + m_pDefaultMDB->Release(); + m_pDefaultMDB = NULL; + } + + if (m_peidDefaultMDB != NULL) + { + MAPIFreeBuffer(m_peidDefaultMDB); + m_peidDefaultMDB = NULL; + } + + if (m_pAddressBook != NULL) + { + m_pAddressBook->Release(); + m_pAddressBook = NULL; + } + + if (m_pMAPISession!=NULL) + { + ULONG ulUIParam = (ULONG)NULL; // null window handle + ULONG ulFlags = 0; + ULONG ulReserved = 0; + + m_pMAPISession->Logoff(ulUIParam, ulFlags, ulReserved); + m_pMAPISession->Release(); + m_pMAPISession = NULL; + MAPIUninitialize(); + } +} + +CString COXSendMail::GetProfile() +{ + CString sProfile; + + if (IsInitialized()) + sProfile = m_sMAPIProfile; + return sProfile; +} + +BOOL COXSendMail::SendMessage(CMessage& message) +{ + LPMESSAGE pMessage; + HRESULT hResult; + + pMessage = ComposeMessage(message); + if (pMessage == NULL) + return FALSE; + + hResult = pMessage->SubmitMessage(FORCE_SUBMIT); + + if (pMessage != NULL) + pMessage->Release(); + + if (FAILED(hResult)) + return FALSE; + return TRUE; +} + + +// protected functions + + +BOOL COXSendMail::InitializeMessageStore() +{ + LPSRowSet pRow = NULL; + ULONG ulRow; + ULONG uRowCount; + HRESULT hResult; + LPMAPITABLE pStoresTable; + LPSPropValue pProps; + BOOL bFound; + + +// The order for this enumaration must match the order of the properties +// in the tag array below + enum + { + DEFAULT_STORE, + STORE_EID, + MSG_STORES_TABLE_PROPS // number columns in the proptagarray + }; + + SizedSPropTagArray (MSG_STORES_TABLE_PROPS, sptMsgStores) = + { + MSG_STORES_TABLE_PROPS, + { + PR_DEFAULT_STORE, + PR_ENTRYID, + } + }; + +///// end of local declarations + + m_cbeidDefaultMDB = 0; + m_peidDefaultMDB = NULL; + + +// first get a table of the message stores available + hResult = m_pMAPISession->GetMsgStoresTable (0, &pStoresTable); + if (FAILED(hResult)) + return FALSE; + + +// we only want the default store flag and the entry id + hResult = pStoresTable->SetColumns((LPSPropTagArray)&sptMsgStores, 0); + if (FAILED(hResult)) + return FALSE; + + pStoresTable->GetRowCount(0, &uRowCount); // one row corresponds to one MDB provider +// typically no one should have more than +// 6 or 7 MDB providers. + +// Get row(s) from the message stores table + hResult = pStoresTable->QueryRows(uRowCount, 0, &pRow); + if (FAILED(hResult)) + return FALSE; + + bFound = FALSE; +// loop through each row -- each row represents the properties of a message store + for (ulRow=0; ulRowcRows; ulRow++) + { + pProps = pRow->aRow[ulRow].lpProps; + + if (pProps[DEFAULT_STORE].Value.b == 1) // we found it! + { + + m_cbeidDefaultMDB = pProps[STORE_EID].Value.bin.cb; + hResult = MAPIAllocateBuffer(m_cbeidDefaultMDB, (LPVOID *)&m_peidDefaultMDB); + if (FAILED(hResult)) + return FALSE; + + memcpy(m_peidDefaultMDB, pProps[STORE_EID].Value.bin.lpb, m_cbeidDefaultMDB); + + bFound = TRUE; + } +/// else ignore the non-defaults + } + + if (bFound) + hResult = S_OK; + else + hResult = MAPI_E_NOT_FOUND; + + + +// clean up if neccessary + if (pRow != NULL) + FreeProws(pRow); + + if (pStoresTable != NULL) + pStoresTable->Release(); + + + if (FAILED(hResult)) // there was an error + return FALSE; + +// open the default message store + m_pDefaultMDB = NULL; + hResult = m_pMAPISession->OpenMsgStore ((ULONG)NULL, + m_cbeidDefaultMDB, + m_peidDefaultMDB, + NULL, + MDB_WRITE, + &m_pDefaultMDB); + if (FAILED(hResult)) + return FALSE; + + return TRUE; +} + +LPMESSAGE COXSendMail::ComposeMessage(CMessage& message) +{ + HRESULT hrRet = 0; + LPMESSAGE pMessage = NULL; + SPropValue pMessageProps[5]; + LPSPropProblemArray pPropProblems; + + // create the message + hrRet = m_pRootFolder->CreateMessage(NULL, 0, &pMessage); + if (FAILED(hrRet)) + return NULL; + + // setup the properties + pMessageProps[0].ulPropTag = PR_MESSAGE_CLASS; + pMessageProps[1].ulPropTag = PR_PRIORITY; + pMessageProps[2].ulPropTag = PR_SUBJECT; + pMessageProps[3].ulPropTag = PR_BODY; + pMessageProps[4].ulPropTag = PR_CLIENT_SUBMIT_TIME; + + pMessageProps[0].Value.lpszA = "IPM.NOTE"; + pMessageProps[1].Value.l = PRIO_NORMAL; +#ifdef _UNICODE + pMessageProps[2].Value.lpszW = message.m_sSubject.GetBuffer(message.m_sSubject.GetLength()); + pMessageProps[3].Value.lpszW = message.m_sContent.GetBuffer(message.m_sContent.GetLength()); +#else + pMessageProps[2].Value.lpszA = message.m_sSubject.GetBuffer(message.m_sSubject.GetLength()); + pMessageProps[3].Value.lpszA = message.m_sContent.GetBuffer(message.m_sContent.GetLength()); +#endif + message.m_sSubject.ReleaseBuffer(); + message.m_sContent.ReleaseBuffer(); + + // set the message submission time + SYSTEMTIME tSysTime; + FILETIME tSubmitTime; + GetSystemTime(&tSysTime); + SystemTimeToFileTime(&tSysTime, &tSubmitTime); // convert to file time + pMessageProps[4].Value.ft = tSubmitTime; + + + // set the properties + hrRet = pMessage->SetProps(5, pMessageProps, &pPropProblems); + if (!FAILED(hrRet)) + { + hrRet = AddRecipients(pMessage, message.m_recipients); + if (!FAILED(hrRet)) + { + // Create the attachment + AddAttachments(pMessage, message.m_attachments); + hrRet = pMessage->SaveChanges(KEEP_OPEN_READWRITE); + } + + if (!FAILED(hrRet)) + return pMessage; + } + + if (pMessage != NULL) + pMessage->Release(); + + return NULL; +} + + +HRESULT COXSendMail::AddRecipients(LPMESSAGE pMessage, CRecipientArray& recipients) +{ + HRESULT hrRet; + LPADRLIST pAddressList; + +// allocate address list for one recipient + MAPIAllocateBuffer(sizeof(ADRLIST) + sizeof(ADRENTRY) * recipients.GetSize(), + (LPVOID *) &pAddressList); + +// set properties for address list + pAddressList->cEntries = recipients.GetSize(); + for (int i=0 ; iaEntries[i].rgPropVals) ); + + pAddressList->aEntries[i].cValues = 2; + pAddressList->aEntries[i].rgPropVals[0].ulPropTag = PR_DISPLAY_NAME; + pAddressList->aEntries[i].rgPropVals[0].Value.lpszA = recipients[i]->sName.GetBuffer(recipients[i]->sName.GetLength()); + pAddressList->aEntries[i].rgPropVals[1].ulPropTag = PR_RECIPIENT_TYPE; + recipients[i]->sName.ReleaseBuffer(); + switch (recipients[i]->eType) + { + case rtTO: + pAddressList->aEntries[i].rgPropVals[1].Value.l = MAPI_TO; + break; + case rtCC: + pAddressList->aEntries[i].rgPropVals[1].Value.l = MAPI_CC; + break; + case rtBCC: + pAddressList->aEntries[i].rgPropVals[1].Value.l = MAPI_BCC; + break; + } + } + +// resolve the address + hrRet = m_pAddressBook->ResolveName(0, 0, NULL, pAddressList); + if (!FAILED(hrRet)) + { + // set the recipients to the message + hrRet = pMessage->ModifyRecipients(MODRECIP_ADD, pAddressList); + } + + for (i=0 ; iaEntries[i].rgPropVals); + + MAPIFreeBuffer(pAddressList); + + return hrRet; +} + +HRESULT COXSendMail::AddAttachments(LPMESSAGE pMessage, CAttachmentArray& attachments) +{ + HRESULT hrRet; + UINT idx; + LPTSTR szAttachment; + +// if there are no attachments, just return + if (attachments.GetSize() == 0) + return 0; + + enum + { + REND_POS, + PATH_NAME, + ATT_METHOD, + DISP_NAME, + ATT_FILENAME, + ATT_DIM + }; + + SizedSPropTagArray(ATT_DIM , sptAttachTags) = + { + ATT_DIM, + { + PR_RENDERING_POSITION, + PR_ATTACH_PATHNAME, + PR_ATTACH_METHOD, + PR_DISPLAY_NAME, + PR_ATTACH_FILENAME + } + }; + SPropValue spvAttachProps[ATT_DIM]; + + + CString sAttachment; + + for (int i=0 ; isPath; + + LPATTACH lpAttach = NULL; + ULONG ulAttachNum = 0; + + hrRet = pMessage->CreateAttach(NULL, 0, &ulAttachNum, &lpAttach); + if (FAILED(hrRet)) + return hrRet; + + for(idx = 0; idx < ATT_DIM; ++idx) + { + spvAttachProps[idx].ulPropTag = sptAttachTags.aulPropTag[idx]; + spvAttachProps[idx].dwAlignPad = 0; + } + + +// Split the path of the attachment, so we can extract the filename +// to display under the attachment + TCHAR pszDrive[_MAX_DRIVE]; + TCHAR pszSubdir[_MAX_DIR]; + TCHAR pszBaseName[_MAX_FNAME]; + TCHAR pszExtender[_MAX_EXT]; + TCHAR pszFileName[_MAX_FNAME + _MAX_EXT]; + + szAttachment = sAttachment.GetBuffer(_MAX_PATH); + + _tsplitpath(szAttachment, pszDrive, pszSubdir, pszBaseName, pszExtender); + _tmakepath(pszFileName, NULL, NULL, pszBaseName, pszExtender); + + spvAttachProps[REND_POS].Value.l = -1; + spvAttachProps[PATH_NAME].Value.LPSZ = szAttachment; + spvAttachProps[ATT_METHOD].Value.l = ATTACH_BY_REF_RESOLVE; +// spvAttachProps[ATT_METHOD].Value.l = ATTACH_BY_VALUE; + spvAttachProps[DISP_NAME].Value.LPSZ = pszFileName; + spvAttachProps[ATT_FILENAME].Value.LPSZ = pszFileName; + + hrRet = lpAttach->SetProps(ATT_DIM, spvAttachProps, NULL); + if (FAILED(hrRet)) + { + sAttachment.ReleaseBuffer(); + return hrRet; + } + + hrRet = lpAttach->SaveChanges(KEEP_OPEN_READWRITE); + + sAttachment.ReleaseBuffer(); + if (FAILED(hrRet)) + return hrRet; + + szAttachment = NULL; + UlRelease(lpAttach); + } + + return hrRet; +} + +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXStaticMenuItem.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXStaticMenuItem.cpp new file mode 100644 index 0000000..d8018ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXStaticMenuItem.cpp @@ -0,0 +1,204 @@ +// OXStaticMenuItem.cpp : implementation file +// + +#include "stdafx.h" +#include "OXStaticMenuItem.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXStaticMenuItem + +COXStaticMenuItem::COXStaticMenuItem() +{ + m_bPressedDown=FALSE; + m_clrActive=RGB(192,0,0); + m_clrNormalText=GetTextColor(); +} + +COXStaticMenuItem::~COXStaticMenuItem() +{ + if(::IsWindow(GetSafeHwnd())) + DestroyWindow(); +} + + +BEGIN_MESSAGE_MAP(COXStaticMenuItem, COXStaticText) + //{{AFX_MSG_MAP(COXStaticMenuItem) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_CREATE() + //}}AFX_MSG_MAP + ON_MESSAGE(HWM_MOUSEENTER, OnMouseEnter) + ON_MESSAGE(HWM_MOUSELEAVE, OnMouseLeave) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COXStaticMenuItem message handlers + +static BOOL bIsCreating=FALSE; + +int COXStaticMenuItem::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + bIsCreating=TRUE; + + if(COXStaticText::OnCreate(lpCreateStruct)==-1) + return -1; + + m_MouseSpy.HookWindow(this); + // call this function in oder to get HWM_MOUSEENTER and HWM_MOUSELEAVE messages + m_MouseSpy.InstallSpy(); + + return 0; +} + +void COXStaticMenuItem::PreSubclassWindow() +{ + // TODO: Add your specialized code here and/or call the base class + + if(!bIsCreating) + { + m_MouseSpy.HookWindow(this); + // call this function in oder to get HWM_MOUSEENTER and + // HWM_MOUSELEAVE messages + m_MouseSpy.InstallSpy(); + } + + COXStaticText::PreSubclassWindow(); +} + +LONG COXStaticMenuItem::OnMouseEnter(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.InflateRect(1,1,0,0); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + m_clrNormalText=GetTextColor(); + SetTextColor(m_clrActive,TRUE); + + NotifyParent(SMIN_ACTIVATED); + + return (LONG)0; +} + +LONG COXStaticMenuItem::OnMouseLeave(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + if(m_bPressedDown) + { + rect.OffsetRect(-2,-2); + m_bPressedDown=FALSE; + } + rect.DeflateRect(1,1,0,0); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + SetTextColor(m_clrNormalText,TRUE); + + NotifyParent(SMIN_DEACTIVATED); + + return (LONG)0; +} + +void COXStaticMenuItem::OnLButtonDown(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.OffsetRect(2,2); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + m_bPressedDown=TRUE; + + COXStaticText::OnLButtonDown(nFlags, point); +} + +void COXStaticMenuItem::OnLButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if(m_bPressedDown) + { + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.OffsetRect(-2,-2); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + m_bPressedDown=FALSE; + + NotifyParent(SMIN_CLICKED); + } + + COXStaticText::OnLButtonUp(nFlags, point); +} + +void COXStaticMenuItem::SetProperties(COLORREF clrText/*=::GetSysColor(COLOR_BTNTEXT)*/, + COLORREF clrBack/*=::GetSysColor(COLOR_BTNFACE)*/, + COLORREF clrActive/*=RGB(192,0,0)*/, + int nFontHeight/*=12*/, + int nFontWeight/*=FW_NORMAL*/, + CString sFontName/*=_T("MS Sans Serif")*/, + BOOL bEmboss/*=TRUE*/, + int nHorzAlignment/*=OX_ALIGNHORZ_LEFT*/, + int nVertAlignment/*=OX_ALIGNVERT_CENTER*/) +{ + SetTextColor(clrText); + SetBkColor(clrBack); + m_clrActive=clrActive; + LOGFONT lf; + if(GetLogFont(&lf)) + { + lf.lfHeight=nFontHeight; + lf.lfWeight=nFontWeight; + SetLogFont(&lf); + } + SetFontName(sFontName); + + SetEmboss(bEmboss); + SetHorzAlignment(nHorzAlignment); + SetVertAlignment(nVertAlignment); + SetCharSet(ANSI_CHARSET,TRUE); +} + + +void COXStaticMenuItem::NotifyParent(int nEventID) +{ + ASSERT(IsWindow(GetSafeHwnd())); + ASSERT(nEventID==SMIN_ACTIVATED || nEventID==SMIN_DEACTIVATED || + nEventID==SMIN_CLICKED); + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd!=NULL); + + NMHDR nmhdr; + nmhdr.code=nEventID; + nmhdr.hwndFrom=GetSafeHwnd(); + nmhdr.idFrom=GetDlgCtrlID(); + pParentWnd->SendMessage(WM_NOTIFY,nmhdr.idFrom,(LPARAM)&nmhdr); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXThreadEngine.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXThreadEngine.cpp new file mode 100644 index 0000000..cf116b9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXThreadEngine.cpp @@ -0,0 +1,399 @@ +// ========================================================================== +// Class Implementation : COXThreadEngine +// ========================================================================== + +// Source file : OXThreadEngine.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXThreadEngine.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// timeout value (in msec) for the thread termination (see 'COXThreadEngine::Terminate()') +#define OXTE_TERMINATION_TIMEOUT 10000 + +///////////////////////////////////////////////////////////////////////////// +// COXEngineCmd +// + +// Definition of static members --------------------------------------------- + +DWORD COXEngineCmd::m_dwGlobalIndex = 0; + + +// Data members ------------------------------------------------------------- +// protected: + + // COXDoneNotifier* m_pDoneNotifier; + // --- For optional notification after execution + + // HANDLE m_hFinishedEvent; + // --- Used for synchronisation of synchrone commands + + // LONG m_nRef; + // --- Used for reference counting + +// private: + + // static DWORD m_dwGlobalIndex; + // --- Internal cyclic counter + +// Implementation of macros ------------------------------------------------- +IMPLEMENT_DYNAMIC(COXEngineCmd, CObject) + +// Member functions --------------------------------------------------------- + +// public: + +COXEngineCmd::COXEngineCmd(BOOL bSynchrone /*= TRUE*/, COXDoneNotifier* pDoneNotifier /*= NULL*/) : + m_hFinishedEvent(NULL), + m_dwIndex(++m_dwGlobalIndex), + m_pDoneNotifier(pDoneNotifier), + m_nRef(2+(pDoneNotifier!=NULL?1:0)) // One release has to be done after PostCommand(); + // Another one will be done by the engine after the + // execution + // In case of notification a release has +{ // to be done after notification + if (bSynchrone) // + m_hFinishedEvent = CreateEvent(NULL, FALSE, FALSE, NULL); +} + +COXEngineCmd::~COXEngineCmd() +{ + if (m_hFinishedEvent) + CloseHandle(m_hFinishedEvent); +} + +void COXEngineCmd::Release() +{ + if (InterlockedDecrement(&m_nRef) == 0) + delete this; +} + +BOOL COXEngineCmd::IsSynchrone() const +{ + return (m_hFinishedEvent!=NULL); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXThreadEngine::COXEngineCmdList + +// Data members ------------------------------------------------------------- + +// protected: + + // HANDLE m_hMutex; + // --- mutex for lock functionality + +// Member functions --------------------------------------------------------- + +// public: + +COXThreadEngine::COXEngineCmdList::COXEngineCmdList() : + m_hMutex(NULL) +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : constructs the command list and creates the internal mutex +{ + m_hMutex = CreateMutex(NULL, FALSE, NULL); +} + +COXThreadEngine::COXEngineCmdList::~COXEngineCmdList() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : destructs the command list and closes the mutex handle +{ + if (m_hMutex) + CloseHandle(m_hMutex); +} + +void COXThreadEngine::COXEngineCmdList::Lock() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : locks the list exclusively +{ + WaitForSingleObject(m_hMutex, INFINITE); +} + +void COXThreadEngine::COXEngineCmdList::Unlock() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : unlocks the list +{ + VERIFY(ReleaseMutex(m_hMutex)); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXThreadEngineBase + +// Data members ------------------------------------------------------------- + +// protected: + + // BOOL m_bEndThread; + // --- Thread shall terminate during next thread event + + // BOOL m_bInitialized; + // --- If successfully initialised + + // CWinThread* m_pThread; + // --- Thread pointer of the engines thread + + // HANDLE m_hCreatedEvent; + // --- Event for initialisation synchronisation + + // HANDLE m_hEndEvent; + // --- Event for termination synchronisation + + // HANDLE m_hThreadEvent; + // --- event when a new command is posted + + // COXEngineCmdList m_cmdList; + // --- the command queue of the engine + + + +// Member functions --------------------------------------------------------- + +// public: + + + +COXThreadEngine::COXThreadEngine() : + m_hCreatedEvent(NULL), + m_bInitialized(FALSE), + m_bEndThread(FALSE), + m_hEndEvent(NULL), + m_hThreadEvent(NULL), + m_pThread(NULL), + m_nTerinationTimeout(OXTE_TERMINATION_TIMEOUT) +{ + m_hCreatedEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + m_hEndEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + m_hThreadEvent = CreateEvent(NULL, FALSE, FALSE, NULL); +} + +COXThreadEngine::~COXThreadEngine() +{ + if (m_hEndEvent) + CloseHandle(m_hEndEvent); + if (m_hCreatedEvent) + CloseHandle(m_hCreatedEvent); + if (m_hThreadEvent) + CloseHandle(m_hThreadEvent); +} + +BOOL COXThreadEngine::Initialize() +{ + DWORD dwWaitResult; + + if (IsInitialized()) + { + TRACE0("COXThreadEngine::Initialize() -> Already initialized !!"); + ASSERT(FALSE); + return FALSE; + } + m_pThread = AfxBeginThread((AFX_THREADPROC)StartThread, this); + if (m_pThread) + { + while (TRUE) + { + dwWaitResult = ::WaitForSingleObject(&m_hCreatedEvent,INFINITE); + //dwWaitResult = MsgWaitForMultipleObjects(1, &m_hCreatedEvent, FALSE, INFINITE, QS_ALLINPUT); + if (dwWaitResult == (WAIT_OBJECT_0 + 1)) + // You must avoid a WM_QUIT to be send during initialization + VERIFY(AfxGetThread()->PumpMessage()); + else + return TRUE; + } + } + return FALSE; +} + +BOOL COXThreadEngine::IsInitialized() +{ + return m_bInitialized; +} + +void COXThreadEngine::Terminate() +{ + DWORD dwWaitResult; + BOOL bEnd = FALSE; + BOOL bPostQuit = FALSE; + + if (m_pThread==NULL) + return; + + m_bEndThread = TRUE; + SetEvent(m_hThreadEvent); + + while (!bEnd) + { + dwWaitResult = MsgWaitForMultipleObjects(1, &m_hEndEvent, FALSE, m_nTerinationTimeout, QS_ALLINPUT); + + if (dwWaitResult == (WAIT_OBJECT_0 + 1)) + { + MSG msg; + // making sure there is a msg in the queue + // we don't want PumpMessage() to hang + if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) + bPostQuit = (!AfxGetThread()->PumpMessage()) || bPostQuit; + } + else + { + if (m_pThread && (dwWaitResult != WAIT_OBJECT_0)) + TerminateThread(m_pThread->m_hThread, 0); + bEnd = TRUE; + } + } + if (bPostQuit) + { + AfxPostQuitMessage(0); + Sleep(200); // Give the terminating thread the time to terminate + } + m_bEndThread = FALSE; + m_bInitialized = FALSE; +} + +void COXThreadEngine::PostCommand(COXEngineCmd* pCmd, BOOL bASAP /*= FALSE*/) +{ + m_cmdList.Lock(); + if (bASAP) + m_cmdList.AddHead(pCmd); + else + m_cmdList.AddTail(pCmd); + m_cmdList.Unlock(); + SetEvent(m_hThreadEvent); + if (pCmd->m_hFinishedEvent) + WaitForSingleObject(pCmd->m_hFinishedEvent, INFINITE); +} + +// protected: + +UINT COXThreadEngine::StartThread( LPVOID pParam ) +// --- In : pParam: the engine itself (it needs to be past on as a parameter +// because this is a static functions) +// --- Out : none +// --- Returns : always zero (indicates that the thread terminated normally) +// --- Effect : calls the Run() functions which implements a message loop +{ + ((COXThreadEngine*) pParam)->Run(); + return 0; +} + +void COXThreadEngine::Run() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : implements a loop which ends if Terminate() is called; +// this loop reacts on every command that is added to the engines queue +{ + MSG msg; + HRESULT hr; + + hr = CoInitialize(NULL); + if (hr==S_OK) + m_bInitialized = OnThreadCreation(); + SetEvent(m_hCreatedEvent); + if (m_bInitialized) + { + DWORD dwWaitResult; + + while (!m_bEndThread) + { + dwWaitResult = MsgWaitForMultipleObjects(1, &m_hThreadEvent, FALSE, INFINITE, QS_ALLINPUT); + if (dwWaitResult == (WAIT_OBJECT_0 + 1)) + { + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + DispatchMessage(&msg); + } + else if (!m_bEndThread) + OnThreadEvent(); + } + OnThreadDestruction(); + m_pThread = NULL; + CoUninitialize(); + SetEvent(m_hEndEvent); + } + m_pThread = NULL; +} + +BOOL COXThreadEngine::OnThreadCreation() +// --- In : none +// --- Out : none +// --- Returns : if initialisation of the engine will be successful or not +// --- Effect : is called by the engine when the thread is started +// overload this function if you need to do some specific +// initialisation +{ + return TRUE; +} + +void COXThreadEngine::OnThreadDestruction() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : is called by the engine when the thread is terminated; +// overload this function if you need to do some specific +// uninitialisation; +// dont forget to call this base function on the +// end of your overloaded version +{ + COXEngineCmd* pCmd; + while (m_cmdList.GetCount()) + { + pCmd = m_cmdList.RemoveHead(); + pCmd->Release(); // the one that will not be done by OnThreadEvent() + if (pCmd->m_pDoneNotifier) + pCmd->Release(); // the one that will not be done by the notifier + } +} + +void COXThreadEngine::OnThreadEvent() +// --- In : none +// --- Out : none +// --- Returns : none +// --- Effect : if a thread event occurs, this function is called to execute all +// the commands in the engine queue (from head to tail) +{ + COXEngineCmd* pCmd; + COXDoneNotifier* pDoneNotifier; + HANDLE hFinishedEvent; + + m_cmdList.Lock(); + while (!m_bEndThread && m_cmdList.GetCount()) + { + pCmd = m_cmdList.RemoveHead(); + m_cmdList.Unlock(); + hFinishedEvent = pCmd->m_hFinishedEvent; + pDoneNotifier = pCmd->m_pDoneNotifier; + OnExecuteCmd(pCmd); + + if (pDoneNotifier) + pDoneNotifier->DoneCommand(pCmd); + if (hFinishedEvent) + SetEvent(hFinishedEvent); + pCmd->Release(); + m_cmdList.Lock(); + } + m_cmdList.Unlock(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXTimer.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXTimer.cpp new file mode 100644 index 0000000..1a37613 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXTimer.cpp @@ -0,0 +1,417 @@ +// ========================================================================== +// Class Implementation : COXTimer +// ========================================================================== + +// Source file : OXTimer.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXTimer.h" +#include + +#ifndef OX_TIMER_NO_MM_LIB + #pragma comment(lib, "winmm.lib") +#endif + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXTimer, CObject) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +// ... Initialize to unkown +LARGE_INTEGER COXTimer::m_nIntervalTimerFrequency = { 0, 0 }; +CMap COXTimer::m_allTimers; +CMap COXTimer::m_synchronizedTimers; + +// Data members ------------------------------------------------------------- +// protected: + // LARGE_INTEGER m_rgStartIntervalCounter; + // --- Start time of interval timer + // The unit are COUNTS of the performance counter + + // LARGE_INTEGER m_rgStopIntervalCounter; + // --- Stop time of interval timer + // The unit are COUNTS of the performance counter + + // static LARGE_INTEGER m_nIntervalTimerFrequency; + // --- Number of counts per second the performance counter uses + // Accurracy is 1/m_nIntervalTimerFrequency (in seconds) + // -1 = Counter is not available + // 0 = Not yet initialzed + + // DWORD m_nUserData; + // --- The user data associated with this timer object + + // P_OX_TIMER_NOTIFICATION m_pfNotification; + // --- Pointer to the notification function + + // UINTm_nNonSynchronizedTimerNotifierID; + // --- Timer ID used by the non synchronized timer + + // UINT m_nSynchronizedTimerNotifierID; + // --- Timer ID used by the synchronized timer + + // BOOL m_bPeriodic; + // --- Whether the running timer is periodic or not + + // static CMap m_allTimers; + // --- Map of all the timers (only the key is used, not the value) + + // static CMap m_synchronizedTimers; + // --- Map of all running synchronized timers + // Organizes a map between the (synchronized) timer ID and the COXTimer object +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXTimer::COXTimer() + : + m_nUserData(0), + m_pfNotification(NULL), + m_nNonSynchronizedTimerNotifierID(0), + m_nSynchronizedTimerNotifierID(0), + m_bPeriodic(FALSE) + { + m_startIntervalCounter.QuadPart = 0; + m_stopIntervalCounter.QuadPart = 0; + + // ... Register this new object in the global map + m_allTimers.SetAt(this, TRUE); + + ASSERT_VALID(this); + } + +BOOL COXTimer::StartInterval() + { + if (::QueryPerformanceCounter(&m_startIntervalCounter)) + return TRUE; + else + { + TRACE0("COXTimer::StartInterval : Failed to use performance counter\n"); + return FALSE; + } + } + +void COXTimer::StopInterval() + { + if (!::QueryPerformanceCounter(&m_stopIntervalCounter)) + TRACE0("COXTimer::StopInterval : Failed to use performance counter\n"); + } + +LONGLONG COXTimer::GetInterval() const + { + return (m_stopIntervalCounter.QuadPart - m_startIntervalCounter.QuadPart) * + GetIntervalAccuracy(); + } + +LONGLONG COXTimer::GetIntervalAccuracy() + { + if (m_nIntervalTimerFrequency.QuadPart == 0) + { + // Variable has not yet been initialzed, do it now + if (!::QueryPerformanceFrequency(&m_nIntervalTimerFrequency)) + // ... Mark as unavailable + m_nIntervalTimerFrequency.QuadPart = -1; + } + + if (m_nIntervalTimerFrequency.QuadPart < 0) + return -1; + else + // ... return result in nanoseconds (1E-9 s) + return 1000000000 / m_nIntervalTimerFrequency.QuadPart ; + } + +BOOL COXTimer::StartNotifier(LONGLONG nDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL bPeriodic /* = FALSE */, BOOL bSynchronized /* = FALSE */, LONGLONG nAccuracy /* = -1 */) + { + // Convert to milliseconds because this is the smallest resolution we can use + int nMilliDelay = NANO_TO_MILLI(nDelay); + int nMilliAccuracy = 0; + + if (0 <= nAccuracy) + nMilliAccuracy = NANO_TO_MILLI(nAccuracy); + else + { + // Use 1% of the total delay time and always less than a second + nMilliAccuracy = NANO_TO_MILLI(nDelay / 100); + if (1000 < nMilliAccuracy) + nMilliAccuracy = 1000; + } + + // Adjust invalid requests + if (nMilliDelay <= 0) + { + TRACE0("COXTimer::StartNotifier : Requested delay time to short, using 1 millisecond\n"); + nMilliDelay = 1; + } + if (nMilliAccuracy <= 0) + { + TRACE0("COXTimer::StartNotifier : Requested accuracy to high, using 1 millisecond\n"); + nMilliAccuracy = 1; + } + + // Kill previous timers + StopNotifier(); + + m_bPeriodic = bPeriodic; + if (!bSynchronized) + return StartNonSynchronizedNotifier(nMilliDelay, pfTimerNotification, bPeriodic, + nMilliAccuracy); + else + return StartSynchronizedNotifier(nMilliDelay, pfTimerNotification, bPeriodic, + nMilliAccuracy); + } + +void COXTimer::StopNotifier() + { + // Stop both nonsynchronized and synchronized timer + StopNonSynchronizedNotifier(); + StopSynchronizedNotifier(); + + m_pfNotification = NULL; + } + +void COXTimer::SetUserData(DWORD nUserData /* = 0 */) + { + m_nUserData = nUserData; + } + +DWORD COXTimer::GetUserData() const + { + return m_nUserData; + } + +#ifdef _DEBUG +void COXTimer::AssertValid() const + { + CObject::AssertValid(); + } + +void COXTimer::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + } +#endif //_DEBUG + +COXTimer::~COXTimer() + { + // Stop possible running timer + StopNotifier(); + ASSERT(m_nNonSynchronizedTimerNotifierID == 0); + ASSERT(m_pfNotification == NULL); + + // Unregister this object from the global map + m_allTimers.RemoveKey(this); + } + +// protected: +BOOL COXTimer::StartNonSynchronizedNotifier(int nMilliDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL bPeriodic, int nMilliAccuracy) + // --- In : nMilliDelay : The delay in milliseconds that must elaps before the + // notificvation function is called + // pfTimerNotification : The notification function to call + // bPeriodic : Whether the function should be called periodically (TRUE) + // or just one (FALSE) + // nMilliAccuracy : The minimum accuracy in milliseconds. + // --- Out : + // --- Returns : Whether it succeeded or not. + // --- Effect : Starts the non synchronized timer notifier + { + // Store the setting of this timer + // (Must be set before starting timer so that there is no period during which the + // data members do not have a valid value) + m_nNonSynchronizedTimerNotifierID = 0; + m_pfNotification = pfTimerNotification; + + // Start a new timer + m_nNonSynchronizedTimerNotifierID = ::timeSetEvent(nMilliDelay, nMilliAccuracy, + NonSynchronizedNotificationCallback, (DWORD)this, + bPeriodic ? TIME_PERIODIC : TIME_ONESHOT); + if (m_nNonSynchronizedTimerNotifierID == 0) + { + TRACE0("COXTimer::StartNonSynchronizedNotifier : Failed to start the timer\n"); + // ... Reset data memebers + m_pfNotification = NULL; + } + + return (m_nNonSynchronizedTimerNotifierID != 0); + } + +void CALLBACK COXTimer::NonSynchronizedNotificationCallback(UINT /* uTimerID */, UINT /* uMsg */, DWORD dwUser, DWORD /* dw1 */, DWORD /* dw2 */) + // --- In : uTimerID : The timer ID + // uMsg : + // dwUser : The user data + // dw1 : + // dw2 : + // --- Out : + // --- Returns : + // --- Effect : The non synchronized callback function of all objects +{ + COXTimer* pTimer = (COXTimer*)dwUser; + + BOOL bDummy; + if (!m_allTimers.Lookup(pTimer, bDummy)) + { + TRACE1("COXTimer::NonSynchronizedNotificationCallback : Timer object at address 0x%X does not exist anymore, ignoring\n", + pTimer); + return; + } + + // ... Do some sanity checks (timer object must still exist!) + ASSERT(pTimer != NULL); + ASSERT(AfxIsValidAddress(pTimer, sizeof(COXTimer))); + ASSERT_VALID(pTimer); + + // ... Delegate to object + pTimer->OnNonSynchronizedNotification(); +} + +void COXTimer::OnNonSynchronizedNotification() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : The non synchronized callback function of this object + { + if (m_pfNotification != NULL) + m_pfNotification(this); + } + +void COXTimer::StopNonSynchronizedNotifier() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Stops the non synchronized timer notifier + { + if (m_nNonSynchronizedTimerNotifierID != 0) + { + // ... Only need to timeKillEvent if the timer was periodic + if (m_bPeriodic) + VERIFY(::timeKillEvent(m_nNonSynchronizedTimerNotifierID) == TIMERR_NOERROR); + m_nNonSynchronizedTimerNotifierID = 0; + } + } + +BOOL COXTimer::StartSynchronizedNotifier(int nMilliDelay, P_OX_TIMER_NOTIFICATION pfTimerNotification, + BOOL /* bPeriodic */, int /* nMilliAccuracy */) + // --- In : nMilliDelay : The delay in milliseconds that must elaps before the + // notificvation function is called + // pfTimerNotification : The notification function to call + // bPeriodic : Whether the function should be called periodically (TRUE) + // or just one (FALSE) + // nMilliAccuracy : The minimum accuracy in milliseconds. + // --- Out : + // --- Returns : Whether it succeeded or not. + // --- Effect : Starts the synchronized timer notifier + { + // Store the setting of this timer + // (Must be set before starting timer so that there is no period during which the + // data members do not have a valid value) + m_nNonSynchronizedTimerNotifierID = 0; + m_pfNotification = pfTimerNotification; + + // Start a new timer + + // Appearantly we have to specify a valid window handle, even when we are using a + // callback function. If we would use a callback function with a NULL HWND, + // MFC's main message loop will not dispatch the thread message. + // We will use the main window by default +#ifdef _DEBUG + if (AfxGetMainWnd()->GetSafeHwnd() == NULL) + TRACE0("COXTimer::StartSynchronizedNotifier : Function needs the HWND of the main window, may not be NULL, failing\n"); +#endif + + m_nSynchronizedTimerNotifierID = ::SetTimer(AfxGetMainWnd()->GetSafeHwnd(), (DWORD)this, nMilliDelay, SynchronizedNotificationCallback); + if (m_nSynchronizedTimerNotifierID != 0) + { + // Register as synchronized timer (ID - COXTimer*) + m_synchronizedTimers.SetAt(m_nSynchronizedTimerNotifierID, this); + } + else + { + TRACE0("COXTimer::StartSynchronizedNotifier : Failed to start the timer\n"); + // ... Reset data memebers + m_pfNotification = NULL; + } + + return (m_nSynchronizedTimerNotifierID != 0); + } + +void CALLBACK COXTimer::SynchronizedNotificationCallback(HWND /*hWnd*/, + UINT /*uMsg*/, + UINT nTimerID, + DWORD /*nTime*/) + // --- In : hWnd : + // uMsg : + // uTimerID : The timer ID + // nTime : The current time + // --- Out : + // --- Returns : + // --- Effect : The synchronized callback function of all objects +{ + COXTimer* pTimer = (COXTimer*)nTimerID; + + BOOL bDummy; + if (!m_allTimers.Lookup(pTimer, bDummy)) + { + TRACE1("COXTimer::SynchronizedNotificationCallback : Timer object at address 0x%X does not exist anymore, ignoring\n", + pTimer); + return; + } + + // ... Do some sanity checks (timer object must still exist!) + ASSERT(pTimer != NULL); + ASSERT(AfxIsValidAddress(pTimer, sizeof(COXTimer))); + ASSERT_VALID(pTimer); + + // ... Delegate to object + pTimer->OnSynchronizedNotification(); +} + +void COXTimer::OnSynchronizedNotification() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : The synchronized callback function of this object + { + if (m_pfNotification != NULL) + m_pfNotification(this); + + // If this is not a periodic timer, kill the timer now + if (!m_bPeriodic) + StopNotifier(); + } + +void COXTimer::StopSynchronizedNotifier() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Stops the synchronized timer notifier + { + if (m_nSynchronizedTimerNotifierID != 0) + { + // ... KillTimer may return FALSE if the main window has already been destroyed + ::KillTimer(AfxGetMainWnd()->GetSafeHwnd(), m_nSynchronizedTimerNotifierID); + // ... Remove from global map + VERIFY(m_synchronizedTimers.RemoveKey(m_nSynchronizedTimerNotifierID)); + m_nSynchronizedTimerNotifierID = 0; + } + } + +// private: + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVariant.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVariant.cpp new file mode 100644 index 0000000..ab2ba04 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVariant.cpp @@ -0,0 +1,194 @@ +// ========================================================================== +// Class Implementation : COXVariant +// ========================================================================== + +// Source file : OXVariant.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "OXVariant.h" +#include // For ConstructElements() + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// Definition of static functions + +// Data members ------------------------------------------------------------- +// protected: +// private: + +// Member functions --------------------------------------------------------- +// public: + +#ifdef _DEBUG +CDumpContext& AFXAPI operator<<(CDumpContext& dc, COXVariant varSrc) + { + // First let the base class implementation process what it can + operator<<(dc, *(COleVariant*)&varSrc); + + // Then process our extensions + // Nothing extra to do + + return dc; + } +#endif + +CArchive& AFXAPI operator<<(CArchive& ar, COXVariant varSrc) + { + // First let the base class implementation process what it can + operator<<(ar, *(COleVariant*)&varSrc); + + // Then process our extensions + if ((V_VT(&varSrc) == (VT_UI1 | VT_ARRAY)) && + (SafeArrayGetDim(V_ARRAY(&varSrc)) == 1) ) + { + void* pBuffer; + long lLower, lUpper; + DWORD lSize; + + // ... Make sure that it is an array of BYTEs + ASSERT(SafeArrayGetElemsize(V_ARRAY(&varSrc)) == 1); + // ... Get the lower and upper bound + COXVariant::CheckError(SafeArrayGetLBound(V_ARRAY(&varSrc), 1, &lLower)); + COXVariant::CheckError(SafeArrayGetUBound(V_ARRAY(&varSrc), 1, &lUpper)); + lSize = (DWORD)(lUpper - lLower + 1); + // ... Get a pointer to the actual data + COXVariant::CheckError(SafeArrayAccessData(V_ARRAY(&varSrc), &pBuffer)); + + // Write the size and data + ar << lSize; + ar.Write(pBuffer, lSize); + + // ... Release access + COXVariant::CheckError(SafeArrayUnaccessData(V_ARRAY(&varSrc))); + } + + return ar; + } + +CArchive& AFXAPI operator>>(CArchive& ar, COXVariant& varSrc) + { + // First let the base class implementation process what it can + operator>>(ar, *(COleVariant*)&varSrc); + + // Then process our extensions + if (V_VT(&varSrc) == (VT_UI1 | VT_ARRAY)) + { + // Read as a only dimensional array of unsigned bytes + void* pBuffer; + DWORD lSize; + + // ... Read the needed size + ar >> lSize; + + // Create a new one dimensional safe array + VERIFY(VariantClear(&varSrc) == NOERROR); + V_VT(&varSrc) = VT_UI1 | VT_ARRAY; + + SAFEARRAYBOUND bound; + bound.cElements = lSize; + bound.lLbound = 0; + V_ARRAY(&varSrc) = SafeArrayCreate(VT_UI1, 1, &bound); + if (V_ARRAY(&varSrc) == NULL) + { + TRACE(_T("COXVariant operator>> : Failed to create array\n")); + AfxThrowMemoryException(); + } + + // Fill with the actual data + COXVariant::CheckError(SafeArrayAccessData(V_ARRAY(&varSrc), &pBuffer)); + ar.Read(pBuffer, lSize); + COXVariant::CheckError(SafeArrayUnaccessData(V_ARRAY(&varSrc))); + } + + return ar; + } + +void COXVariant::CheckError(SCODE sc) + { + if (FAILED(sc)) + { + if (sc == E_OUTOFMEMORY) + AfxThrowMemoryException(); + else + AfxThrowOleException(sc); + } + } + +// protected: +// private: + +// Declare special versions for COleVariant +void AFXAPI ConstructElements(COleVariant* pElements, int nCount); +void AFXAPI DestructElements(COleVariant* pElements, int nCount); +void AFXAPI CopyElements(COleVariant* pDest, const COleVariant* pSrc, int nCount); +void AFXAPI SerializeElements(CArchive& ar, COleVariant* pElements, int nCount); +void AFXAPI DumpElements(CDumpContext& dc, COleVariant* pElements, int nCount); + +void AFXAPI ConstructElements(COXVariant* pElements, int nCount) + { + ASSERT(nCount == 0 || + AfxIsValidAddress(pElements, nCount * sizeof(COXVariant))); + + for (; nCount--; ++pElements) + new(pElements) COXVariant; + } + +void AFXAPI DestructElements(COXVariant* pElements, int nCount) + { + ASSERT(nCount == 0 || + AfxIsValidAddress(pElements, nCount * sizeof(COXVariant))); + + for (; nCount--; ++pElements) + pElements->~COXVariant(); + } + +void AFXAPI CopyElements(COXVariant* pDest, const COXVariant* pSrc, int nCount) + { + ASSERT(nCount == 0 || + AfxIsValidAddress(pDest, nCount * sizeof(COXVariant))); + ASSERT(nCount == 0 || + AfxIsValidAddress(pSrc, nCount * sizeof(COXVariant))); + + for (; nCount--; ++pDest, ++pSrc) + *pDest = *pSrc; + } + +void AFXAPI SerializeElements(CArchive& ar, COXVariant* pElements, int nCount) + { + ASSERT(nCount == 0 || + AfxIsValidAddress(pElements, nCount * sizeof(COXVariant))); + + if (ar.IsStoring()) + { + for (; nCount--; ++pElements) + ar << *pElements; + } + else + { + for (; nCount--; ++pElements) + ar >> *pElements; + } + } + +#ifdef _DEBUG +void AFXAPI DumpElements(CDumpContext& dc, COXVariant* pElements, int nCount) + { + for (; nCount--; ++pElements) + dc << *pElements; + } +#endif // _DEBUG + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVerinfo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVerinfo.cpp new file mode 100644 index 0000000..8adc5e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXVerinfo.cpp @@ -0,0 +1,375 @@ +// ========================================================================== +// Class Implementation : COXVersionInfo +// ========================================================================== + +// Source file : verinfo.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "OXVerinfo.h" // class specification +#ifdef WIN32 +#include +#else +#include +#endif + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXVersionInfo, CObject) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +const DWORD COXVersionInfo::m_dwFixedFileInfoSignature = 0xFEEF04BDL; +const DWORD COXVersionInfo::m_dwAmericanEnglishTranslation = 0x040904E4L; +LPCTSTR COXVersionInfo::m_pszTranslation = _T("\\VarFileInfo\\Translation"); +LPCTSTR COXVersionInfo::m_pszFileInfo = _T("StringFileInfo"); + +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXVersionInfo::COXVersionInfo() + { + Empty(); + } + +BOOL COXVersionInfo::ReadInfo(LPCTSTR pszPathName) + { + LPBYTE pData = NULL; + DWORD hVersion = 0; + DWORD dwVersionSize = 0; + UINT nVersionItemSize = 0; + void* pVersionItemData = NULL; + VS_FIXEDFILEINFO* pFixedFileInfo = NULL; + + // Assume failure + Empty(); + + // Note : + // Several functions changed parameter type from WIN16 to WIN32 + // e.g. WIN16 : BOOL VerQueryValue(const void FAR*, LPCSTR, VOID FAR* FAR*, UINT FAR*) + // WIN32 : BOOL VerQueryValue(const LPVOID, LPTSTR, LPVOID*, PUINT) + // Notice that the second parameter changed from pointer to LPCTSTR to + // just pointer to char + // The /Gf option under large model locates string literals in the code segment + // Passing such a string as parameter in WIN16 causes a General Protection Fault + // which points out that the string is not really const ! + // Therefore a copy to a temporary buffer will be used in both WIN16 and WIN32 + + TCHAR szCopyBuffer[512 + 1]; + + _tcscpy(szCopyBuffer, pszPathName); + dwVersionSize = ::GetFileVersionInfoSize(szCopyBuffer, &hVersion); + if (dwVersionSize == 0) + { + TRACE(_T("COXVersionInfo::ReadInfo : Could not get version info\n")); + return FALSE; + } + + pData = new BYTE[dwVersionSize + 1]; + _tcscpy(szCopyBuffer, pszPathName); + VERIFY(::GetFileVersionInfo(szCopyBuffer, hVersion, dwVersionSize, pData)); + + // Get the fixed info first + ::VerQueryValue(pData, _T("\\"), &pVersionItemData, &nVersionItemSize); + if (nVersionItemSize != 0) + { + // ... Must have right size + ASSERT(nVersionItemSize == sizeof(VS_FIXEDFILEINFO)); + pFixedFileInfo = (VS_FIXEDFILEINFO*)pVersionItemData; + // ... Must have correct header; + ASSERT(pFixedFileInfo->dwSignature == m_dwFixedFileInfoSignature); + + m_dwSignature = pFixedFileInfo->dwSignature; + m_dwStrucVersion = pFixedFileInfo->dwStrucVersion; + m_dwFileVersionMS = pFixedFileInfo->dwFileVersionMS; + m_dwFileVersionLS = pFixedFileInfo->dwFileVersionLS; + m_dwProductVersionMS = pFixedFileInfo->dwProductVersionMS; + m_dwProductVersionLS = pFixedFileInfo->dwProductVersionLS; + m_dwFileFlagsMask = pFixedFileInfo->dwFileFlagsMask; + m_dwFileFlags = pFixedFileInfo->dwFileFlags; + m_dwFileOS = pFixedFileInfo->dwFileOS; + m_dwFileType = pFixedFileInfo->dwFileType; + m_dwFileSubtype = pFixedFileInfo->dwFileSubtype; + m_dwFileDateMS = pFixedFileInfo->dwFileDateMS; + m_dwFileDateLS = pFixedFileInfo->dwFileDateLS; + } + else + TRACE(_T("COXVersionInfo::ReadInfo : Could not get fixed version info\n")); + + // Get the language - character info + TCHAR szLangChar[512]; + _tcscpy(szCopyBuffer, m_pszTranslation); + ::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize); + if(nVersionItemSize != 0) + { + ::VerLanguageName (*(UINT*)pVersionItemData, szLangChar, 512 - 1); + + // ... Swap high and low word (char set and lang id) + m_dwLanguageCountryID = MAKELONG(HIWORD(*(DWORD*)pVersionItemData), LOWORD(*(DWORD*)pVersionItemData)); + m_sLanguageCountry = szLangChar; + } + else + TRACE(_T("COXVersionInfo::ReadInfo : Could not get language info, using default\n")); + + // Get the variable info + TCHAR szCountryHex[8 + 1]; + wsprintf(szCountryHex, _T("%08.8lX"), m_dwLanguageCountryID != 0 ? m_dwLanguageCountryID : m_dwAmericanEnglishTranslation); + CString sFront = CString(_T("\\")) + m_pszFileInfo + _T("\\") + szCountryHex + _T("\\"); + CString sSubBlock; + + + sSubBlock = sFront + _T("Comments"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sComments = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("CompanyName"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sCompanyName = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("FileDescription"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sFileDescription = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("FileVersion"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sFileVersion = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("InternalName"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sInternalName = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("LegalCopyright"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sLegalCopyright = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("LegalTrademarks"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sLegalTrademarks = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("OriginalFilename"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sOriginalFilename = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("PrivateBuild"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sPrivateBuild = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("ProductName"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sProductName = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("ProductVersion"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sProductVersion = (LPCTSTR)(LPTSTR)pVersionItemData; + + sSubBlock = sFront + _T("SpecialBuild"); + _tcscpy(szCopyBuffer, sSubBlock); + if (::VerQueryValue(pData, szCopyBuffer, &pVersionItemData, &nVersionItemSize)) + m_sSpecialBuild = (LPCTSTR)(LPTSTR)pVersionItemData; + + m_bValid = TRUE; + delete[] pData; + + // Dump(afxDump); + + return TRUE; + } + +BOOL COXVersionInfo::ContainsValidInfo() + { + return m_bValid; + } + +CString COXVersionInfo::GetOSName() + { + if (!ContainsValidInfo()) + { + TRACE(_T("COXVersionInfo::GetOSName() : Object does not contain valid info, returning empty string\n")); + return _T(""); + } + + CString sResult; + DWORD dwFileOS = m_dwFileOS; + + // Try all the possible flags and remove them it when a match is found + // The order in which the possible flags are checked is important, because + // they binairy overlap (see winver.h or ver.h) + + // GUI Environment + if ((dwFileOS & VOS__PM32) == VOS__PM32) + { + sResult += _T("- 32-bit PM"); + dwFileOS &= ~VOS__PM32; + } + if ((dwFileOS & VOS__WINDOWS16) == VOS__WINDOWS16) + { + sResult += _T("- 16-bit Windows"); + dwFileOS &= ~VOS__WINDOWS16; + } + if ((dwFileOS & VOS__PM16) == VOS__PM16) + { + sResult += _T("- 16-bit PM"); + dwFileOS &= ~VOS__PM16; + } + if ((dwFileOS & VOS__WINDOWS32) == VOS__WINDOWS32) + { + sResult += _T("- Win32"); + dwFileOS &= ~VOS__WINDOWS32; + } + + // Basic OS + if ((dwFileOS & VOS_OS232) == VOS_OS232) + { + sResult += _T("- 32-bit OS/2"); + dwFileOS &= ~VOS_OS232; + } + if ((dwFileOS & VOS_DOS) == VOS_DOS) + { + sResult += _T("- MS-DOS"); + dwFileOS &= ~VOS_DOS; + } + if ((dwFileOS & VOS_OS216) == VOS_OS216) + { + sResult += _T("- 16-bit OS/2"); + dwFileOS &= ~VOS_OS216; + } + if ((dwFileOS & VOS_NT) == VOS_NT) + { + sResult += _T("- Windows NT"); + dwFileOS &= ~VOS_NT; + } + // If the OS still contains flags, it are flag we did not anticipate + if (dwFileOS != 0) + { + sResult += _T("- Unknown"); + } + if (!sResult.IsEmpty()) + // ... If the result is not empty, remove the leading hyphen + sResult = sResult.Mid(2); + else + // ... If the result is empty, no OS was specified + sResult = _T("None"); + + return sResult; + } + +void COXVersionInfo::Empty() + { + m_dwSignature = 0; + m_dwStrucVersion = 0; + m_dwFileVersionMS = 0; + m_dwFileVersionLS = 0; + m_dwProductVersionMS = 0; + m_dwProductVersionLS = 0; + m_dwFileFlagsMask = 0; + m_dwFileFlags = 0; + m_dwFileOS = 0; + m_dwFileType = 0; + m_dwFileSubtype = 0; + m_dwFileDateMS = 0; + m_dwFileDateLS = 0; + + m_dwLanguageCountryID = 0; + m_sLanguageCountry = _T(""); + + m_sComments = _T(""); + m_sCompanyName = _T(""); + m_sFileDescription = _T(""); + m_sFileVersion = _T(""); + m_sInternalName = _T(""); + m_sLegalCopyright = _T(""); + m_sLegalTrademarks = _T(""); + m_sOriginalFilename = _T(""); + m_sPrivateBuild = _T(""); + m_sProductName = _T(""); + m_sProductVersion = _T(""); + m_sSpecialBuild = _T(""); + + m_bValid = FALSE; + } + +COXVersionInfo::~COXVersionInfo() + { + } + +// Diagnostics --------------------------------------------------------------- +#ifdef _DEBUG +void COXVersionInfo::AssertValid() const + { + CObject::AssertValid(); + } + +void COXVersionInfo::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + + dc << _T("\nm_dwSignature : ") << m_dwSignature;; + dc << _T("\nm_dwStrucVersion : ") << m_dwStrucVersion; + dc << _T("\nm_dwFileVersionMS : ") << m_dwFileVersionMS; + dc << _T("\nm_dwFileVersionLS : ") << m_dwFileVersionLS; + dc << _T("\nm_dwProductVersionMS : ") << m_dwProductVersionMS; + dc << _T("\nm_dwProductVersionLS : ") << m_dwProductVersionLS; + dc << _T("\nm_dwFileFlagsMask : ") << m_dwFileFlagsMask; + dc << _T("\nm_dwFileFlags : ") << m_dwFileFlags; + dc << _T("\nm_dwFileOS : ") << m_dwFileOS; + dc << _T("\nm_dwFileType : ") << m_dwFileType; + dc << _T("\nm_dwFileSubtype : ") << m_dwFileSubtype; + dc << _T("\nm_dwFileDateMS : ") << m_dwFileDateMS; + dc << _T("\nm_dwFileDateLS : ") << m_dwFileDateLS; + + dc << _T("\nm_dwLanguageCountryID : ") << m_dwLanguageCountryID; + dc << _T("\nm_sLanguageCountry : ") << m_sLanguageCountry; + + dc << _T("\nm_sComments : ") << m_sComments; + dc << _T("\nm_sCompanyName : ") << m_sCompanyName; + dc << _T("\nm_sFileDescription : ") << m_sFileDescription; + dc << _T("\nm_sFileVersion : ") << m_sFileVersion; + dc << _T("\nm_sInternalName : ") << m_sInternalName; + dc << _T("\nm_sLegalCopyright : ") << m_sLegalCopyright; + dc << _T("\nm_sLegalTrademarks : ") << m_sLegalTrademarks; + dc << _T("\nm_sOriginalFilename : ") << m_sOriginalFilename; + dc << _T("\nm_sPrivateBuild : ") << m_sPrivateBuild; + dc << _T("\nm_sProductName : ") << m_sProductName; + dc << _T("\nm_sProductVersion : ") << m_sProductVersion; + dc << _T("\nm_sSpecialBuild; : ") << m_sSpecialBuild;; + + dc << _T("\nm_bValid : ") << m_bValid; + } +#endif //_DEBUG + +// protected: + +// private: + +// Message handlers --------------------------------------------------------- + +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXWebView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXWebView.cpp new file mode 100644 index 0000000..08df842 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/OXWebView.cpp @@ -0,0 +1,732 @@ +// ============================================================================= +// Class Implementation : COXWebView +// ============================================================================= +// +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. +// +///////////////////////////////////////////////////////////////////////////// + +#include "StdAfx.h" +#include "OXWebView.h" +#include "OXMainRes.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +#ifndef CSC_NAVIGATEBACK + #define CSC_NAVIGATEBACK 2 +#endif + +#ifndef CSC_NAVIGATEFORWARD + #define CSC_NAVIGATEFORWARD 1 +#endif + +// Edit control that adds item to combobox upon pressing enter. + +const int ECA_NO_DUPLICATES = 0x1; +const int ECA_DEFAULT = ECA_NO_DUPLICATES; + +class OX_CLASS_DECL CEditComboboxAdder : public CEdit +{ +public: + CEditComboboxAdder(CWnd* pCB, int nFlags = ECA_DEFAULT, int nMaxEntries = 20); + virtual BOOL PreTranslateMessage(MSG* pMsg); +protected: + virtual void PostNcDestroy() + { + delete this; + } +private: + // Note: The control ID for the edit control of a combobox + // is 1001. It seems quite unlikely that Microsoft + // would ever change this, but if it happens, the + // following anonymous enumeration will need updating. + + enum { IDC_COMBOBOX_EDIT = 1001 }; + + CComboBox* m_pCB; + int m_nMaxEntries; + int m_nFlags; +}; + +CEditComboboxAdder::CEditComboboxAdder(CWnd* pCB, int nFlags, int nMaxEntries) + : + m_nFlags(nFlags), + m_nMaxEntries(nMaxEntries) + { + UINT uiEdit = IDC_COMBOBOX_EDIT; + m_pCB = (CComboBox*)pCB; + ASSERT_VALID(pCB); + VERIFY(SubclassDlgItem(uiEdit, pCB)); + } + +BOOL CEditComboboxAdder::PreTranslateMessage(MSG* pMsg) + { + if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN) + { + CString s; + GetWindowText(s); + + // If we are supposed to prevent duplicates, and the + // given item exists, delete it. + + int nDupe; + if ((m_nFlags & ECA_NO_DUPLICATES) && + ((nDupe = m_pCB->FindStringExact(-1, s)) != CB_ERR)) + { + m_pCB->DeleteString(nDupe); + } + + // Add the item to the top and select it. + + m_pCB->InsertString(0, s); + m_pCB->SetCurSel(0); + + // If we have more than the maximum, trim the list. + + for (int n = m_pCB->GetCount(); n > m_nMaxEntries; n--) + m_pCB->DeleteString(n - 1); + + // Fake the selection change notifcation. + + CWnd* pwndParent = m_pCB->GetParent(); + if (pwndParent != NULL) + { + WPARAM w = MAKEWPARAM(m_pCB->GetDlgCtrlID(), CBN_SELCHANGE); + LPARAM l = (LPARAM)m_pCB->GetSafeHwnd(); + pwndParent->PostMessage(WM_COMMAND, w, l); + } + + return TRUE; + } + + return FALSE; + } + +///////////////////////////////////////////////////////////////////////////// +// COXWebView + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + +// Data members ------------------------------------------------------------- +// private: + +CFont* COXWebView::m_pfontToolbarURL; +int COXWebView::m_nNumInstantiated; + +IMPLEMENT_DYNCREATE(COXWebView, CView) + +BEGIN_MESSAGE_MAP(COXWebView, CView) + //{{AFX_MSG_MAP(COXWebView) + ON_WM_CREATE() + ON_WM_SIZE() + ON_COMMAND(ID_OX_WEBVIEW_BACK, OnWebviewBack) + ON_COMMAND(ID_OX_WEBVIEW_FORWARD, OnWebviewForward) + ON_UPDATE_COMMAND_UI(ID_OX_WEBVIEW_BACK, OnUpdateWebviewBack) + ON_UPDATE_COMMAND_UI(ID_OX_WEBVIEW_FORWARD, OnUpdateWebviewForward) + ON_COMMAND(ID_OX_WEBVIEW_HOME, OnWebviewHome) + ON_COMMAND(ID_OX_WEBVIEW_SEARCH, OnWebviewSearch) + ON_UPDATE_COMMAND_UI(ID_OX_WEBVIEW_STOP, OnUpdateWebviewStop) + ON_COMMAND(ID_OX_WEBVIEW_STOP, OnWebviewStop) + ON_UPDATE_COMMAND_UI(ID_FILE_PRINT_PREVIEW, OnUpdateFilePrintPreview) + ON_COMMAND(ID_FILE_PRINT, OnFilePrint) + ON_UPDATE_COMMAND_UI(ID_OX_WEBVIEW_REFRESH, OnUpdateWebviewRefresh) + ON_COMMAND(ID_OX_WEBVIEW_REFRESH, OnWebviewRefresh) + //}}AFX_MSG_MAP + // 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) + + ON_CBN_SELCHANGE(IDC_TOOLBAR_URL, OnToolbarURLChange) + ON_NOTIFY_EX(TTN_NEEDTEXTA, 0, OnTooltipNeedText) + ON_NOTIFY_EX(TTN_NEEDTEXTW, 0, OnTooltipNeedText) + //ON_NOTIFY_EX_RANGE(TTN_NEEDTEXT, 0, 0xFFFFFFFF, OnTooltipNeedText) + +END_MESSAGE_MAP() + +BEGIN_EVENTSINK_MAP(COXWebView, CView) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x64, BeforeNavigate, VTS_BSTR VTS_I4 VTS_BSTR VTS_PVARIANT VTS_BSTR VTS_PVARIANT) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x65, NavigateComplete, VTS_BSTR) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x66, StatusTextChange, VTS_BSTR) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x67, Quit, VTS_PVARIANT) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x6a, DownloadBegin, VTS_NONE) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x6b, NewWindow, VTS_BSTR VTS_I4 VTS_BSTR VTS_PVARIANT VTS_BSTR VTS_PVARIANT) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x6c, ProgressChange, VTS_I4 VTS_I4) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x68, DownloadComplete, VTS_NONE) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x69, CommandStateChange, VTS_I4 VTS_BOOL) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x70, PropertyChange, VTS_BSTR) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0x71, TitleChange, VTS_BSTR) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0xc8, FrameBeforeNavigate, VTS_BSTR VTS_I4 VTS_BSTR VTS_PVARIANT VTS_BSTR VTS_PVARIANT) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0xc9, FrameNavigateComplete, VTS_BSTR) + ON_EVENT(COXWebView, IDC_WEB_CTRL, 0xcc, FrameNewWindow, VTS_BSTR VTS_I4 VTS_BSTR VTS_PVARIANT VTS_BSTR VTS_PVARIANT) +END_EVENTSINK_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COXWebView construction/destruction + +COXWebView::COXWebView() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + : + m_bCanGoBack(FALSE), + m_bCanGoForward(FALSE), + m_bCanRefresh(FALSE) + { + if (m_nNumInstantiated++ == 0) + { + CDC DC; + DC.CreateCompatibleDC(NULL); + LOGFONT lf; + memset(&lf, 0, sizeof(lf)); + _tcscpy(lf.lfFaceName, _T("MS Sans Serif")); + const int POINTS_PER_INCH = 72; + const int PPLIY = DC.GetDeviceCaps(LOGPIXELSY); + lf.lfHeight = -MulDiv(8, PPLIY, POINTS_PER_INCH); + m_pfontToolbarURL = new CFont; + m_pfontToolbarURL->CreateFontIndirect(&lf); + } + } + +COXWebView::~COXWebView() + { + if (--m_nNumInstantiated == 0) + { + delete m_pfontToolbarURL; + m_pfontToolbarURL = NULL; + } + } + +///////////////////////////////////////////////////////////////////////////// +// COXWebView drawing + +void COXWebView::OnDraw(CDC* /* pDC */) + { + // no implementation + } + +///////////////////////////////////////////////////////////////////////////// +// COXWebView printing + +BOOL COXWebView::OnPreparePrinting(CPrintInfo* pInfo) + { + // default preparation + return DoPreparePrinting(pInfo); + } + +void COXWebView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) + { + // TODO: add extra initialization before printing + } + +void COXWebView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) + { + // TODO: add cleanup after printing + } + +///////////////////////////////////////////////////////////////////////////// +// COXWebView diagnostics + +#ifdef _DEBUG +void COXWebView::AssertValid() const + { + CView::AssertValid(); + } + +void COXWebView::Dump(CDumpContext& dc) const + { + CView::Dump(dc); + } + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COXWebView message handlers + +int COXWebView::OnCreate(LPCREATESTRUCT lpCreateStruct) + { + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // Fail if we cannot create the web control. + + if (!m_WebCtrl.Create(_T(""), WS_VISIBLE|WS_CHILD, + CRect(0, 0, 0, 0), this, IDC_WEB_CTRL)) + { + TRACE0("COXWebView::OnCreate could not create web control\n"); + return -1; + } + + // The control ID specified in the create function does + // not actually get used for the container ID; instead, + // zero is used. Unfortunately, the RepositionBars method + // will not actually resize the web control if the container + // ID is zero. Thus, we set it to something else here. Also, + // FYI, this cannot be done with SetDlgCtrlID--it sneakily + // checks to see if the window in question is a client site + // and changes the ID of the ActiveX control instead. The + // more MFC does, the more it frustrates customizations. + + SetWindowLong(m_WebCtrl.GetSafeHwnd(), GWL_ID, 1); + +#ifdef _DEBUG + // (Make sure OXWebViev.rc is included in your resource file) + HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(IDR_OX_WEBVIEW_BAR), RT_TOOLBAR); + HRSRC hRsrc = ::FindResource(hInst, MAKEINTRESOURCE(IDR_OX_WEBVIEW_BAR), RT_TOOLBAR); + ASSERT(hRsrc != NULL); +#endif + + // Fail if we cannot create the toolbar. + if (!m_Toolbar.Create(this) || + !m_Toolbar.LoadToolBar(IDR_OX_WEBVIEW_BAR)) + { + TRACE0("COXWebView::OnCreate could not create toolbar\n"); + return -1; + } + + // Create the combobox on the toolbar. + + CRect rc; + const int HEIGHT = 150; + const int WIDTH = 200; + CToolBarCtrl& t = m_Toolbar.GetToolBarCtrl(); + int nNum = t.GetButtonCount(); + t.GetItemRect(nNum - 1, &rc); + CSize sizeOfs(rc.Width() / 2, rc.top); + rc.top = sizeOfs.cy; + rc.bottom = rc.top + HEIGHT; + rc.left = rc.right + sizeOfs.cx; + rc.right = rc.left + WIDTH; + + if (!m_cbxToolbarURL.Create(CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL, + rc, &t, IDC_TOOLBAR_URL)) + { + TRACE0("COXWebView::OnCreate could not create toolbar URL combo-box\n"); + return -1; + } + m_cbxToolbarURL.SetFont(m_pfontToolbarURL, FALSE); + + // Add combobox edit control handling for entering URLs. + + CEditComboboxAdder* pCbxEdit; + pCbxEdit = new CEditComboboxAdder(&m_cbxToolbarURL); + ASSERT(pCbxEdit != NULL); + + // Load up the tooltips for the toolbar. + + VERIFY(m_Tooltips.Create(&m_Toolbar)); + for (int n = 0; n < nNum; n++) + { + TBBUTTON btn; + t.GetButton(n, &btn); + t.GetItemRect(n, &rc); + m_Tooltips.AddTool(&t, LPSTR_TEXTCALLBACK, rc, btn.idCommand); + } + t.SetToolTips(&m_Tooltips); + + return 0; + } + +void COXWebView::OnSize(UINT nType, int cx, int cy) + { + // First, make sure that the view window has finished + // its own sizing. + + CView::OnSize(nType, cx, cy); + UpdateWindow(); + + // Now, force an update of the toolbar, and resize the + // combobox to take advantage of all available room. + + CRect rcTB, rc, rcLast; + RepositionBars(AFX_IDW_TOOLBAR, AFX_IDW_TOOLBAR, 1); + CToolBarCtrl& t = m_Toolbar.GetToolBarCtrl(); + int nNum = t.GetButtonCount(); + t.GetClientRect(&rcTB); + m_cbxToolbarURL.GetWindowRect(&rc); + t.ScreenToClient(&rc); + t.GetItemRect(nNum - 1, &rcLast); + const int HOFS = rcLast.Width() / 2; + rc.left = rcLast.right + HOFS; + rc.right = rcTB.right; + + // Make sure the combobox is at least four buttons wide. + + if (rc.Width() < HOFS * 8) + rc.right = rc.left + HOFS * 8; + + m_cbxToolbarURL.MoveWindow(rc); + } + +void COXWebView::OnUpdateWebviewBack(CCmdUI* pCmdUI) + { + pCmdUI->Enable(m_bCanGoBack); + } + +void COXWebView::OnWebviewBack() + { + m_WebCtrl.GoBack(); + } + +void COXWebView::OnUpdateWebviewForward(CCmdUI* pCmdUI) + { + pCmdUI->Enable(m_bCanGoForward); + } + +void COXWebView::OnWebviewForward() + { + m_WebCtrl.GoForward(); + } + +void COXWebView::OnWebviewHome() + { + m_WebCtrl.GoHome(); + } + +void COXWebView::OnWebviewSearch() + { + m_WebCtrl.GoSearch(); + } + +void COXWebView::OnUpdateWebviewStop(CCmdUI* pCmdUI) + { + pCmdUI->Enable(m_WebCtrl.GetBusy()); + } + +void COXWebView::OnWebviewStop() + { + m_WebCtrl.Stop(); + } + +void COXWebView::OnUpdateWebviewRefresh(CCmdUI* pCmdUI) + { + pCmdUI->Enable(m_bCanRefresh); + } + +void COXWebView::OnWebviewRefresh() + { + m_WebCtrl.Refresh(); + } + +void COXWebView::OnToolbarURLChange() + { + int nSel = m_cbxToolbarURL.GetCurSel(); + if (nSel != CB_ERR) + { + CString s; + m_cbxToolbarURL.GetLBText(nSel, s); + m_WebCtrl.Navigate(s, NULL, NULL, NULL, NULL); + } + } + +BOOL COXWebView::OnTooltipNeedText(UINT /* id */, NMHDR* pNMHDR, LRESULT* pResult) + { + // need to handle both ANSI and UNICODE versions of the message + TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR; + TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR; + CString strTipText; + UINT nID = pNMHDR->idFrom; + if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) || + pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND)) + { + // idFrom is actually the HWND of the tool + nID = ((UINT)(WORD)::GetDlgCtrlID((HWND)nID)); + } + + if (nID != 0) // will be zero on a separator + { + strTipText.LoadString(nID); + int nNewLine = strTipText.Find('\n'); + if (nNewLine != -1) + strTipText = strTipText.Mid(nNewLine + 1); + } +#ifndef _UNICODE + if (pNMHDR->code == TTN_NEEDTEXTA) + lstrcpyn(pTTTA->szText, strTipText, + (sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0]))); + else + _mbstowcsz(pTTTW->szText, strTipText, + (sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0]))); +#else + if (pNMHDR->code == TTN_NEEDTEXTA) + _wcstombsz(pTTTA->szText, strTipText, + (sizeof(pTTTA->szText)/sizeof(pTTTA->szText[0]))); + else + lstrcpyn(pTTTW->szText, strTipText, + (sizeof(pTTTW->szText)/sizeof(pTTTW->szText[0]))); +#endif + *pResult = 0; + + // bring the tooltip window above other popup windows + ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0, + SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE); + + return TRUE; // message was handled + } + +void COXWebView::OnUpdateFilePrintPreview(CCmdUI* pCmdUI) + { + pCmdUI->Enable(FALSE); + } + +void COXWebView::OnFilePrint() + { + m_WebCtrl.Print(); + } + +///////////////////////////////////////////////////////////////////////////// +// Web control notification handlers. + +void COXWebView::BeforeNavigate(LPCTSTR /* pcszURL */, long /* lFlags */, LPCTSTR /* pcszTargetFrameName */, VARIANT* /* PostData */, LPCTSTR /* pcszHeaders */, VARIANT_BOOL* /* pbCancel */) + // --- In : pcszURL : The URL to which the view is about to navigate. + // lFlags : (reserved for Microsoft's future use) + // pcszTargetFrameName : String that contains the name of + // the frame in which to display the + // resource, or NULL if no named frame + // is targeted for the resource. + // PostData : Address of data to send to the server if the + // HTTP POST transaction is being used. + // pcszHeaders : Additional HTTP headers to send to the server + // (HTTP URLs only). The headers can specify + // such things as the action required of the + // server, the type of data being passed to the + // server, or a status code. + // --- Out : pbCancel : Address of cancel flag. An application can set + // this parameter to TRUE to cancel the navigation + // operation, or FALSE to allow it to proceed. + // --- Returns : + // --- Effect : This method is called prior to a navigation operation. + { + //TRACE1("COXWebView::BeforeNavigate %s\n", pcszURL); + } + +void COXWebView::NavigateComplete(LPCTSTR /* pcszURL */) + // --- In : pcszURL : The URL to which the view is now positioned. + // --- Out : + // --- Returns : + // --- Effect : This method is called after a navigation operation + // is completed. + { + m_bCanRefresh = TRUE; + CString s = m_WebCtrl.GetLocationURL(); + m_cbxToolbarURL.SetWindowText(s); + + //TRACE1("COXWebView::NavigateComplete %s\n", pcszURL); + } + +void COXWebView::StatusTextChange(LPCTSTR /* pcszText */) + // --- In : pcszText : The message describing an event that + // has occurred. + // --- Out : + // --- Returns : + // --- Effect : This method is called when something has happened of + // which the application might want to inform the user. + { + //TRACE1("COXWebView::StatusTextChange %s\n", pcszText); + } + +void COXWebView::Quit(VARIANT_BOOL* /* pbCancel */) + // --- In : + // --- Out : pbCancel : Address of the cancel flag. An application + // can set this parameter to TRUE to cancel the + // quit operation, or FALSE to allow it to + // continue. + // --- Returns : + // --- Effect : This method is called when the Internet Explorer + // application is ready to quit. + { + //TRACE0("COXWebView::Quit\n"); + } + +void COXWebView::DownloadBegin() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that a navigation operation + // is beginning. This event is fired shortly after the + // BeforeNavigate event, unless the navigation is cancelled. + { + //TRACE0("COXWebView::DownloadBegin\n"); + } + +void COXWebView::NewWindow(LPCTSTR /* pcszURL */, long /* lFlags */, LPCTSTR /* pcszTargetFrameName */, VARIANT* /* PostData */, LPCTSTR /* pcszHeaders */, VARIANT_BOOL* /* pbCancel */) + // --- In : pcszURL : The URL to which the view is about to navigate. + // lFlags : (reserved for Microsoft's future use) + // pcszTargetFrameName : String that contains the name of + // the frame in which to display the + // resource, or NULL if no named frame + // is targeted for the resource. + // PostData : Address of data to send to the server if the + // HTTP POST transaction is being used. + // pcszHeaders : Additional HTTP headers to send to the server + // (HTTP URLs only). The headers can specify + // such things as the action required of the + // server, the type of data being passed to the + // server, or a status code. + // --- Out : pbCancel : Address of cancel flag. An application can set + // this parameter to TRUE to cancel the navigation + // operation, or FALSE to allow it to proceed. + // --- Returns : + // --- Effect : Notifies an application that a new window is to be + // created for displaying a resource. + { + //TRACE1("COXWebView::NewWindow %s\n", pcszURL); + } + +void COXWebView::ProgressChange(long /* lProgress */, long /* lProgressMax */) + // --- In : lProgress : Amount of total progress to show, + // or -1 when progress is complete. + // lProgressMax : Maximum progress value. + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that the progress of a + // download operation has been updated. + { + //TRACE2("COXWebView::ProgressChange %i of %i\n", lProgress, lProgressMax); + } + +void COXWebView::DownloadComplete() + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Occurs when a navigation operation finished, was halted, + // or failed. Unlike NavigateComplete which is only fired + // when a URL is successfully navigated to, this event + // is always fired after a navigation starts. Any animation + // or "busy" indication that the container needs to display + // should be connected to this event. + { + //TRACE0("COXWebView::DownloadComplete\n"); + } + +void COXWebView::CommandStateChange(long lCmdID, BOOL bEnabled) + // --- In : lCmdID : Identifier of the command whose enable state + // has changed. + // bEnabled : This parameter is TRUE if the command is + // enabled, or FALSE if it is disabled. + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that the enabled state of a Web + // browser command has changed. + { + switch (lCmdID) + { + case CSC_NAVIGATEBACK: + m_bCanGoBack = bEnabled; + break; + case CSC_NAVIGATEFORWARD: + m_bCanGoForward = bEnabled; + break; + } + + // TRACE(_T("COXWebView::CommandStateChange 0x%X %i\n"), lCmdID, bEnabled); + } + +void COXWebView::PropertyChange(LPCTSTR /* pcszProperty */) + // --- In : pcszProperty : The name of the property that has changed. + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that the IWebBrowser::PutProperty + // function has changed the value of a property. + { + // TRACE1("COXWebView::PropertyChange %s\n", pcszProperty); + } + +void COXWebView::TitleChange(LPCTSTR /* pcszTitle */) + // --- In : pcszTitle : Caller allocated buffer that contains the + // new document title. + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that the title of a document + // in the Web browser control becomes available or changes. + // For HTML, the title may change; while HTML is still + // downloading, the URL of the document is set as the title. + // After the real title (if there is one) is parsed from the + // HTML, the title is changed to reflect the actual title. + { + // TRACE1("COXWebView::TitleChange %s\n", pcszTitle); + } + +void COXWebView::FrameBeforeNavigate(LPCTSTR /* pcszURL */, long /* lFlags */, LPCTSTR /* pcszTargetFrameName */, VARIANT* /* PostData */, LPCTSTR /* pcszHeaders */, VARIANT_BOOL* /* pbCancel */) + // --- In : pcszURL : The URL to which the view is about to navigate. + // lFlags : (reserved for Microsoft's future use) + // pcszTargetFrameName : String that contains the name of + // the frame in which to display the + // resource, or NULL if no named frame + // is targeted for the resource. + // PostData : Address of data to send to the server if the + // HTTP POST transaction is being used. + // pcszHeaders : Additional HTTP headers to send to the server + // (HTTP URLs only). The headers can specify + // such things as the action required of the + // server, the type of data being passed to the + // server, or a status code. + // --- Out : pbCancel : Address of cancel flag. An application can set + // this parameter to TRUE to cancel the navigation + // operation, or FALSE to allow it to proceed. + // --- Returns : + // --- Effect : Notifies an application that Web browser control is + // about to navigate to a different URL, which may happen + // as a result of external automation, internal automation + // from a script, or the user clicking a link or typing in + // the address bar. The container has an opportunity to + // cancel the pending navigation. This event is fired for + // navigations that occur inside an HTML frame. + { + // TRACE1("COXWebView::FrameBeforeNavigate %s\n", pcszURL); + } + +void COXWebView::FrameNavigateComplete(LPCTSTR /* pcszURL */) + // --- In : pcszURL : URL to be navigated to. Note that this URL can be + // different from the URL that the browser was told + // to navigate to. + // --- Out : + // --- Returns : + // --- Effect : Notifies an application that the browser has successfully + // navigated to a new location. The document may still be + // downloading (and in the case of HTML, images may still be + // downloading), but at least part of the document has been + // received from the server and the viewer for the document + // has been created. This event is fired for navigations + // that occur inside an HTML frame. + { + // TRACE1("COXWebView::FrameNavigateComplete %s\n", pcszURL); + } + +void COXWebView::FrameNewWindow(LPCTSTR /* pcszURL */, long /* lFlags */, LPCTSTR /* pcszTargetFrameName */, VARIANT* /* PostData */, LPCTSTR /* pcszHeaders */, VARIANT_BOOL* /* pbCancel */) + // --- In : pcszURL : The URL to which the view is about to navigate. + // lFlags : (reserved for Microsoft's future use) + // pcszTargetFrameName : String that contains the name of + // the frame in which to display the + // resource, or NULL if no named frame + // is targeted for the resource. + // PostData : Address of data to send to the server if the + // HTTP POST transaction is being used. + // pcszHeaders : Additional HTTP headers to send to the server + // (HTTP URLs only). The headers can specify + // such things as the action required of the + // server, the type of data being passed to the + // server, or a status code. + // --- Out : pbCancel : Address of cancel flag. An application can set + // this parameter to TRUE to cancel the navigation + // operation, or FALSE to allow it to proceed. + // --- Returns : + // --- Effect : Notifies an application that a new window is to be + // created for displaying a resource. + { + // TRACE1("COXWebView::FrameNewWindow %s\n", pcszURL); + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/PROGRESS.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/PROGRESS.CPP new file mode 100644 index 0000000..5beeef1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/PROGRESS.CPP @@ -0,0 +1,129 @@ +// ========================================================================== +// Class Implementation : COXDiffProgress +// ========================================================================== + +// Source file : progress.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "progress.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXDiffProgress, CObject) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + +// Data members ------------------------------------------------------------- +// protected: + // LONG m_MinVal; + // --- The minimum value of the progress bar (specified with Init()) + + // LONG m_MaxVal; + // --- The maximumvalue of the progress bar (specified with Init()) + + // LONG m_CurPos; + // --- The current value of the progress bar + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXDiffProgress::COXDiffProgress() + : + m_MinVal(0), + m_MaxVal(0), + m_CurPos(0) + { + } + +void COXDiffProgress::Init(LONG minVal, LONG maxVal, LPCTSTR pszMessage) + { + + _tprintf(_T("%s\r\n"),pszMessage); + _tprintf(_T("________________________________________\r")); + + if (maxVal == minVal) + maxVal = minVal + 1; + + m_MinVal = minVal; + m_MaxVal = maxVal; + m_CurPos = 0; + } + +BOOL COXDiffProgress::Adjust(LONG curVal) + { + // ... Must have initialized first + ASSERT( ! (m_MinVal == 0 && m_MaxVal == 0 && m_CurPos == 0) ); + + + LONG pos; + + pos = 40 * (curVal - m_MinVal) / (m_MaxVal - m_MinVal); + while (pos > m_CurPos) + { + _tprintf(_T("#")); + m_CurPos++; + } + + return TRUE; + } + +void COXDiffProgress::Abort(LPCTSTR pszMessage) + { + TRACE(_T("COXDiffProgress::Abort : %s\n"), pszMessage); + _ftprintf(stderr,_T("%s\n"),pszMessage); + exit(-1); + } + +void COXDiffProgress::Close() + { + Adjust(m_MaxVal); + _tprintf(_T("\r\n")); + + m_MinVal = 0; + m_MaxVal = 0; + m_CurPos = 0; + } + +#ifdef _DEBUG +void COXDiffProgress::Dump(CDumpContext& dc) const + { + CObject::Dump(dc); + dc << TEXT("\nm_MinVal : ") << m_MinVal; + dc << TEXT("\nm_MaxVal : ") << m_MaxVal; + dc << TEXT("\nm_CurPos : ") << m_CurPos; + } + +void COXDiffProgress::AssertValid() const + { + CObject::AssertValid(); + ASSERT(m_MinVal <= m_MaxVal); + ASSERT(m_MinVal <= m_CurPos); + ASSERT(m_CurPos <= m_MaxVal); + } +#endif + +COXDiffProgress::~COXDiffProgress() + { + } + +// protected: +// private: +// ========================================================================== + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMAINFRM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMAINFRM.CPP new file mode 100644 index 0000000..bad038f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMAINFRM.CPP @@ -0,0 +1,187 @@ +// ========================================================================== +// Class Implementation : COXMainFrame +// ========================================================================== + +// Source file : xmainfrm.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "xmainfrm.h" // class specification + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNAMIC(COXMainFrame, CMDIFrameWnd) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + + +// Data members ------------------------------------------------------------- +// protected: + // COXMDIClient m_XMDIClient + // --- The subclassed MDI Client. + // All messages (like WM_ERASEBACKGROUND,...)meant for the old MDI Client + // will now pass through this new MDI CLIENT + +// private: + +// Member functions --------------------------------------------------------- +// public: + +COXMainFrame::COXMainFrame() + : m_pWindowPlacement(NULL) + { + } + +BOOL COXMainFrame::CreateClient(LPCREATESTRUCT lpCreateStruct, CMenu* pWindowMenu) + { + if (CMDIFrameWnd::CreateClient(lpCreateStruct, pWindowMenu)) + { + // Messages meant for the MDICLIENT have to pass our class First + // the m_hWndMDIClient is a fixed existing handle of the CMDIFrameWnd + m_XMDIClient.SubclassWindow(m_hWndMDIClient); + + return TRUE; + } + + return FALSE; + } + +void COXMainFrame::InitialShowWindow(WINDOWPLACEMENT& windowPlacement, UINT nCmdShow) + { + m_pWindowPlacement = &windowPlacement; + + if (m_pWindowPlacement->length == 0) + ShowWindow(nCmdShow); + else + { + if (nCmdShow != SW_SHOWNORMAL) + m_pWindowPlacement->showCmd = nCmdShow; + + SetWindowPlacement(m_pWindowPlacement); + ShowWindow(m_pWindowPlacement->showCmd); + } + } + +BOOL COXMainFrame::GetPaletteState() + { + return m_XMDIClient.GetPaletteState(); + } + +BOOL COXMainFrame::SetPaletteState(BOOL bBackGround /* = TRUE */) + { + return m_XMDIClient.SetPaletteState(bBackGround); + } + +BOOL COXMainFrame::SetWallPaper(COLORREF rgbColor /* = RGB(192, 192, 192) */, + EWallOrg eWallOrganisation /* = WP_Center */, COXDIB* pDib /* = NULL */) + { + return m_XMDIClient.SetNewBackGround(rgbColor, eWallOrganisation, pDib); + } + +COXMainFrame::~COXMainFrame() + { + } + +#ifdef _DEBUG +void COXMainFrame::AssertValid() const + { + CMDIFrameWnd::AssertValid(); + } + +void COXMainFrame::Dump(CDumpContext& dc) const + { + CMDIFrameWnd::Dump(dc); + + dc << TEXT("\nm_pWindowPlacement") << (const void*)m_pWindowPlacement; + dc << TEXT("\nm_XMDIClient") << (const void*)&m_XMDIClient; + } + +#endif //_DEBUG + +// protected: + + +// Message handlers --------------------------------------------------------- +BEGIN_MESSAGE_MAP(COXMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(COXMainFrame) + ON_WM_PALETTECHANGED() + ON_WM_QUERYNEWPALETTE() + ON_WM_CLOSE() + ON_WM_ACTIVATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +void COXMainFrame::OnPaletteChanged(CWnd* pFocusWnd) + { + CMDIFrameWnd::OnPaletteChanged(pFocusWnd); + + // always realize the palette for the active view + CMDIChildWnd* pMDIChildWnd = MDIGetActive(); + CView* pView = NULL; + if (pMDIChildWnd != NULL) + { + pView = pMDIChildWnd->GetActiveView(); + ASSERT(pView != NULL); + + // notify all child windows that the palette has changed + SendMessageToDescendants(WM_DOREALIZE, (WPARAM)pView->m_hWnd); + } + + // notify the special MDI Client that the palette has changed + m_XMDIClient.SendMessage(WM_DOMDICLTREALIZE, (WPARAM)this, (LPARAM)pFocusWnd->m_hWnd); + } + +BOOL COXMainFrame::OnQueryNewPalette() + { + // always realize the palette for the active view + CMDIChildWnd* pMDIChildWnd = MDIGetActive(); + if (pMDIChildWnd == NULL) + return FALSE; // no active MDI child frame (no new palette) + + CView* pView = pMDIChildWnd->GetActiveView(); + ASSERT(pView != NULL); + + // just notify the target view + pView->SendMessage(WM_DOREALIZE, (WPARAM)pView->m_hWnd); + return TRUE; + } + +void COXMainFrame::OnClose() + { + if (m_pWindowPlacement != NULL) + { + // before it is destroyed, save the position of the window + m_pWindowPlacement->length = sizeof(*m_pWindowPlacement); + if (GetWindowPlacement(m_pWindowPlacement)) + { + m_pWindowPlacement->flags = 0; + if (IsZoomed()) + m_pWindowPlacement->flags |= WPF_RESTORETOMAXIMIZED; + } + } + + CMDIFrameWnd::OnClose(); + } + +void COXMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) + { + CMDIFrameWnd::OnActivate(nState, pWndOther, bMinimized); + + // notify the special MDI Client that the palette could have changed + m_XMDIClient.SendMessage(WM_DOMDICLTREALIZE, (WPARAM)m_hWnd, (LPARAM)m_hWnd); + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMDICLT.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMDICLT.CPP new file mode 100644 index 0000000..281dc99 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/XMDICLT.CPP @@ -0,0 +1,537 @@ +// ========================================================================== +// Class Implementation : COXMDIClient +// ========================================================================== + +// Source file : xmdiclt.cpp + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + + +#include "stdafx.h" +#include "xmdiclt.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// COXMDIClient + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members + // static WNDPROC pfnSuper; + // --- The new window procedure of this Object. + +// Data members ------------------------------------------------------------- +// protected: + + // COXDIB m_bmpBackGround; + // --- the wallpaper of the mainframe + + // CPalette* m_pPictPalette; + // --- the palette of the wallpaper + + // CBitmap* m_pTotalNewBitmap; + // --- the Bitmap of the wallpaper + + // COLORREF m_rgbBkColor; + // --- The Background color of the wallpaper + + // EWallOrg m_eWallPaperOrganisation; + // ---- the organisation of the wallpaper like center, tile,.. + + // CSize m_sizeClient; + // --- The Size of the mainframe Client area = Size of the MDI CLIENT + + // CSize m_DibSize; + // --- The Size of the wallpaper bitmap + + // HBITMAP m_hOldDestBitmap; + // --- Handle of the bitmap that was initially present in the Destination DC + + // HBITMAP m_hOldSrcBitmap; + // --- Handle of the bitmap that was initially present in the Source DC + + // CDC m_MemDCSrc; + // --- the Source Memory DC + + // CDC m_MemDCDest; + // --- the the destination Memory DC + +// Member functions --------------------------------------------------------- +// public: + +COXMDIClient::COXMDIClient() + : + m_sizeClient(0,0), + m_rgbBkColor(GetSysColor(COLOR_APPWORKSPACE)), + m_DibSize(0,0), + m_bFirstCreation(TRUE), + m_bBackGround(FALSE), + m_bWin4(FALSE), + m_hOldDestBitmap(NULL), + m_hOldSrcBitmap(NULL), + m_pTotalNewBitmap(NULL), + m_pPictPalette(NULL) + { +#ifdef WIN32 + OSVERSIONINFO VersionInfo; + VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + GetVersionEx(&VersionInfo); + if (VersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS || + (VersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && VersionInfo.dwMajorVersion >= 4)) + m_bWin4 = TRUE; +#endif + } + +BOOL COXMDIClient::SetPaletteState(BOOL bBackGround /* = TRUE */, + EPalUpdate ePalUpdate /* = PU_IntelUpdate */) + { + BOOL bChange = m_bBackGround != bBackGround; + + m_bBackGround = bBackGround; + + if ((bChange && !m_bBackGround && ePalUpdate != PU_NoUpdate) || ePalUpdate == PU_ForceUpdate) + // Only redraw when we're changing from background to foreground + { + // Trigger the WM_ERASEBKGROUND message + OnDoMDICltRealize((WPARAM)0, MAKELPARAM(1,0)); // same as SendMessage(WM_DOMDICLTREALIZE); + } + + return TRUE; + } + +BOOL COXMDIClient::GetPaletteState() + { + return m_bBackGround; + } + + +BOOL COXMDIClient::SetNewBackGround(COLORREF rgbColor /* = GetSysColor(COLOR_APPWORKSPACE) */, + EWallOrg eWallOrganisation /* = WP_Center */, COXDIB* pDib /* = NULL */) + { + BOOL bSuccess = TRUE; + + m_eWallPaperOrganisation = eWallOrganisation; + m_rgbBkColor = rgbColor; + + if (pDib != NULL && !m_bFirstCreation ) + { + ASSERT((WP_FIRST <= (int)eWallOrganisation) && ((int) eWallOrganisation <= WP_LAST)); + + // Copy all external parameters to internal variables, so we don't have + // to take in account what happens with those parameters outside our + // MDI CLIENT object + m_bmpBackGround = *pDib; + + //Place the Bitmap in the memory dc if there is one + CSize BmpSize; + + if (!m_bmpBackGround.IsEmpty()) + // The user is giving us a new DIB to work with + { + // .... Replace the bitmap in the DC with the bitmap from the DIB + CBitmap* pOldSrcBitmap = m_bmpBackGround.MakeBitmap(&m_MemDCSrc, BmpSize); + + if (pOldSrcBitmap == NULL) + // An Error occurred + { + // Be sure that we will be working with no Bitmap to paint on our screen + m_bmpBackGround.Empty(); + m_eWallPaperOrganisation = WP_Undefined; + bSuccess = FALSE; + } + else + { + if (m_hOldSrcBitmap == NULL) + // Store the original bitmap handle, so we can select it back in when + // we destroy this MDI Client object + { + // Only the first time we can select out the original bitmap and store it + ASSERT(m_hOldSrcBitmap == NULL); + + m_hOldSrcBitmap = (HBITMAP)pOldSrcBitmap->GetSafeHandle(); + } + else + // ... The bitmap we just selected out is a bitmap we allocated ourselves + // ... so we must delete it too + delete pOldSrcBitmap; + + m_pPictPalette = m_bmpBackGround.GetPalette(); + m_DibSize = m_bmpBackGround.GetSize(); + + // Depending on the screen organisation and color and DIB, build up the + // resulting Memory DC that will be used finally in the OnEraseBackGround + // function to be copied from into the screen DC + if (!PrepareMemDC(m_sizeClient.cx, m_sizeClient.cy)) + // An Error occurred + { + // Be sure that we will be working with no Bitmap to paint on our screen + m_bmpBackGround.Empty(); + bSuccess = FALSE; + } + } + } + } + else + { + // Be sure that we will be working with no Bitmap to paint on our screen + m_bmpBackGround.Empty(); + m_DibSize = CSize(0,0); + } + + // Trigger the WM_ERASEBKGROUND message + OnDoMDICltRealize((WPARAM)0, MAKELPARAM(1,0)); // same as SendMessage(WM_DOMDICLTREALIZE); + RedrawWindow(NULL, NULL, + RDW_INVALIDATE|RDW_ERASE|RDW_ERASENOW); + + return bSuccess; + } + +COXMDIClient::~COXMDIClient() + { + if (m_hOldDestBitmap != NULL) + { + // first select the new ones out and delete them afterwards + CBitmap* ptemp3 = m_MemDCDest.SelectObject(CBitmap::FromHandle(m_hOldDestBitmap)); + delete ptemp3; + } + + if (m_hOldSrcBitmap != NULL) + { + // first select the new ones out and delete them afterwards + CBitmap* ptemp4 = m_MemDCSrc.SelectObject(CBitmap::FromHandle(m_hOldSrcBitmap)); + delete ptemp4; + } + + } + +// protected: +BOOL COXMDIClient::PrepareMemDC(int nWidth, int nHeight) + // --- In : nWidth : The needed Width of the bitmap in the Destination MemDC + // nHeight : The needed Height of the bitmap in the Destination MemDC + // --- Out : + // --- Returns : TRUE if succeeded + // --- Effect : Builds a Destination Memory DC out of a given bitmap and organisation +{ + // If there isn't a dib loaded, we don't need do all this calculating + if (m_bmpBackGround.IsEmpty() || m_DibSize.cy <= 0 || m_DibSize.cx <= 0) + return FALSE; + + BeginWaitCursor(); + + int i,j; + CRect TempDibRect(0,0,0,0); + CPalette* pOldDestPal = NULL; + CPalette* pOldSrcPal = NULL; + BOOL bResult = TRUE; + + switch(m_eWallPaperOrganisation) + { + case WP_Tile: + // create a new bitmap which is compatible with the source DC but + // which has other dimensions. We will use the changed dimensions + // to copy later one new build bitmap into a new DC. This is done + // because a memdc can only be used to copy ONE bmp into it. + m_pTotalNewBitmap = new CBitmap; + bResult = m_pTotalNewBitmap->CreateCompatibleBitmap(&m_MemDCSrc, nWidth, nHeight); + if (bResult) + { + // Get the DIB's palette, then select it into DC + if (m_pPictPalette != NULL) + { + // ... Select as background since we have + // already realized in forground if needed + pOldDestPal = m_MemDCDest.SelectPalette(m_pPictPalette, TRUE); + } + // select the compatible bmp into the new Destination memDC + CBitmap* pOldDestBitmap = m_MemDCDest.SelectObject(m_pTotalNewBitmap); + if (m_hOldDestBitmap == NULL) + m_hOldDestBitmap = (HBITMAP)pOldDestBitmap->GetSafeHandle(); + else + delete pOldDestBitmap; + + // Calculate the Tiling organisation and copy each tile to the Destination + // MemDC where we selected a bitmap in with Client Area dimensions + for (i = 0; i < nHeight; i += m_DibSize.cy) + for (j = 0; j < nWidth; j += m_DibSize.cx) + { + TempDibRect = CRect(CPoint(j, i), m_DibSize); + m_MemDCDest.BitBlt(TempDibRect.left, TempDibRect.top, + m_DibSize.cx, m_DibSize.cy, &m_MemDCSrc, 0, 0, SRCCOPY); + } + + // ... Reselect old palette + if (pOldDestPal != NULL) + { + m_MemDCDest.SelectPalette(pOldDestPal, TRUE); + } + } + + break; + case WP_Scale: + + m_pTotalNewBitmap = new CBitmap; + + // Get the DIB's palette, then select it into DC + if (m_pPictPalette != NULL) + { + // ... Select as background since we have + // already realized in forground if needed + pOldSrcPal = m_MemDCSrc.SelectPalette(m_pPictPalette, TRUE); + } + bResult = m_pTotalNewBitmap->CreateCompatibleBitmap(&m_MemDCSrc, nWidth, nHeight); + if (bResult) + { + if (m_pPictPalette != NULL) + { + // ... Select as background since we have + // already realized in forground if needed + pOldDestPal = m_MemDCDest.SelectPalette(m_pPictPalette, TRUE); + } + + // ... Make sure to use the stretching mode best for color pictures +#ifdef WIN32 + ::SetStretchBltMode(m_MemDCDest.m_hDC, COLORONCOLOR); +#else + ::SetStretchBltMode(m_MemDCDest.m_hDC, STRETCH_DELETESCANS); +#endif + + CBitmap* pOldDestBitmap = m_MemDCDest.SelectObject(m_pTotalNewBitmap); + if (m_hOldDestBitmap == NULL) + m_hOldDestBitmap = (HBITMAP)pOldDestBitmap->GetSafeHandle(); + else + delete pOldDestBitmap; + + VERIFY(m_MemDCDest.StretchBlt(0, 0, nWidth, nHeight, &m_MemDCSrc, 0, 0, + m_DibSize.cx, m_DibSize.cy, SRCCOPY)); + + // ... Reselect old palette + if (pOldDestPal != NULL) + { + m_MemDCDest.SelectPalette(pOldDestPal, TRUE); + } + } + + // ... Reselect old palette + if (pOldSrcPal != NULL) + { + m_MemDCSrc.SelectPalette(pOldSrcPal, TRUE); + } + + break; + case WP_Center: + break; + default: + break; + } + + EndWaitCursor(); + return bResult; +} + +BEGIN_MESSAGE_MAP(COXMDIClient, CWnd) + //{{AFX_MSG_MAP(COXMDIClient) + ON_WM_ERASEBKGND() + ON_WM_SIZE() + ON_MESSAGE(WM_DOMDICLTREALIZE, OnDoMDICltRealize) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// Message handlers --------------------------------------------------------- +BOOL COXMDIClient::OnEraseBkgnd(CDC* pDC) + { + CPalette* pOldPal = NULL; + + // Erase only the area needed + // We don't need to paint a special background color, if the screen organisation + // is other than CENTER because this is the only organisation that does not + // cover the entire Client area + if (m_rgbBkColor != pDC->GetBkColor() && (m_eWallPaperOrganisation == WP_Center) || + m_bmpBackGround.IsEmpty()) + { + // Make a brush to erase the background + // + CBrush NewBrush(m_rgbBkColor); + + pDC->SetBrushOrg(0,0); + + CBrush* pOldBrush = (CBrush*)pDC->SelectObject(&NewBrush); + + // Paint the background.... + // + pDC->PatBlt(0, 0, m_sizeClient.cx, + m_sizeClient.cy,PATCOPY); + + pDC->SetBkColor(m_rgbBkColor); + + // Reselect the Old Brush + pDC->SelectObject(pOldBrush); + } + else + CWnd::OnEraseBkgnd(pDC); + + //Place the Bitmap if there is one + if (!m_bmpBackGround.IsEmpty() && !m_bFirstCreation) + { + // Get the DIB's palette, then select it into DC + if (m_pPictPalette != NULL) + { + // ... Select as background since we have + // already realized in forground if needed + pOldPal = pDC->SelectPalette(m_pPictPalette, TRUE); + if (pOldPal != NULL) + pDC->RealizePalette(); + } + + + CRect DibRect(CPoint(0,0), m_DibSize); + // centered rectangle + CRect CenteredDibRect(CPoint(m_sizeClient.cx - (m_DibSize.cx>>1), + m_sizeClient.cy - (m_DibSize.cy>>1)), + m_DibSize); + + // Paint bitmap + // + switch(m_eWallPaperOrganisation) + { + case WP_Center: + pDC->BitBlt(CenteredDibRect.left, CenteredDibRect.top, + CenteredDibRect.Width(), CenteredDibRect.Height(), + &m_MemDCSrc, 0, 0, SRCCOPY); + + break; + case WP_Tile: + case WP_Scale: + pDC->BitBlt(0, 0, + m_sizeClient.cx, m_sizeClient.cy, &m_MemDCDest, 0, 0, SRCCOPY); + break; + default: + break; + } + + // ... Reselect old palette + if (pOldPal != NULL) + { + pDC->SelectPalette(pOldPal, TRUE); + } + + } + + return TRUE; + + } + +WNDPROC COXMDIClient::pfnSuper = NULL; + +WNDPROC* COXMDIClient::GetSuperWndProcAddr() + { + return &pfnSuper; + } + +void COXMDIClient::OnSize(UINT nType, int cx, int cy) + { + CWnd::OnSize(nType, cx, cy); + + // if the app is just starting up, save the window + // dimensions and get out + + // This is just done once at the first time this message is processed + if (m_bFirstCreation) + { + // make the memory dc equal to the clientscreen dc + CClientDC dc(this); + if (m_MemDCSrc.CreateCompatibleDC(&dc) && m_MemDCDest.CreateCompatibleDC(&dc)) + { + m_bFirstCreation = FALSE; + } + } + + if ((m_sizeClient.cx == 0) && (m_sizeClient.cy==0)) + { + m_sizeClient.cx = cx; + m_sizeClient.cy = cy; + + return; + } + + // if the size hasn't changed, break and pass to default + + if ((m_sizeClient.cx == cx) && ( m_sizeClient.cy == cy)) + return; + + // window size has changed so save new dimensions and force + // entire background to redraw, including icon backgrounds + + m_sizeClient.cx = cx; + m_sizeClient.cy = cy; + + // build the memDC that will hold the entire clientscreen image + if (!PrepareMemDC(cx, cy)) + return; + + switch(m_eWallPaperOrganisation) + { + case WP_Tile: + break; + case WP_Scale: + case WP_Center: + RedrawWindow(NULL, NULL, + RDW_INVALIDATE|RDW_ERASE|RDW_ERASENOW); + break; + default: + break; + } + + return; + } + +LRESULT COXMDIClient::OnDoMDICltRealize(WPARAM wParam, LPARAM) + { + if ((HWND)wParam == m_hWnd) + return 0L; + + if ((m_eWallPaperOrganisation == WP_Center && m_bmpBackGround.IsEmpty()) + || !m_bmpBackGround.IsEmpty()) + { + TRACE(_T("In COXMDIClient::OnDoRealize\n")); + + CPalette* pOldPal = NULL; + + CFrameWnd* pAppFrame = (CFrameWnd*)GetParent(); + ASSERT(pAppFrame->IsKindOf(RUNTIME_CLASS( CFrameWnd ))); + + CClientDC appDC(pAppFrame); + int nColorsChanged(0); + // Get the DIB's palette, then select it into DC + if (m_pPictPalette != NULL) + { + // ... Select as background because wallpaper is always background + pOldPal = appDC.SelectPalette(m_pPictPalette, m_bBackGround); + + // match the selected palette to the system palette when we get active + if (pOldPal != NULL) + nColorsChanged = appDC.RealizePalette(); + } + + if (nColorsChanged > 0) + Invalidate(TRUE); + + if (pOldPal != NULL) + // ... Reselect old palette + appDC.SelectPalette(pOldPal, TRUE); + } + + return 0L; + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/oxmdisp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/oxmdisp.cpp new file mode 100644 index 0000000..2c924b2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/archive/source/oxmdisp.cpp @@ -0,0 +1,1682 @@ +// ========================================================================== +// Class Specification : MAPI Framework +// COXMSession; +// COXMInfoStores; +// COXMInfoStore; +// COXMFolders; +// COXMFolder; +// COXMMessages; +// COXMMessage; +// COXMFields; +// COXMField; +// COXMRecipients; +// COXMRecipient; +// COXMAttachments; +// COXMAttachment; +// COXMAddressEntry; + +// ========================================================================== + +// Header file : oxmdisp.h + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "oxmdisp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// COXMSession class + +CString COXMSession::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +EOXMClass COXMSession::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LPUNKNOWN COXMSession::GetMapiobject() +{ + VARIANT result; + GetProperty(0x31, VT_VARIANT, (void*)&result); + return result.punkVal; +} + +void COXMSession::SetMapiobject(LPUNKNOWN pSession) +{ + COleVariant vSession; + vSession.vt = VT_UNKNOWN; + vSession.punkVal = pSession; + SetProperty(0x31, VT_VARIANT, &vSession); +} + +CString COXMSession::GetVersion() +{ + VARIANT result; + GetProperty(0x2c, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMSession::GetOperatingSystem() +{ + VARIANT result; + GetProperty(0x18, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMSession::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMAddressEntry COXMSession::GetCurrentUser() +{ + COXMAddressEntry entry; + VARIANT result; + GetProperty(0x1, VT_VARIANT, (void*)&result); + entry.m_bCurrentSessionUser = TRUE; + entry.AttachDispatch(result.pdispVal); + return entry; +} + +COXMFolder COXMSession::GetInbox() +{ + VARIANT result; + GetProperty(0xf, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMFolder COXMSession::GetOutbox() +{ + VARIANT result; + GetProperty(0x10, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMInfoStores COXMSession::GetInfoStores() +{ + VARIANT result; + GetProperty(0x39, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + + +void COXMSession::Logon(CString sProfileName /*= _T("")*/, CString sProfilePassword /*= _T("")*/, BOOL bShowDialog /*= TRUE*/, BOOL bNewSession /*= FALSE*/, HWND hParentWindow /*= NULL*/) +{ + VARIANT result; + COleVariant vProfileName; + if (!sProfileName.IsEmpty()) + vProfileName = sProfileName; + COleVariant vProfilePassword; + if (!sProfilePassword.IsEmpty()) + vProfilePassword = sProfilePassword; + COleVariant vShowDialog((short)bShowDialog, VT_BOOL); + COleVariant vNewSession((short)bNewSession, VT_BOOL); + COleVariant vParentWindow((LONG) hParentWindow); + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x77, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vProfileName, &vProfilePassword, &vShowDialog, &vNewSession, &vParentWindow); +} + +void COXMSession::Logoff() +{ + VARIANT result; + InvokeHelper(0x76, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +COXMInfoStore COXMSession::GetInfoStore(CString sStoreID) +{ + VARIANT result; + COleVariant vStoreID(sStoreID); + + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x7a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vStoreID); + return result.pdispVal; +} + +COXMFolder COXMSession::GetFolder(CString sFolderID, CString sStoreID /*=_T("")*/) +{ + VARIANT result; + COleVariant vFolderID(sFolderID); + COleVariant vStoreID; + + if (!sStoreID.IsEmpty()) + vStoreID = sStoreID; + + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x74, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFolderID, &vStoreID); + return result.pdispVal; +} + +COXMMessage COXMSession::GetMessage(CString sMessageID, CString sStoreID /*=NULL*/) +{ + VARIANT result; + COleVariant vMessageID(sMessageID); + COleVariant vStoreID; + if (!sStoreID.IsEmpty()) + vStoreID = sStoreID; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x75, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vMessageID, &vStoreID); + return result.pdispVal; +} + +COXMAddressEntry COXMSession::GetAddressEntry(CString sEntryID) +{ + VARIANT result; + COleVariant vEntryID(sEntryID); + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x72, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vEntryID); + return result.pdispVal; +} + +COXMRecipients COXMSession::AddressBook(LPDISPATCH pRecipients /*= NULL*/, + CString sTitle /*= _T("")*/, + BOOL bOneAddress /*= FALSE*/, + BOOL bForceResolution /*= TRUE*/, + LONG nRecipLists /*= 0*/, + CString sTOLabel /*= _T(")*/, + CString sCCLabel /*= _T("")*/, + CString sBCCLabel /*= _T("")*/, + HWND hParentWindow /*= NULL*/) +{ + VARIANT result; + VARIANT vRecipients; + vRecipients.vt = VT_DISPATCH; + vRecipients.pdispVal = pRecipients; + COleVariant vTitle(sTitle); + COleVariant vOneAddress((short)bOneAddress, VT_BOOL); + COleVariant vForceResolution((short)bForceResolution, VT_BOOL); + COleVariant vRecipLists(nRecipLists); + COleVariant vTOLabel; + if (!sTOLabel.IsEmpty()) + vTOLabel = sTOLabel; + COleVariant vCCLabel; + if (!sCCLabel.IsEmpty()) + vCCLabel = sCCLabel; + COleVariant vBCCLabel; + if (!sBCCLabel.IsEmpty()) + vBCCLabel = sBCCLabel; + COleVariant vParentWindow((LONG)hParentWindow); + + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x65, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vRecipients, &vTitle, &vOneAddress, &vForceResolution, &vRecipLists, &vTOLabel, &vCCLabel, &vBCCLabel, &vParentWindow); + return result.pdispVal; +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMInfoStores Class + +CString COXMInfoStores::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +EOXMClass COXMInfoStores::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LONG COXMInfoStores::GetCount() +{ + VARIANT result; + GetProperty(0x9, VT_VARIANT, (void*)&result); + return result.lVal; +} + +COXMInfoStore COXMInfoStores::GetItem(LONG nItem) +{ + COleVariant vItem(nItem); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, + &vItem); + return result.pdispVal; +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMInfoStore Class + +CString COXMInfoStore::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMInfoStores COXMInfoStore::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMInfoStore::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMInfoStore::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LONG COXMInfoStore::GetIndex() +{ + VARIANT result; + GetProperty(0x13, VT_VARIANT, (void*)&result); + return result.lVal; +} + +CString COXMInfoStore::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMInfoStore::GetId() +{ + VARIANT result; + GetProperty(0xe, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMInfoStore::GetProviderName() +{ + VARIANT result; + GetProperty(0x3a, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFolder COXMInfoStore::GetRootFolder() +{ + VARIANT result; + GetProperty(0x3b, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +///////////////////////////////////////////////////////////////////////////// +// COXMFolder Class + +CString COXMFolder::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +LPDISPATCH COXMFolder::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMFolder::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMFolder::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LPUNKNOWN COXMFolder::GetMapiobject() +{ + VARIANT result; + GetProperty(0x31, VT_VARIANT, (void*)&result); + return result.punkVal; +} + +void COXMFolder::SetMapiobject(LPUNKNOWN punkVal) +{ + COleVariant vProp; + vProp.vt = VT_UNKNOWN; + vProp.punkVal = punkVal; + SetProperty(0x31, VT_VARIANT, &vProp); +} + +CString COXMFolder::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMFolder::SetName(CString sName) +{ + COleVariant propVal(sName); + SetProperty(0x17, VT_VARIANT, &propVal); +} + +CString COXMFolder::GetId() +{ + VARIANT result; + GetProperty(0xe, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMFolder::GetFolderID() +{ + VARIANT result; + GetProperty(0x33, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMFolder::GetStoreID() +{ + VARIANT result; + GetProperty(0x34, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFolders COXMFolder::GetFolders() +{ + VARIANT result; + GetProperty(0xd, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMMessages COXMFolder::GetMessages() +{ + VARIANT result; + GetProperty(0x16, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMFields COXMFolder::GetFields() +{ + VARIANT result; + GetProperty(0xc, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +void COXMFolder::Update(BOOL bMakePermanent /*= TRUE*/, BOOL bRrefreshObject /*= FALSE*/) +{ + COleVariant vMakePermanent((short) bMakePermanent, VT_BOOL); + COleVariant vRefreshObject((short) bRrefreshObject, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x84, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vMakePermanent, &vRefreshObject); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMFolders properties + +CString COXMFolders::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFolder COXMFolders::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMFolders::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMFolders::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +COXMFolder COXMFolders::GetFirst() +{ + VARIANT result; + InvokeHelper(0x6d, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + +COXMFolder COXMFolders::GetNext() +{ + VARIANT result; + InvokeHelper(0x6f, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + +COXMFolder COXMFolders::GetLast() +{ + VARIANT result; + InvokeHelper(0x6e, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + +COXMFolder COXMFolders::GetPrevious() +{ + VARIANT result; + InvokeHelper(0x70, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMMessages class + +CString COXMMessages::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFolder COXMMessages::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMMessages::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMMessages::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +COXMMessage COXMMessages::Add(CString sSubject /*= _T("")*/, + CString sText /*= _T("")*/, + CString sType /*= _T("")*/, + LONG nImportance /*= 1*/) +{ + VARIANT result; + COleVariant vSubject; + if (!sSubject.IsEmpty()) + vSubject = sSubject; + COleVariant vText; + if (!sText.IsEmpty()) + vText = sText; + COleVariant vType; + if (!sType.IsEmpty()) + vType = sType; + COleVariant vImportance(nImportance); + + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x64, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vSubject, &vText, &vType, &vImportance); + return result.pdispVal; +} + +void COXMMessages::Delete(BOOL bSubFolders /*= TRUE*/) +{ + COleVariant vSubFolders((short)bSubFolders, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vSubFolders); +} + +void COXMMessages::Sort(LONG nSortOrder) +{ + COleVariant vSortOrder(nSortOrder); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x86, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vSortOrder); +} + +COXMMessage COXMMessages::GetFirst(CString sFilter /*= _T("")*/) +{ + COleVariant vFilter; + if (!sFilter.IsEmpty()) + vFilter = sFilter; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x6d, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFilter); + return result.pdispVal; +} + +COXMMessage COXMMessages::GetNext() +{ + VARIANT result; + InvokeHelper(0x6f, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + +COXMMessage COXMMessages::GetLast(CString sFilter /*= _T("")*/) +{ + COleVariant vFilter; + if (!sFilter.IsEmpty()) + vFilter = sFilter; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x6e, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFilter); + return result.pdispVal; +} + +COXMMessage COXMMessages::GetPrevious() +{ + VARIANT result; + InvokeHelper(0x70, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); + return result.pdispVal; +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMMessage class + +CString COXMMessage::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMMessages COXMMessage::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMMessage::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMMessage::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LPUNKNOWN COXMMessage::GetMapiobject() +{ + VARIANT result; + GetProperty(0x31, VT_VARIANT, (void*)&result); + return result.punkVal; +} + +void COXMMessage::SetMapiobject(LPUNKNOWN pSession) +{ + COleVariant vSession; + vSession.vt = VT_UNKNOWN; + vSession.punkVal = pSession; + SetProperty(0x31, VT_VARIANT, &vSession); +} + +CString COXMMessage::GetId() +{ + VARIANT result; + GetProperty(0xe, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMMessage::GetFolderID() +{ + VARIANT result; + GetProperty(0x33, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMMessage::GetStoreID() +{ + VARIANT result; + GetProperty(0x34, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +CString COXMMessage::GetType() +{ + VARIANT result; + GetProperty(0x11, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMMessage::SetType(CString sType) +{ + COleVariant propVal(sType); + SetProperty(0x11, VT_VARIANT, &propVal); +} + +LONG COXMMessage::GetSize() +{ + VARIANT result; + GetProperty(0x24, VT_VARIANT, (void*)&result); + return result.lVal; +} + +LONG COXMMessage::GetImportance() +{ + VARIANT result; + GetProperty(0x1b, VT_VARIANT, (void*)&result); + return result.lVal; +} + +void COXMMessage::SetImportance(LONG nImportance) +{ + COleVariant propVal(nImportance); + SetProperty(0x1b, VT_VARIANT, &propVal); +} + +CString COXMMessage::GetSubject() +{ + VARIANT result; + GetProperty(0x26, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMMessage::SetSubject(CString sSubject) +{ + COleVariant propVal(sSubject); + SetProperty(0x26, VT_VARIANT, &propVal); +} + +COXMAddressEntry COXMMessage::GetSender() +{ + VARIANT result; + GetProperty(0x20, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COleDateTime COXMMessage::GetTimeSent() +{ + VARIANT result; + GetProperty(0x29, VT_VARIANT, (void*)&result); + return result.date; +} + +void COXMMessage::SetTimeSent(COleDateTime tDate) +{ + COleVariant propVal(tDate); + SetProperty(0x29, VT_VARIANT, &propVal); +} + +COleDateTime COXMMessage::GetTimeReceived() +{ + VARIANT result; + GetProperty(0x28, VT_VARIANT, (void*)&result); + return result.date; +} + +void COXMMessage::SetTimeReceived(COleDateTime tDate) +{ + COleVariant propVal(tDate); + SetProperty(0x28, VT_VARIANT, &propVal); +} + +CString COXMMessage::GetText() +{ + VARIANT result; + GetProperty(0x27, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMMessage::SetText(CString sText) +{ + COleVariant propVal(sText); + SetProperty(0x27, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetSent() +{ + VARIANT result; + GetProperty(0x21, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetSent(BOOL bSent) +{ + COleVariant propVal((short) bSent, VT_BOOL); + SetProperty(0x21, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetSubmitted() +{ + VARIANT result; + GetProperty(0x12, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetSubmitted(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0x12, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetUnread() +{ + VARIANT result; + GetProperty(0x2a, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetUnread(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0x2a, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetSigned() +{ + VARIANT result; + GetProperty(0x23, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetSigned(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0x23, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetEncrypted() +{ + VARIANT result; + GetProperty(0xa, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetEncrypted(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0xa, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetReadReceipt() +{ + VARIANT result; + GetProperty(0x1e, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetReadReceipt(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0x1e, VT_VARIANT, &propVal); +} + +BOOL COXMMessage::GetDeliveryReceipt() +{ + VARIANT result; + GetProperty(0x32, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +void COXMMessage::SetDeliveryReceipt(BOOL bFlag) +{ + COleVariant propVal((short) bFlag, VT_BOOL); + SetProperty(0x32, VT_VARIANT, &propVal); +} + +CString COXMMessage::GetConversationIndex() +{ + VARIANT result; + GetProperty(0x37, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMMessage::SetConversationIndex(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x37, VT_VARIANT, &propVal); +} + +CString COXMMessage::GetConversationTopic() +{ + VARIANT result; + GetProperty(0x36, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMMessage::SetConversationTopic(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x36, VT_VARIANT, &propVal); +} + +COXMFields COXMMessage::GetFields() +{ + VARIANT result; + GetProperty(0xc, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMRecipients COXMMessage::GetRecipients() +{ + VARIANT result; + GetProperty(0x1c, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMAttachments COXMMessage::GetAttachments() +{ + VARIANT result; + GetProperty(0x5, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +void COXMMessage::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +void COXMMessage::Update(BOOL bMakePermanent /*= TRUE*/, BOOL bRefreshObject /*= FALSE*/) +{ + COleVariant vMakePermanent((short) bMakePermanent, VT_BOOL); + COleVariant vRefreshObject((short)bRefreshObject, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x84, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vMakePermanent, &vRefreshObject); +} + +void COXMMessage::Send(BOOL bSaveCopy /*= TRUE*/, BOOL bShowDialog /*= FALSE*/, HWND hParentWindow /*= NULL*/) +{ + COleVariant vSaveCopy((short) bSaveCopy, VT_BOOL); + COleVariant vShowDialog((short) bShowDialog, VT_BOOL); + COleVariant vParentWindow((LONG) hParentWindow); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x83, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vSaveCopy, &vShowDialog, &vParentWindow); +} + +void COXMMessage::Options(HWND hParentWindow) +{ + COleVariant vParentWindow((LONG) hParentWindow); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x7d, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vParentWindow); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMFields Class + +CString COXMFields::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +LPDISPATCH COXMFields::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMFields::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMFields::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LONG COXMFields::GetCount() +{ + VARIANT result; + GetProperty(0x9, VT_VARIANT, (void*)&result); + return result.lVal; +} + +COXMField COXMFields::GetItem(COleVariant vItem, CString sPropSetID /* = _T("")*/) +{ + COleVariant vPropSetID; + if (!sPropSetID.IsEmpty()) + vPropSetID = sPropSetID; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_BSTR; + InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, + &vItem, vPropSetID); + return result.pdispVal; +} + +void COXMFields::SetNamespace(CString sValue) +{ + COleVariant vPropsetID(sValue); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x7b, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vPropsetID); +} + +COXMField COXMFields::Add(CString sName, COleVariant value, CString sPropsetID /*= _T("")*/) +{ + ASSERT( value.vt == VT_NULL || + value.vt == VT_I2 || + value.vt == VT_I4 || + value.vt == VT_R4 || + value.vt == VT_R8 || + value.vt == VT_CY || + value.vt == VT_DATE || + value.vt == VT_BSTR || + value.vt == VT_BOOL || + value.vt == VT_UNKNOWN || + value.vt == VT_BLOB); + COleVariant vName(sName); + COleVariant vClass((LONG) value.vt); + COleVariant vPropsetID; + if (!sPropsetID.IsEmpty()) + vPropsetID = sPropsetID; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x64, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vName, &vClass, &value, &vPropsetID); + return result.pdispVal; +} + +void COXMFields::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMField properties + +CString COXMField::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFields COXMField::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMField::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMField::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LONG COXMField::GetIndex() +{ + VARIANT result; + GetProperty(0x13, VT_VARIANT, (void*)&result); + return result.lVal; +} + +LONG COXMField::GetType() +{ + VARIANT result; + GetProperty(0x11, VT_VARIANT, (void*)&result); + return result.lVal; +} + +CString COXMField::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +LONG COXMField::GetId() +{ + VARIANT result; + GetProperty(0xe, VT_VARIANT, (void*)&result); + return result.lVal; +} + +COleVariant COXMField::GetValue() +{ + VARIANT result; + GetProperty(0x2b, VT_VARIANT, (void*)&result); + return result; +} + +void COXMField::SetValue(COleVariant propVal) +{ + COleVariant vType((LONG) propVal.vt); + SetProperty(0x11, VT_VARIANT, &vType); + SetProperty(0x2b, VT_VARIANT, &propVal); +} + +void COXMField::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +void COXMField::ReadFromFile(CString sPath) +{ + COleVariant vFileName(sPath); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x7f, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFileName); +} + +void COXMField::WriteToFile(CString sPath) +{ + COleVariant vFileName(sPath); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x85, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFileName); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMRecipients Class + +CString COXMRecipients::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFolder COXMRecipients::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMRecipients::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMRecipients::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +COXMRecipient COXMRecipients::GetItem(LONG nIndex) +{ + COleVariant vItem(nIndex); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, + &vItem); + return result.pdispVal; +} + +LONG COXMRecipients::GetCount() +{ + VARIANT result; + GetProperty(0x9, VT_VARIANT, (void*)&result); + return result.lVal; +} + +BOOL COXMRecipients::GetResolved() +{ + VARIANT result; + GetProperty(0x1d, VT_VARIANT, (void*)&result); + return V_BOOL(&result); +} + +COXMRecipient COXMRecipients::Add(CString sName /*= _T("")*/, CString sAddress /*= _T("")*/, EOXMRecipientType eType/*= oxmrtTo*/, CString sEntryID /*= _T("")*/) +{ + COleVariant vName; + if (!sName.IsEmpty()) + vName = sName; + COleVariant vAddress; + if (!sAddress.IsEmpty()) + vAddress = sAddress; + COleVariant vType((LONG) eType); + COleVariant vEntryID; + if (!sEntryID.IsEmpty()) + vEntryID = sEntryID; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x64, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vName, &vAddress, &vType, &vEntryID); + return result.pdispVal; +} + +void COXMRecipients::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +void COXMRecipients::Resolve(BOOL bShowDialog) +{ + COleVariant vShowDialog((short) bShowDialog, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x82, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vShowDialog); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMRecipient properties + +CString COXMRecipient::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMRecipients COXMRecipient::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMRecipient::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMRecipient::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +LONG COXMRecipient::GetIndex() +{ + VARIANT result; + GetProperty(0x13, VT_VARIANT, (void*)&result); + return result.lVal; +} + +EOXMDisplayType COXMRecipient::GetDisplayType() +{ + VARIANT result; + GetProperty(0x38, VT_VARIANT, (void*)&result); + return (EOXMDisplayType) result.lVal; +} + +CString COXMRecipient::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMRecipient::SetName(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x17, VT_VARIANT, &propVal); +} + +EOXMRecipientType COXMRecipient::GetType() +{ + VARIANT result; + GetProperty(0x11, VT_VARIANT, (void*)&result); + return (EOXMRecipientType) result.lVal; +} + +void COXMRecipient::SetType(EOXMRecipientType eValue) +{ + COleVariant propVal((LONG) eValue); + SetProperty(0x11, VT_VARIANT, &propVal); +} + +CString COXMRecipient::GetAddress() +{ + VARIANT result; + GetProperty(0x2, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMRecipient::SetAddress(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x2, VT_VARIANT, &propVal); +} + +COXMAddressEntry COXMRecipient::GetAddressEntry() +{ + VARIANT result; + GetProperty(0x35, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +void COXMRecipient::SetAddressEntry(LPDISPATCH pAddressEntry) +{ + VARIANT propVal; + propVal.vt = VT_DISPATCH; + propVal.pdispVal = pAddressEntry; + SetProperty(0x35, VT_VARIANT, &propVal); +} + +void COXMRecipient::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +void COXMRecipient::Resolve(BOOL bShowDialog) +{ + COleVariant vShowDialog((short) bShowDialog, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x82, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vShowDialog); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMAttachments Class + +CString COXMAttachments::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMMessage COXMAttachments::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMAttachments::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMAttachments::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +COXMAttachment COXMAttachments::GetItem(LONG nIndex) +{ + COleVariant vItem(nIndex); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms, + &vItem); + return result.pdispVal; +} + +LONG COXMAttachments::GetCount() +{ + VARIANT result; + GetProperty(0x9, VT_VARIANT, (void*)&result); + return result.lVal; +} + +COXMAttachment COXMAttachments::Add(CString sName /*= _T("")*/, LONG nPosition /*= 0*/, EOXMAttachmentType eType /*= oxmatFileData*/, CString sSource /*= _T("")*/) +{ + COleVariant vName; + if (!sName.IsEmpty()) + vName = sName; + COleVariant vPosition(nPosition); + COleVariant vType((LONG) eType); + COleVariant vSource; + if (!sSource.IsEmpty()) + vSource = sSource; + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x64, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vName, &vPosition, &vType, &vSource); + return result.pdispVal; +} + +void COXMAttachments::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMAttachment properties + +CString COXMAttachment::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMAttachments COXMAttachment::GetParent() +{ + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMAttachment::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMAttachment::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +CString COXMAttachment::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMAttachment::SetName(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x17, VT_VARIANT, &propVal); +} + +EOXMAttachmentType COXMAttachment::GetType() +{ + VARIANT result; + GetProperty(0x11, VT_VARIANT, (void*)&result); + return (EOXMAttachmentType) result.lVal; +} + +void COXMAttachment::SetType(EOXMAttachmentType eValue) +{ + COleVariant propVal((LONG) eValue); + SetProperty(0x11, VT_VARIANT, &propVal); +} + +LONG COXMAttachment::GetIndex() +{ + VARIANT result; + GetProperty(0x13, VT_VARIANT, (void*)&result); + return result.lVal; +} + +LONG COXMAttachment::GetPosition() +{ + VARIANT result; + GetProperty(0x1a, VT_VARIANT, (void*)&result); + return result.lVal; +} + +void COXMAttachment::SetPosition(LONG nValue) +{ + COleVariant propVal(nValue); + SetProperty(0x1a, VT_VARIANT, &propVal); +} + +CString COXMAttachment::GetSource() +{ + VARIANT result; + GetProperty(0x25, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMAttachment::SetSource(CString sSource) +{ + COleVariant vSource(sSource); + SetProperty(0x25, VT_VARIANT, &sSource); +} + +void COXMAttachment::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} + +void COXMAttachment::ReadFromFile(CString sPath) +{ + COleVariant vFileName(sPath); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + SetProperty(0x25, VT_VARIANT, &vFileName); + InvokeHelper(0x7f, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFileName); +} + +void COXMAttachment::WriteToFile(CString sPath) +{ + COleVariant vFileName(sPath); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + SetProperty(0x25, VT_VARIANT, &vFileName); + InvokeHelper(0x85, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vFileName); +} + + +///////////////////////////////////////////////////////////////////////////// +// COXMAddressEntry class + +CString COXMAddressEntry::GetApplication() +{ + VARIANT result; + GetProperty(0x14, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMRecipient COXMAddressEntry::GetParent() +{ + if (m_bCurrentSessionUser) + return NULL; + VARIANT result; + GetProperty(0x19, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +COXMSession COXMAddressEntry::GetSession() +{ + VARIANT result; + GetProperty(0x22, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +EOXMClass COXMAddressEntry::GetClass() +{ + VARIANT result; + GetProperty(0x6, VT_VARIANT, (void*)&result); + return (EOXMClass) result.lVal; +} + +EOXMDisplayType COXMAddressEntry::GetDisplayType() +{ + VARIANT result; + GetProperty(0x38, VT_VARIANT, (void*)&result); + return (EOXMDisplayType) result.lVal; +} + +CString COXMAddressEntry::GetName() +{ + VARIANT result; + GetProperty(0x17, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMAddressEntry::SetName(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x17, VT_VARIANT, &propVal); +} + +CString COXMAddressEntry::GetAddress() +{ + VARIANT result; + GetProperty(0x2, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMAddressEntry::SetAddress(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x2, VT_VARIANT, &propVal); +} + +CString COXMAddressEntry::GetType() +{ + VARIANT result; + GetProperty(0x11, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +void COXMAddressEntry::SetType(CString sValue) +{ + COleVariant propVal(sValue); + SetProperty(0x11, VT_VARIANT, &propVal); +} + +CString COXMAddressEntry::GetId() +{ + VARIANT result; + GetProperty(0xe, VT_VARIANT, (void*)&result); + return result.bstrVal; +} + +COXMFields COXMAddressEntry::GetFields() +{ + VARIANT result; + GetProperty(0xc, VT_VARIANT, (void*)&result); + return result.pdispVal; +} + +void COXMAddressEntry::Details(HWND hParentWindow) +{ + COleVariant vParentWindow((LONG) hParentWindow); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT; + InvokeHelper(0x6b, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vParentWindow); +} + +void COXMAddressEntry::Update(BOOL bMakePermanent /*=TRUE*/, BOOL bRefreshObject /*= FALSE*/) +{ + COleVariant vMakePermanent((short) bMakePermanent, VT_BOOL); + COleVariant vRefreshObject((short) bRefreshObject, VT_BOOL); + VARIANT result; + static BYTE parms[] = + VTS_VARIANT VTS_VARIANT; + InvokeHelper(0x84, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms, + &vMakePermanent, &vRefreshObject); +} + +void COXMAddressEntry::Delete() +{ + VARIANT result; + InvokeHelper(0x6a, DISPATCH_METHOD, VT_VARIANT, (void*)&result, NULL); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.dsw new file mode 100644 index 0000000..6b22d75 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.dsw @@ -0,0 +1,1533 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ActiveDesktop"="..\shell\ActiveDesktop\ActiveDesktop.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AddressBook"="..\shell\AddressBook\AddressBook.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AdvancedAssert"="..\utility\AdvancedAssert\AdvancedAssert.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AdvancedTrace"="..\utility\AdvancedTrace\AdvancedTrace.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ApplicationBar"="..\gui\ApplicationBar\ApplicationBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AutoComplete"="..\gui\AutoComplete\AutoComplete.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BackgroundPainter"="..\gui\BackgroundPainter\BackgroundPainter.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BitmapButtonDemo"="..\gui\BitmapButton\BitmapButtonDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BitmapMenuDemo"="..\gui\BitmapMenuDemo\BitmapMenuDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CalculatorCtrl"="..\gui\CalculatorCtrl\CalculatorCtrl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ClipDock"="..\utility\ClipDock\ClipDock.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ColorPickerButton"="..\gui\ColorPickerButton\ColorPickerButton.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ComboTree"="..\gui\ComboTree\ComboTree.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ContextHelp"="..\gui\ContextHelp\ContextHelp.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CoolCombo"="..\gui\CoolCombo\CoolCombo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CoolControls"="..\gui\CoolControls\CoolControls.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CsvTest"="..\database\csvtest\CsvTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CustomizeManager"="..\advanced\CustomizeManager\CustomizeManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DIBManager"="..\advanced\DIBManager\DIBManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DateTimePicker"="..\gui\DateTimePicker\DateTimePicker.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DockProp"="..\gui\DockProp\DockProp.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Docktest"="..\gui\DockView\Docktest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "EditList1"="..\gui\EditList1\EditList1.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "EventLog"="..\utility\EventLog\EventLog.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ExtTreeDemo"="..\gui\ExtTreeDemo\ExtTreeDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ExtendedEditControls"="..\gui\ExtendedEditControls\ExtendedEditControls.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ExtendedListBox"="..\gui\ExtendedListBox\ExtendedListBox.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ExtendedTreeControl"="..\gui\ExtendedTreeControl\ExtendedTreeControl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FileChanger"="..\utility\FileChanger\FileChanger.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FileExplorer"="..\advanced\FileExplorer\FileExplorer.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FileWatcher"="..\file\FileWatcher\FileWatcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FontPickers"="..\gui\FontPickers\FontPickers.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FullScreen"="..\gui\FullScreen\FullScreen.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "GridCtrl"="..\gui\GridCtrl\GridCtrl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "HistoryComboDemo"="..\gui\HistCmbo\HistoryComboDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ImageListBox"="..\gui\ImageListBox\ImageListBox.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ImageViewer"="..\graphics\ImageViewer\ImageViewer.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "InstanceManagerDemo"="..\utility\InstanceManager\InstanceManagerDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ItemTips"="..\gui\ItemTips\ItemTips.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "JPGtest"="..\graphics\JPGtest\JPGtest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Layout"="..\gui\Layout\Layout.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "LayoutManager"="..\gui\LayoutManager\LayoutManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MCombo"="..\gui\MultiCombo\MCombo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MaskedEditTest"="..\gui\maskededit\MaskedEditTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MetaFile"="..\graphics\Metafile\MetaFile.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MonthCalendar"="..\gui\MonthCalendar\MonthCalendar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MultiPad"="..\gui\CaptionPainter\multipad.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MultiPad2"="..\gui\CoolToolBar\multipad2.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NetBrowse"="..\gui\NetBrowse\NetBrowse.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Notes"="..\gui\Notes\Notes.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NumberConversionDemo"="..\utility\NumberConversionDemo\NumberConversionDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OXCalendarDemo1"="..\gui\OXCalendarDemo1\OXCalendarDemo1.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OptionTree"="..\gui\OptionTree\OptionTree.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Outlook"="..\advanced\OutlookLikedemo\Outlook.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ParserView"="..\utility\Parser\ParserView.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PhysicalTest"="..\gui\PhysicalTest\PhysicalTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PopupBar"="..\gui\PopupBar\PopupBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Preview"="..\gui\preview\Preview.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ROLL32"="..\gui\rollup\Roll32.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RegEvent"="..\utility\Regevent\RegEvent.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RegExpression"="..\utility\RegExpression\RegExpression.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RegistryDemo"="..\utility\RegistryDemo\RegistryDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ResFile"="..\utility\resfile\ResFile.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RoundedButton"="..\gui\RoundedButton\RoundedButton.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RulerBar"="..\gui\RulerBar\RulerBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SCRIBBLE"="..\gui\zoomvw\Scribble.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ScreenGrabber"="..\advanced\ScreenGrabber\ScreenGrabber.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ScrollTipDemo"="..\gui\scrolltips\ScrollTipDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Separator"="..\gui\Separator\Separator.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Service"="..\utility\Service\Service.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Shortcut"="..\utility\Shortcut\Shortcut.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ShortcutBar"="..\gui\Shortcutbar\ShortcutBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SideBySideToolbars"="..\gui\SideBySideToolbars\SideBySideToolbars.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SkinsDemo"="..\advanced\SkinsDemo\SkinsDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SoundManager"="..\utility\SoundManager\SoundManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SoundTest"="..\utility\SoundTest\SoundTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SpinEx"="..\gui\spinex\SpinEx.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Splash"="..\graphics\Splash\Splash.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "StaticHyperLink"="..\gui\StaticHyperLink\StaticHyperLink.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "StaticText"="..\gui\StaticText\StaticText.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Statusbar"="..\gui\StatBar\Statusbar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SysInfo1"="..\utility\SysInfo1\SysInfo1.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SystemStateInfo"="..\advanced\SystemStateInfo\SystemStateInfo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TabViews"="..\gui\3DTabViews\TabViews.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Taskbar"="..\gui\TaskBarIcon\Taskbar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ToolTipEx"="..\gui\ToolTipEx\ToolTipEx.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "URLDemo"="..\file\URLDemo\URLDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "VisualStudioLikeDemo"="..\advanced\VisualStudioLikeDemo\VisualStudioLikeDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "WorkspaceDemo"="..\utility\WorkspaceDemo\WorkspaceDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "calc"="..\gui\Calc\Calc.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "cgiscrpt"="..\communication\CGIscrpt\cgiscrpt.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "demo"="..\database\DAOclass\demo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "note"="..\gui\NOTE\Note.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "scrngrab"="..\utility\scrngrab\scrngrab.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "undo"="..\utility\Undo\undo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/UTB_Dev/Ultimate Toolbox/UTB_DevBranch/samples/AllSamples", ZRHGAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.sln new file mode 100644 index 0000000..0ce4aec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/AllSamples/AllSamples.sln @@ -0,0 +1,2906 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ActiveDesktop", "..\shell\ActiveDesktop\ActiveDesktop.vcproj", "{0D883A36-C567-4035-9404-227DD053963C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddressBook", "..\shell\AddressBook\AddressBook.vcproj", "{1AB3C321-0A14-4759-BD7C-1EF778E46C14}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdvancedAssert", "..\utility\AdvancedAssert\AdvancedAssert.vcproj", "{0AC00180-1A2C-449C-B27D-9FEA7F177BCF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdvancedTrace", "..\utility\AdvancedTrace\AdvancedTrace.vcproj", "{356D6219-4D5B-4C3F-9911-733BFA4DD983}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApplicationBar", "..\gui\ApplicationBar\ApplicationBar.vcproj", "{363C1917-07AD-4B30-A4C1-C3D4CDC7140E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoComplete", "..\gui\AutoComplete\AutoComplete.vcproj", "{B42009AD-84D5-4B93-8770-AAF3F2B4719C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BackgroundPainter", "..\gui\BackgroundPainter\BackgroundPainter.vcproj", "{EA571232-722A-4992-A91D-46B19EBBDFE1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BitmapButtonDemo", "..\gui\BitmapButton\BitmapButtonDemo.vcproj", "{AEBC3A72-A3C2-453A-88A3-EAD461D44235}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BitmapMenuDemo", "..\gui\BitmapMenuDemo\BitmapMenuDemo.vcproj", "{B3EED7FD-817D-4631-990C-C6C8F66948F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalculatorCtrl", "..\gui\CalculatorCtrl\CalculatorCtrl.vcproj", "{FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClipDock", "..\utility\ClipDock\ClipDock.vcproj", "{D6877776-505F-4C20-96FA-27B8C24837D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ColorPickerButton", "..\gui\ColorPickerButton\ColorPickerButton.vcproj", "{3B8A4499-76F5-4843-A103-BFA6A64DD3CC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ComboTree", "..\gui\ComboTree\ComboTree.vcproj", "{77268A67-C4FD-43B3-B49D-573EE3794152}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ContextHelp", "..\gui\ContextHelp\ContextHelp.vcproj", "{3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoolCombo", "..\gui\CoolCombo\CoolCombo.vcproj", "{EDF94834-7924-4563-8382-368120B8D440}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoolControls", "..\gui\CoolControls\CoolControls.vcproj", "{ACEE7C3F-0004-4F68-80EC-3892C3843A43}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CsvTest", "..\database\csvtest\CsvTest.vcproj", "{4A96508B-87A3-48AD-BDD5-D991D737A2C4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CustomizeManager", "..\advanced\CustomizeManager\CustomizeManager.vcproj", "{477794B0-5722-4B8B-876F-2193FBD388A9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DIBManager", "..\advanced\DIBManager\DIBManager.vcproj", "{FDF923F4-1373-4F7A-8739-F797B30655AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DateTimePicker", "..\gui\DateTimePicker\DateTimePicker.vcproj", "{1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DockProp", "..\gui\DockProp\DockProp.vcproj", "{4478DBB5-40DD-4FE8-B236-9B7663BB531A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Docktest", "..\gui\DockView\Docktest.vcproj", "{6B354278-51B6-4AC9-97B7-D715C6DB9D07}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EditList1", "..\gui\EditList1\EditList1.vcproj", "{41CEA51C-6C57-442B-9055-DD4E5582C941}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EventLog", "..\utility\EventLog\EventLog.vcproj", "{8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtTreeDemo", "..\gui\ExtTreeDemo\ExtTreeDemo.vcproj", "{558783DB-6F17-46DF-83F9-F931B2A5D3D7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtendedEditControls", "..\gui\ExtendedEditControls\ExtendedEditControls.vcproj", "{760EBB30-6E32-4F71-A7F4-9740863BF2BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtendedListBox", "..\gui\ExtendedListBox\ExtendedListBox.vcproj", "{F6E2871A-42FF-4863-BDEC-032FE73D991F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtendedTreeControl", "..\gui\ExtendedTreeControl\ExtendedTreeControl.vcproj", "{CCF3E412-6202-408D-AF8A-BD7D010A11CD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileChanger", "..\utility\FileChanger\FileChanger.vcproj", "{CDBBE042-E581-42F7-BE9E-FA16F668CBC6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileExplorer", "..\advanced\FileExplorer\FileExplorer.vcproj", "{3A98DBA1-F67C-49CD-87D6-6F59B23F770A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileWatcher", "..\file\FileWatcher\FileWatcher.vcproj", "{53698F98-A520-44CD-BACB-939DAB5B0D65}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontPickers", "..\gui\FontPickers\FontPickers.vcproj", "{D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FullScreen", "..\gui\FullScreen\FullScreen.vcproj", "{1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GridCtrl", "..\gui\GridCtrl\GridCtrl.vcproj", "{C0587A88-C07E-4545-874F-8436C64ECC03}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryComboDemo", "..\gui\HistCmbo\HistoryComboDemo.vcproj", "{90157A9E-111F-494A-A253-E478AE7B2848}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageListBox", "..\gui\ImageListBox\ImageListBox.vcproj", "{444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageViewer", "..\graphics\ImageViewer\ImageViewer.vcproj", "{B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstanceManagerDemo", "..\utility\InstanceManager\InstanceManagerDemo.vcproj", "{E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ItemTips", "..\gui\ItemTips\ItemTips.vcproj", "{42B2177B-4260-42CB-9177-2F95CE21655A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JPGtest", "..\graphics\JPGtest\JPGtest.vcproj", "{EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Layout", "..\gui\Layout\Layout.vcproj", "{CEA65F15-22A4-4818-8E4B-013A6CE79C02}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LayoutManager", "..\gui\LayoutManager\LayoutManager.vcproj", "{F7B1D72A-92E8-4A43-8295-3D353F63ECA1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MCombo", "..\gui\MultiCombo\MCombo.vcproj", "{A7155B4E-FD86-4E75-B89C-DB46F7449136}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaskedEditTest", "..\gui\maskededit\MaskedEditTest.vcproj", "{9C5A8B5D-C45A-42F6-876B-8E769D9631C3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MetaFile", "..\graphics\Metafile\MetaFile.vcproj", "{D9BCDE31-E94A-4002-A0D0-B895589C9CCE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonthCalendar", "..\gui\MonthCalendar\MonthCalendar.vcproj", "{41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiPad", "..\gui\CaptionPainter\multipad.vcproj", "{E98EAE2F-5D5F-4D17-8629-3EDF9E265151}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetBrowse", "..\gui\NetBrowse\NetBrowse.vcproj", "{2C5C831C-4D4E-4703-A4E6-188E441B3959}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Notes", "..\gui\Notes\Notes.vcproj", "{0C253783-D9E4-4DD9-8643-164C22C4CDE9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NumberConversionDemo", "..\utility\NumberConversionDemo\NumberConversionDemo.vcproj", "{C0285571-2D5C-49A7-AAA6-D699107D65B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OXCalendarDemo1", "..\gui\OXCalendarDemo1\OXCalendarDemo1.vcproj", "{8E43E587-76DE-4523-A6EF-322AB8E0D5CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OptionTree", "..\gui\OptionTree\OptionTree.vcproj", "{C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Outlook", "..\advanced\OutlookLikedemo\Outlook.vcproj", "{F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParserView", "..\utility\Parser\ParserView.vcproj", "{549EEE53-EEE6-4484-AA13-ACED98B99A6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PhysicalTest", "..\gui\PhysicalTest\PhysicalTest.vcproj", "{33E23649-48BC-40CC-901B-19131E21A83E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupBar", "..\gui\PopupBar\PopupBar.vcproj", "{95C3C484-D129-49A6-8CF1-876E642209D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Preview", "..\gui\preview\Preview.vcproj", "{FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ROLL32", "..\gui\rollup\Roll32.vcproj", "{A67ECAB2-F6C5-491E-A3EB-2212081B6191}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RegEvent", "..\utility\Regevent\RegEvent.vcproj", "{684A4664-BC51-4A46-91E2-E62A3241C30F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RegExpression", "..\utility\RegExpression\RegExpression.vcproj", "{55FA0C3A-F07B-4A43-9465-FACD23C71D37}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RegistryDemo", "..\utility\RegistryDemo\RegistryDemo.vcproj", "{38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ResFile", "..\utility\resfile\ResFile.vcproj", "{0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RoundedButton", "..\gui\RoundedButton\RoundedButton.vcproj", "{F1872280-AF4A-4BE3-8C09-4B23CB0146BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RulerBar", "..\gui\RulerBar\RulerBar.vcproj", "{0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SCRIBBLE", "..\gui\zoomvw\Scribble.vcproj", "{999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenGrabber", "..\advanced\ScreenGrabber\ScreenGrabber.vcproj", "{52C98624-EE86-40C9-B679-ABF97FF9050F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScrollTipDemo", "..\gui\scrolltips\ScrollTipDemo.vcproj", "{CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Separator", "..\gui\Separator\Separator.vcproj", "{70075261-66BB-4269-8662-1BFD046ABF43}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Service", "..\utility\Service\Service.vcproj", "{DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shortcut", "..\utility\Shortcut\Shortcut.vcproj", "{D1446E51-4678-4C37-9C38-143B4D3BEC06}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShortcutBar", "..\gui\Shortcutbar\ShortcutBar.vcproj", "{CD680273-4B2C-4904-BF69-7FF6ED7D7951}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SideBySideToolbars", "..\gui\SideBySideToolbars\SideBySideToolbars.vcproj", "{383EE854-F9D2-44ED-BE9F-A90A2354D781}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkinsDemo", "..\advanced\SkinsDemo\SkinsDemo.vcproj", "{368A240D-155A-4971-A79C-EF524AEB5567}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundManager", "..\utility\SoundManager\SoundManager.vcproj", "{B4596412-B65A-4277-9DB0-EA8888043A36}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTest", "..\utility\SoundTest\SoundTest.vcproj", "{3F68CEF2-2882-4638-83E1-F24803B9CD53}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpinEx", "..\gui\spinex\SpinEx.vcproj", "{AFA1F68C-993E-4717-94FC-CB6398833C5D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Splash", "..\graphics\Splash\Splash.vcproj", "{396F525F-44D9-48AC-9E6A-B1754B715E93}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StaticHyperLink", "..\gui\StaticHyperLink\StaticHyperLink.vcproj", "{8B68C24D-34A9-4C10-A873-F5EE35BB40B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StaticText", "..\gui\StaticText\StaticText.vcproj", "{448183A2-C773-4015-8B52-962904852B9A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Statusbar", "..\gui\StatBar\Statusbar.vcproj", "{87747963-45F7-4A05-B971-78FE15872EA7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SysInfo1", "..\utility\SysInfo1\SysInfo1.vcproj", "{673F36FA-666A-4274-B560-EB1BCB99DE1B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SystemStateInfo", "..\advanced\SystemStateInfo\SystemStateInfo.vcproj", "{4BF68E89-342E-4E7D-8623-26B538D02D34}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabViews", "..\gui\3DTabViews\TabViews.vcproj", "{29CA054F-3945-488A-AB47-D29A58C694A5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Taskbar", "..\gui\TaskBarIcon\Taskbar.vcproj", "{6B900F8C-C808-460A-BF17-12143C6CB1E8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ToolTipEx", "..\gui\ToolTipEx\ToolTipEx.vcproj", "{39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "URLDemo", "..\file\URLDemo\URLDemo.vcproj", "{7992FECF-AEC9-4E72-9035-EEDACFE899C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VisualStudioLikeDemo", "..\advanced\VisualStudioLikeDemo\VisualStudioLikeDemo.vcproj", "{6E1019D0-4AA0-4233-B32D-D085CD79E526}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkspaceDemo", "..\utility\WorkspaceDemo\WorkspaceDemo.vcproj", "{A7E8CA5B-F812-45F5-BEB8-D3C999A86995}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calc", "..\gui\Calc\Calc.vcproj", "{2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgiscrpt", "..\communication\CGIscrpt\cgiscrpt.vcproj", "{0AD5CFBC-B35D-43F5-A6C3-D2871494681E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "..\database\DAOclass\demo.vcproj", "{A5017E69-8F71-45DF-BF46-B1E0DF18646B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "note", "..\gui\NOTE\Note.vcproj", "{7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scrngrab", "..\utility\scrngrab\scrngrab.vcproj", "{B6D9617C-C9DA-457A-874E-1AE37C8C75E6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "undo", "..\utility\Undo\undo.vcproj", "{2BBAB318-883C-43AF-A326-BC6D06C5518F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiPad2", "..\gui\CoolToolBar\multipad2.vcproj", "{D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HyperbarDemo", "..\gui\HyperbarDemo\HyperbarDemo.vcproj", "{1AF15FBC-E92F-4161-99F7-7C1960A9F529}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Unicode|Win32 = Debug_Unicode|Win32 + Debug|Win32 = Debug|Win32 + DebugUnicode|Win32 = DebugUnicode|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release_Unicode|Win32 = Release_Unicode|Win32 + Release|Win32 = Release|Win32 + ReleaseShared|Win32 = ReleaseShared|Win32 + ReleaseUnicode|Win32 = ReleaseUnicode|Win32 + Unicode Debug|Win32 = Unicode Debug|Win32 + Unicode Release|Win32 = Unicode Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + UnicodeDebug|Win32 = UnicodeDebug|Win32 + UnicodeRelease|Win32 = UnicodeRelease|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0D883A36-C567-4035-9404-227DD053963C}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Debug|Win32.ActiveCfg = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Debug|Win32.Build.0 = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release_Shared|Win32.Build.0 = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release_Unicode|Win32.Build.0 = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Release|Win32.Build.0 = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode Release|Win32.Build.0 = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.Unicode_Release|Win32.Build.0 = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0D883A36-C567-4035-9404-227DD053963C}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Debug_Unicode|Win32.ActiveCfg = DebugUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Debug_Unicode|Win32.Build.0 = DebugUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Debug|Win32.Build.0 = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release_Shared|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release_Unicode|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Release|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode Release|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.Unicode_Release|Win32.Build.0 = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {1AB3C321-0A14-4759-BD7C-1EF778E46C14}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Debug|Win32.ActiveCfg = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Debug|Win32.Build.0 = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release|Win32.ActiveCfg = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Release|Win32.Build.0 = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode Release|Win32.Build.0 = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0AC00180-1A2C-449C-B27D-9FEA7F177BCF}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Debug|Win32.ActiveCfg = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Debug|Win32.Build.0 = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release|Win32.ActiveCfg = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Release|Win32.Build.0 = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode Release|Win32.Build.0 = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {356D6219-4D5B-4C3F-9911-733BFA4DD983}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Debug|Win32.ActiveCfg = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Debug|Win32.Build.0 = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release_Shared|Win32.ActiveCfg = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release_Shared|Win32.Build.0 = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release_Unicode|Win32.ActiveCfg = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release_Unicode|Win32.Build.0 = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release|Win32.ActiveCfg = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Release|Win32.Build.0 = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.ReleaseUnicode|Win32.ActiveCfg = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.ReleaseUnicode|Win32.Build.0 = ReleaseShared|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode Release|Win32.Build.0 = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.Unicode_Release|Win32.Build.0 = Release|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.UnicodeDebug|Win32.ActiveCfg = UnicodeDebug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.UnicodeDebug|Win32.Build.0 = UnicodeDebug|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.UnicodeRelease|Win32.ActiveCfg = UnicodeRelease|Win32 + {363C1917-07AD-4B30-A4C1-C3D4CDC7140E}.UnicodeRelease|Win32.Build.0 = UnicodeRelease|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Debug|Win32.ActiveCfg = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Debug|Win32.Build.0 = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release_Shared|Win32.ActiveCfg = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release_Shared|Win32.Build.0 = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release_Unicode|Win32.ActiveCfg = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release_Unicode|Win32.Build.0 = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release|Win32.ActiveCfg = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Release|Win32.Build.0 = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode Release|Win32.Build.0 = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.Unicode_Release|Win32.Build.0 = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {B42009AD-84D5-4B93-8770-AAF3F2B4719C}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Debug|Win32.ActiveCfg = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Debug|Win32.Build.0 = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release|Win32.ActiveCfg = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Release|Win32.Build.0 = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.ReleaseShared|Win32.Build.0 = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode Release|Win32.Build.0 = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {EA571232-722A-4992-A91D-46B19EBBDFE1}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Debug|Win32.ActiveCfg = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Debug|Win32.Build.0 = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release|Win32.ActiveCfg = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Release|Win32.Build.0 = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.ReleaseShared|Win32.Build.0 = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode Release|Win32.Build.0 = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {AEBC3A72-A3C2-453A-88A3-EAD461D44235}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Debug|Win32.Build.0 = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release|Win32.ActiveCfg = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Release|Win32.Build.0 = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.ReleaseShared|Win32.Build.0 = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode Release|Win32.Build.0 = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {B3EED7FD-817D-4631-990C-C6C8F66948F5}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Debug|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release_Shared|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release_Unicode|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Release|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.ReleaseShared|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode Release|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.Unicode_Release|Win32.Build.0 = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {FBB89275-6BC0-4E29-BFBE-3B5B1655C1E3}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Debug|Win32.Build.0 = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release_Shared|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release_Unicode|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Release|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode Release|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.Unicode_Release|Win32.Build.0 = Release|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.UnicodeDebug|Win32.ActiveCfg = UnicodeDebug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.UnicodeDebug|Win32.Build.0 = UnicodeDebug|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.UnicodeRelease|Win32.ActiveCfg = UnicodeRelease|Win32 + {D6877776-505F-4C20-96FA-27B8C24837D1}.UnicodeRelease|Win32.Build.0 = UnicodeRelease|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Debug|Win32.Build.0 = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release|Win32.ActiveCfg = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Release|Win32.Build.0 = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.ReleaseShared|Win32.Build.0 = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode Release|Win32.Build.0 = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {3B8A4499-76F5-4843-A103-BFA6A64DD3CC}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Debug|Win32.ActiveCfg = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Debug|Win32.Build.0 = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release_Shared|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release_Unicode|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Release|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode Release|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.Unicode_Release|Win32.Build.0 = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {77268A67-C4FD-43B3-B49D-573EE3794152}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Debug|Win32.Build.0 = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release|Win32.ActiveCfg = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Release|Win32.Build.0 = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.ReleaseShared|Win32.Build.0 = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode Release|Win32.Build.0 = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {3DFAD2ED-5736-47F9-AFFF-693A4F33BBDA}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Debug|Win32.Build.0 = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release|Win32.ActiveCfg = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Release|Win32.Build.0 = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode Release|Win32.Build.0 = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {EDF94834-7924-4563-8382-368120B8D440}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Debug|Win32.ActiveCfg = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Debug|Win32.Build.0 = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release|Win32.ActiveCfg = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Release|Win32.Build.0 = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.ReleaseShared|Win32.Build.0 = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode Release|Win32.Build.0 = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {ACEE7C3F-0004-4F68-80EC-3892C3843A43}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Debug|Win32.ActiveCfg = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Debug|Win32.Build.0 = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release|Win32.ActiveCfg = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Release|Win32.Build.0 = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode Release|Win32.Build.0 = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {4A96508B-87A3-48AD-BDD5-D991D737A2C4}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Debug|Win32.Build.0 = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release_Shared|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release_Unicode|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Release|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.ReleaseShared|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.Unicode_Release|Win32.Build.0 = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {477794B0-5722-4B8B-876F-2193FBD388A9}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Debug|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release_Shared|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release_Unicode|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Release|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.ReleaseShared|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode Release|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.Unicode_Release|Win32.Build.0 = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {FDF923F4-1373-4F7A-8739-F797B30655AF}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Debug|Win32.ActiveCfg = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Debug|Win32.Build.0 = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release|Win32.ActiveCfg = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Release|Win32.Build.0 = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode Release|Win32.Build.0 = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {1BB8725F-9ABE-47DE-B247-9B3C35D13FB5}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release|Win32.ActiveCfg = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release|Win32.Build.0 = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode Release|Win32.Build.0 = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.ReleaseShared|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode Release|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Debug|Win32.ActiveCfg = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Debug|Win32.Build.0 = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release|Win32.ActiveCfg = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Release|Win32.Build.0 = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.ReleaseShared|Win32.Build.0 = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode Release|Win32.Build.0 = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {41CEA51C-6C57-442B-9055-DD4E5582C941}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Debug|Win32.ActiveCfg = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Debug|Win32.Build.0 = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release|Win32.ActiveCfg = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Release|Win32.Build.0 = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode Release|Win32.Build.0 = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {8AD9DCC3-567C-4F4F-B087-D0399BFD9F79}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Debug|Win32.Build.0 = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release|Win32.ActiveCfg = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Release|Win32.Build.0 = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.ReleaseShared|Win32.Build.0 = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode Release|Win32.Build.0 = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {558783DB-6F17-46DF-83F9-F931B2A5D3D7}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Debug|Win32.Build.0 = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release|Win32.ActiveCfg = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Release|Win32.Build.0 = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode Release|Win32.Build.0 = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {760EBB30-6E32-4F71-A7F4-9740863BF2BD}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Debug|Win32.ActiveCfg = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Debug|Win32.Build.0 = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release|Win32.ActiveCfg = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Release|Win32.Build.0 = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode Release|Win32.Build.0 = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {F6E2871A-42FF-4863-BDEC-032FE73D991F}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Debug|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release_Shared|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release_Unicode|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Release|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.ReleaseShared|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode Release|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.Unicode_Release|Win32.Build.0 = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {CCF3E412-6202-408D-AF8A-BD7D010A11CD}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Debug|Win32.Build.0 = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release|Win32.ActiveCfg = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Release|Win32.Build.0 = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.ReleaseShared|Win32.Build.0 = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode Release|Win32.Build.0 = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {CDBBE042-E581-42F7-BE9E-FA16F668CBC6}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Debug|Win32.Build.0 = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release|Win32.ActiveCfg = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Release|Win32.Build.0 = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode Release|Win32.Build.0 = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {3A98DBA1-F67C-49CD-87D6-6F59B23F770A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Debug|Win32.ActiveCfg = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Debug|Win32.Build.0 = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release|Win32.ActiveCfg = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Release|Win32.Build.0 = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode Release|Win32.Build.0 = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {53698F98-A520-44CD-BACB-939DAB5B0D65}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.ReleaseShared|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode Release|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Debug|Win32.ActiveCfg = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Debug|Win32.Build.0 = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Release|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.ReleaseShared|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode Release|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.Unicode_Release|Win32.Build.0 = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {1CE4E436-53FA-4DA9-BAB3-63ED0A7FB3E7}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.ReleaseShared|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode Release|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Debug|Win32.ActiveCfg = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Debug|Win32.Build.0 = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release|Win32.ActiveCfg = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Release|Win32.Build.0 = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.ReleaseShared|Win32.Build.0 = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode Release|Win32.Build.0 = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {90157A9E-111F-494A-A253-E478AE7B2848}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Debug|Win32.ActiveCfg = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Debug|Win32.Build.0 = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release|Win32.ActiveCfg = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Release|Win32.Build.0 = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode Release|Win32.Build.0 = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {444A7CEA-79F8-4A6B-9E8F-DFEC335A0B8A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Debug|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Debug|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release|Win32.ActiveCfg = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Release|Win32.Build.0 = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode Release|Win32.Build.0 = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.Unicode_Release|Win32.Build.0 = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {B89B0A8D-BDD2-4A5D-9A46-FBE49B34F944}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Debug|Win32.ActiveCfg = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Debug|Win32.Build.0 = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release|Win32.ActiveCfg = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Release|Win32.Build.0 = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.ReleaseShared|Win32.Build.0 = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode Release|Win32.Build.0 = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {E3CA6878-C5DE-47EC-8D03-8BDC4AB8B184}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Debug|Win32.ActiveCfg = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Debug|Win32.Build.0 = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release|Win32.ActiveCfg = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Release|Win32.Build.0 = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.ReleaseShared|Win32.Build.0 = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode Release|Win32.Build.0 = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {42B2177B-4260-42CB-9177-2F95CE21655A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Debug|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Release|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.ReleaseShared|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode Release|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.Unicode_Release|Win32.Build.0 = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {EF8EAD5A-DE98-4067-B9D0-45E765AD4EE6}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Debug|Win32.ActiveCfg = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Debug|Win32.Build.0 = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release|Win32.ActiveCfg = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Release|Win32.Build.0 = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.ReleaseShared|Win32.Build.0 = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode Release|Win32.Build.0 = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {CEA65F15-22A4-4818-8E4B-013A6CE79C02}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Debug|Win32.Build.0 = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release|Win32.ActiveCfg = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Release|Win32.Build.0 = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.ReleaseShared|Win32.Build.0 = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode Release|Win32.Build.0 = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {F7B1D72A-92E8-4A43-8295-3D353F63ECA1}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Debug|Win32.Build.0 = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release|Win32.ActiveCfg = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Release|Win32.Build.0 = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.ReleaseShared|Win32.Build.0 = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode Release|Win32.Build.0 = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {A7155B4E-FD86-4E75-B89C-DB46F7449136}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Debug|Win32.Build.0 = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release|Win32.ActiveCfg = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Release|Win32.Build.0 = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode Release|Win32.Build.0 = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {9C5A8B5D-C45A-42F6-876B-8E769D9631C3}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Debug|Win32.Build.0 = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release|Win32.ActiveCfg = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Release|Win32.Build.0 = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.ReleaseShared|Win32.Build.0 = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode Release|Win32.Build.0 = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {D9BCDE31-E94A-4002-A0D0-B895589C9CCE}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Debug|Win32.ActiveCfg = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Debug|Win32.Build.0 = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release|Win32.ActiveCfg = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Release|Win32.Build.0 = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.ReleaseShared|Win32.Build.0 = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode Release|Win32.Build.0 = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {41AD7F97-A2A3-4B7C-8E63-7ADED4F365C9}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Debug|Win32.ActiveCfg = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Debug|Win32.Build.0 = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release|Win32.ActiveCfg = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Release|Win32.Build.0 = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.Unicode_Release|Win32.Build.0 = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {E98EAE2F-5D5F-4D17-8629-3EDF9E265151}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Debug|Win32.Build.0 = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release|Win32.ActiveCfg = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Release|Win32.Build.0 = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.ReleaseShared|Win32.Build.0 = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode Release|Win32.Build.0 = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {2C5C831C-4D4E-4703-A4E6-188E441B3959}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Debug_Unicode|Win32.ActiveCfg = DebugUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Debug_Unicode|Win32.Build.0 = DebugUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Debug|Win32.Build.0 = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release_Shared|Win32.ActiveCfg = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release_Shared|Win32.Build.0 = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release_Unicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release_Unicode|Win32.Build.0 = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release|Win32.ActiveCfg = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Release|Win32.Build.0 = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.ReleaseShared|Win32.ActiveCfg = ReleaseShared|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.ReleaseShared|Win32.Build.0 = ReleaseShared|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode Release|Win32.Build.0 = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.Unicode_Release|Win32.Build.0 = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0C253783-D9E4-4DD9-8643-164C22C4CDE9}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Debug|Win32.Build.0 = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release|Win32.ActiveCfg = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Release|Win32.Build.0 = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode Release|Win32.Build.0 = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {C0285571-2D5C-49A7-AAA6-D699107D65B3}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Debug|Win32.Build.0 = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release|Win32.ActiveCfg = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Release|Win32.Build.0 = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode Release|Win32.Build.0 = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {8E43E587-76DE-4523-A6EF-322AB8E0D5CE}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Debug|Win32.ActiveCfg = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Debug|Win32.Build.0 = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release|Win32.ActiveCfg = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Release|Win32.Build.0 = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode Release|Win32.Build.0 = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {C43338CE-6AF0-4E1E-BD6A-3DAED7498C03}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Debug|Win32.ActiveCfg = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Debug|Win32.Build.0 = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release|Win32.ActiveCfg = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Release|Win32.Build.0 = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.ReleaseShared|Win32.Build.0 = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode Release|Win32.Build.0 = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {F32DF29D-43FE-4E7B-BF80-EB641F4B8C5D}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Debug|Win32.Build.0 = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release|Win32.ActiveCfg = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Release|Win32.Build.0 = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.ReleaseShared|Win32.ActiveCfg = ReleaseUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.ReleaseShared|Win32.Build.0 = ReleaseUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode Release|Win32.Build.0 = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.Unicode_Release|Win32.Build.0 = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {549EEE53-EEE6-4484-AA13-ACED98B99A6A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Debug|Win32.ActiveCfg = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Debug|Win32.Build.0 = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release|Win32.ActiveCfg = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Release|Win32.Build.0 = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode Release|Win32.Build.0 = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {33E23649-48BC-40CC-901B-19131E21A83E}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Debug|Win32.Build.0 = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release|Win32.ActiveCfg = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Release|Win32.Build.0 = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode Release|Win32.Build.0 = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {95C3C484-D129-49A6-8CF1-876E642209D4}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Debug|Win32.Build.0 = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release|Win32.ActiveCfg = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Release|Win32.Build.0 = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode Release|Win32.Build.0 = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {FC81C4F3-BE4E-4C44-8DAD-17B4863148A6}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Debug|Win32.ActiveCfg = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Debug|Win32.Build.0 = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release|Win32.ActiveCfg = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Release|Win32.Build.0 = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.ReleaseShared|Win32.Build.0 = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode Release|Win32.Build.0 = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {A67ECAB2-F6C5-491E-A3EB-2212081B6191}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Debug|Win32.ActiveCfg = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Debug|Win32.Build.0 = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release|Win32.ActiveCfg = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Release|Win32.Build.0 = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode Release|Win32.Build.0 = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {684A4664-BC51-4A46-91E2-E62A3241C30F}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Debug|Win32.ActiveCfg = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Debug|Win32.Build.0 = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.DebugUnicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.DebugUnicode|Win32.Build.0 = Debug_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release|Win32.ActiveCfg = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Release|Win32.Build.0 = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.ReleaseShared|Win32.ActiveCfg = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.ReleaseShared|Win32.Build.0 = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.ReleaseUnicode|Win32.ActiveCfg = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.ReleaseUnicode|Win32.Build.0 = Release_Unicode|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode Release|Win32.Build.0 = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.Unicode_Release|Win32.Build.0 = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {55FA0C3A-F07B-4A43-9465-FACD23C71D37}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Debug|Win32.ActiveCfg = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Debug|Win32.Build.0 = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release|Win32.ActiveCfg = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Release|Win32.Build.0 = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.ReleaseShared|Win32.Build.0 = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode Release|Win32.Build.0 = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {38F5787F-E6C3-4F2B-8E68-2C86B84E3FFC}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Debug|Win32.Build.0 = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release|Win32.ActiveCfg = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Release|Win32.Build.0 = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode Release|Win32.Build.0 = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0EB44FC1-8B19-4F28-AB84-6D029C00EF3E}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Debug|Win32.Build.0 = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release|Win32.ActiveCfg = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Release|Win32.Build.0 = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode Release|Win32.Build.0 = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {F1872280-AF4A-4BE3-8C09-4B23CB0146BD}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Debug|Win32.Build.0 = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release|Win32.ActiveCfg = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Release|Win32.Build.0 = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.ReleaseShared|Win32.Build.0 = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode Release|Win32.Build.0 = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0616C61D-2FDB-4A62-B52C-8DC000C0B8F7}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Debug|Win32.Build.0 = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release|Win32.ActiveCfg = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Release|Win32.Build.0 = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode Release|Win32.Build.0 = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {999E5BF9-8FF5-4490-BCDC-2DCF24E44D0A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Debug|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Debug|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release|Win32.ActiveCfg = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Release|Win32.Build.0 = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode Release|Win32.Build.0 = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.Unicode_Release|Win32.Build.0 = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {52C98624-EE86-40C9-B679-ABF97FF9050F}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Debug|Win32.Build.0 = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release|Win32.ActiveCfg = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Release|Win32.Build.0 = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode Release|Win32.Build.0 = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {CDBC1648-8457-49E4-A8F3-A2E11CF1CF7D}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Debug|Win32.ActiveCfg = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Debug|Win32.Build.0 = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release|Win32.ActiveCfg = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Release|Win32.Build.0 = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode Release|Win32.Build.0 = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {70075261-66BB-4269-8662-1BFD046ABF43}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release|Win32.ActiveCfg = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release|Win32.Build.0 = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode Release|Win32.Build.0 = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Debug|Win32.Build.0 = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release|Win32.ActiveCfg = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Release|Win32.Build.0 = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode Release|Win32.Build.0 = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {D1446E51-4678-4C37-9C38-143B4D3BEC06}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Debug|Win32.Build.0 = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release|Win32.ActiveCfg = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Release|Win32.Build.0 = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode Release|Win32.Build.0 = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {CD680273-4B2C-4904-BF69-7FF6ED7D7951}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Debug|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Debug|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release_Shared|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release_Unicode|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Release|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.ReleaseShared|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode Release|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.Unicode_Release|Win32.Build.0 = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {383EE854-F9D2-44ED-BE9F-A90A2354D781}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release_Shared|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release_Unicode|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.ReleaseShared|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode_Release|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Debug|Win32.Build.0 = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release|Win32.ActiveCfg = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Release|Win32.Build.0 = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode Release|Win32.Build.0 = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {B4596412-B65A-4277-9DB0-EA8888043A36}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Debug|Win32.Build.0 = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release|Win32.ActiveCfg = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Release|Win32.Build.0 = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.ReleaseShared|Win32.Build.0 = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode Release|Win32.Build.0 = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {3F68CEF2-2882-4638-83E1-F24803B9CD53}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Debug|Win32.ActiveCfg = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Debug|Win32.Build.0 = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release|Win32.ActiveCfg = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Release|Win32.Build.0 = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.ReleaseShared|Win32.Build.0 = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode Release|Win32.Build.0 = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {AFA1F68C-993E-4717-94FC-CB6398833C5D}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Debug|Win32.ActiveCfg = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Debug|Win32.Build.0 = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release|Win32.ActiveCfg = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Release|Win32.Build.0 = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.ReleaseShared|Win32.Build.0 = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode Release|Win32.Build.0 = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {396F525F-44D9-48AC-9E6A-B1754B715E93}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Debug|Win32.Build.0 = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release|Win32.ActiveCfg = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Release|Win32.Build.0 = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.ReleaseShared|Win32.Build.0 = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode Release|Win32.Build.0 = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {8B68C24D-34A9-4C10-A873-F5EE35BB40B3}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Debug|Win32.ActiveCfg = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Debug|Win32.Build.0 = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release|Win32.ActiveCfg = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Release|Win32.Build.0 = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.ReleaseShared|Win32.Build.0 = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode Release|Win32.Build.0 = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {448183A2-C773-4015-8B52-962904852B9A}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Debug|Win32.Build.0 = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release|Win32.ActiveCfg = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Release|Win32.Build.0 = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode Release|Win32.Build.0 = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {87747963-45F7-4A05-B971-78FE15872EA7}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Debug|Win32.ActiveCfg = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Debug|Win32.Build.0 = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release|Win32.ActiveCfg = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Release|Win32.Build.0 = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode Release|Win32.Build.0 = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {673F36FA-666A-4274-B560-EB1BCB99DE1B}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Debug|Win32.ActiveCfg = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Debug|Win32.Build.0 = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release|Win32.ActiveCfg = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Release|Win32.Build.0 = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.ReleaseShared|Win32.Build.0 = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode Release|Win32.Build.0 = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {4BF68E89-342E-4E7D-8623-26B538D02D34}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release|Win32.ActiveCfg = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release|Win32.Build.0 = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode Release|Win32.Build.0 = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Debug|Win32.Build.0 = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release|Win32.ActiveCfg = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Release|Win32.Build.0 = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.ReleaseShared|Win32.Build.0 = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode Release|Win32.Build.0 = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {6B900F8C-C808-460A-BF17-12143C6CB1E8}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Debug_Unicode|Win32.ActiveCfg = DebugUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Debug_Unicode|Win32.Build.0 = DebugUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Debug|Win32.ActiveCfg = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Debug|Win32.Build.0 = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.DebugUnicode|Win32.ActiveCfg = DebugUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.DebugUnicode|Win32.Build.0 = DebugUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release|Win32.ActiveCfg = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Release|Win32.Build.0 = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.ReleaseUnicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.ReleaseUnicode|Win32.Build.0 = ReleaseUnicode|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode Release|Win32.Build.0 = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.Unicode_Release|Win32.Build.0 = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {39AA238D-6DF0-40E5-BFD7-32C72FFFCD02}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Debug|Win32.ActiveCfg = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Debug|Win32.Build.0 = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release|Win32.ActiveCfg = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Release|Win32.Build.0 = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode Release|Win32.Build.0 = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {7992FECF-AEC9-4E72-9035-EEDACFE899C6}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Debug|Win32.ActiveCfg = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Debug|Win32.Build.0 = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.DebugUnicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.DebugUnicode|Win32.Build.0 = Debug_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release|Win32.ActiveCfg = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Release|Win32.Build.0 = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.ReleaseShared|Win32.ActiveCfg = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.ReleaseShared|Win32.Build.0 = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.ReleaseUnicode|Win32.ActiveCfg = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.ReleaseUnicode|Win32.Build.0 = Release_Unicode|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode Release|Win32.Build.0 = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.Unicode_Release|Win32.Build.0 = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {6E1019D0-4AA0-4233-B32D-D085CD79E526}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Debug|Win32.Build.0 = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release|Win32.ActiveCfg = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Release|Win32.Build.0 = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.ReleaseShared|Win32.Build.0 = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode Release|Win32.Build.0 = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {A7E8CA5B-F812-45F5-BEB8-D3C999A86995}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Debug|Win32.Build.0 = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release|Win32.ActiveCfg = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Release|Win32.Build.0 = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode Release|Win32.Build.0 = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {2ACE5793-2DFE-4178-B02B-4DB3AA9F8FC8}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Debug|Win32.Build.0 = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release|Win32.ActiveCfg = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Release|Win32.Build.0 = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.ReleaseShared|Win32.Build.0 = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode Release|Win32.Build.0 = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {0AD5CFBC-B35D-43F5-A6C3-D2871494681E}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Debug|Win32.Build.0 = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release|Win32.ActiveCfg = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Release|Win32.Build.0 = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.ReleaseShared|Win32.Build.0 = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode Release|Win32.Build.0 = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {A5017E69-8F71-45DF-BF46-B1E0DF18646B}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Debug|Win32.Build.0 = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release|Win32.ActiveCfg = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Release|Win32.Build.0 = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.ReleaseShared|Win32.Build.0 = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode Release|Win32.Build.0 = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {7ECEE602-53B5-499B-BECB-2DC15DE5A4E2}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Debug|Win32.Build.0 = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release|Win32.ActiveCfg = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Release|Win32.Build.0 = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.ReleaseShared|Win32.Build.0 = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode Release|Win32.Build.0 = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {B6D9617C-C9DA-457A-874E-1AE37C8C75E6}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Debug|Win32.Build.0 = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release|Win32.ActiveCfg = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Release|Win32.Build.0 = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.ReleaseShared|Win32.Build.0 = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode Release|Win32.Build.0 = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {2BBAB318-883C-43AF-A326-BC6D06C5518F}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Debug|Win32.Build.0 = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release_Unicode|Win32.ActiveCfg = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release_Unicode|Win32.Build.0 = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release|Win32.ActiveCfg = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Release|Win32.Build.0 = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.ReleaseShared|Win32.ActiveCfg = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.ReleaseShared|Win32.Build.0 = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.ReleaseUnicode|Win32.ActiveCfg = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.ReleaseUnicode|Win32.Build.0 = Release_Shared|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.Unicode_Release|Win32.Build.0 = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {D2563ABA-425A-41DA-8756-FDBCBFBC5D4B}.UnicodeRelease|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug_Unicode|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug_Unicode|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.DebugUnicode|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.DebugUnicode|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release_Shared|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release_Shared|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release_Unicode|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release_Unicode|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.ReleaseShared|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.ReleaseShared|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.ReleaseUnicode|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.ReleaseUnicode|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode Debug|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode Release|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode_Debug|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode_Debug|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode_Release|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Unicode_Release|Win32.Build.0 = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.UnicodeDebug|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.UnicodeDebug|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.UnicodeRelease|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.UnicodeRelease|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/ReadMe.txt new file mode 100644 index 0000000..b58cc08 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : UsingDLL +======================================================================== + + +AppWizard has created this UsingDLL 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 UsingDLL application. + +UsingDLL.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +UsingDLL.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CUsingDLLApp application class. + +UsingDLL.cpp + This is the main application source file that contains the application + class CUsingDLLApp. + +UsingDLL.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++. + +UsingDLL.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\UsingDLL.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file UsingDLL.rc. + +res\UsingDLL.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +UsingDLLDlg.h, UsingDLLDlg.cpp - the dialog + These files contain your CUsingDLLDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in UsingDLL.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named UsingDLL.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.cpp new file mode 100644 index 0000000..ec5c8dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// UsingDLL.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.h new file mode 100644 index 0000000..2f9c307 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/StdAfx.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__1E45C133_14C9_4003_9BD3_AB8428DFB8AB__INCLUDED_) +#define AFX_STDAFX_H__1E45C133_14C9_4003_9BD3_AB8428DFB8AB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +// STEP 2: +#define _LINK_TO_UTB_IN_EXTDLL +#include "UTDLL.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__1E45C133_14C9_4003_9BD3_AB8428DFB8AB__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.cpp new file mode 100644 index 0000000..383ca6e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.cpp @@ -0,0 +1,74 @@ +// UsingDLL.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "UsingDLL.h" +#include "UsingDLLDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLApp + +BEGIN_MESSAGE_MAP(CUsingDLLApp, CWinApp) + //{{AFX_MSG_MAP(CUsingDLLApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLApp construction + +CUsingDLLApp::CUsingDLLApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CUsingDLLApp object + +CUsingDLLApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLApp initialization + +BOOL CUsingDLLApp::InitInstance() +{ + 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + CUsingDLLDlg dlg; + m_pMainWnd = &dlg; + int 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; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsp new file mode 100644 index 0000000..9930c8d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsp @@ -0,0 +1,221 @@ +# Microsoft Developer Studio Project File - Name="UsingDLL" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=UsingDLL - Win32 Unicode Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "UsingDLL.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "UsingDLL.mak" CFG="UsingDLL - Win32 Unicode Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "UsingDLL - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "UsingDLL - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "UsingDLL - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "UsingDLL - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "UsingDLL - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\DLLs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\DLLs\UTD.lib" echo ERROR : UTD.lib not found. You need to build the UT project (Debug) found in /lib/Build DLLs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingDLL - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "UsingDLL___Win32_Release" +# PROP BASE Intermediate_Dir "UsingDLL___Win32_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\DLLs" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\DLLs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\DLLs\UT.lib" echo ERROR : UT.lib not found. You need to build the UT project (Release) found in /lib/Build DLLs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingDLL - Win32 Unicode Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "UsingDLL___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "UsingDLL___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\DLLs" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\DLLs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\DLLs\UTDU.lib" echo ERROR : UTDU.lib not found. You need to build the UT project (Unicode Debug) found in /lib/Build DLLs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingDLL - Win32 Unicode Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "UsingDLL___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "UsingDLL___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseU" +# PROP Intermediate_Dir "ReleaseU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\DLLs" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\DLLs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\DLLs\UTU.lib" echo ERROR : UTU.lib not found. You need to build the UT project (Unicode Release) found in /lib/Build DLLs +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "UsingDLL - Win32 Debug" +# Name "UsingDLL - Win32 Release" +# Name "UsingDLL - Win32 Unicode Debug" +# Name "UsingDLL - Win32 Unicode Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\UsingDLL.cpp +# End Source File +# Begin Source File + +SOURCE=.\UsingDLL.rc +# End Source File +# Begin Source File + +SOURCE=.\UsingDLLDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\UsingDLL.h +# End Source File +# Begin Source File + +SOURCE=.\UsingDLLDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\UsingDLL.ico +# End Source File +# Begin Source File + +SOURCE=.\res\UsingDLL.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsw new file mode 100644 index 0000000..5cfc1f6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UsingDLL"=".\UsingDLL.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.h new file mode 100644 index 0000000..195b82e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.h @@ -0,0 +1,49 @@ +// UsingDLL.h : main header file for the USINGDLL application +// + +#if !defined(AFX_USINGDLL_H__79D3F732_28CF_42E3_8553_1F8E40B588B7__INCLUDED_) +#define AFX_USINGDLL_H__79D3F732_28CF_42E3_8553_1F8E40B588B7__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLApp: +// See UsingDLL.cpp for the implementation of this class +// + +class CUsingDLLApp : public CWinApp +{ +public: + CUsingDLLApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CUsingDLLApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CUsingDLLApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_USINGDLL_H__79D3F732_28CF_42E3_8553_1F8E40B588B7__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.rc new file mode 100644 index 0000000..0aa7208 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLL.rc @@ -0,0 +1,220 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\UsingDLL.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 DISCARDABLE "res\\UsingDLL.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About UsingDLL" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "UsingDLL Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) The Code Project 2002 - 2005",IDC_STATIC, + 40,25,143,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_USINGDLL_DIALOG DIALOGEX 0, 0, 295, 170 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "UsingDLL" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,180,145,50,14 + PUSHBUTTON "Cancel",IDCANCEL,235,145,50,14 + LTEXT "STEP 1: Compile the UT project located in /lib/Build DLLs.", + IDC_STATIC,30,35,200,10 + LTEXT "You need to perform the following steps in order to use the Ultimate ToolBox in a DLL:", + IDC_STATIC,15,15,275,10 + LTEXT "STEP 2: Add the following lines to to the end of your project's StdAfx.h file:", + IDC_STATIC,30,55,245,10 + LTEXT "www.theultimatetoolbox.com",IDC_STATIC_HYPERLING,130, + 125,98,10 + LTEXT "If everything is OK you should be able to compile and run this project.", + IDC_STATIC,15,110,230,10 + LTEXT "Also the following link should work:",IDC_STATIC,15,125, + 110,8 + LTEXT "#define _LINK_TO_UTB_IN_EXTDLL\n#include ""UTDLL.h""", + IDC_STATIC,40,75,205,20 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "UsingDLL MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "UsingDLL\0" + VALUE "LegalCopyright", "Copyright (C) 2002\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "UsingDLL.EXE\0" + VALUE "ProductName", "UsingDLL Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_USINGDLL_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 288 + TOPMARGIN, 7 + BOTTOMMARGIN, 163 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About UsingDLL..." +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\UsingDLL.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.cpp new file mode 100644 index 0000000..f67b953 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.cpp @@ -0,0 +1,169 @@ +// UsingDLLDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "UsingDLL.h" +#include "UsingDLLDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLDlg dialog + +CUsingDLLDlg::CUsingDLLDlg(CWnd* pParent /*=NULL*/) + : CDialog(CUsingDLLDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CUsingDLLDlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CUsingDLLDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CUsingDLLDlg) + DDX_Control(pDX, IDC_STATIC_HYPERLING, m_HyperLink); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CUsingDLLDlg, CDialog) + //{{AFX_MSG_MAP(CUsingDLLDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLDlg message handlers + +BOOL CUsingDLLDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CUsingDLLDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CUsingDLLDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CUsingDLLDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.h new file mode 100644 index 0000000..9d431da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/UsingDLLDlg.h @@ -0,0 +1,51 @@ +// UsingDLLDlg.h : header file +// + +#if !defined(AFX_USINGDLLDLG_H__F8BE97CD_A983_4FAE_95B5_EDE302C33EE6__INCLUDED_) +#define AFX_USINGDLLDLG_H__F8BE97CD_A983_4FAE_95B5_EDE302C33EE6__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CUsingDLLDlg dialog + +#include "OXStaticHyperLink.h" + +class CUsingDLLDlg : public CDialog +{ +// Construction +public: + CUsingDLLDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CUsingDLLDlg) + enum { IDD = IDD_USINGDLL_DIALOG }; + COXStaticHyperLink m_HyperLink; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CUsingDLLDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CUsingDLLDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_USINGDLLDLG_H__F8BE97CD_A983_4FAE_95B5_EDE302C33EE6__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.rc2 new file mode 100644 index 0000000..8f2e532 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/res/UsingDLL.rc2 @@ -0,0 +1,13 @@ +// +// USINGDLL.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/resource.h new file mode 100644 index 0000000..6b61207 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingDLL/resource.h @@ -0,0 +1,22 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by UsingDLL.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_USINGDLL_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_STATIC_HYPERLING 1000 +#define IDC_EDIT_LINES 1001 + +// 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 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/ReadMe.txt new file mode 100644 index 0000000..774022c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : UsingStaticLib +======================================================================== + + +AppWizard has created this UsingStaticLib 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 UsingStaticLib application. + +UsingStaticLib.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +UsingStaticLib.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CUsingStaticLibApp application class. + +UsingStaticLib.cpp + This is the main application source file that contains the application + class CUsingStaticLibApp. + +UsingStaticLib.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++. + +UsingStaticLib.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\UsingStaticLib.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file UsingStaticLib.rc. + +res\UsingStaticLib.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +UsingStaticLibDlg.h, UsingStaticLibDlg.cpp - the dialog + These files contain your CUsingStaticLibDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in UsingStaticLib.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named UsingStaticLib.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.cpp new file mode 100644 index 0000000..5569e32 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// UsingStaticLib.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.h new file mode 100644 index 0000000..4bc298d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__06ED5FE0_5F1D_4967_982F_EEDEF805E31E__INCLUDED_) +#define AFX_STDAFX_H__06ED5FE0_5F1D_4967_982F_EEDEF805E31E__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +// STEP 2: +#include "UTStaticLib.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__06ED5FE0_5F1D_4967_982F_EEDEF805E31E__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.cpp new file mode 100644 index 0000000..d190f16 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.cpp @@ -0,0 +1,74 @@ +// UsingStaticLib.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "UsingStaticLib.h" +#include "UsingStaticLibDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibApp + +BEGIN_MESSAGE_MAP(CUsingStaticLibApp, CWinApp) + //{{AFX_MSG_MAP(CUsingStaticLibApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibApp construction + +CUsingStaticLibApp::CUsingStaticLibApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CUsingStaticLibApp object + +CUsingStaticLibApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibApp initialization + +BOOL CUsingStaticLibApp::InitInstance() +{ + 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + CUsingStaticLibDlg dlg; + m_pMainWnd = &dlg; + int 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; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsp new file mode 100644 index 0000000..1d5930d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsp @@ -0,0 +1,225 @@ +# Microsoft Developer Studio Project File - Name="UsingStaticLib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=UsingStaticLib - Win32 Unicode Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "UsingStaticLib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "UsingStaticLib.mak" CFG="UsingStaticLib - Win32 Unicode Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "UsingStaticLib - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "UsingStaticLib - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "UsingStaticLib - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "UsingStaticLib - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "UsingStaticLib - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\Libs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\Libs\UTLib*.*" echo ERROR : You need to build all configurations of the UTStaticLib project found in /lib/Build Libs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingStaticLib - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\Libs" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\Libs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\Libs\UTLib*.*" echo ERROR : You need to build all configurations of the UTStaticLib project found in /lib/Build Libs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingStaticLib - Win32 Unicode Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode Debug" +# PROP BASE Intermediate_Dir "Unicode Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\Libs" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\Libs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\Libs\UTLib*.*" echo ERROR : You need to build all configurations of the UTStaticLib project found in /lib/Build Libs +# End Special Build Tool + +!ELSEIF "$(CFG)" == "UsingStaticLib - Win32 Unicode Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode Release" +# PROP BASE Intermediate_Dir "Unicode Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseU" +# PROP Intermediate_Dir "ReleaseU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\Libs" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /libpath:"..\..\..\lib\Libs" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PreLink_Cmds=if not exist "..\..\..\lib\Libs\UTLib*.*" echo ERROR : You need to build all configurations of the UTStaticLib project found in /lib/Build Libs +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "UsingStaticLib - Win32 Debug" +# Name "UsingStaticLib - Win32 Release" +# Name "UsingStaticLib - Win32 Unicode Debug" +# Name "UsingStaticLib - Win32 Unicode Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\UsingStaticLib.cpp +# End Source File +# Begin Source File + +SOURCE=.\UsingStaticLib.rc +# End Source File +# Begin Source File + +SOURCE=.\UsingStaticLibDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\UsingStaticLib.h +# End Source File +# Begin Source File + +SOURCE=.\UsingStaticLibDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\UsingDLL\res\UsingDLL.ico +# End Source File +# Begin Source File + +SOURCE=.\res\UsingStaticLib.ico +# End Source File +# Begin Source File + +SOURCE=.\res\UsingStaticLib.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsw new file mode 100644 index 0000000..689056e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UsingStaticLib"=".\UsingStaticLib.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.h new file mode 100644 index 0000000..1c3717c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.h @@ -0,0 +1,49 @@ +// UsingStaticLib.h : main header file for the USINGSTATICLIB application +// + +#if !defined(AFX_USINGSTATICLIB_H__0B90D75A_A148_4832_8142_849A8EB21940__INCLUDED_) +#define AFX_USINGSTATICLIB_H__0B90D75A_A148_4832_8142_849A8EB21940__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibApp: +// See UsingStaticLib.cpp for the implementation of this class +// + +class CUsingStaticLibApp : public CWinApp +{ +public: + CUsingStaticLibApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CUsingStaticLibApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CUsingStaticLibApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_USINGSTATICLIB_H__0B90D75A_A148_4832_8142_849A8EB21940__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.rc new file mode 100644 index 0000000..1ee6943 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.rc @@ -0,0 +1,226 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\UsingStaticLib.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "// STEP 3:\r\n" + "#include ""OXMain.rc""\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 DISCARDABLE "res\\UsingStaticLib.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About UsingStaticLib" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "UsingStaticLib Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) The Code Project 2002 - 2005",IDC_STATIC, + 40,25,139,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_USINGSTATICLIB_DIALOG DIALOGEX 0, 0, 322, 206 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "UsingStaticLib" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,205,180,50,14 + PUSHBUTTON "Cancel",IDCANCEL,260,180,50,14 + LTEXT "STEP 1: Compile the UTStaticLib project located in /lib/Build Libs.", + IDC_STATIC,30,35,230,10 + LTEXT "You need to perform the following steps in order to use the Ultimate ToolBox in a static library:", + IDC_STATIC,15,15,295,10 + LTEXT "STEP 2: Add the following line to to the end of your project's StdAfx.h file:", + IDC_STATIC,30,55,245,10 + LTEXT "www.theultimatetoolbox.com",IDC_STATIC_HYPERLING,130, + 160,102,10 + LTEXT "If everything is OK you should be able to compile and run this project.", + IDC_STATIC,15,145,230,10 + LTEXT "Also the following link should work:",IDC_STATIC,15,160, + 110,8 + LTEXT "#include ""UTStaticLib.h""",IDC_STATIC,40,70,205,10 + LTEXT "STEP 3: Add the following line to the compile-time directives of the ""Resource Includes"" window:", + IDC_STATIC,30,95,215,20 + LTEXT "#include ""OXMain.rc""",IDC_STATIC,40,120,250,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "UsingStaticLib MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "UsingStaticLib\0" + VALUE "LegalCopyright", "Copyright (C) 2002\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "UsingStaticLib.EXE\0" + VALUE "ProductName", "UsingStaticLib Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_USINGSTATICLIB_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 315 + TOPMARGIN, 7 + BOTTOMMARGIN, 199 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About UsingStaticLib..." +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\UsingStaticLib.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +// STEP 3: +#include "OXMain.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.sln new file mode 100644 index 0000000..e64e7e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UsingStaticLib", "UsingStaticLib.vcproj", "{1E30D933-D54D-46A4-8E69-3FFD11A9121D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Unicode Debug|Win32 = Unicode Debug|Win32 + Unicode Release|Win32 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Debug|Win32.Build.0 = Debug|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Release|Win32.ActiveCfg = Release|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Release|Win32.Build.0 = Release|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {1E30D933-D54D-46A4-8E69-3FFD11A9121D}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.vcproj new file mode 100644 index 0000000..af6cb7b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLib.vcproj @@ -0,0 +1,636 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.cpp new file mode 100644 index 0000000..d479007 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.cpp @@ -0,0 +1,170 @@ +// UsingStaticLibDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "UsingStaticLib.h" +#include "UsingStaticLibDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibDlg dialog + +CUsingStaticLibDlg::CUsingStaticLibDlg(CWnd* pParent /*=NULL*/) + : CDialog(CUsingStaticLibDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CUsingStaticLibDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CUsingStaticLibDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CUsingStaticLibDlg) + DDX_Control(pDX, IDC_STATIC_HYPERLING, m_HyperLink); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CUsingStaticLibDlg, CDialog) + //{{AFX_MSG_MAP(CUsingStaticLibDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibDlg message handlers + +BOOL CUsingStaticLibDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CUsingStaticLibDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CUsingStaticLibDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CUsingStaticLibDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.h new file mode 100644 index 0000000..82ae567 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/UsingStaticLibDlg.h @@ -0,0 +1,51 @@ +// UsingStaticLibDlg.h : header file +// + +#if !defined(AFX_USINGSTATICLIBDLG_H__8B67B7E5_2839_4535_909A_8AE58146AFCC__INCLUDED_) +#define AFX_USINGSTATICLIBDLG_H__8B67B7E5_2839_4535_909A_8AE58146AFCC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CUsingStaticLibDlg dialog + +#include "OXStaticHyperLink.h" + +class CUsingStaticLibDlg : public CDialog +{ +// Construction +public: + CUsingStaticLibDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CUsingStaticLibDlg) + enum { IDD = IDD_USINGSTATICLIB_DIALOG }; + COXStaticHyperLink m_HyperLink; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CUsingStaticLibDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CUsingStaticLibDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_USINGSTATICLIBDLG_H__8B67B7E5_2839_4535_909A_8AE58146AFCC__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.rc2 new file mode 100644 index 0000000..056acaa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/res/UsingStaticLib.rc2 @@ -0,0 +1,13 @@ +// +// USINGSTATICLIB.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/resource.h new file mode 100644 index 0000000..15ea08b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/GettingStarted/UsingStaticLib/resource.h @@ -0,0 +1,21 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by UsingStaticLib.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_USINGSTATICLIB_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_STATIC_HYPERLING 1000 + +// 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 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.cpp new file mode 100644 index 0000000..a8c42d0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "CustomizeManager.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.h new file mode 100644 index 0000000..bf6d958 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__ADCFCFEA_E1F9_48E2_BF7B_A1C232EF487A__INCLUDED_) +#define AFX_CHILDFRM_H__ADCFCFEA_E1F9_48E2_BF7B_A1C232EF487A__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__ADCFCFEA_E1F9_48E2_BF7B_A1C232EF487A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.cpp new file mode 100644 index 0000000..71d3e1f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.cpp @@ -0,0 +1,181 @@ +// CustomizeManager.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CustomizeManager.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "CustomizeManagerDoc.h" +#include "CustomizeManagerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerApp + +BEGIN_MESSAGE_MAP(CCustomizeManagerApp, CWinApp) + //{{AFX_MSG_MAP(CCustomizeManagerApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerApp construction + +CCustomizeManagerApp::CCustomizeManagerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCustomizeManagerApp object + +CCustomizeManagerApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerApp initialization + +BOOL CCustomizeManagerApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // STEP 6g: Commands Page - Initialize OLE in order for Drag and Drop to work. + AfxOleInit(); + + // 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(); // Load standard INI file options (including MRU) + + // STEP 8c: Instance Manager Page - Check for number of running instances and exit + // if that number has been exceeded. Make sure COXCustomizeManager goes out of scope. + { + COXCustomizeManager CM; + if (CM.CheckMaxAllowedInstances()) + { + AfxMessageBox(_T("The maximum allowed number of instances has been reached.")); + return FALSE; + } + } + + // Register the application's document templates. Document templates + // serve as the connection between documents, frame windows and views. + + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate( + IDR_CUSTOMTYPE, + RUNTIME_CLASS(CCustomizeManagerDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CCustomizeManagerView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // STEP 14b: Workspace State Page - Call LoadWorkspaceState() from OnInitInstance(). + pMainFrame->m_CM.LoadWorkspaceState(); + + // STEP 14c: Workspace State Page - Do not call ProcessShellCommand(...) if restoring + // the workspace state. +// 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CCustomizeManagerApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerApp message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsp new file mode 100644 index 0000000..576a310 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsp @@ -0,0 +1,570 @@ +# Microsoft Developer Studio Project File - Name="CustomizeManager" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CustomizeManager - Win32 Unicode Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CustomizeManager.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CustomizeManager.mak" CFG="CustomizeManager - Win32 Unicode Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CustomizeManager - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CustomizeManager - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CustomizeManager - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "CustomizeManager - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CustomizeManager - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CustomizeManager.exe" + +!ELSEIF "$(CFG)" == "CustomizeManager - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CustomizeManager.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "CustomizeManager - Win32 Unicode Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CustomizeManager___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "CustomizeManager___Win32_Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseU" +# PROP Intermediate_Dir "ReleaseU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CustomizeManager.exe" + +!ELSEIF "$(CFG)" == "CustomizeManager - Win32 Unicode Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "CustomizeManager___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "CustomizeManager___Win32_Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CustomizeManager.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CustomizeManager - Win32 Release" +# Name "CustomizeManager - Win32 Debug" +# Name "CustomizeManager - Win32 Unicode Release" +# Name "CustomizeManager - Win32 Unicode Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Ultimate ToolBox" + +# PROP Default_Filter "*.cpp" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBackgroundPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBMPFilePickerCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXButtonAppearanceDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXChildFrameState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolControlOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeBackgroundPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeCaptionPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeCommandsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeCoolControlsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeInstanceManagerPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeIntelliMousePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeShortkeysPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeSplashWindowPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeTabbedMDIPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeToolbarsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeTrayIconPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeWorkspaceStatePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDocTemplateSpy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDropCommands.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXImageListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXInstanceManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXIntelliMouse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXListBoxEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMultiComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXOptionTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPreviewDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortkeysOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplashWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplashWndDIB.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterColRowState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXWorkspaceState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManager.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManager.rc +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManagerDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManagerView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "Ultimate ToolBox Headers" + +# PROP Default_Filter "*.h" +# Begin Source File + +SOURCE=..\..\..\include\OXCoolToolBar.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManager.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManagerDoc.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeManagerView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\background.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\CustomizeManager.ico +# End Source File +# Begin Source File + +SOURCE=.\res\CustomizeManager.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\CustomizeManagerDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\splash.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsw new file mode 100644 index 0000000..ff6b4e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CustomizeManager"=".\CustomizeManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Code Project/Ultimate Toolbox/Working/samples/advanced/CustomizeManager", APIAAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.h new file mode 100644 index 0000000..6e25af2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.h @@ -0,0 +1,50 @@ +// CustomizeManager.h : main header file for the CUSTOMIZEMANAGER application +// + +#if !defined(AFX_CUSTOMIZEMANAGER_H__040D0153_4DB2_4DAB_B65F_8C3A98FB4250__INCLUDED_) +#define AFX_CUSTOMIZEMANAGER_H__040D0153_4DB2_4DAB_B65F_8C3A98FB4250__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols +#include "OXSkins.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerApp: +// See CustomizeManager.cpp for the implementation of this class +// + +class CCustomizeManagerApp : public COXSkinnedApp +{ +public: + CCustomizeManagerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeManagerApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CCustomizeManagerApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEMANAGER_H__040D0153_4DB2_4DAB_B65F_8C3A98FB4250__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.rc new file mode 100644 index 0000000..91fe713 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.rc @@ -0,0 +1,442 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\CustomizeManager.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" + "#include ""OXMain.rc""\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 DISCARDABLE "res\\CustomizeManager.ico" +IDR_CUSTOMTYPE ICON DISCARDABLE "res\\CustomizeManagerDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDB_SPLASH BITMAP DISCARDABLE "res\\splash.bmp" +IDB_BACKGROUND BITMAP DISCARDABLE "res\\background.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END + POPUP "&Help" + BEGIN + MENUITEM "&About CustomizeManager...", ID_APP_ABOUT + END +END + +IDR_CUSTOMTYPE MENU PRELOAD DISCARDABLE +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 + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + 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 CustomizeManager...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About CustomizeManager" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "CustomizeManager Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) The Code Project 2005",IDC_STATIC,40,25, + 119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "CustomizeManager MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "CustomizeManager\0" + VALUE "LegalCopyright", "Copyright (C) 2003\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "CustomizeManager.EXE\0" + VALUE "ProductName", "CustomizeManager Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "CustomizeManager" + IDR_CUSTOMTYPE "\nCustom\nCustom\n\n\nCustomizeManager.Document\nCustom Document" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "CustomizeManager" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" + ID_CB_COMBO "Combo Box/nCombo Box" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\CustomizeManager.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXMain.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.sln new file mode 100644 index 0000000..00edaf6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CustomizeManager", "CustomizeManager.vcproj", "{B16DB8EC-79D3-464E-AD09-7F54E871AD46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Unicode Debug|Win32 = Unicode Debug|Win32 + Unicode Release|Win32 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Debug|Win32.ActiveCfg = Debug|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Debug|Win32.Build.0 = Debug|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Release|Win32.ActiveCfg = Release|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Release|Win32.Build.0 = Release|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {B16DB8EC-79D3-464E-AD09-7F54E871AD46}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vcproj new file mode 100644 index 0000000..0f797f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vcproj @@ -0,0 +1,3787 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vssscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vssscc new file mode 100644 index 0000000..6cb031b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManager.vssscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.cpp new file mode 100644 index 0000000..9004466 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.cpp @@ -0,0 +1,84 @@ +// CustomizeManagerDoc.cpp : implementation of the CCustomizeManagerDoc class +// + +#include "stdafx.h" +#include "CustomizeManager.h" + +#include "CustomizeManagerDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerDoc + +IMPLEMENT_DYNCREATE(CCustomizeManagerDoc, CDocument) + +BEGIN_MESSAGE_MAP(CCustomizeManagerDoc, CDocument) + //{{AFX_MSG_MAP(CCustomizeManagerDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerDoc construction/destruction + +CCustomizeManagerDoc::CCustomizeManagerDoc() +{ + // TODO: add one-time construction code here + +} + +CCustomizeManagerDoc::~CCustomizeManagerDoc() +{ +} + +BOOL CCustomizeManagerDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerDoc serialization + +void CCustomizeManagerDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerDoc diagnostics + +#ifdef _DEBUG +void CCustomizeManagerDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CCustomizeManagerDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.h new file mode 100644 index 0000000..89b63de --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerDoc.h @@ -0,0 +1,57 @@ +// CustomizeManagerDoc.h : interface of the CCustomizeManagerDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CUSTOMIZEMANAGERDOC_H__F8CA3858_21D3_41FD_B720_15875E934869__INCLUDED_) +#define AFX_CUSTOMIZEMANAGERDOC_H__F8CA3858_21D3_41FD_B720_15875E934869__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CCustomizeManagerDoc : public CDocument +{ +protected: // create from serialization only + CCustomizeManagerDoc(); + DECLARE_DYNCREATE(CCustomizeManagerDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeManagerDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCustomizeManagerDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCustomizeManagerDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEMANAGERDOC_H__F8CA3858_21D3_41FD_B720_15875E934869__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.cpp new file mode 100644 index 0000000..d5e15aa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.cpp @@ -0,0 +1,104 @@ +// CustomizeManagerView.cpp : implementation of the CCustomizeManagerView class +// + +#include "stdafx.h" +#include "CustomizeManager.h" + +#include "CustomizeManagerDoc.h" +#include "CustomizeManagerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView + +IMPLEMENT_DYNCREATE(CCustomizeManagerView, CView) + +BEGIN_MESSAGE_MAP(CCustomizeManagerView, CView) + //{{AFX_MSG_MAP(CCustomizeManagerView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView construction/destruction + +CCustomizeManagerView::CCustomizeManagerView() +{ + // TODO: add construction code here + +} + +CCustomizeManagerView::~CCustomizeManagerView() +{ +} + +BOOL CCustomizeManagerView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView drawing + +void CCustomizeManagerView::OnDraw(CDC* /*pDC*/) +{ + CCustomizeManagerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView printing + +BOOL CCustomizeManagerView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CCustomizeManagerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CCustomizeManagerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView diagnostics + +#ifdef _DEBUG +void CCustomizeManagerView::AssertValid() const +{ + CView::AssertValid(); +} + +void CCustomizeManagerView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CCustomizeManagerDoc* CCustomizeManagerView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCustomizeManagerDoc))); + return (CCustomizeManagerDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeManagerView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.h new file mode 100644 index 0000000..5323007 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/CustomizeManagerView.h @@ -0,0 +1,68 @@ +// CustomizeManagerView.h : interface of the CCustomizeManagerView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CUSTOMIZEMANAGERVIEW_H__F7F2B4D2_A8E3_4676_8DA3_45B0DAECB502__INCLUDED_) +#define AFX_CUSTOMIZEMANAGERVIEW_H__F7F2B4D2_A8E3_4676_8DA3_45B0DAECB502__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXSkinnedView.h" + +class CCustomizeManagerView : public COXSkinnedView +{ +protected: // create from serialization only + CCustomizeManagerView(); + DECLARE_DYNCREATE(CCustomizeManagerView) + +// Attributes +public: + CCustomizeManagerDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeManagerView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCustomizeManagerView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCustomizeManagerView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in CustomizeManagerView.cpp +inline CCustomizeManagerDoc* CCustomizeManagerView::GetDocument() + { return (CCustomizeManagerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEMANAGERVIEW_H__F7F2B4D2_A8E3_4676_8DA3_45B0DAECB502__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.cpp new file mode 100644 index 0000000..f1ffd2e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.cpp @@ -0,0 +1,236 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "CustomizeManager.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + ON_WM_CLOSE() + //}}AFX_MSG_MAP +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() : COXMenuBarFrame(CBRS_ALIGN_ANY, + RUNTIME_CLASS(COXSizableMiniDockFrameWnd)) +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // STEP 6f: Commands Page - You must use Create(...) instead of CreateEx(...), + // otherwise the toolbar buttons will not be customizable. + if (!m_wndToolBar.Create(this, + WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, + AFX_IDW_TOOLBAR) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + InitToolBar(); + + 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); + + // Comment out the next line if you don't want the snapping and tear-off behavior. + EnableSnapping(); + + // STEP 3: Before initializing the different pages of the Customize Manager you have + // to set CWinApp::m_pMainWnd to point to your main frame. + AfxGetApp()->m_pMainWnd = this; + + // STEP 4b: Tabbed MDI Page - Call InitializeTabbedMDI() in the WM_CREATE handler + // of your main frame window. This call but be prior to calling InitializeBackgroundPainter(...). + m_CM.InitializeTabbedMDI(); + + // STEP 5b: Toolbars Page - Call InitializeToolbars() in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeToolbars(); + + // STEP 6b: Commands Page - Call InitializeCommands() in the WM_CREATE handler of + // your main frame window. Make sure that this function is called AFTER InitializeToolbars(). + m_CM.InitializeCommands(); + + // STEP 6c: Recent Menus - If you want some menu items to be colapsed call + // ExcludeFromRecentlyUsed(...) and pass the ID of the menu item. + m_CM.GetBMOrganizer()->ExcludeFromRecentlyUsed(ID_FILE_OPEN); + m_CM.GetBMOrganizer()->ExcludeFromRecentlyUsed(ID_FILE_PRINT_PREVIEW); + m_CM.GetBMOrganizer()->ExcludeFromRecentlyUsed(ID_FILE_PRINT_SETUP); + + // STEP 7b: Cool Controls Page - Call InitializeCoolControls() in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeCoolControls(); + + // STEP 8b: Instance Manager Page - Call InitializeInstanceManager() in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeInstanceManager(); + + // STEP 9b: IntelliMouse Support Page - Call InitializeIntelliMouse() in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeIntelliMouse(TRUE, WM_LBUTTONDOWN, KEYPRESSED_SHIFT); + + // STEP 10b: Shortkeys Page - Call InitializeShortkeys(...) in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeShortkeys(this); + + // STEP 11b: Splash Window Page - Call InitializeSplashWindow(...) in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeSplashWindow(IDB_SPLASH, TRUE, 2000); + + // STEP 12b: Background Painter Page - Call InitializeBackgroundPainter(...) in the + // WM_CREATE handler of your main frame window. This must be called after InitializeTabbedMDI(). + m_CM.InitializeBackgroundPainter(TRUE, TRUE, IDB_BACKGROUND); + + // STEP 13b: Tray Icon Page - Call InitializeTrayIcon(...) in the WM_CREATE handler + // of your main frame window. + m_CM.InitializeTrayIcon(IDR_MAINFRAME, IDR_MAINFRAME, _T("Tooltip")); + + return 0; +} + +void CMainFrame::OnClose() +{ + // STEP 14c: Workspace State Page - Call SaveWorkspaceState() in the WM_CLOSE handler + // of your main frame window. +// m_CM.SaveWorkspaceState(); + + CMDIFrameWnd::OnClose(); +} + +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 + +// STEP 2: Add a command and a handler for it which will display the Customize Manager window. +void CMainFrame::OnViewCustomize() +{ + // If the Customize Manager window has not been created yet - create it. + if (!::IsWindow(m_CM.GetSafeHwnd())) + { + VERIFY(m_CM.Create(COXCustomizeManager::IDD, this)); + } + + // Set the page you want to display first and show the window. + m_CM.ActivatePage(BACKGROUND_PAINTER); + m_CM.SetActiveWindow(); + m_CM.ShowWindow(SW_SHOW); +} + +void CMainFrame::InitToolBar() +{ + m_wndToolBar.SetWindowText(_T("Toolbar")); + + static CFont font; + if(font.m_hObject == NULL) + font.CreatePointFont(-80, _T("MS Sans Serif")); + + // Add the skinned combo box + int iCombo = COXCoolToolBar::AddCustomButton(&m_Combo, ID_CB_COMBO, 100, 100); + m_wndToolBar.InsertComboBox(m_wndToolBar.GetToolBarCtrl().GetButtonCount(), iCombo); + m_Combo.SetFont(&font); + + m_Combo.AddString(_T("One")); + m_Combo.SetItemData(0, 500); + m_Combo.AddString(_T("Two")); + m_Combo.SetItemData(1, 1000); + m_Combo.AddString(_T("Three")); + m_Combo.SetItemData(2, 1500); + m_Combo.AddString(_T("Four")); + m_Combo.SetItemData(3, 2000); + m_Combo.AddString(_T("Five")); + m_Combo.SetItemData(4, 2500); +} + +// We override WindowProc since we want to get CBN_SELCHANGE along with +// the handle of the window that generated it. +LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) +{ + // NOTE: Since the Customize Manager could have been used to place the combo box + // in more than one place, there is no garantee that m_Combo is where this notification + // originated. So we must get the pointer using the combo box handle. + if (message == WM_COMMAND && HIWORD(wParam) == CBN_SELCHANGE) + { + COXCustomTBComboBox* pCombo = + (COXCustomTBComboBox*) CWnd::FromHandlePermanent((HWND) lParam); + + if (pCombo) + { + // Beep with the appropriate frequency when the selection changes + int iFrequency = (int) pCombo->GetItemData(pCombo->GetCurSel()); + Beep(iFrequency, 100); + } + } + + return COXMenuBarFrame::WindowProc(message, wParam, lParam); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.h new file mode 100644 index 0000000..49f2f8d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/MainFrm.h @@ -0,0 +1,77 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__84AC7585_BE42_4A2A_AE55_76F3BF8B34E6__INCLUDED_) +#define AFX_MAINFRM_H__84AC7585_BE42_4A2A_AE55_76F3BF8B34E6__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXCustomizeManager.h" +#include "OXCoolToolBar.h" +#include "xstatus4.h" + +// STEP 6d: Commands Page - Derive your main frame class from COXMenuBarFrame<...> for the menus +// to be customizable. +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // STEP 1: Add an instance of COXCustomizeManager to you main frame class. + COXCustomizeManager m_CM; + +protected: // control bar embedded members + + // STEP 6e, 12c: Commands Page, Toolbars Page - Use an instance of COXCoolToolBar + // instead of CToolBar. + COXCoolToolBar m_wndToolBar; + + COXStatusBar m_wndStatusBar; + COXCustomTBComboBox m_Combo; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnViewCustomize(); + afx_msg void OnClose(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +private: + void InitToolBar(); + +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__84AC7585_BE42_4A2A_AE55_76F3BF8B34E6__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ReadMe.txt new file mode 100644 index 0000000..3bb2dda --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/ReadMe.txt @@ -0,0 +1,117 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : CustomizeManager +======================================================================== + + +AppWizard has created this CustomizeManager 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 CustomizeManager application. + +CustomizeManager.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +CustomizeManager.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CCustomizeManagerApp application class. + +CustomizeManager.cpp + This is the main application source file that contains the application + class CCustomizeManagerApp. + +CustomizeManager.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++. + +CustomizeManager.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\CustomizeManager.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file CustomizeManager.rc. + +res\CustomizeManager.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 CustomizeManager.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +CustomizeManagerDoc.h, CustomizeManagerDoc.cpp - the document + These files contain your CCustomizeManagerDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CCustomizeManagerDoc::Serialize). + +CustomizeManagerView.h, CustomizeManagerView.cpp - the view of the document + These files contain your CCustomizeManagerView class. + CCustomizeManagerView objects are used to view CCustomizeManagerDoc objects. + +res\CustomizeManagerDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CCustomizeManagerDoc class. This icon is included by the main + resource file CustomizeManager.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named CustomizeManager.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.cpp new file mode 100644 index 0000000..d48765a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// CustomizeManager.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.h new file mode 100644 index 0000000..f13cc47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/StdAfx.h @@ -0,0 +1,63 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__D985ED2C_5BB7_4A58_8CEC_BF5FB5C03A98__INCLUDED_) +#define AFX_STDAFX_H__D985ED2C_5BB7_4A58_8CEC_BF5FB5C03A98__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +#include + +// STEP 4a: Tabbed MDI Page - Define OX_CUSTOMIZE_TABBEDMDI in your StdAfx.h file +#define OX_CUSTOMIZE_TABBEDMDI + +// STEP 6a: Toolbars Page - Define OX_CUSTOMIZE_TOOLBARS in your StdAfx.h file +#define OX_CUSTOMIZE_TOOLBARS + +// STEP 6a: Commands Page - Define OX_CUSTOMIZE_COMMANDS in your StdAfx.h file +#define OX_CUSTOMIZE_COMMANDS + +// STEP 7a: Cool Controls Page - Define OX_CUSTOMIZE_COOLCONTROLS in your StdAfx.h file +#define OX_CUSTOMIZE_COOLCONTROLS + +// STEP 8a: Instance Manager Page - Define OX_CUSTOMIZE_INSTANCE_MANAGER in your StdAfx.h file +#define OX_CUSTOMIZE_INSTANCE_MANAGER + +// STEP 9a: IntelliMouse Support Page - Define OX_CUSTOMIZE_INTELLIMOUSE in your StdAfx.h file +#define OX_CUSTOMIZE_INTELLIMOUSE + +// STEP 10a: Shortkeys Page - Define OX_CUSTOMIZE_SHORTKEYS in your StdAfx.h file +#define OX_CUSTOMIZE_SHORTKEYS + +// STEP 11a: Splash Window Page - Define OX_CUSTOMIZE_SPLASHWINDOW in your StdAfx.h file +#define OX_CUSTOMIZE_SPLASHWINDOW + +// STEP 12a: Background Painter Page - Define OX_CUSTOMIZE_BACKGROUND in your StdAfx.h file +#define OX_CUSTOMIZE_BACKGROUND + +// STEP 13a: Tray Icon Page - Define OX_CUSTOMIZE_TRAYICON in your StdAfx.h file +#define OX_CUSTOMIZE_TRAYICON + +// STEP 14a: Workspace State Page - Define OX_CUSTOMIZE_WORKSPACE_STATE in your StdAfx.h file +#define OX_CUSTOMIZE_WORKSPACE_STATE + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__D985ED2C_5BB7_4A58_8CEC_BF5FB5C03A98__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.rc2 new file mode 100644 index 0000000..e992f33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManager.rc2 @@ -0,0 +1,13 @@ +// +// CUSTOMIZEMANAGER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManagerDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManagerDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/CustomizeManagerDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/background.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/background.bmp new file mode 100644 index 0000000..1f8b567 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/background.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/splash.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/splash.bmp new file mode 100644 index 0000000..fe058db Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/res/splash.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/resource.h new file mode 100644 index 0000000..441a783 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/CustomizeManager/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CustomizeManager.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_CUSTOMTYPE 129 +#define IDB_SPLASH 130 +#define IDB_BACKGROUND 131 +#define ID_VIEW_CUSTOMIZE 32771 +#define ID_CB_COMBO 61446 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32772 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.cpp new file mode 100644 index 0000000..001176f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.cpp @@ -0,0 +1,134 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "DIBManager.h" + +#include "ChildFrm.h" + +#include "MainFrm.h" +#include "DIBManagerDoc.h" +#include "ScaleRollupDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + ON_WM_CREATE() + ON_WM_DESTROY() + //}}AFX_MSG_MAP +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 + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_DIBMANTYPE)); + ASSERT(cs.lpszClass); + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + m_Caption.Attach(this); + SendMessage(WM_NCPAINT); + + // when we create new child window we add info about it + // into TreeFilesBar docking control + ((CMainFrame*)GetMDIFrame())-> + m_TreeFilesBar.AddNewWindowToTree(this); + + return 0; +} + +void CChildFrame::OnDestroy() +{ + CMDIChildWnd::OnDestroy(); + + // TODO: Add your message handler code here + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + // notify TreeFilesBar docking control that the child window is about + // to be destroyed and we have to remove info about the window + pMainFrame->m_TreeFilesBar.RemoveWindowFromTree(this); + + // if we are about to destroy the last child window and + // roll-up ZoomLevel Dialog is active then destroy that dialog + if(pMainFrame->m_bShowZoomLevelDlg && + pMainFrame->m_TreeFilesBar.m_TreeFiles.GetCount()==1) + { + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + pScaleRollupDlg->DestroyWindow(); + pMainFrame->m_bShowZoomLevelDlg=FALSE; + } +} + + +LRESULT CChildFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) +{ + // TODO: Add your specialized code here and/or call the base class + + switch(message) + { + // when mainframe sets new title for the child window + // we notify TreeFilesBar docking control about that + case WM_SETTEXT: + { + ((CMainFrame*)GetMDIFrame())-> + m_TreeFilesBar.SetTextForWindowInTree(this, + (const CString&)(CString)((LPCSTR)lParam)); + break; + } + } + + return CMDIChildWnd::WindowProc(message, wParam, lParam); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.h new file mode 100644 index 0000000..5d920fb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ChildFrm.h @@ -0,0 +1,62 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__D2552D14_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_CHILDFRM_H__D2552D14_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXMDIFloatWnd.h" + +#include "OXCaptionPainter.h" + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +protected: + COXCaptionPainter m_Caption; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnDestroy(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__D2552D14_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.clw new file mode 100644 index 0000000..afb55ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.clw @@ -0,0 +1,697 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CDIBManagerApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "dibmanager.h" +LastPage=0 + +ClassCount=12 +Class1=CChildFrame +Class2=CDIBManagerApp +Class3=CDIBManagerDoc +Class4=CDIBManagerView +Class5=CExportDlg +Class6=CImageInfoDlg +Class7=CImportDlg +Class8=CMainFrame +Class9=CResampleImageDlg +Class10=CScaleRollupDlg +Class11=CTreeFilesDlg +Class12=CWorkspaceDlg + +ResourceCount=26 +Resource1=IDD_IMAGE_INFO_DIALOG +Resource2=IDD_DIALOG_WORKSPACE +Resource3=IDR_MAINFRAME +Resource4=IDD_DIALOG_EXPORT +Resource5=IDR_DIBMANTYPE +Resource6=IDR_MAINFRAME_COPY +Resource7=IDR_MAINFRAME_HOT +Resource8=IDD_DIALOG_TREE_FILES +Resource9=IDR_DUMMY +Resource10=IDD_DIALOG_IMPORT +Resource11=IDD_DIALOG_ROLLUP +Resource12=IDR_DUMMY_HOT +Resource13=IDD_DIALOG_RESAMPLE +Resource14=IDR_MAINFRAME_HOT (English (U.S.)) +Resource15=IDR_DUMMY (English (U.S.)) +Resource16=IDR_DUMMY_HOT (English (U.S.)) +Resource17=IDR_MAINFRAME_COPY (English (U.S.)) +Resource18=IDR_MAINFRAME (English (U.S.)) +Resource19=IDR_DIBMANTYPE (English (U.S.)) +Resource20=IDD_DIALOG_TREE_FILES (English (U.S.)) +Resource21=IDD_DIALOG_EXPORT (English (U.S.)) +Resource22=IDD_DIALOG_IMPORT (English (U.S.)) +Resource23=IDD_DIALOG_WORKSPACE (English (U.S.)) +Resource24=IDD_DIALOG_ROLLUP (English (U.S.)) +Resource25=IDD_IMAGE_INFO_DIALOG (English (U.S.)) +Resource26=IDD_DIALOG_RESAMPLE (English (U.S.)) + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CDIBManagerApp] +Type=0 +BaseClass=COXWinApp +HeaderFile=DIBManager.h +ImplementationFile=DIBManager.cpp +LastObject=CDIBManagerApp + +[CLS:CDIBManagerDoc] +Type=0 +BaseClass=CDocument +HeaderFile=DIBManagerDoc.h +ImplementationFile=DIBManagerDoc.cpp + +[CLS:CDIBManagerView] +Type=0 +BaseClass=COXZoomView +HeaderFile=DIBManagerView.h +ImplementationFile=DIBManagerView.cpp + +[CLS:CExportDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ExportDlg.h +ImplementationFile=ExportDlg.cpp + +[CLS:CImageInfoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ImageInfoDlg.h +ImplementationFile=ImageInfoDlg.cpp + +[CLS:CImportDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ImportDlg.h +ImplementationFile=ImportDlg.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=COXMDIFrameWndSizeDock +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CResampleImageDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ResampleImageDlg.h +ImplementationFile=ResampleImageDlg.cpp + +[CLS:CScaleRollupDlg] +Type=0 +BaseClass=COXRollup +HeaderFile=ScaleRollupDlg.h +ImplementationFile=ScaleRollupDlg.cpp + +[CLS:CTreeFilesDlg] +Type=0 +BaseClass=COXSizeDialogBar +HeaderFile=TreeFilesDlg.h +ImplementationFile=TreeFilesDlg.cpp + +[CLS:CWorkspaceDlg] +Type=0 +BaseClass=CDialog +HeaderFile=WorkspaceDlg.h +ImplementationFile=WorkspaceDlg.cpp + +[DLG:IDD_DIALOG_EXPORT] +Type=1 +Class=CExportDlg +ControlCount=19 +Control1=IDC_FILENAME,combobox,1344340034 +Control2=IDC_QUALITY,edit,1350631552 +Control3=IDC_SPIN_QUALITY,msctls_updown32,1342177442 +Control4=IDC_CHECK_SMOOTH,button,1342242819 +Control5=IDC_SMOOTH,edit,1350631552 +Control6=IDC_SPIN_SMOOTH,msctls_updown32,1342177442 +Control7=IDC_CHECK_GRAYSCALE,button,1342242819 +Control8=IDC_CHECK_OPTIMIZE,button,1342242819 +Control9=IDC_CHECK_PROGRESSIVE,button,1342242819 +Control10=IDC_CHECK_BASELINE,button,1342242819 +Control11=IDC_RADIO_DCT_INT,button,1342373897 +Control12=IDC_RADIO_DCT_FAST,button,1342242825 +Control13=IDC_RADIO_DCT_FLOAT,button,1342242825 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,button,1342177287 +Control19=IDC_STATIC,button,1342177287 + +[DLG:IDD_IMAGE_INFO_DIALOG] +Type=1 +Class=CImageInfoDlg +ControlCount=17 +Control1=IDOK,button,1342242817 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_FILE_NAME,static,1342308364 +Control10=IDC_WIDTH,static,1342308352 +Control11=IDC_HEIGHT,static,1342308352 +Control12=IDC_SIZE_IN_MEMORY,static,1342308352 +Control13=IDC_FILE_SIZE,static,1342308352 +Control14=IDC_FORMAT,static,1342308352 +Control15=IDC_TYPE,static,1342308352 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_FILE_STATUS,static,1342308352 + +[DLG:IDD_DIALOG_IMPORT] +Type=1 +Class=CImportDlg +ControlCount=24 +Control1=IDC_FILENAME,combobox,1344339970 +Control2=IDC_CHECK_COLORS,button,1342242819 +Control3=IDC_COLORS,edit,1350631552 +Control4=IDC_SPIN_COLORS,msctls_updown32,1342177442 +Control5=IDC_CHECK_GRAYSCALE,button,1342242819 +Control6=IDC_CHECK_ONE_PASS,button,1342242819 +Control7=IDC_CHECK_NO_SMOOTH,button,1342242819 +Control8=IDC_RADIO_ONE_TO_ONE,button,1342373897 +Control9=IDC_RADIO_ONE_TO_TWO,button,1342242825 +Control10=IDC_RADIO_ONE_TO_FOUR,button,1342242825 +Control11=IDC_RADIO_ONE_TO_EIGHT,button,1342242825 +Control12=IDC_RADIO_DCT_INT,button,1342373897 +Control13=IDC_RADIO_DCT_FAST,button,1342242825 +Control14=IDC_RADIO_DCT_FLOAT,button,1342242825 +Control15=IDC_RADIO_DM_FLOYD_STEIN,button,1342373897 +Control16=IDC_RADIO_DM_ORDERED,button,1342242825 +Control17=IDC_RADIO_DM_NONE,button,1342242825 +Control18=IDOK,button,1342242817 +Control19=IDCANCEL,button,1342242816 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,button,1342177287 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 +Control24=IDC_STATIC,button,1342177287 + +[DLG:IDD_DIALOG_RESAMPLE] +Type=1 +Class=CResampleImageDlg +ControlCount=23 +Control1=IDC_WIDTH_PIXELS,edit,1350566016 +Control2=IDC_SPIN_WIDTH_PIXELS,msctls_updown32,1342177442 +Control3=IDC_HEIGHT_PIXELS,edit,1350566016 +Control4=IDC_SPIN_HEIGHT_PIXELS,msctls_updown32,1342177442 +Control5=IDC_WIDTH_PERCENTS,edit,1350566016 +Control6=IDC_SPIN_WIDTH_PERCENTS,msctls_updown32,1342177442 +Control7=IDC_HEIGHT_PERCENTS,edit,1350566016 +Control8=IDC_SPIN_HEIGHT_PERCENTS,msctls_updown32,1342177442 +Control9=IDC_CHECK_MAINTAIN_RATIO,button,1342242819 +Control10=IDC_CHECK_MATCH_ZOOM_LEVEL,button,1342242819 +Control11=IDC_CHECK_CONVERT_TO,button,1342242819 +Control12=IDC_COMBO_CONVERT_TO,combobox,1344339971 +Control13=IDOK,button,1342242816 +Control14=ID_BUTTON_RESET,button,1342242816 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_WIDTH_ORIG,static,1342308352 +Control20=IDC_HEIGHT_ORIG,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_BUTTON_DUMMY,button,1073741825 + +[DLG:IDD_DIALOG_ROLLUP] +Type=1 +Class=CScaleRollupDlg +ControlCount=11 +Control1=IDC_ZOOM_LEVEL,edit,1350631424 +Control2=IDC_SPIN_ZOOM_LEVEL,msctls_updown32,1342177442 +Control3=IDC_BUTTON_APPLY,button,1342242817 +Control4=IDC_PICTURE,static,1342179333 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,button,1342177287 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_SCALED_WIDTH,edit,1350568064 +Control10=IDC_SCALED_HEIGHT,edit,1350568064 +Control11=IDC_STATIC,button,1342177287 + +[DLG:IDD_DIALOG_TREE_FILES] +Type=1 +Class=CTreeFilesDlg +ControlCount=1 +Control1=IDC_TREE_FILES,SysTreeView32,1342242871 + +[DLG:IDD_DIALOG_WORKSPACE] +Type=1 +Class=CWorkspaceDlg +ControlCount=5 +Control1=IDC_CHECK_SAVE_ON_EXIT,button,1342242819 +Control2=IDC_CHECK_LOAD_ON_ENTER,button,1342242819 +Control3=IDOK,button,1342242817 +Control4=IDCANCEL,button,1342242816 +Control5=IDC_SAVE_WORKSPACE,button,1342242816 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_IMPORT +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_TREEFILESBAR +Command9=ID_VIEW_WORKSPACE +Command10=ID_APP_ABOUT +CommandCount=10 + +[MNU:IDR_DIBMANTYPE] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_FILE_PRINT +Command9=ID_FILE_PRINT_PREVIEW +Command10=ID_FILE_PRINT_SETUP +Command11=ID_FILE_MRU_FILE1 +Command12=ID_APP_EXIT +Command13=ID_VIEW_TOOLBAR +Command14=ID_VIEW_STATUS_BAR +Command15=ID_TREEFILESBAR +Command16=ID_VIEW_RESAMPLE_IMAGE +Command17=ID_VIEW_IMAGE_INFO +Command18=ID_VIEW_ZOOM_IN +Command19=ID_VIEW_ZOOM_OUT +Command20=ID_VIEW_ZOOM_TO_WINDOW +Command21=ID_VIEW_ZOOM_TO_100 +Command22=ID_VIEW_ZOOM_LEVEL_DLG +Command23=ID_VIEW_WORKSPACE +Command24=ID_WINDOW_NEW +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +Command27=ID_WINDOW_ARRANGE +Command28=ID_WINDOW_SYNCHRONIZE +Command29=ID_APP_ABOUT +CommandCount=29 + +[TB:IDR_MAINFRAME_HOT] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_VIEW_ZOOM_IN +Command9=ID_VIEW_ZOOM_OUT +Command10=ID_VIEW_ZOOM_TO_WINDOW +Command11=ID_VIEW_ZOOM_TO_100 +Command12=ID_FILE_PRINT +Command13=ID_FILE_PRINT_PREVIEW +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[TB:IDR_DUMMY] +Type=1 +Class=? +Command1=ID_VIEW_ZOOM_IN +Command2=ID_VIEW_ZOOM_OUT +Command3=ID_VIEW_ZOOM_TO_WINDOW +Command4=ID_VIEW_ZOOM_TO_100 +CommandCount=4 + +[TB:IDR_DUMMY_HOT] +Type=1 +Class=? +Command1=ID_VIEW_ZOOM_IN +Command2=ID_VIEW_ZOOM_OUT +Command3=ID_VIEW_ZOOM_TO_WINDOW +Command4=ID_VIEW_ZOOM_TO_100 +CommandCount=4 + +[TB:IDR_MAINFRAME_COPY] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_FILE_PRINT +Command9=ID_FILE_PRINT_PREVIEW +Command10=ID_VIEW_ZOOM_IN +Command11=ID_VIEW_ZOOM_OUT +Command12=ID_VIEW_ZOOM_TO_WINDOW +Command13=ID_VIEW_ZOOM_TO_100 +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_VIEW_ZOOM_IN +Command9=ID_VIEW_ZOOM_OUT +Command10=ID_VIEW_ZOOM_TO_WINDOW +Command11=ID_VIEW_ZOOM_TO_100 +Command12=ID_FILE_PRINT +Command13=ID_FILE_PRINT_PREVIEW +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[TB:IDR_MAINFRAME_HOT (English (U.S.))] +Type=1 +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_VIEW_ZOOM_IN +Command9=ID_VIEW_ZOOM_OUT +Command10=ID_VIEW_ZOOM_TO_WINDOW +Command11=ID_VIEW_ZOOM_TO_100 +Command12=ID_FILE_PRINT +Command13=ID_FILE_PRINT_PREVIEW +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[TB:IDR_DUMMY (English (U.S.))] +Type=1 +Command1=ID_VIEW_ZOOM_IN +Command2=ID_VIEW_ZOOM_OUT +Command3=ID_VIEW_ZOOM_TO_WINDOW +Command4=ID_VIEW_ZOOM_TO_100 +CommandCount=4 + +[TB:IDR_DUMMY_HOT (English (U.S.))] +Type=1 +Command1=ID_VIEW_ZOOM_IN +Command2=ID_VIEW_ZOOM_OUT +Command3=ID_VIEW_ZOOM_TO_WINDOW +Command4=ID_VIEW_ZOOM_TO_100 +CommandCount=4 + +[TB:IDR_MAINFRAME_COPY (English (U.S.))] +Type=1 +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_FILE_PRINT +Command9=ID_FILE_PRINT_PREVIEW +Command10=ID_VIEW_ZOOM_IN +Command11=ID_VIEW_ZOOM_OUT +Command12=ID_VIEW_ZOOM_TO_WINDOW +Command13=ID_VIEW_ZOOM_TO_100 +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_VIEW_ZOOM_IN +Command9=ID_VIEW_ZOOM_OUT +Command10=ID_VIEW_ZOOM_TO_WINDOW +Command11=ID_VIEW_ZOOM_TO_100 +Command12=ID_FILE_PRINT +Command13=ID_FILE_PRINT_PREVIEW +Command14=ID_WINDOW_NEW +Command15=ID_WINDOW_CASCADE +Command16=ID_WINDOW_TILE_HORZ +Command17=ID_WINDOW_ARRANGE +Command18=ID_WINDOW_SYNCHRONIZE +Command19=ID_APP_ABOUT +CommandCount=19 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_OPEN +Command2=ID_FILE_IMPORT +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_TREEFILESBAR +Command9=ID_VIEW_WORKSPACE +Command10=ID_APP_ABOUT +CommandCount=10 + +[MNU:IDR_DIBMANTYPE (English (U.S.))] +Type=1 +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_IMPORT +Command6=ID_FILE_EXPORT +Command7=ID_FILE_PROTECTED +Command8=ID_FILE_PRINT +Command9=ID_FILE_PRINT_PREVIEW +Command10=ID_FILE_PRINT_SETUP +Command11=ID_FILE_MRU_FILE1 +Command12=ID_APP_EXIT +Command13=ID_VIEW_TOOLBAR +Command14=ID_VIEW_STATUS_BAR +Command15=ID_TREEFILESBAR +Command16=ID_VIEW_RESAMPLE_IMAGE +Command17=ID_VIEW_IMAGE_INFO +Command18=ID_VIEW_ZOOM_IN +Command19=ID_VIEW_ZOOM_OUT +Command20=ID_VIEW_ZOOM_TO_WINDOW +Command21=ID_VIEW_ZOOM_TO_100 +Command22=ID_VIEW_ZOOM_LEVEL_DLG +Command23=ID_VIEW_WORKSPACE +Command24=ID_WINDOW_NEW +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +Command27=ID_WINDOW_ARRANGE +Command28=ID_WINDOW_SYNCHRONIZE +Command29=ID_APP_ABOUT +CommandCount=29 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_DIALOG_TREE_FILES (English (U.S.))] +Type=1 +ControlCount=1 +Control1=IDC_TREE_FILES,SysTreeView32,1342242871 + +[DLG:IDD_DIALOG_EXPORT (English (U.S.))] +Type=1 +ControlCount=19 +Control1=IDC_FILENAME,combobox,1344340034 +Control2=IDC_QUALITY,edit,1350631552 +Control3=IDC_SPIN_QUALITY,msctls_updown32,1342177442 +Control4=IDC_CHECK_SMOOTH,button,1342242819 +Control5=IDC_SMOOTH,edit,1350631552 +Control6=IDC_SPIN_SMOOTH,msctls_updown32,1342177442 +Control7=IDC_CHECK_GRAYSCALE,button,1342242819 +Control8=IDC_CHECK_OPTIMIZE,button,1342242819 +Control9=IDC_CHECK_PROGRESSIVE,button,1342242819 +Control10=IDC_CHECK_BASELINE,button,1342242819 +Control11=IDC_RADIO_DCT_INT,button,1342373897 +Control12=IDC_RADIO_DCT_FAST,button,1342242825 +Control13=IDC_RADIO_DCT_FLOAT,button,1342242825 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,button,1342177287 +Control19=IDC_STATIC,button,1342177287 + +[DLG:IDD_DIALOG_IMPORT (English (U.S.))] +Type=1 +ControlCount=24 +Control1=IDC_FILENAME,combobox,1344339970 +Control2=IDC_CHECK_COLORS,button,1342242819 +Control3=IDC_COLORS,edit,1350631552 +Control4=IDC_SPIN_COLORS,msctls_updown32,1342177442 +Control5=IDC_CHECK_GRAYSCALE,button,1342242819 +Control6=IDC_CHECK_ONE_PASS,button,1342242819 +Control7=IDC_CHECK_NO_SMOOTH,button,1342242819 +Control8=IDC_RADIO_ONE_TO_ONE,button,1342373897 +Control9=IDC_RADIO_ONE_TO_TWO,button,1342242825 +Control10=IDC_RADIO_ONE_TO_FOUR,button,1342242825 +Control11=IDC_RADIO_ONE_TO_EIGHT,button,1342242825 +Control12=IDC_RADIO_DCT_INT,button,1342373897 +Control13=IDC_RADIO_DCT_FAST,button,1342242825 +Control14=IDC_RADIO_DCT_FLOAT,button,1342242825 +Control15=IDC_RADIO_DM_FLOYD_STEIN,button,1342373897 +Control16=IDC_RADIO_DM_ORDERED,button,1342242825 +Control17=IDC_RADIO_DM_NONE,button,1342242825 +Control18=IDOK,button,1342242817 +Control19=IDCANCEL,button,1342242816 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,button,1342177287 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 +Control24=IDC_STATIC,button,1342177287 + +[DLG:IDD_DIALOG_WORKSPACE (English (U.S.))] +Type=1 +ControlCount=5 +Control1=IDC_CHECK_SAVE_ON_EXIT,button,1342242819 +Control2=IDC_CHECK_LOAD_ON_ENTER,button,1342242819 +Control3=IDOK,button,1342242817 +Control4=IDCANCEL,button,1342242816 +Control5=IDC_SAVE_WORKSPACE,button,1342242816 + +[DLG:IDD_DIALOG_ROLLUP (English (U.S.))] +Type=1 +ControlCount=11 +Control1=IDC_ZOOM_LEVEL,edit,1350631424 +Control2=IDC_SPIN_ZOOM_LEVEL,msctls_updown32,1342177442 +Control3=IDC_BUTTON_APPLY,button,1342242817 +Control4=IDC_PICTURE,static,1342179333 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,button,1342177287 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_SCALED_WIDTH,edit,1350568064 +Control10=IDC_SCALED_HEIGHT,edit,1350568064 +Control11=IDC_STATIC,button,1342177287 + +[DLG:IDD_IMAGE_INFO_DIALOG (English (U.S.))] +Type=1 +ControlCount=17 +Control1=IDOK,button,1342242817 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_FILE_NAME,static,1342308364 +Control10=IDC_WIDTH,static,1342308352 +Control11=IDC_HEIGHT,static,1342308352 +Control12=IDC_SIZE_IN_MEMORY,static,1342308352 +Control13=IDC_FILE_SIZE,static,1342308352 +Control14=IDC_FORMAT,static,1342308352 +Control15=IDC_TYPE,static,1342308352 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_FILE_STATUS,static,1342308352 + +[DLG:IDD_DIALOG_RESAMPLE (English (U.S.))] +Type=1 +ControlCount=23 +Control1=IDC_WIDTH_PIXELS,edit,1350566016 +Control2=IDC_SPIN_WIDTH_PIXELS,msctls_updown32,1342177442 +Control3=IDC_HEIGHT_PIXELS,edit,1350566016 +Control4=IDC_SPIN_HEIGHT_PIXELS,msctls_updown32,1342177442 +Control5=IDC_WIDTH_PERCENTS,edit,1350566016 +Control6=IDC_SPIN_WIDTH_PERCENTS,msctls_updown32,1342177442 +Control7=IDC_HEIGHT_PERCENTS,edit,1350566016 +Control8=IDC_SPIN_HEIGHT_PERCENTS,msctls_updown32,1342177442 +Control9=IDC_CHECK_MAINTAIN_RATIO,button,1342242819 +Control10=IDC_CHECK_MATCH_ZOOM_LEVEL,button,1342242819 +Control11=IDC_CHECK_CONVERT_TO,button,1342242819 +Control12=IDC_COMBO_CONVERT_TO,combobox,1344339971 +Control13=IDOK,button,1342242816 +Control14=ID_BUTTON_RESET,button,1342242816 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_WIDTH_ORIG,static,1342308352 +Control20=IDC_HEIGHT_ORIG,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_BUTTON_DUMMY,button,1073741825 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.cpp new file mode 100644 index 0000000..72d81b3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.cpp @@ -0,0 +1,268 @@ +// DIBManager.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "DIBManager.h" + +#include "OXDocMgr.h" +#include "MainFrm.h" +#include "ChildFrm.h" +#include "DIBManagerDoc.h" +#include "DIBManagerView.h" +#include "WorkspaceDlg.h" +#include "ScaleRollupDlg.h" + +#include "OXPreviewDialog.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerApp + +BEGIN_MESSAGE_MAP(CDIBManagerApp, COXWinApp) + //{{AFX_MSG_MAP(CDIBManagerApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + ON_COMMAND(ID_FILE_NEW, OnFileNew) + ON_COMMAND(ID_FILE_OPEN, OnFileOpen) + ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace) + //}}AFX_MSG_MAP + ON_COMMAND (ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerApp construction + +CDIBManagerApp::CDIBManagerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance + + m_pSplash=NULL; + m_pScaleRollupDlg=NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CDIBManagerApp object + +CDIBManagerApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerApp initialization + +BOOL CDIBManagerApp::InitInstance() +{ + // COXSplashWnd window + // show splash window from the very beginning + ShowSplashWindow(IDB_LOGO_DUMMY,ID_TIME_SHOWING_LOGO); + Sleep(2000); + + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Change the registry key under which our settings are stored. + // You should modify this string to be something appropriate + // such as the name of your company or organization. + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); // 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_DIBMANTYPE, + RUNTIME_CLASS(CDIBManagerDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CDIBManagerView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + IniAppVars(); + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + // load the workspaces settings if needed + if(m_bLoadWSOnEnter) + { + pMainFrame->LoadWorkspace(); + } + + // we made all preparations, so hide splash window + HideSplashWindow(); + + return TRUE; +} + +// App command to run the dialog +void CDIBManagerApp::OnAppAbout() +{ + // we use our own About Dialog + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerApp commands + +CFileDialog* CDIBManagerApp::NewFileDialog(BOOL bOpenFileDialog, DWORD lFlags) +{ + // we provide functionality to open more than one file simultenuosly + lFlags|=OFN_ALLOWMULTISELECT; + // create the dialog with Preview capability + return new COXPreviewDialog(bOpenFileDialog,NULL,NULL, + OFN_ALLOWMULTISELECT|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST| + OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT); +} + +void CDIBManagerApp::OnFileNew() +{ + // TODO: Add your command handler code here + // do nothing +// CWinApp::OnFileNew(); +} + +void CDIBManagerApp::OnFileOpen() +{ + // TODO: Add your command handler code here + CWinApp::OnFileOpen(); + +} + +void CDIBManagerApp::OnViewWorkspace() +{ + // TODO: Add your command handler code here + + CWorkspaceDlg workspaceDlg; + + workspaceDlg.m_bLoadOnEnter=m_bLoadWSOnEnter; + workspaceDlg.m_bSaveOnExit=m_bSaveWSOnExit; + + if(workspaceDlg.DoModal()==IDOK) + { + m_bLoadWSOnEnter=workspaceDlg.m_bLoadOnEnter; + m_bSaveWSOnExit=workspaceDlg.m_bSaveOnExit; + } +} + +int CDIBManagerApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // save all application variables in registry + SaveAppVars(); + + // if we used splash window then delete it + if(m_pSplash!=NULL) + { + delete m_pSplash; + } + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + + return COXWinApp::ExitInstance(); +} + +void CDIBManagerApp::IniAppVars() +{ + m_bLoadWSOnEnter=GetProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),TRUE); + m_bSaveWSOnExit=GetProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),TRUE); +} + +void CDIBManagerApp::SaveAppVars() +{ + WriteProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),m_bLoadWSOnEnter); + WriteProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),m_bSaveWSOnExit); +} + +void CDIBManagerApp::ShowSplashWindow(UINT nBitmapID, UINT nTime) +{ + // just load bitmap and set time to show splash window + if(m_pSplash==NULL) + { + m_pSplash=new COXSplashWnd; + } + // the fourth parameter is level of tolerance which + // indicates how much the color can be different from CLR_DEFAULT (which is white) + // before it is actually accepted as a different color + // for bitmap that we use in this application value of 150 is the best + m_pSplash->LoadBitmap(nBitmapID,CLR_DEFAULT,NULL,0); + m_pSplash->Show(nTime, NULL); +} + +void CDIBManagerApp::HideSplashWindow(BOOL bRedrawMainFrame) +{ + // if splash window was initialized then hide it and destroy + if(m_pSplash!=NULL) + { + m_pSplash->Hide(); + + delete m_pSplash; + m_pSplash=NULL; + + // redraw mainframe if needed + if(bRedrawMainFrame) + { + CMainFrame* pMainFrame=(CMainFrame*)m_pMainWnd; + pMainFrame->RedrawWindow(); + } + } +} + +// if during loading of application error happened then hide splash window +// and notify about the error +void CDIBManagerApp::ErrorNotify(UINT nMsgID) +{ + CString sMsg; + sMsg.LoadString(nMsgID); + ErrorNotify(sMsg); +} + +void CDIBManagerApp::ErrorNotify(CString sMsg) +{ + HideSplashWindow(TRUE); + AfxMessageBox(sMsg,MB_OK|MB_ICONEXCLAMATION); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsp new file mode 100644 index 0000000..2b3f1e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsp @@ -0,0 +1,683 @@ +# Microsoft Developer Studio Project File - Name="DIBManager" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DIBManager - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DIBManager.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DIBManager.mak" CFG="DIBManager - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DIBManager - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DIBManager - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DIBManager - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\lib\jpeg\jpegsrc6" /I "..\..\..\lib\jpeg" /I "..\..\..\archive\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\..\lib\jpeg\jpegsrc6" /i "..\..\..\lib\jpeg" /i "..\..\..\archive\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /nodefaultlib:"MSVCRT" /out:"DIBManager.exe" /libpath:"..\..\..\lib\libs" + +!ELSEIF "$(CFG)" == "DIBManager - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\lib\jpeg\jpegsrc6" /I "..\..\..\lib\jpeg" /I "..\..\..\archive\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\..\lib\jpeg\jpegsrc6" /i "..\..\..\lib\jpeg" /i "..\..\..\archive\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 jpgd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"DIBManager.exe" /pdbtype:sept /libpath:"..\..\..\lib\libs" +# SUBTRACT LINK32 /nodefaultlib + +!ENDIF + +# Begin Target + +# Name "DIBManager - Win32 Release" +# Name "DIBManager - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE="..\..\..\Source\Convfile.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Copytree.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Cpystdlg.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Dir.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Dirlist.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Dstrlist.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\File.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Filelist.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Mdeldlg.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxbitbuf.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXBitmapMenu.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXBitmapMenuOrganizer.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXBMPFle.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXChildFrameState.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxcmpfl.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxcompr.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXCoolBar.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXCoolToolBar.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDFlHdr.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxdib.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDirDlg.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDlgBar.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDocTemplateSpy.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDragDockContext.CPP" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXFrameWndDock.CPP" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXGphFle.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXHistoryCombo.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGCod.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGCom.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGDom.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGExp.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGFle.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXMDIFloatWnd.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXRectTracker.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXRegistryItem.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXRollup.CPP" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXScrollTip.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXScrollTipOwner.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSizeCtrlBar.CPP" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSizeDlgBar.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSizeDockBar.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSizeToolBar.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSpinCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSplashWnd.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSplashWndDIB.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSplitterColRowState.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSplitterRect.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSzMiniDockFrmWnd.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXTleBar.CPP" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXWorkspaceState.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxzoomvw.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Path.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Pathiter.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Progress.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Watchbuf.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Xstatus4.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Xstring.cpp" +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\DIBManager.cpp +# End Source File +# Begin Source File + +SOURCE=.\DIBManager.rc +# End Source File +# Begin Source File + +SOURCE=.\DIBManagerDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\DIBManagerView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExportDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImageInfoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImportDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPreviewDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.cpp +# End Source File +# Begin Source File + +SOURCE=.\ProtectedFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResampleImageDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScaleRollupDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TreeFilesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\CONVFILE.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\CRYPFILE.h +# End Source File +# Begin Source File + +SOURCE=.\DIBManager.h +# End Source File +# Begin Source File + +SOURCE=.\DIBManagerDoc.h +# End Source File +# Begin Source File + +SOURCE=.\DIBManagerView.h +# End Source File +# Begin Source File + +SOURCE=.\ExportDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ImageInfoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ImportDlg.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenuOrganizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCMPFL.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCOMPR.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDIB.H +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXPreviewDialog.h +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXZOOMVW.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXZOOMVW.inl +# End Source File +# Begin Source File + +SOURCE=.\ProtectedFile.h +# End Source File +# Begin Source File + +SOURCE=.\ResampleImageDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\ScaleRollupDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TreeFilesDlg.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\XSTATUS4.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\Res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\BMPdemo.BMP +# End Source File +# Begin Source File + +SOURCE=.\res\check.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\CoolBarWallPaper.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\DIBManager.ico +# End Source File +# Begin Source File + +SOURCE=.\res\DIBManager.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\DIBManagerDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\Res\dummy.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\dummy1.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\dummyhot.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\imagelis.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\logo.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\logo_dum.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\mainfram.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\mainfram_copy.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\newtool.BMP +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\Res\ToolbarHot.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Cup.avi +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\search.avi +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsw new file mode 100644 index 0000000..7bab7ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DIBManager"=".\DIBManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.h new file mode 100644 index 0000000..c7d3572 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.h @@ -0,0 +1,82 @@ +// DIBManager.h : main header file for the DIBMANAGER application +// + +#if !defined(AFX_DIBMANAGER_H__D2552D0E_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_DIBMANAGER_H__D2552D0E_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXWinApp.h" +#include "OXSplashWnd.h" + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerApp: +// See DIBManager.cpp for the implementation of this class +// + +class CScaleRollupDlg; + +class CDIBManagerApp : public COXWinApp +{ +protected: + // defines roll-up ZoomLevel Dialog + CScaleRollupDlg* m_pScaleRollupDlg; + + void IniAppVars(); + void SaveAppVars(); + +public: + CDIBManagerApp(); + + CScaleRollupDlg* &GetScaleRollupDlg() { return m_pScaleRollupDlg; } + + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog, DWORD lFlags); + + // load workspace on enter or not + BOOL m_bLoadWSOnEnter; + // save workspace on exit or not + BOOL m_bSaveWSOnExit; + // the number of bits in current system palette + UINT m_nColors; + // splash window that we use while loading + COXSplashWnd* m_pSplash; + + void ShowSplashWindow(UINT nBitmapID, UINT nTime); + void HideSplashWindow(BOOL bRedrawMainFrame=FALSE); + void ErrorNotify(UINT nMsgID); + void ErrorNotify(CString sMsg); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDIBManagerApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CDIBManagerApp) + afx_msg void OnAppAbout(); + afx_msg void OnFileNew(); + afx_msg void OnFileOpen(); + afx_msg void OnViewWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DIBMANAGER_H__D2552D0E_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.rc new file mode 100644 index 0000000..504abe9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.rc @@ -0,0 +1,862 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "OXCommon.h" + +#include "afxres.h" +#include + +///////////////////////////////////////////////////////////////////////////// +#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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""OXCommon.h"" \r\n" + "\r\n" + "#include ""afxres.h""\r\n" + "#include \r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""OXCommon.rc"" \r\n" + "#include ""OXBitmapButton.rc"" \r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolBar.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXFrameWndDock.rc""\r\n" + "#include ""OxDockCtrlBars.rc""\r\n" + "#include ""UTSampleAbout.rc"" \r\n" + "#include ""OXHistoryCombo.rc"" \r\n" + "#include ""OXMenuBar.rc""\r\n" + "#include ""OXPreviewDialog.rc""\r\n" + "#include ""OXRollUp.rc"" // Roll up class resources\r\n" + "#include ""OXSpinCtrl.rc"" // Spin ctrl resources\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\DIBManager.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\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 DISCARDABLE "res\\DIBManager.ico" +IDR_DIBMANTYPE ICON DISCARDABLE "res\\DIBManagerDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME_HOT BITMAP MOVEABLE PURE "res\\ToolbarHot.bmp" +IDB_IMAGELIST BITMAP DISCARDABLE "res\\imagelis.bmp" +IDB_CHECK BITMAP DISCARDABLE "res\\check.bmp" +IDB_LOGO BITMAP DISCARDABLE "res\\logo.BMP" +IDB_LOGO_DUMMY BITMAP DISCARDABLE "res\\logo_dum.bmp" +IDR_DUMMY BITMAP MOVEABLE PURE "res\\dummy.bmp" +IDR_DUMMY_HOT BITMAP MOVEABLE PURE "res\\dummyhot.bmp" +IDR_MAINFRAME_COPY BITMAP MOVEABLE PURE "res\\mainfram_copy.bmp" +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\toolbar.bmp" +IDB_LOGO_TEST BITMAP DISCARDABLE "RES\\BMPdemo.BMP" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_IMPORT + BUTTON ID_FILE_EXPORT + SEPARATOR + BUTTON ID_FILE_PROTECTED + SEPARATOR + BUTTON ID_VIEW_ZOOM_IN + BUTTON ID_VIEW_ZOOM_OUT + BUTTON ID_VIEW_ZOOM_TO_WINDOW + BUTTON ID_VIEW_ZOOM_TO_100 + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_WINDOW_NEW + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE + BUTTON ID_WINDOW_SYNCHRONIZE + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_DUMMY TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_VIEW_ZOOM_IN + BUTTON ID_VIEW_ZOOM_OUT + BUTTON ID_VIEW_ZOOM_TO_WINDOW + BUTTON ID_VIEW_ZOOM_TO_100 +END + +IDR_DUMMY_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_VIEW_ZOOM_IN + BUTTON ID_VIEW_ZOOM_OUT + BUTTON ID_VIEW_ZOOM_TO_WINDOW + BUTTON ID_VIEW_ZOOM_TO_100 +END + +IDR_MAINFRAME_COPY TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_IMPORT + BUTTON ID_FILE_EXPORT + SEPARATOR + BUTTON ID_FILE_PROTECTED + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_VIEW_ZOOM_IN + BUTTON ID_VIEW_ZOOM_OUT + BUTTON ID_VIEW_ZOOM_TO_WINDOW + BUTTON ID_VIEW_ZOOM_TO_100 + SEPARATOR + BUTTON ID_WINDOW_NEW + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE + BUTTON ID_WINDOW_SYNCHRONIZE + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_IMPORT + BUTTON ID_FILE_EXPORT + SEPARATOR + BUTTON ID_FILE_PROTECTED + SEPARATOR + BUTTON ID_VIEW_ZOOM_IN + BUTTON ID_VIEW_ZOOM_OUT + BUTTON ID_VIEW_ZOOM_TO_WINDOW + BUTTON ID_VIEW_ZOOM_TO_100 + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_WINDOW_NEW + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE + BUTTON ID_WINDOW_SYNCHRONIZE + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Import ...", ID_FILE_IMPORT + MENUITEM SEPARATOR + 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 "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "T&ree bar", ID_TREEFILESBAR + MENUITEM SEPARATOR + MENUITEM "&WorkSpace ...", ID_VIEW_WORKSPACE + END + POPUP "&Help" + BEGIN + MENUITEM "&About DIBManager...", ID_APP_ABOUT + END +END + +IDR_DIBMANTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "&Save", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Import ...", ID_FILE_IMPORT + MENUITEM "&Export ...", ID_FILE_EXPORT + MENUITEM SEPARATOR + MENUITEM "&Protect Image", ID_FILE_PROTECTED + 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 "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "T&ree bar", ID_TREEFILESBAR + MENUITEM SEPARATOR + MENUITEM "Resam&ple Image ...", ID_VIEW_RESAMPLE_IMAGE + MENUITEM "&Image Info ...", ID_VIEW_IMAGE_INFO + MENUITEM SEPARATOR + MENUITEM "Zoom &In", ID_VIEW_ZOOM_IN + MENUITEM "Zoom &Out", ID_VIEW_ZOOM_OUT + MENUITEM "Zoom to &Window", ID_VIEW_ZOOM_TO_WINDOW + MENUITEM "Zoom to &100%", ID_VIEW_ZOOM_TO_100 + MENUITEM "Zoom &Level Dialog ...", ID_VIEW_ZOOM_LEVEL_DLG + MENUITEM SEPARATOR + MENUITEM "&WorkSpace ...", ID_VIEW_WORKSPACE + 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 + MENUITEM SEPARATOR + MENUITEM "&Synchronize views", ID_WINDOW_SYNCHRONIZE + END + POPUP "&Help" + BEGIN + MENUITEM "&About DIBManager...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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_DIALOG_TREE_FILES DIALOGEX 0, 0, 185, 214 +STYLE WS_CHILD | WS_BORDER +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Tree1",IDC_TREE_FILES,"SysTreeView32",TVS_HASBUTTONS | + TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | + TVS_SHOWSELALWAYS | WS_TABSTOP,0,0,185,214, + WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE +END + +IDD_DIALOG_EXPORT DIALOG DISCARDABLE 0, 0, 312, 119 +STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Export" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_FILENAME,23,7,228,66,CBS_DROPDOWN | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_QUALITY,39,33,37,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_QUALITY,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,77,33, + 10,13 + CONTROL "&Smooth",IDC_CHECK_SMOOTH,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,113,34,40,10 + EDITTEXT IDC_SMOOTH,156,33,37,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_SMOOTH,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,194,33, + 10,13 + CONTROL "&Grayscale",IDC_CHECK_GRAYSCALE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,56,47,10 + CONTROL "&Optimize",IDC_CHECK_OPTIMIZE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,13,69,43,10 + CONTROL "&Progressive",IDC_CHECK_PROGRESSIVE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,82,53,10 + CONTROL "&Baseline",IDC_CHECK_BASELINE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,13,95,43,10 + CONTROL "DCT &int",IDC_RADIO_DCT_INT,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,112,68,59,8 + CONTROL "DCT &Fast Int",IDC_RADIO_DCT_FAST,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,112,80,59,8 + CONTROL "DCT F&loat",IDC_RADIO_DCT_FLOAT,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,112,93,59,8 + DEFPUSHBUTTON "&Export",IDOK,255,25,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,255,43,50,14 + LTEXT "&File",IDC_STATIC,7,9,12,8 + LTEXT "&Quality",IDC_STATIC,13,35,22,8 + GROUPBOX "Discrete Cosinus Transformation",IDC_STATIC,104,55,138, + 52 + GROUPBOX "Options",IDC_STATIC,7,23,244,90 +END + +IDD_DIALOG_IMPORT DIALOG DISCARDABLE 0, 0, 312, 149 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Import" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_FILENAME,23,7,228,66,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + CONTROL "&Colors",IDC_CHECK_COLORS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,13,35,35,10 + EDITTEXT IDC_COLORS,56,33,47,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_COLORS,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,104,33, + 11,13 + CONTROL "&Grayscale",IDC_CHECK_GRAYSCALE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,54,47,10 + CONTROL "One &Pass",IDC_CHECK_ONE_PASS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,13,67,47,10 + CONTROL "No &Smooth",IDC_CHECK_NO_SMOOTH,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,80,51,10 + CONTROL "1/&1",IDC_RADIO_ONE_TO_ONE,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,23,107,38,8 + CONTROL "1/&2",IDC_RADIO_ONE_TO_TWO,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,23,120,38,8 + CONTROL "1/&4",IDC_RADIO_ONE_TO_FOUR,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,69,107,38,8 + CONTROL "1/&8",IDC_RADIO_ONE_TO_EIGHT,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,69,120,38,8 + CONTROL "DCT &int",IDC_RADIO_DCT_INT,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,126,41,59,8 + CONTROL "DCT &Fast",IDC_RADIO_DCT_FAST,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,126,54,59,8 + CONTROL "DCT F&loat",IDC_RADIO_DCT_FLOAT,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,126,67,59,8 + CONTROL "Flo&yd Stein",IDC_RADIO_DM_FLOYD_STEIN,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,126,96,59,8 + CONTROL "O&rdered",IDC_RADIO_DM_ORDERED,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,126,107,59,8 + CONTROL "&None",IDC_RADIO_DM_NONE,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,126,120,59,8 + DEFPUSHBUTTON "&Import",IDOK,255,27,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,255,45,50,14 + LTEXT "&File",IDC_STATIC,7,9,12,8 + GROUPBOX "Discrete Cosinus Transformation",IDC_STATIC,118,30,127, + 50 + GROUPBOX "Options",IDC_STATIC,7,21,244,120 + GROUPBOX "Scale",IDC_STATIC,13,95,96,40 + GROUPBOX "Dither Method",IDC_STATIC,118,83,127,52 +END + +IDD_DIALOG_WORKSPACE DIALOG DISCARDABLE 0, 0, 143, 61 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "WorkSpace" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Save WorkSpace on &Exit",IDC_CHECK_SAVE_ON_EXIT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,7,111,10 + CONTROL "Load WorkSpace on En&ter",IDC_CHECK_LOAD_ON_ENTER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,117,10 + DEFPUSHBUTTON "&OK",IDOK,7,40,40,14 + PUSHBUTTON "&Cancel",IDCANCEL,51,40,40,14 + PUSHBUTTON "&Save",IDC_SAVE_WORKSPACE,96,40,40,14 +END + +IDD_DIALOG_ROLLUP DIALOGEX 0, 0, 184, 123 +STYLE WS_POPUP | WS_BORDER +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_ZOOM_LEVEL,133,20,34,12 + CONTROL "Spin1",IDC_SPIN_ZOOM_LEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,167,20, + 12,12 + DEFPUSHBUTTON "&Apply",IDC_BUTTON_APPLY,115,104,64,14 + CONTROL "",IDC_PICTURE,"Static",SS_GRAYRECT | SS_REALSIZEIMAGE, + 51,62,13,12,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE + LTEXT "&Scale",IDC_STATIC,114,22,19,8 + GROUPBOX "Scaled Size",IDC_STATIC,115,46,64,40 + LTEXT "Width:",IDC_STATIC,119,58,20,8 + LTEXT "Height:",IDC_STATIC,119,70,24,8 + EDITTEXT IDC_SCALED_WIDTH,147,56,27,12,ES_AUTOHSCROLL | + ES_READONLY | NOT WS_TABSTOP + EDITTEXT IDC_SCALED_HEIGHT,147,69,27,12,ES_AUTOHSCROLL | + ES_READONLY | NOT WS_TABSTOP + GROUPBOX "",IDC_STATIC,4,14,108,104 +END + +IDD_IMAGE_INFO_DIALOG DIALOG DISCARDABLE 0, 0, 223, 173 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Image Info" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,86,153,50,14 + LTEXT "Name",IDC_STATIC,12,17,20,8 + LTEXT "Width",IDC_STATIC,12,31,20,8 + LTEXT "Height",IDC_STATIC,13,47,22,8 + LTEXT "Size in memory",IDC_STATIC,12,62,48,8 + LTEXT "Original file size",IDC_STATIC,12,78,49,8 + LTEXT "Format",IDC_STATIC,12,94,22,8 + LTEXT "Type",IDC_STATIC,12,109,17,8 + CONTROL "Static",IDC_FILE_NAME,"Static",SS_LEFTNOWORDWRAP | + WS_GROUP,66,17,150,8 + LTEXT "Static",IDC_WIDTH,66,31,133,8 + LTEXT "Static",IDC_HEIGHT,66,46,133,8 + LTEXT "Static",IDC_SIZE_IN_MEMORY,66,62,133,8 + LTEXT "Static",IDC_FILE_SIZE,66,78,133,8 + LTEXT "Static",IDC_FORMAT,66,94,133,8 + LTEXT "Static",IDC_TYPE,66,109,133,8 + GROUPBOX "",IDC_STATIC,6,6,212,118 + LTEXT "Static",IDC_FILE_STATUS,7,130,211,18 +END + +IDD_DIALOG_RESAMPLE DIALOG DISCARDABLE 0, 0, 184, 162 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Resample Image" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_WIDTH_PIXELS,80,24,27,12,ES_AUTOHSCROLL | NOT + WS_TABSTOP + CONTROL "Spin1",IDC_SPIN_WIDTH_PIXELS,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,108,24, + 11,12 + EDITTEXT IDC_HEIGHT_PIXELS,80,41,27,12,ES_AUTOHSCROLL | NOT + WS_TABSTOP + CONTROL "Spin1",IDC_SPIN_HEIGHT_PIXELS,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,108,41, + 11,12 + EDITTEXT IDC_WIDTH_PERCENTS,130,24,27,12,ES_AUTOHSCROLL | NOT + WS_TABSTOP + CONTROL "Spin1",IDC_SPIN_WIDTH_PERCENTS,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,158,24, + 11,12 + EDITTEXT IDC_HEIGHT_PERCENTS,130,41,27,12,ES_AUTOHSCROLL | NOT + WS_TABSTOP + CONTROL "Spin1",IDC_SPIN_HEIGHT_PERCENTS,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,158,41, + 11,12 + CONTROL "Maintain Aspect &Ratio",IDC_CHECK_MAINTAIN_RATIO,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,9,61,85,10 + CONTROL "Match &Zoom Level",IDC_CHECK_MATCH_ZOOM_LEVEL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,9,74,85,10 + CONTROL "Convert to:",IDC_CHECK_CONVERT_TO,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,5,101,51,10 + COMBOBOX IDC_COMBO_CONVERT_TO,58,99,121,32,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&OK",IDOK,4,143,53,14 + PUSHBUTTON "&Reset",ID_BUTTON_RESET,66,143,53,14 + PUSHBUTTON "&Cancel",IDCANCEL,126,143,53,14 + GROUPBOX "Image Size",IDC_STATIC,4,2,175,90 + LTEXT "&Width:",IDC_STATIC,9,26,20,8 + LTEXT "&Height:",IDC_STATIC,9,43,24,8 + LTEXT "Static",IDC_WIDTH_ORIG,39,26,28,8 + LTEXT "Static",IDC_HEIGHT_ORIG,39,43,28,8 + LTEXT "Pixels",IDC_STATIC,80,13,19,8 + LTEXT "Percents",IDC_STATIC,130,13,29,8 + DEFPUSHBUTTON "Dummy",IDC_BUTTON_DUMMY,12,120,39,10,NOT WS_VISIBLE | + NOT WS_TABSTOP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "DIBManager MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "DIBManager\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "OriginalFilename", "DIBManager.EXE\0" + VALUE "ProductName", "DIBManager Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG_EXPORT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 305 + TOPMARGIN, 7 + BOTTOMMARGIN, 112 + END + + IDD_DIALOG_IMPORT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 305 + TOPMARGIN, 7 + BOTTOMMARGIN, 142 + END + + IDD_DIALOG_WORKSPACE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 136 + TOPMARGIN, 7 + BOTTOMMARGIN, 54 + END + + IDD_DIALOG_ROLLUP, DIALOG + BEGIN + LEFTMARGIN, 5 + RIGHTMARGIN, 179 + BOTTOMMARGIN, 118 + END + + IDD_IMAGE_INFO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 6 + RIGHTMARGIN, 218 + TOPMARGIN, 6 + BOTTOMMARGIN, 167 + END + + IDD_DIALOG_RESAMPLE, DIALOG + BEGIN + LEFTMARGIN, 5 + RIGHTMARGIN, 179 + BOTTOMMARGIN, 157 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_DIALOG_EXPORT DLGINIT +BEGIN + IDC_FILENAME, 0x403, 1, 0 +"\000" + 0 +END + +IDD_DIALOG_IMPORT DLGINIT +BEGIN + IDC_FILENAME, 0x403, 1, 0 +"\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "DIBManager" + IDR_DIBMANTYPE "\nDIBMan\nDIBMan\nBitmap Files (*.bmp)\n.BMP\nDIBManager.Document\nDIBMan Document" + ID_INDICATOR_SIZE "0000000000" + ID_INDICATOR_ZOOM "1000%" + ID_INDICATOR_PARAMETERS "000000000" + ID_INDICATOR_PROGRESS "progress indicator" + ID_DESCRIPTION_FILE "DIBManagerInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "DIBManager" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_SYNCHRONIZE "Synchronize image window with tree\nSynchronize" + ID_VIEW_ZOOM_IN "Zoom image in\nZoom In" + ID_VIEW_ZOOM_OUT "Zoom image out\nZoom Out" + ID_VIEW_ZOOM_TO_WINDOW "Zoom image to size of window\nZoom to Window" + ID_VIEW_ZOOM_TO_100 "Zoom to image's original size\nZoom to original size" + ID_TREEFILESBAR "Show or hide the Tree bar\nToggle TreeBar" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_FILE_EXPORT "Save DIB file in different formats\nExport " + ID_FILE_IMPORT "Open file of different format\nImport" + ID_FILE_SET_PROTECTION "Protect image via encryption\nSet Protection" + ID_FILE_REMOVE_PROTECTION "Encode encrypted image\nRemove Protection" + ID_FILE_PROTECTED "Protect image via encryption\nSet Protection On/Off" + ID_VIEW_WORKSPACE "Change settings for saving and loading workspace\nWorkSpace Settings" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_SCALE_DLG "Popup dialog to customize zoom level of viewing imagr/nZoom Level Dialog" + ID_VIEW_ZOOM_LEVEL_DLG "Popup dialog to customize zoom level of viewing imagr/nZoom Level Dialog" + ID_VIEW_TREE_BAR "Show or hide the Tree bar\nToggle TreeBar" + ID_VIEW_IMAGE_INFO "get information about active image\nImage Info" + ID_VIEW_RESAMPLE_IMAGE "Change size or convert current image\nResample Image" + ID_VIEW_ZOOM "Zoom image/nZoom" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "OXCommon.rc" +#include "OXBitmapButton.rc" +#include "OXBitmapMenu.rc" +#include "OXCoolBar.rc" +#include "OXCoolToolBar.rc" +#include "OXFrameWndDock.rc" +#include "OxDockCtrlBars.rc" +#include "UTSampleAbout.rc" +#include "OXHistoryCombo.rc" +#include "OXMenuBar.rc" +#include "OXPreviewDialog.rc" +#include "OXRollUp.rc" // Roll up class resources +#include "OXSpinCtrl.rc" // Spin ctrl resources + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\DIBManager.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.vcproj new file mode 100644 index 0000000..e7c738c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManager.vcproj @@ -0,0 +1,2467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.cpp new file mode 100644 index 0000000..d895240 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.cpp @@ -0,0 +1,440 @@ +// DIBManagerDoc.cpp : implementation of the CDIBManagerDoc class +// + +#include "stdafx.h" +#include "DIBManager.h" + +#include "DIBManagerDoc.h" + +#include "MainFrm.h" +#include "DIBManagerView.h" +#include "ChildFrm.h" + +#include "ProtectedFile.h" + +#include "path.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerDoc + +IMPLEMENT_DYNCREATE(CDIBManagerDoc, CDocument) + +BEGIN_MESSAGE_MAP(CDIBManagerDoc, CDocument) + //{{AFX_MSG_MAP(CDIBManagerDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerDoc construction/destruction + +CDIBManagerDoc::CDIBManagerDoc() +{ + // TODO: add one-time construction code here + m_nDIBNumPage=0; + m_nXPage=0; + m_nYPage=0; +} + +CDIBManagerDoc::~CDIBManagerDoc() +{ +} + +BOOL CDIBManagerDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerDoc serialization + +void CDIBManagerDoc::Serialize(CArchive& ar) +{ + // use built-in functions to save/load DIB file to/from + // CFile which is associated with CArchive ar + ar.Flush(); + if(ar.IsStoring()) + { + m_dib.Write(ar.GetFile()); + } + else + { + m_dib.Read(ar.GetFile()); + } +} + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerDoc diagnostics + +#ifdef _DEBUG +void CDIBManagerDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CDIBManagerDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerDoc commands + +BOOL CDIBManagerDoc::OnSaveDocument(LPCTSTR lpszPathName) +{ + // TODO: Add your specialized code here and/or call the base class + + BOOL bSuccess=FALSE; + + // try to open or create file + CFile m_file; + TRY + { + bSuccess=m_file.Open(lpszPathName,CFile::modeCreate|CFile::modeReadWrite); + } + CATCH(CFileException,e) + { + TCHAR szCause[255]; + CString strFormatted; + e->GetErrorMessage(szCause, 255); + strFormatted = _T("CDIBManagerDoc::OnSaveDocument:exception: "); + strFormatted += szCause; + TRACE(strFormatted); + } + END_CATCH + + if(!bSuccess) + { + AfxMessageBox(_T("Cannot open or create specified file!"), + MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + + if(m_bProtected) + { + // if image is protected + // then try to save image using object of CProtectedFile class + TRY + { + CArchive ar(&m_file, CArchive::store); + bSuccess=m_dib.Write(ar); + ar.Close(); + if(!bSuccess) + { + AfxMessageBox(_T("Cannot save image!"),MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + + CProtectedFile m_protectedFile; + bSuccess=m_protectedFile.Save(&m_file); + } + CATCH(CFileException,e) + { + if(e->m_cause==CFileException::accessDenied) + { + e->Delete(); + } + } + END_CATCH + } + else + { + // just save DIB file + CArchive ar(&m_file, CArchive::store); + bSuccess=m_dib.Write(ar); + ar.Close(); + } + // to get the length of file + // we have to flush it + m_file.Flush(); + if(bSuccess) + { + // in a case of protection the length of DIB file could change + // then recalculate it + COXPathSpec path; + path.SetPath(lpszPathName); + path.DoGetInfo(); + m_dwImageSize=path.GetLength(); + m_bInitiallyProtected=m_bProtected; + m_tf=TF_DIB; + SetModifiedFlag(FALSE); + } + return bSuccess; +} + +BOOL CDIBManagerDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + // TODO: Add your specialized creation code here + + return OpenDocument(lpszPathName); +} + +BOOL CDIBManagerDoc::OpenDocument(LPCTSTR lpszPathName, TypeFile tf) +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + // try to open file on read + CFile m_file; + BOOL bSuccess=FALSE; + TRY + { + bSuccess=m_file.Open(lpszPathName,CFile::modeRead); + } + CATCH(CFileException, e) + { + TCHAR szCause[255]; + CString strFormatted; + e->GetErrorMessage(szCause, 255); + strFormatted = _T("CDIBManagerDoc::OpenDocument:exception: "); + strFormatted += szCause; + TRACE(strFormatted); + + bSuccess=FALSE; + } + END_CATCH + + if(!bSuccess) + { + // notify system about error + // if error happens during loading of system + // then ErrorNotify() will hide splash window if it is active + pApp->ErrorNotify(_T("Cannot open file!")); + return FALSE; + } + + return OpenDocument(&m_file,CString(lpszPathName),tf); +} + +BOOL CDIBManagerDoc::OpenDocument(CFile* m_pFile, CString sFileName, TypeFile tf) +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + m_bProtected=FALSE; + m_bInitiallyProtected=FALSE; + + m_pFile->SeekToBegin(); + // just try to read DIB file + if(!m_dib.Read(m_pFile)) + { + // if error happened then suggest that we have to open + // protected image + TRY + { + m_pFile->SeekToBegin(); + CProtectedFile m_protectedFile; + CMemFile tmpFile; + if(!m_protectedFile.CopyFile(&tmpFile,m_pFile)) + return FALSE; + if(!m_protectedFile.Open(&tmpFile)) + return FALSE; + + m_bProtected=TRUE; + m_bInitiallyProtected=TRUE; + + tmpFile.SeekToBegin(); + // try to read DIB file by means of object of CProtectedFile class + if(!m_dib.Read(&tmpFile)) + { + // if error happened then assume that file is not of DIB format + AfxThrowFileException(CFileException::badPath); + } + } + CATCH(CFileException,e) + { + if(e->m_cause==CFileException::badPath) + { + pApp->ErrorNotify(_T("Unknown file format!")); + } + return FALSE; + } + END_CATCH + } + + m_sNameFile=sFileName; + m_tf=tf; + + COXPathSpec path; + path.SetPath(m_sNameFile); + path.DoGetInfo(); + m_dwImageSize=path.GetLength(); + + m_dibDither=NULL; + // if current video color palette is no more than 256 colors and + // DIB file uses no les than 256 color then create dithered copy + // of the file to render it on the display (this way we will get + // better output quality) + if(CheckUseDithered()) + { + m_dibDither=m_dib; + m_dibDither.HalfToneDitherDIB(); + } + + return TRUE; +} + +BOOL CDIBManagerDoc::SaveModified() +{ + // TODO: Add your specialized code here and/or call the base class + + // we can save only files of DIB format + if(m_tf!=TF_DIB) + { + SetModifiedFlag(FALSE); + } + + return CDocument::SaveModified(); +} + +CPalette* CDIBManagerDoc::GetDIBPalette() +{ + // depending on the current color palette + // return original palette or palette of dithered file + if(!CheckUseDithered()) + { + return m_dib.GetPalette(); + } + else + { + return m_dibDither.GetPalette(); + } +} + +CSize CDIBManagerDoc::GetDIBSize() +{ + + // depending on the current color palette + // return original size or size of dithered file + if(!CheckUseDithered()) + { + return m_dib.GetSize(); + } + else + { + return m_dibDither.GetSize(); + } +} + +UINT CDIBManagerDoc::CalcDIBNumPage(CDIBManagerView* pView, CDC* pDC) +{ + // convert logical boundaries of image to corresponding boundaries + // for printer taking into account current zoom level + + CSize sizeDIB=GetDIBSize(); + CRect rect(0,0,sizeDIB.cx,sizeDIB.cy); + pView->NormalToScaled(&rect); + pView->NormalToPrinted(pDC,&rect); + + // calculate the number of page based on the size of print page + int xPrinterRes=pDC->GetDeviceCaps(HORZRES); + int yPrinterRes=pDC->GetDeviceCaps(VERTRES); + + m_nXPage=rect.Width()/xPrinterRes; + if(rect.Width()%xPrinterRes!=0) + { + m_nXPage++; + } + m_nYPage=rect.Height()/yPrinterRes; + if(rect.Height()%yPrinterRes!=0) + { + m_nYPage++; + } + + // all pages + m_nDIBNumPage=m_nXPage*m_nYPage; + + return m_nDIBNumPage; +} + +// we would better have such function in COXDIB class +DWORD CDIBManagerDoc::CalcDIBSizeInMemory() +{ + LPBITMAPINFOHEADER lpBI; // Pointer to DIB info structure + DWORD dwDIBSizeInMemory; + + HDIB hDIB=m_dib.MakeCopy(); + if (hDIB==NULL) + { + TRACE0("CDIBManagerDoc::CalcDIBSizeInMemory: cannot make copy of DIB handle\n"); + return (DWORD)0; + } + // Get a pointer to the DIB memory, the first of which contains + // a BITMAPINFO structure + lpBI = (LPBITMAPINFOHEADER)::GlobalLock((HGLOBAL) hDIB); + if (lpBI == NULL) + { + TRACE0("CDIBManagerDoc::CalcDIBSizeInMemory: Out of memory\n"); + ::GlobalFree((HGLOBAL)hDIB); + return (DWORD)0; + } + + // Calculating the size of the DIB is a bit tricky (if we want to + // do it right). The easiest way to do this is to call GlobalSize() + // on our global handle, but since the size of our global memory may have + // been padded a few bytes, we may end up writing out a few too + // many bytes to the file (which may cause problems with some apps). + // + // So, instead let's calculate the size manually (if we can) + // + // First, find size of header plus size of color table. Since the + // first DWORD in both BITMAPINFOHEADER and BITMAPCOREHEADER conains + // the size of the structure, let's use this. + + // Partial Calculation + dwDIBSizeInMemory=*(LPDWORD)lpBI+m_dib.GetPaletteSize((LPSTR)lpBI); + + // Now calculate the size of the image + if ((lpBI->biCompression == BI_RLE8) || (lpBI->biCompression == BI_RLE4)) + { + // It's an RLE bitmap, we can't calculate size, so trust the + // biSizeImage field + + dwDIBSizeInMemory+=lpBI->biSizeImage; + } + else + { + DWORD dwBmBitsSize; // Size of Bitmap Bits only + + // It's not RLE, so size is Width (DWORD aligned) * Height + + dwBmBitsSize=WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount))* + lpBI->biHeight; + + dwDIBSizeInMemory+=dwBmBitsSize; + } + + // Calculate the file size by adding the DIB size to sizeof(BITMAPFILEHEADER) + dwDIBSizeInMemory+=sizeof(BITMAPFILEHEADER); + + ::GlobalUnlock((HGLOBAL)hDIB); + ::GlobalFree((HGLOBAL)hDIB); + + return dwDIBSizeInMemory; +} + +BOOL CDIBManagerDoc::CheckUseDithered() +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + // if current video color palette is no more than 256 colors and + // DIB file uses no les than 256 color then create dithered copy + // of the file to render it on the display (this way we will get + // better output quality) + return (pApp->m_nColors<=8 && (m_dib.GetNumColors()==0 || m_dib.GetNumColors()==256)); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.h new file mode 100644 index 0000000..515482d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerDoc.h @@ -0,0 +1,98 @@ +// DIBManagerDoc.h : interface of the CDIBManagerDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_DIBMANAGERDOC_H__D2552D16_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_DIBMANAGERDOC_H__D2552D16_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXdib.h" + +class CDIBManagerDoc : public CDocument +{ +protected: // create from serialization only + CDIBManagerDoc(); + DECLARE_DYNCREATE(CDIBManagerDoc) + +// Attributes +public: + enum TypeFile { TF_DIB, TF_JPEG }; + + // our DIB image + COXDIB m_dib; + // special DIB object that we use to render the image on the screen + // in the case when the current system palette is no more than 8 bits + // and image consist of no less than 256 colors + COXDIB m_dibDither; + // full file name of the document + CString m_sNameFile; + // type of image file + // currently available only: + // BITMAP = TF_DIB + // JPEG = TF_JPEG + TypeFile m_tf; + // defines if image is currently protected + BOOL m_bProtected; + // defines if image was initially protected + BOOL m_bInitiallyProtected; + // defines image length in byte + DWORD m_dwImageSize; + // the number of all pages to put it on screen + UINT m_nDIBNumPage; + // the number of pages in different direction + UINT m_nXPage; + UINT m_nYPage; + + BOOL OpenDocument(LPCTSTR lpszPathName, TypeFile tf=TF_DIB); + BOOL OpenDocument(CFile* m_pFile, CString sFileName, TypeFile tf=TF_JPEG); + + CPalette* GetDIBPalette(); + CSize GetDIBSize(); + UINT CalcDIBNumPage(class CDIBManagerView* pView, CDC* pDC); + + DWORD CalcDIBSizeInMemory(); + BOOL CheckUseDithered(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDIBManagerDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); + protected: + virtual BOOL SaveModified(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDIBManagerDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CDIBManagerDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DIBMANAGERDOC_H__D2552D16_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerInfo.rtf new file mode 100644 index 0000000..bbab176 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerView.cpp new file mode 100644 index 0000000..8d7da15 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/DIBManagerView.cpp @@ -0,0 +1,1034 @@ +// DIBManagerView.cpp : implementation of the CDIBManagerView class +// + +#include "stdafx.h" +#include "DIBManager.h" + +#include "MainFrm.h" +#include "DIBManagerDoc.h" +#include "DIBManagerView.h" +#include "ChildFrm.h" + +#include "ExportDlg.h" +#include "ScaleRollupDlg.h" +#include "ImageInfoDlg.h" +#include "ResampleImageDlg.h" + +#include "oxbmpfle.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerView + +IMPLEMENT_DYNCREATE(CDIBManagerView, COXZoomView) + +BEGIN_MESSAGE_MAP(CDIBManagerView, COXZoomView) + //{{AFX_MSG_MAP(CDIBManagerView) + ON_COMMAND(ID_VIEW_ZOOM_IN, OnViewZoomIn) + ON_UPDATE_COMMAND_UI(ID_VIEW_ZOOM_IN, OnUpdateViewZoomIn) + ON_COMMAND(ID_VIEW_ZOOM_OUT, OnViewZoomOut) + ON_UPDATE_COMMAND_UI(ID_VIEW_ZOOM_OUT, OnUpdateViewZoomOut) + ON_COMMAND(ID_VIEW_ZOOM_TO_100, OnViewZoomTo100) + ON_UPDATE_COMMAND_UI(ID_VIEW_ZOOM_TO_100, OnUpdateViewZoomTo100) + ON_COMMAND(ID_VIEW_ZOOM_TO_WINDOW, OnViewZoomToWindow) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_ZOOM, OnUpdateZoom) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_SIZE, OnUpdateSize) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_PARAMETERS, OnUpdateParameters) + ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateFileSave) + ON_COMMAND(ID_FILE_EXPORT, OnFileExport) + ON_UPDATE_COMMAND_UI(ID_FILE_PROTECTED, OnUpdateFileProtected) + ON_COMMAND(ID_FILE_PROTECTED, OnFileProtected) + ON_WM_DESTROY() + ON_WM_SETFOCUS() + ON_COMMAND(ID_VIEW_ZOOM_LEVEL_DLG, OnViewZoomLevelDlg) + ON_WM_QUERYNEWPALETTE() + ON_WM_PALETTECHANGED() + ON_COMMAND(ID_VIEW_IMAGE_INFO, OnViewImageInfo) + ON_COMMAND(ID_VIEW_RESAMPLE_IMAGE, OnViewResampleImage) + //}}AFX_MSG_MAP + ON_ROLLUP_NOTIFICATION() + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerView construction/destruction + +CDIBManagerView::CDIBManagerView() +{ + // TODO: add construction code here + + SetSmoothScrolling(TRUE); + SetSmoothEnvironment(); +} + +CDIBManagerView::~CDIBManagerView() +{ +} + +BOOL CDIBManagerView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerView drawing + +void CDIBManagerView::OnDraw(CDC* pDC) +{ + CDIBManagerDoc* pDoc=GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + + // get the size of image + CSize sizeDIB=pDoc->GetDIBSize(); + CRect rect(0,0,sizeDIB.cx,sizeDIB.cy); + CRect rectPaint=rect; + // transform coordinates of boundary rectangle + // taking into account current zoom level + NormalToScaled(&rectPaint); + + /// + // we have to revert Y-coordinates + // to get right print output + UINT diff=rect.bottom-rect.top; + rect.bottom=sizeDIB.cy-rect.top; + rect.top=rect.bottom-diff; + /// + DrawDIB(pDC,rectPaint,rect); +} + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerView printing + +BOOL CDIBManagerView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CDIBManagerView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + CDIBManagerDoc* pDoc=GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add extra initialization before printing + + pInfo->SetMaxPage(pDoc->CalcDIBNumPage(this,pDC)); +} + +void CDIBManagerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +void CDIBManagerView::OnPrint(CDC* pDC, CPrintInfo* pInfo) +{ + // TODO: Add your specialized code here and/or call the base class + + // print current page + PrintPage(pDC, pInfo); +} + +void CDIBManagerView::PrintPage(CDC* pDC, CPrintInfo* pInfo) +{ + CDIBManagerDoc* pDoc=GetDocument(); + ASSERT_VALID(pDoc); + + // define size of image on printer taking into account current zoom level + CSize sizeDIB=pDoc->GetDIBSize(); + CRect rect(0,0,sizeDIB.cx,sizeDIB.cy); + NormalToScaled(&rect); + NormalToPrinted(pDC,&rect); + + // define the rectangle for current printing page + // based on the number of all pages in the image + int xPrinterRes=pDC->GetDeviceCaps(HORZRES); + int yPrinterRes=pDC->GetDeviceCaps(VERTRES); + CRect rectPage(xPrinterRes*((pInfo->m_nCurPage-1)%pDoc->m_nXPage), + yPrinterRes*((pInfo->m_nCurPage-1)/pDoc->m_nXPage), + xPrinterRes*((pInfo->m_nCurPage-1)%pDoc->m_nXPage)+xPrinterRes, + yPrinterRes*((pInfo->m_nCurPage-1)/pDoc->m_nXPage)+yPrinterRes); + // if size of page is bigger than size of remaining image + // then make them equal + if(rectPage.right>rect.right) + { + rectPage.right=rect.right; + } + if(rectPage.bottom>rect.bottom) + { + rectPage.bottom=rect.bottom; + } + + // get the coordinates of part of image that is going to be printed + // on the current page + CRect rectDIB=rectPage; + PrintedToNormal(pDC,&rectDIB); + ScaledToNormal(&rectDIB); + /// + // we have to revert Y-coordinates + // to get right print output + UINT diff=rectDIB.bottom-rectDIB.top; + rectDIB.bottom=sizeDIB.cy-rectDIB.top; + rectDIB.top=rectDIB.bottom-diff; + /// + + rectPage+=CSize(-rectPage.left,-rectPage.top); + + DrawDIB(pDC,rectPage,rectDIB); +} + +BOOL CDIBManagerView::DrawDIB(CDC* pDC, CRect& rectDest, CRect& rectSrc) +{ + CDIBManagerDoc* pDoc=GetDocument(); + ASSERT_VALID(pDoc); + + // set neccessary map mode + int oldMapMode; + oldMapMode=pDC->SetMapMode(MM_TEXT); + + // depending on current palette use original or dithered image + // to render image on display + int bSuccess; + if(!pDoc->CheckUseDithered()) + { + bSuccess=pDoc->m_dib.Paint(pDC,rectDest,rectSrc); + } + else + { + bSuccess=pDoc->m_dibDither.Paint(pDC,rectDest,rectSrc); + } + + pDC->SetMapMode(oldMapMode); + + return bSuccess; +} + +void CDIBManagerView::NormalToScaled(CRect* pRect) +{ + int nZoomLevel=GetZoomLevel(); + + // scale coordinates from normal to scaled + // taking into account current zoom level + if(nZoomLevel!=100) + { + pRect->left=((long)((long)pRect->left*(long)nZoomLevel))/(100L); + pRect->top=((long)((long)pRect->top*(long)nZoomLevel))/(100L); + pRect->right=((long)((long)pRect->right*(long)nZoomLevel))/(100L); + pRect->bottom=((long)((long)pRect->bottom*(long)nZoomLevel))/(100L); + } +} + +void CDIBManagerView::NormalToScaled(CPoint* pPoint) +{ + int nZoomLevel=GetZoomLevel(); + + // scale coordinates from normal to scaled + // taking into account current zoom level + if(nZoomLevel!=100) + { + pPoint->x=((long)((long)pPoint->x*(long)nZoomLevel))/(100L); + pPoint->y=((long)((long)pPoint->y*(long)nZoomLevel))/(100L); + } +} + +void CDIBManagerView::ScaledToNormal(CRect* pRect) +{ + int nZoomLevel=GetZoomLevel(); + + // scale coordinates from scaled to normal + // taking into account current zoom level + if(nZoomLevel!=100) + { + pRect->left=((long)((long)pRect->left*100L))/((long)nZoomLevel); + pRect->top=((long)((long)pRect->top*100L))/((long)nZoomLevel); + pRect->right=((long)((long)pRect->right*100L))/((long)nZoomLevel); + pRect->bottom=((long)((long)pRect->bottom*100L))/((long)nZoomLevel); + } +} + +void CDIBManagerView::ScaledToNormal(CPoint* pPoint) +{ + int nZoomLevel=GetZoomLevel(); + + // scale coordinates from scaled to normal + // taking into account current zoom level + if(nZoomLevel!=100) + { + pPoint->x=((long)((long)pPoint->x*100L))/((long)nZoomLevel); + pPoint->y=((long)((long)pPoint->y*100L))/((long)nZoomLevel); + } +} + +void CDIBManagerView::NormalToPrinted(CDC* pDC, CRect* pRect) +{ + // scale coordinates from display to printer + // taking into account screen and current printer DPI + int xPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSX); + int yPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSY); + + CClientDC dc(this); + int xScreenDPI=dc.GetDeviceCaps(LOGPIXELSX); + int yScreenDPI=dc.GetDeviceCaps(LOGPIXELSY); + + if(xPrinterDPI!=xScreenDPI || yPrinterDPI!=yScreenDPI) + { + pRect->left=((long)((long)pRect->left*(long)xPrinterDPI))/((long)xScreenDPI); + pRect->top=((long)((long)pRect->top*(long)yPrinterDPI))/((long)yScreenDPI); + pRect->right=((long)((long)pRect->right*(long)xPrinterDPI))/((long)xScreenDPI); + pRect->bottom=((long)((long)pRect->bottom*(long)yPrinterDPI))/((long)yScreenDPI); + } +} + +void CDIBManagerView::NormalToPrinted(CDC* pDC, CPoint* pPoint) +{ + // scale coordinates from display to printer + // taking into account screen and current printer DPI + int xPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSX); + int yPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSY); + + CClientDC dc(this); + int xScreenDPI=dc.GetDeviceCaps(LOGPIXELSX); + int yScreenDPI=dc.GetDeviceCaps(LOGPIXELSY); + + if(xPrinterDPI!=xScreenDPI || yPrinterDPI!=yScreenDPI) + { + pPoint->x=((long)((long)pPoint->x*(long)xPrinterDPI))/((long)xScreenDPI); + pPoint->y=((long)((long)pPoint->y*(long)yPrinterDPI))/((long)yScreenDPI); + } +} + +void CDIBManagerView::PrintedToNormal(CDC* pDC, CRect* pRect) +{ + // scale coordinates from printer to display + // taking into account screen and current printer DPI + int xPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSX); + int yPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSY); + + CClientDC dc(this); + int xScreenDPI=dc.GetDeviceCaps(LOGPIXELSX); + int yScreenDPI=dc.GetDeviceCaps(LOGPIXELSY); + + if(xPrinterDPI!=xScreenDPI || yPrinterDPI!=yScreenDPI) + { + pRect->left=((long)((long)pRect->left*(long)xScreenDPI))/((long)xPrinterDPI); + pRect->top=((long)((long)pRect->top*(long)yScreenDPI))/((long)yPrinterDPI); + pRect->right=((long)((long)pRect->right*(long)xScreenDPI))/((long)xPrinterDPI); + pRect->bottom=((long)((long)pRect->bottom*(long)yScreenDPI))/((long)yPrinterDPI); + } +} + +void CDIBManagerView::PrintedToNormal(CDC* pDC, CPoint* pPoint) +{ + // scale coordinates from printer to display + // taking into account screen and current printer DPI + int xPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSX); + int yPrinterDPI=pDC->GetDeviceCaps(LOGPIXELSY); + + CClientDC dc(this); + int xScreenDPI=dc.GetDeviceCaps(LOGPIXELSX); + int yScreenDPI=dc.GetDeviceCaps(LOGPIXELSY); + + if(xPrinterDPI!=xScreenDPI || yPrinterDPI!=yScreenDPI) + { + pPoint->x=((long)((long)pPoint->x*(long)xScreenDPI))/((long)xPrinterDPI); + pPoint->y=((long)((long)pPoint->y*(long)yScreenDPI))/((long)yPrinterDPI); + } +} + +///////////////////////////////////////////////////////////////////////////// +// CDIBManagerView diagnostics + +#ifdef _DEBUG +void CDIBManagerView::AssertValid() const +{ + CView::AssertValid(); +} + +void CDIBManagerView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CDIBManagerDoc* CDIBManagerView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDIBManagerDoc))); + return(CDIBManagerDoc*)m_pDocument; +} +#endif //_DEBUG + + + +///////////////////////////////////////////////////////////////////////////// +// A view's OnInitialUpdate() overrideable function is called immediately +// after the frame window is created, and the view within the frame +// window is attached to its document. This provides the scroll view the +// opportunity to set its size(m_totalSize) based on the document size. +void CDIBManagerView::OnInitialUpdate() +{ + CDIBManagerDoc* pDoc=GetDocument(); + + // get the size of DIB image to set ScrollSize of view window + CSize sizeDIB=pDoc->m_dib.GetSize(); + CRect rectDIB=CRect(0,0,sizeDIB.cx,sizeDIB.cy); + SetDeviceScrollSizesRelative(MM_TEXT,rectDIB); + SetZoomAlign(ZV_CENTER); + +} + +void CDIBManagerView::OnViewZoomIn() +{ + // TODO: Add your command handler code here + + // up current zoom level on 100% if it is more than 100% already + // or on 10% otherwise + int nZoomLevel=GetZoomLevel(); + if(nZoomLevel=100 ? 100 : 10; + nZoomLevel+=nMargin; + SetZoomLevel(nZoomLevel); + if(GetZoomLevel()>ID_MAX_ZOOM_LEVEL) + { + SetZoomLevel(ID_MAX_ZOOM_LEVEL); + } + // if roll-up ZoomLevel dialog is active then + // notify it that current zoom level is changed + NotifyZoomChanged(); + } +} + +void CDIBManagerView::OnUpdateViewZoomIn(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->Enable(ID_MAX_ZOOM_LEVEL>GetZoomLevel()); +} + +void CDIBManagerView::OnViewZoomOut() +{ + // TODO: Add your command handler code here + + // down current zoom level on 100% if it is more than 100% already + // or on 10% otherwise + int nZoomLevel=GetZoomLevel(); + if(nZoomLevel>ID_MIN_ZOOM_LEVEL) + { + int nMargin=nZoomLevel>100 ? 100 : 10; + nZoomLevel-=nMargin; + if(nZoomLevelEnable(ID_MIN_ZOOM_LEVELEnable(!bZoomLevelEqual100); + pCmdUI->SetCheck(bZoomLevelEqual100); + +} + +void CDIBManagerView::OnViewZoomToWindow() +{ + // TODO: Add your command handler code here + + // zoom to the size of the containing window + ZoomToWindow(); + if(GetZoomLevel()>ID_MAX_ZOOM_LEVEL) + { + SetZoomLevel(ID_MAX_ZOOM_LEVEL); + } + // if roll-up ZoomLevel dialog is active then + // notify it that current zoom level is changed + NotifyZoomChanged(); +} + +void CDIBManagerView::OnUpdateZoom(CCmdUI* pCmdUI) +{ + CString string=""; + string.Format(_T("%u%%"),GetZoomLevel()); + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + +void CDIBManagerView::OnUpdateSize(CCmdUI* pCmdUI) +{ + // put length in bytes of image StatusBar + CString string=""; + CDIBManagerDoc* pDoc=GetDocument(); + if(pDoc!=NULL) + { + DWORD dwSize=pDoc->m_dwImageSize; + // if length in bytes is less than 1 kilobyte then show it in bytes + // otherwise in kilobytes + if(dwSize<1024) + { + string.Format(_T("%u byte%s"),dwSize,dwSize>1 ? "s" : ""); + } + else + { + string.Format(_T("%u.%1u KB"),dwSize/1024,((dwSize%1024)*10)/1024); + } + } + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + +void CDIBManagerView::OnUpdateParameters(CCmdUI* pCmdUI) +{ + // put the size of image on StatusBar + CString string=""; + CDIBManagerDoc* pDoc=GetDocument(); + if(pDoc!=NULL) + { + CSize sizeDIB=pDoc->m_dib.GetSize(); + string.Format(_T("%4u:%u"),sizeDIB.cx,sizeDIB.cy); + } + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + + +void CDIBManagerView::OnUpdateFileSave(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + CDIBManagerDoc* pDoc=GetDocument(); + // we can save changes to current document only if + // image is of DIB format + pCmdUI->Enable(pDoc->m_tf==CDIBManagerDoc::TF_DIB && + pDoc->IsModified()); +} + +void CDIBManagerView::OnFileExport() +{ + // TODO: Add your command handler code here + + // we can save DIB image as JPEG + CDIBManagerDoc* pDoc=GetDocument(); + + CExportDlg exportDlg; + + // copy current DIB image to the temporary file that + // will be transformed into JPEG file + CArchive ar(&exportDlg.m_tmpBMPFile, CArchive::store); + pDoc->m_dib.Write(ar); + ar.Close(); + exportDlg.m_tmpBMPFile.SeekToBegin(); + + if(exportDlg.DoModal()==IDOK) + { + } + +} + +void CDIBManagerView::OnUpdateFileProtected(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetCheck(GetDocument()->m_bProtected); +} + +void CDIBManagerView::OnFileProtected() +{ + // TODO: Add your command handler code here + + CDIBManagerDoc* pDoc=GetDocument(); + pDoc->m_bProtected=!pDoc->m_bProtected; + // mark document as dirty only if we really changed the + // original protection + if(pDoc->m_bProtected==pDoc->m_bInitiallyProtected) + { + pDoc->SetModifiedFlag(FALSE); + } + else + { + pDoc->SetModifiedFlag(); + } +} + +void CDIBManagerView::OnDestroy() +{ + COXZoomView::OnDestroy(); + + // TODO: Add your message handler code here + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + // notify roll-up ZoomLevel Dialog that + // current view is about to be destroyed + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + pScaleRollupDlg->ReleaseRecipient(this); +} + +void CDIBManagerView::OnSetFocus(CWnd* pOldWnd) +{ + COXZoomView::OnSetFocus(pOldWnd); + + // TODO: Add your message handler code here + + // as far as we get focus + // simply set our view as message recipient + CScaleRollupDlg *pScaleRollupDlg=((CDIBManagerApp *)AfxGetApp())->GetScaleRollupDlg(); + if(!pScaleRollupDlg->IsOwner( this )) + { + pScaleRollupDlg->SetRecipient(this); + + NotifyZoomChanged(); + } + + DoRealizePalette(TRUE,TRUE); +} + +BOOL CDIBManagerView::OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID) +{ + // get messages from roll-up ZoomLevel Dialog + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + if(pScaleRollupDlg->GetRollupID() == rollupID) + { + switch(message) + { + // apply set zoom level to the current image + case ID_APPLY: + { + SetZoomLevel(((CScaleRollupDlg*)pWndRollup)->m_nZoomLevel); + break; + } + case IDCANCEL: + { + pScaleRollupDlg->DestroyWindow(); + pMainFrame->m_bShowZoomLevelDlg=FALSE; + } + default: + { + TRACE2("Unhandled message %d from Rollup %d\n",message,rollupID); + break; + } + } + } + // messages from other rollups are being ignored!!! + return TRUE; +} + +void CDIBManagerView::OnViewZoomLevelDlg() +{ + // TODO: Add your command handler code here + + // open roll-up ZoomLevel Dialog + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + CDIBManagerDoc* pDoc=GetDocument(); + + pMainFrame->m_bShowZoomLevelDlg=!pMainFrame->m_bShowZoomLevelDlg; + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + if(pMainFrame->m_bShowZoomLevelDlg) + { + TCHAR szTitle[20]; + UTBStr::tcscpy(szTitle,20, _T("Zoom Level")); + + // set initial values of dialog vars + pScaleRollupDlg->m_nZoomLevel=GetZoomLevel(); + CSize sizeDIB=pDoc->m_dib.GetSize(); + pScaleRollupDlg->m_nOrigWidth=sizeDIB.cx; + pScaleRollupDlg->m_nOrigHeight=sizeDIB.cy; + + // create roll-up + pScaleRollupDlg->CreateRollUp(this, 6458, szTitle); + pScaleRollupDlg->ShowWindow(SW_SHOWNORMAL); + + pScaleRollupDlg->SendMessage(IDM_OX_RU_ARRANGE); + + SetFocus(); + } + else + { + pScaleRollupDlg->DestroyWindow(); + } +} + +void CDIBManagerView::NotifyZoomChanged() +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + CDIBManagerDoc* pDoc=GetDocument(); + + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + + // if roll-up ZoomLevel Dialog is active then + // set values of dialog vars + if(pMainFrame->m_bShowZoomLevelDlg) + { + CSize sizeDIB=pDoc->m_dib.GetSize(); + pScaleRollupDlg->m_nOrigHeight=sizeDIB.cx; + pScaleRollupDlg->m_nOrigWidth=sizeDIB.cy; + + pScaleRollupDlg->m_nZoomLevel=GetZoomLevel(); + pScaleRollupDlg->ShowControls(); + + // notify roll-up to change values + pScaleRollupDlg->RUpdateData(FALSE); + } +} + +// next 3 functions +// use to display 256 and higher images when +// current palette is 8-bit color or less +BOOL CDIBManagerView::OnQueryNewPalette() +{ + return DoRealizePalette(TRUE,TRUE)>0 ? TRUE : FALSE; +} + +void CDIBManagerView::OnPaletteChanged(CWnd* pFocusWnd) +{ + if(pFocusWnd!=this) + { + DoRealizePalette(TRUE,FALSE); + } +} + +UINT CDIBManagerView::DoRealizePalette(BOOL bRedraw, BOOL bForeground) +{ + UINT nCount=0; + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + // applicable only when current palette is 8-bit or less + if(pApp->m_nColors<=8) + { + CDIBManagerDoc* pDoc=GetDocument(); + // retrieve image palette + CPalette* pPalette=pDoc->GetDIBPalette(); + if(pPalette!=NULL) + { + CClientDC dc(this); + CPalette* pOldPalette=dc.SelectPalette(pPalette,!bForeground); + nCount=dc.RealizePalette(); + if(nCount>0) + { + // if image pallete is selected then + // redraw image if needed + if(bRedraw) + { + Invalidate(); + } + dc.SelectPalette(pOldPalette,!bForeground); + } + } + } + + return nCount; +} + + +void CDIBManagerView::OnViewImageInfo() +{ + // TODO: Add your command handler code here + CImageInfoDlg dlgInfo; + dlgInfo.pDoc=GetDocument(); + dlgInfo.DoModal(); +} + +void CDIBManagerView::OnViewResampleImage() +{ + // TODO: Add your command handler code here + CDIBManagerDoc* pDoc=GetDocument(); + + CResampleImageDlg dlgResample; + + // we provide convertion only from 24-bit image to + // 8-bit image by means of dithering + dlgResample.m_bCanConvert=pDoc->m_dib.GetNumBitsPerPixel()==24 ? TRUE : FALSE; + // we can resize only 24 and 8 bit DIB images + dlgResample.m_bCanResize=pDoc->m_dib.GetNumBitsPerPixel()==24 || + pDoc->m_dib.GetNumBitsPerPixel()==8 ? TRUE : FALSE; + dlgResample.m_nCurrentZoomLevel=GetZoomLevel(); + + dlgResample.m_bConvertTo=FALSE; + dlgResample.m_bMatchZoomLevel=FALSE; + dlgResample.m_bMaintainRatio=TRUE; + + CSize sizeDIB=pDoc->m_dib.GetSize(); + dlgResample.m_sHeightOrig.Format(_T("%u"),sizeDIB.cy); + dlgResample.m_sWidthOrig.Format(_T("%u"),sizeDIB.cx); + dlgResample.m_nWidthPixels=sizeDIB.cx; + dlgResample.m_nHeightPixels=sizeDIB.cy; + dlgResample.m_nOrigWidth=sizeDIB.cx; + dlgResample.m_nOrigHeight=sizeDIB.cy; + + dlgResample.m_nWidthPercents=100; + dlgResample.m_nHeightPercents=100; + + if(dlgResample.DoModal()==IDOK) + { + BOOL bChanged=FALSE; + if(dlgResample.m_bCanConvert && dlgResample.m_bConvertTo) + { + // try to dither the image + if(!pDoc->m_dib.HalfToneDitherDIB()) + { + AfxMessageBox(_T("Cannot convert image!")); + } + else + { + bChanged=TRUE; + } + } + if(dlgResample.m_bCanResize &&(sizeDIB.cx!=(int)dlgResample.m_nWidthPixels || + sizeDIB.cy!=(int)dlgResample.m_nHeightPixels)) + { + // try to resize + if(!pDoc->m_dib.ResizeDIB(dlgResample.m_nWidthPixels, + dlgResample.m_nHeightPixels)) + { + AfxMessageBox(_T("Cannot resize image!")); + } + else + { + bChanged=TRUE; + } + } + if(bChanged) + { + // if we changed image we have to mark it as dirty, + pDoc->SetModifiedFlag(TRUE); + // set new ScrollSize of view window + CRect rectDIB=CRect(0,0,dlgResample.m_nWidthPixels, + dlgResample.m_nHeightPixels); + SetDeviceScrollSizesRelative(MM_TEXT,rectDIB); + // redraw image + Invalidate(); + } + } +} + +BOOL CDIBManagerView::OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll) +{ + // TODO: Add your specialized code here and/or call the base class + + if(IsSmoothScrolling()) + { + // + // First handle left/right scroll messages. If scrolling by page, + // scroll m_nPageSlices times rather than 1. If scrolling by line, + // scroll m_nLineSlices times. + // + BYTE nCode=LOBYTE(nScrollCode); + + if((nCode==SB_PAGELEFT) ||(nCode==SB_PAGERIGHT) || + (nCode==SB_LINELEFT) ||(nCode==SB_LINERIGHT)) + { + int nCount=0; + int nInc=0; + int nFinalInc=0; + int nLineCode=0; + + switch(nCode) + { + case SB_PAGELEFT: + { + nLineCode=SB_LINELEFT; + nInc=m_pageDev.cx/m_nPageSlices; + nFinalInc=m_pageDev.cx%m_nPageSlices; + nCount=m_nPageSlices; + break; + } + case SB_PAGERIGHT: + { + nLineCode=SB_LINERIGHT; + nInc=m_pageDev.cx/m_nPageSlices; + nFinalInc=m_pageDev.cx%m_nPageSlices; + nCount=m_nPageSlices; + break; + } + + case SB_LINELEFT: + { + nLineCode=SB_LINELEFT; + nInc=m_lineDev.cx/m_nLineSlices; + nFinalInc=m_lineDev.cx%m_nLineSlices; + nCount=m_nLineSlices; + break; + } + + case SB_LINERIGHT: + { + nLineCode=SB_LINERIGHT; + nInc=m_lineDev.cx/m_nLineSlices; + nFinalInc=m_lineDev.cx%m_nLineSlices; + nCount=m_nLineSlices; + break; + } + } + + int nOldLineSize=m_lineDev.cx; + BOOL bResult=FALSE; + DWORD dwTime=0; + + while(nCount--) + { + DWORD dwCurrentTime=::GetCurrentTime(); + DWORD dwElapsedTime=dwCurrentTime-dwTime; + if(dwElapsedTime= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXZoomVw.h" // Should be REMARKED IF USING OXClass.h in stdafx.h +//#include "OXScrollTipOwner.h" + +class CDIBManagerView : public COXZoomView +{ +protected: // create from serialization only + CDIBManagerView(); + DECLARE_DYNCREATE(CDIBManagerView) + +// Attributes +public: + CDIBManagerDoc* GetDocument(); + +// Operations +public: + void NormalToScaled(CRect* pRect); + void NormalToScaled(CPoint* pPoint); + void ScaledToNormal(CRect* pRect); + void ScaledToNormal(CPoint* pPoint); + void NormalToPrinted(CDC* pDC, CRect* pRect); + void NormalToPrinted(CDC* pDC, CPoint* pPoint); + void PrintedToNormal(CDC* pDC, CRect* pRect); + void PrintedToNormal(CDC* pDC, CPoint* pPoint); + + void SetSmoothScrolling(BOOL bSmoothScrolling=TRUE) { + m_bSmoothScrolling=bSmoothScrolling; } + + BOOL IsSmoothScrolling() { return m_bSmoothScrolling; } + + void SetSmoothEnvironment(int nLineSlices=12, int nPageSlices=4, + DWORD dwWaitingTime=10) + { + m_nLineSlices=nLineSlices; + m_nPageSlices=nPageSlices; + m_dwWaitingTime=dwWaitingTime; + } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDIBManagerView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDIBManagerView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + + BOOL m_bSmoothScrolling; + int m_nLineSlices; + int m_nPageSlices; + DWORD m_dwWaitingTime; + + +protected: + void NotifyZoomChanged(); + UINT DoRealizePalette(BOOL bRedraw=TRUE, BOOL bForeground=TRUE); + void PrintPage(CDC* pDC, CPrintInfo* pInfo); + BOOL DrawDIB(CDC* pDC, CRect& rectDest, CRect& rectSrc); + +// Generated message map functions +protected: + //{{AFX_MSG(CDIBManagerView) + afx_msg void OnViewZoomIn(); + afx_msg void OnUpdateViewZoomIn(CCmdUI* pCmdUI); + afx_msg void OnViewZoomOut(); + afx_msg void OnUpdateViewZoomOut(CCmdUI* pCmdUI); + afx_msg void OnViewZoomTo100(); + afx_msg void OnUpdateViewZoomTo100(CCmdUI* pCmdUI); + afx_msg void OnViewZoomToWindow(); + afx_msg void OnUpdateZoom(CCmdUI* pCmdUI); + afx_msg void OnUpdateSize(CCmdUI* pCmdUI); + afx_msg void OnUpdateParameters(CCmdUI* pCmdUI); + afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI); + afx_msg void OnFileExport(); + afx_msg void OnUpdateFileProtected(CCmdUI* pCmdUI); + afx_msg void OnFileProtected(); + afx_msg void OnDestroy(); + afx_msg void OnSetFocus(CWnd* pOldWnd); + afx_msg void OnViewZoomLevelDlg(); + afx_msg BOOL OnQueryNewPalette(); + afx_msg void OnPaletteChanged(CWnd*); + afx_msg void OnViewImageInfo(); + afx_msg void OnViewResampleImage(); + //}}AFX_MSG + afx_msg BOOL OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID); + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in DIBManagerView.cpp +inline CDIBManagerDoc* CDIBManagerView::GetDocument() + { return (CDIBManagerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DIBMANAGERVIEW_H__D2552D18_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.cpp new file mode 100644 index 0000000..9d5cac5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.cpp @@ -0,0 +1,260 @@ +// ExportDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "DIBManager.h" +#include "ExportDlg.h" + +#include "oxbmpfle.h" +#include "oxjpgfle.h" +#include "oxjpgcom.h" +#include "oxjpgdom.h" +#include "oxjpgexp.h" + +#include "path.h" +#include "dir.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExportDlg dialog + + +CExportDlg::CExportDlg(CWnd* pParent /*=NULL*/) + : CDialog(CExportDlg::IDD, pParent), + m_cbFileName(COXHistoryCombo::TBPHorizontalRightCenter,TRUE) +{ + //{{AFX_DATA_INIT(CExportDlg) + m_bBaseline = FALSE; + m_bGrayscale = FALSE; + m_bOptimize = FALSE; + m_bProgressive = FALSE; + m_bSmooth = FALSE; + m_sFileName = _T(""); + m_nQuality = 0; + m_nSmooth = 0; + //}}AFX_DATA_INIT +} + + +void CExportDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CExportDlg) + DDX_Control(pDX, IDC_SMOOTH, m_ctlEditSmooth); + DDX_Control(pDX, IDC_QUALITY, m_ctlEditQuality); + DDX_Control(pDX, IDC_SPIN_SMOOTH, m_ctlSpinSmooth); + DDX_Control(pDX, IDC_SPIN_QUALITY, m_ctlSpinQuality); + DDX_Control(pDX, IDC_FILENAME, m_cbFileName); + DDX_Check(pDX, IDC_CHECK_BASELINE, m_bBaseline); + DDX_Check(pDX, IDC_CHECK_GRAYSCALE, m_bGrayscale); + DDX_Check(pDX, IDC_CHECK_OPTIMIZE, m_bOptimize); + DDX_Check(pDX, IDC_CHECK_PROGRESSIVE, m_bProgressive); + DDX_Check(pDX, IDC_CHECK_SMOOTH, m_bSmooth); + DDX_Text(pDX, IDC_FILENAME, m_sFileName); + DDX_Text(pDX, IDC_QUALITY, m_nQuality); + DDV_MinMaxUInt(pDX, m_nQuality, 0, 100); + DDX_Text(pDX, IDC_SMOOTH, m_nSmooth); + DDV_MinMaxUInt(pDX, m_nSmooth, 1, 100); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CExportDlg, CDialog) + //{{AFX_MSG_MAP(CExportDlg) + ON_BN_CLICKED(IDC_CHECK_PROGRESSIVE, OnCheckProgressive) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_KICKIDLE, OnKickIdle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExportDlg message handlers + +BOOL CExportDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinQuality.SetBuddy(&m_ctlEditQuality); + m_ctlSpinQuality.SetRange(0,100); + m_ctlSpinQuality.SetPos(m_nQuality); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinQuality.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinSmooth.SetBuddy(&m_ctlEditSmooth); + m_ctlSpinSmooth.SetRange(1,100); + m_ctlSpinSmooth.SetPos(m_nSmooth); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinQuality.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + m_nQuality = 75; + m_nSmooth = 10; + CheckRadioButton(IDC_RADIO_DCT_INT,IDC_RADIO_DCT_FLOAT,IDC_RADIO_DCT_INT); + + // Use auto persistence + m_cbFileName.SetAutoPersistent(_T("History - Export")); + m_cbFileName.SetFileDialogParams(FALSE,_T("*.jpg"),NULL, + OFN_HIDEREADONLY|OFN_PATHMUSTEXIST, + _T("JPEG Images (*.jpg)|*.jpg|All Files (*.*)|*.*||")); + // set toolbar on the right with a little gap + COXHistoryCombo::EToolbarPosition eToolbarPosition=m_cbFileName.GetToolbarPosition(); + m_cbFileName.PositionToolbar(eToolbarPosition, TRUE); + // unimited number of items in combobox are could be saved + m_cbFileName.SetMaxHistoryCount(-1); + + UpdateData(FALSE); + + // show buttons depending on set properties + ShowButtons(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CExportDlg::OnCheckProgressive() +{ + // TODO: Add your control notification handler code here + + ShowButtons(); +} + +void CExportDlg::OnOK() +{ + // TODO: Add extra validation here + + // check if typed directory exists + if(UpdateData()==0 || !CheckFileName()) + return; + + // operation of exporting from DIB to JPEG + // could be time-consuming + BeginWaitCursor(); + + // create bitmap file on the base of current DIB image + // m_tmpBMPFile we initialize when we run the export dialog + COXBMPFile BMPFile(&m_tmpBMPFile); + COXJPEGFile jpgFile(m_sFileName); + COXJPEGCompressor JCompr; + + JCompr.SetQuality(m_nQuality); + if(m_bSmooth) + { + JCompr.SetSmooth(m_nSmooth); + } + + JCompr.SetGrayScale(m_bGrayscale); + JCompr.SetBaseLine(m_bBaseline); + JCompr.SetProgressive(m_bProgressive); + JCompr.SetOptimize(m_bOptimize); + EDiscreteCosTransf DCT; + switch(GetCheckedRadioButton(IDC_RADIO_DCT_INT, + IDC_RADIO_DCT_FLOAT)) + { + case IDC_RADIO_DCT_INT: + { + DCT=DC_Int; + break; + } + case IDC_RADIO_DCT_FAST: + { + DCT=DC_FastInt; + break; + } + case IDC_RADIO_DCT_FLOAT: + { + DCT=DC_Float; + break; + } + default: + { + DCT=DC_Int; + break; + } + } + JCompr.SetDisCosTranf(DCT); + + short nReturn(1); + TCHAR ErrorBuffer[SIZE_ERROR_BUF]; + TRY + { + // the only line of code that we need to compress bitmap file to JPEG + nReturn = JCompr.DoCompress(&BMPFile, &jpgFile); + if (nReturn == 2) + AfxMessageBox(JCompr.GetWarningMessages()); + } + CATCH(COXJPEGException, e) + { + // if something went wrong then notify about it + e->GetErrorMessage(ErrorBuffer, SIZE_ERROR_BUF); + AfxMessageBox(CString("Exception : ") + ErrorBuffer); + + TRACE((LPCTSTR)ErrorBuffer); + } + END_CATCH + + EndWaitCursor(); + + if(nReturn!=0) + return; + + CDialog::OnOK(); +} + +LRESULT CExportDlg::OnKickIdle(WPARAM wParam, LPARAM lParam) +{ + // we use this function to let buttons in HistoryCombo toolbar + // to get some notification + UNUSED(wParam); + UNUSED_ALWAYS(lParam); + ASSERT_VALID(this); + ASSERT(wParam == MSGF_DIALOGBOX); + BOOL bContinueIdle = TRUE; + + // Pass on to the history combo + m_cbFileName.OnIdle(); + + return bContinueIdle; +} + +void CExportDlg::ShowButtons() +{ + // TODO: Add your control notification handler code here + + // show buttons depending on some conditions + + UpdateData(); + ctlOptimize().EnableWindow(!m_bProgressive); + if(m_bProgressive) + { + ctlOptimize().SetCheck(1); + } +} + +BOOL CExportDlg::CheckFileName() +{ + // check if typed directory exist + COXPathSpec path; + path.SetPath(m_sFileName); + COXDirSpec dir(path.GetDirectory()); + if(dir.IsEmpty() || !dir.Exists()) + { + AfxMessageBox(_T("Designated directory doesn't exist!"),MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + else + { + return TRUE; + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.h new file mode 100644 index 0000000..f8d527e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ExportDlg.h @@ -0,0 +1,70 @@ +#if !defined(AFX_EXPORTDLG_H__645E3D42_7531_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_EXPORTDLG_H__645E3D42_7531_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ExportDlg.h : header file +// + +#include "OXHistoryCombo.h" +#include "OXSpinCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CExportDlg dialog + +class CExportDlg : public CDialog +{ +// Construction +protected: + CButton& ctlOptimize() { return *(CButton*)GetDlgItem(IDC_CHECK_OPTIMIZE); } + void ShowButtons(); + BOOL CheckFileName(); + +public: + CExportDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CExportDlg) + enum { IDD = IDD_DIALOG_EXPORT }; + CEdit m_ctlEditSmooth; + CEdit m_ctlEditQuality; + COXSpinCtrl m_ctlSpinSmooth; + COXSpinCtrl m_ctlSpinQuality; + COXHistoryCombo m_cbFileName; + BOOL m_bBaseline; + BOOL m_bGrayscale; + BOOL m_bOptimize; + BOOL m_bProgressive; + BOOL m_bSmooth; + CString m_sFileName; + UINT m_nQuality; + UINT m_nSmooth; + //}}AFX_DATA + // we use mem file as temporarily one to export info to JPEG file + CMemFile m_tmpBMPFile; + BOOL m_bCheckFileName; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExportDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CExportDlg) + afx_msg void OnCheckProgressive(); + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXPORTDLG_H__645E3D42_7531_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.cpp new file mode 100644 index 0000000..d5b1d6d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.cpp @@ -0,0 +1,138 @@ +// ImageInfoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "dibmanager.h" +#include "ImageInfoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageInfoDlg dialog + + +CImageInfoDlg::CImageInfoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CImageInfoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CImageInfoDlg) + m_sFileName = _T(""); + m_sFileSize = _T(""); + m_sFileStatus = _T(""); + m_sFormat = _T(""); + m_sHeight = _T(""); + m_sSizeInMemory = _T(""); + m_sType = _T(""); + m_sWidth = _T(""); + //}}AFX_DATA_INIT +} + + +void CImageInfoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CImageInfoDlg) + DDX_Control(pDX, IDC_FILE_STATUS, m_ctlStaticFileStatus); + DDX_Text(pDX, IDC_FILE_NAME, m_sFileName); + DDX_Text(pDX, IDC_FILE_SIZE, m_sFileSize); + DDX_Text(pDX, IDC_FILE_STATUS, m_sFileStatus); + DDX_Text(pDX, IDC_FORMAT, m_sFormat); + DDX_Text(pDX, IDC_HEIGHT, m_sHeight); + DDX_Text(pDX, IDC_SIZE_IN_MEMORY, m_sSizeInMemory); + DDX_Text(pDX, IDC_TYPE, m_sType); + DDX_Text(pDX, IDC_WIDTH, m_sWidth); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CImageInfoDlg, CDialog) + //{{AFX_MSG_MAP(CImageInfoDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImageInfoDlg message handlers + +BOOL CImageInfoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // get the name of current file + m_sFileName=pDoc->m_sNameFile; + + // get the length in bytes of current image on disk + DWORD dwSize=pDoc->m_dwImageSize; + // if length in bytes is less than 1 kilobyte then show it in bytes + // otherwise in kilobytes + if(dwSize<1024) + { + m_sFileSize.Format(_T("%u byte%s"),dwSize,dwSize>1 ? "s" : ""); + } + else + { + m_sFileSize.Format(_T("%u.%1u KB"),dwSize/1024,((dwSize%1024)*10)/1024); + } + + // get the length in bytes of current image in memory + DWORD dwSizeInMemory=pDoc->CalcDIBSizeInMemory(); + // if length in bytes is less than 1 kilobyte then show it in bytes + // otherwise in kilobytes + if(dwSizeInMemory<1024) + { + m_sSizeInMemory.Format(_T("%u byte%s"),dwSizeInMemory, + dwSizeInMemory>1 ? "s" : ""); + } + else + { + m_sSizeInMemory.Format(_T("%u.%1u KB"),dwSizeInMemory/1024, + ((dwSizeInMemory%1024)*10)/1024); + } + + // define if document is dirty + m_sFileStatus.Format(_T("Image has %schanged"), + pDoc->IsModified() ? _T("") : _T("not ")) ; + + // get image format + m_sFormat=pDoc->m_tf==CDIBManagerDoc::TF_DIB ? + _T("Windows Bitmap") : _T("JPEG Bitmap"); + + // get height and width in pixels + CSize sizeDIB=pDoc->m_dib.GetSize(); + m_sHeight.Format(_T("%u pixel%s"),sizeDIB.cy, sizeDIB.cy>1 ? _T("s") : _T("")); + m_sWidth.Format(_T("%u pixel%s"),sizeDIB.cx, sizeDIB.cx>1 ? _T("s") : _T("")); + + // define the number of colors used in DIB + switch(pDoc->m_dib.GetNumBitsPerPixel()) + { + case 1: + { + m_sType=_T("Black & White (1-bit)"); + break; + } + case 4: + { + m_sType=_T("16 Color (4-bit)"); + break; + } + case 8: + { + m_sType=_T("256 Color (8-bit)"); + break; + } + case 24: + { + m_sType=_T("RGB Color (24-bit)"); + break; + } + } + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.h new file mode 100644 index 0000000..ce65662 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImageInfoDlg.h @@ -0,0 +1,57 @@ +#if !defined(AFX_IMAGEINFODLG_H__3581B502_8ABD_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_IMAGEINFODLG_H__3581B502_8ABD_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ImageInfoDlg.h : header file +// + +#include "DIBManagerDoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CImageInfoDlg dialog + +class CImageInfoDlg : public CDialog +{ +// Construction +public: + CImageInfoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CImageInfoDlg) + enum { IDD = IDD_IMAGE_INFO_DIALOG }; + CStatic m_ctlStaticFileStatus; + CString m_sFileName; + CString m_sFileSize; + CString m_sFileStatus; + CString m_sFormat; + CString m_sHeight; + CString m_sSizeInMemory; + CString m_sType; + CString m_sWidth; + //}}AFX_DATA + CDIBManagerDoc* pDoc; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageInfoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CImageInfoDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGEINFODLG_H__3581B502_8ABD_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.cpp new file mode 100644 index 0000000..3dcafc4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.cpp @@ -0,0 +1,337 @@ +// ImportDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "dibmanager.h" +#include "MainFrm.h" +#include "ImportDlg.h" + +#include "oxbmpfle.h" +#include "oxjpgfle.h" +#include "oxjpgcom.h" +#include "oxjpgdom.h" +#include "oxjpgexp.h" + +#include "path.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImportDlg dialog + + +CImportDlg::CImportDlg(CWnd* pParent /*=NULL*/) + : CDialog(CImportDlg::IDD, pParent), + m_cbFileName(COXHistoryCombo::TBPHorizontalRightCenter,TRUE) +{ + //{{AFX_DATA_INIT(CImportDlg) + m_bColors = FALSE; + m_bGrayscale = FALSE; + m_bNoSmooth = FALSE; + m_bOnePass = FALSE; + m_sFileName = _T(""); + m_nColors = 0; + //}}AFX_DATA_INIT +} + + +void CImportDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CImportDlg) + DDX_Control(pDX, IDC_COLORS, m_ctlEditColors); + DDX_Control(pDX, IDC_SPIN_COLORS, m_ctlSpinColors); + DDX_Control(pDX, IDC_FILENAME, m_cbFileName); + DDX_Check(pDX, IDC_CHECK_COLORS, m_bColors); + DDX_Check(pDX, IDC_CHECK_GRAYSCALE, m_bGrayscale); + DDX_Check(pDX, IDC_CHECK_NO_SMOOTH, m_bNoSmooth); + DDX_Check(pDX, IDC_CHECK_ONE_PASS, m_bOnePass); + DDX_Text(pDX, IDC_FILENAME, m_sFileName); + DDX_Text(pDX, IDC_COLORS, m_nColors); + DDV_MinMaxInt(pDX, m_nColors, 8, 256); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CImportDlg, CDialog) + //{{AFX_MSG_MAP(CImportDlg) + ON_BN_CLICKED(IDC_CHECK_ONE_PASS, OnCheckOnePass) + ON_BN_CLICKED(IDC_CHECK_COLORS, OnCheckColors) + ON_BN_CLICKED(IDC_CHECK_GRAYSCALE, OnCheckGrayscale) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_KICKIDLE, OnKickIdle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImportDlg message handlers + +BOOL CImportDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + m_nColors = 256; + CheckRadioButton(IDC_RADIO_DM_FLOYD_STEIN,IDC_RADIO_DM_NONE, + IDC_RADIO_DM_FLOYD_STEIN); + CheckRadioButton(IDC_RADIO_ONE_TO_ONE,IDC_RADIO_ONE_TO_EIGHT, + IDC_RADIO_ONE_TO_ONE); + CheckRadioButton(IDC_RADIO_ONE_TO_ONE,IDC_RADIO_ONE_TO_EIGHT, + IDC_RADIO_ONE_TO_ONE); + CheckRadioButton(IDC_RADIO_DCT_INT,IDC_RADIO_DCT_FLOAT, + IDC_RADIO_DCT_INT); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinColors.SetBuddy(&m_ctlEditColors); + m_ctlSpinColors.SetRange(8,256); + m_ctlSpinColors.SetPos(m_nColors); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinColors.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Use auto persistence + m_cbFileName.SetAutoPersistent(_T("History - Import")); + m_cbFileName.SetFileDialogParams(TRUE,_T("*.jpg"),NULL, + OFN_HIDEREADONLY|OFN_PATHMUSTEXIST, + _T("JPEG Images (*.jpg)|*.jpg|All Files (*.*)|*.*||")); + // set toolbar on the right with a little gap + COXHistoryCombo::EToolbarPosition eToolbarPosition=m_cbFileName.GetToolbarPosition(); + // unimited number of items in combobox are could be saved + m_cbFileName.PositionToolbar(eToolbarPosition, TRUE); + m_cbFileName.SetMaxHistoryCount(-1); + + UpdateData(FALSE); + + ShowButtons(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CImportDlg::OnOK() +{ + // TODO: Add extra validation here + + if(UpdateData()==0 || !CheckFileName()) + return; + + // operation of exporting JPEG to DIB + // could be time-consuming + BeginWaitCursor(); + + COXBMPFile BMPFile(&m_tmpBMPFile); + COXJPEGFile jpgFile(m_sFileName); + COXJPEGDecompressor JDecompr; + + JDecompr.SetGrayScale(m_bGrayscale); + JDecompr.SetNoSmooth(m_bNoSmooth); + JDecompr.SetOnePass(m_bOnePass); + + EDiscreteCosTransf DCT; + switch(GetCheckedRadioButton(IDC_RADIO_DCT_INT, + IDC_RADIO_DCT_FLOAT)) + { + case IDC_RADIO_DCT_INT: + { + DCT=DC_Int; + break; + } + case IDC_RADIO_DCT_FAST: + { + DCT=DC_FastInt; + break; + } + case IDC_RADIO_DCT_FLOAT: + { + DCT=DC_Float; + break; + } + default: + { + DCT=DC_Int; + break; + } + } + JDecompr.SetDisCosTranf(DCT); + + EDitherMethod DM; + switch(GetCheckedRadioButton(IDC_RADIO_DM_FLOYD_STEIN,IDC_RADIO_DM_NONE)) + { + case IDC_RADIO_DM_FLOYD_STEIN: + { + DM=DM_FloydStein; + break; + } + case IDC_RADIO_DM_ORDERED: + { + DM=DM_Ordered; + break; + } + case IDC_RADIO_DM_NONE: + { + DM=DM_None; + break; + } + default: + { + DM=DM_FloydStein; + break; + } + } + JDecompr.SetDitherMethod(DM); + + EDecompScale DS; + switch(GetCheckedRadioButton(IDC_RADIO_ONE_TO_ONE,IDC_RADIO_ONE_TO_EIGHT)) + { + case IDC_RADIO_ONE_TO_ONE: + { + DS=DS_OneOne; + break; + } + case IDC_RADIO_ONE_TO_TWO: + { + DS=DS_OneHalf; + break; + } + case IDC_RADIO_ONE_TO_FOUR: + { + DS=DS_OneFourth; + break; + } + case IDC_RADIO_ONE_TO_EIGHT: + { + DS=DS_OneEight; + break; + } + default: + { + DS=DS_OneOne; + break; + } + } + JDecompr.SetScale(DS); + + if(m_bColors) + { + JDecompr.SetColors(m_nColors); + } + + short nReturn(1); + TCHAR ErrorBuffer[SIZE_ERROR_BUF]; + TRY + { + // the only line of code that we need to decompress JPEG to bitmap file + nReturn = JDecompr.DoDecompress(&jpgFile, &BMPFile); + if (nReturn == 2) + AfxMessageBox(JDecompr.GetWarningMessages()); + } + CATCH(COXJPEGException, e) + { + // if something went wrong then notify about it + e->GetErrorMessage(ErrorBuffer, SIZE_ERROR_BUF); + AfxMessageBox(CString("Exception : ") + ErrorBuffer); + TRACE((LPCTSTR)ErrorBuffer); + } + END_CATCH + + EndWaitCursor(); + + if(nReturn!=0) + return; + + CDialog::OnOK(); +} + +void CImportDlg::OnCheckOnePass() +{ + // TODO: Add your control notification handler code here + + ShowButtons(); +} + +void CImportDlg::OnCheckColors() +{ + // TODO: Add your control notification handler code here + + ShowButtons(); +} + +void CImportDlg::OnCheckGrayscale() +{ + // TODO: Add your control notification handler code here + + ShowButtons(); +} + +LRESULT CImportDlg::OnKickIdle(WPARAM wParam, LPARAM lParam) +{ + // we use this function to let buttons in HistoryCombo toolbar + // to get some notification + UNUSED(wParam); + UNUSED_ALWAYS(lParam); + + ASSERT_VALID(this); + ASSERT(wParam == MSGF_DIALOGBOX); + BOOL bContinueIdle = TRUE; + + // Pass on to the history combo + m_cbFileName.OnIdle(); + + return bContinueIdle; +} + +void CImportDlg::ShowButtons() +{ + // show buttons depending on some conditions + + UpdateData(); + ctlOnePass().EnableWindow(!m_bGrayscale && m_bColors); + if(m_bGrayscale) + { + ctlOnePass().SetCheck(1); + m_bOnePass=TRUE; + } + else + { + if(!m_bColors) + { + ctlOnePass().SetCheck(0); + m_bOnePass=FALSE; + } + } + if(!m_bOnePass) + { + CheckRadioButton(IDC_RADIO_DM_FLOYD_STEIN,IDC_RADIO_DM_NONE, + IDC_RADIO_DM_NONE); + } + ctlDitherMethodFS().EnableWindow(m_bOnePass); + ctlDitherMethodOrdered().EnableWindow(m_bOnePass); + ctlDitherMethodNone().EnableWindow(m_bOnePass); +} + +BOOL CImportDlg::CheckFileName() +{ + // check if typed file already opened + CMainFrame* pMainFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + if(pMainFrame->CheckFileAlreadyOpened(m_sFileName,TRUE)) + { + return FALSE; + } + + // check if typed directory exist + COXPathSpec path; + path.SetPath(m_sFileName); + if(path.IsEmpty() || !path.Exists()) + { + AfxMessageBox(_T("Entered file doesn't exist!"),MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + else + { + return TRUE; + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.h new file mode 100644 index 0000000..a2db4ce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ImportDlg.h @@ -0,0 +1,76 @@ +#if !defined(AFX_IMPORTDLG_H__97965B42_754D_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_IMPORTDLG_H__97965B42_754D_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ImportDlg.h : header file +// + +#include "OXHistoryCombo.h" +#include "OXSpinCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CImportDlg dialog + +class CImportDlg : public CDialog +{ +protected: + CButton& ctlOnePass() { + return *(CButton*)GetDlgItem(IDC_CHECK_ONE_PASS); } + CButton& ctlDitherMethodFS() { + return *(CButton*)GetDlgItem(IDC_RADIO_DM_FLOYD_STEIN); } + CButton& ctlDitherMethodOrdered() { + return *(CButton*)GetDlgItem(IDC_RADIO_DM_ORDERED); } + CButton& ctlDitherMethodNone() { + return *(CButton*)GetDlgItem(IDC_RADIO_DM_NONE); } + void ShowButtons(); + BOOL CheckFileName(); + +// Construction +public: + CImportDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CImportDlg) + enum { IDD = IDD_DIALOG_IMPORT }; + CEdit m_ctlEditColors; + COXSpinCtrl m_ctlSpinColors; + COXHistoryCombo m_cbFileName; + BOOL m_bColors; + BOOL m_bGrayscale; + BOOL m_bNoSmooth; + BOOL m_bOnePass; + CString m_sFileName; + int m_nColors; + //}}AFX_DATA + // we use mem file as temporarily one in which we import info from JPEG + CMemFile m_tmpBMPFile; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImportDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CImportDlg) + virtual void OnOK(); + afx_msg void OnCheckOnePass(); + afx_msg void OnCheckColors(); + afx_msg void OnCheckGrayscale(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMPORTDLG_H__97965B42_754D_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.cpp new file mode 100644 index 0000000..80aaec7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.cpp @@ -0,0 +1,670 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "DIBManager.h" + +#include "MainFrm.h" +#include "DIBManagerView.h" +#include "ChildFrm.h" + +#include "ImportDlg.h" +#include "ScaleRollupDlg.h" + +#include "OXDocMgr.h" +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, COXMDIFrameWndSizeDock) + +BEGIN_MESSAGE_MAP(CMainFrame, COXMDIFrameWndSizeDock) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_WM_QUERYNEWPALETTE() + ON_WM_PALETTECHANGED() + ON_COMMAND(ID_WINDOW_SYNCHRONIZE, OnWindowSynchronize) + ON_UPDATE_COMMAND_UI(ID_WINDOW_SYNCHRONIZE, OnUpdateWindowSynchronize) + ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateFileSave) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_ZOOM, OnUpdateZoom) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_SIZE, OnUpdateSize) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_PARAMETERS, OnUpdateParameters) + ON_COMMAND(ID_FILE_IMPORT, OnFileImport) + ON_UPDATE_COMMAND_UI(ID_FILE_PROTECTED, OnUpdateFileProtected) + ON_UPDATE_COMMAND_UI(ID_VIEW_ZOOM_LEVEL_DLG, OnUpdateViewZoomLevelDlg) + //}}AFX_MSG_MAP + ON_ROLLUP_NOTIFICATION() + // standard on/off control bar handlers for View menu. + ON_UPDATE_COMMAND_UI(ID_TREEFILESBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_TREEFILESBAR, OnBarCheck) + ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR, OnDropDown) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// arrays of IDs used to initialize control bars +// toolbar buttons - IDs are command buttons +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_SEPARATOR, + ID_FILE_IMPORT, + ID_FILE_EXPORT, + ID_SEPARATOR, + ID_FILE_PROTECTED, + ID_SEPARATOR, + ID_VIEW_ZOOM_IN, + ID_VIEW_ZOOM_OUT, + ID_VIEW_ZOOM_TO_WINDOW, + ID_VIEW_ZOOM_TO_100, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_FILE_PRINT_PREVIEW, + ID_SEPARATOR, + ID_WINDOW_NEW, + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, + ID_WINDOW_SYNCHRONIZE, + ID_SEPARATOR, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE buttons1[] = +{ + ID_VIEW_ZOOM_IN, + ID_SEPARATOR, + ID_VIEW_ZOOM_OUT, + ID_SEPARATOR, + ID_VIEW_ZOOM_TO_WINDOW, + ID_SEPARATOR, + ID_VIEW_ZOOM_TO_100, +}; + +static UINT BASED_CODE allbuttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_FILE_IMPORT, + ID_FILE_EXPORT, + ID_FILE_PROTECTED, + ID_VIEW_ZOOM_IN, + ID_VIEW_ZOOM_OUT, + ID_VIEW_ZOOM_TO_WINDOW, + ID_VIEW_ZOOM_TO_100, + ID_FILE_PRINT, + ID_FILE_PRINT_PREVIEW, + ID_WINDOW_NEW, + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, + ID_WINDOW_SYNCHRONIZE, + ID_APP_ABOUT, +}; + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_PROGRESS, + ID_INDICATOR_SIZE, + ID_INDICATOR_PARAMETERS, + ID_INDICATOR_ZOOM, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ + // TODO: add member initialization code here + m_pShowProgress=NULL; + m_bShowZoomLevelDlg=FALSE; +} + +CMainFrame::~CMainFrame() +{ + if(m_pShowProgress!=NULL) + delete m_pShowProgress; + + // if roll-up ZoomLevel Dialog is active then delete it + CScaleRollupDlg *pScaleRollupDlg=((CDIBManagerApp*)AfxGetApp())->GetScaleRollupDlg(); + if(pScaleRollupDlg!=NULL) + delete pScaleRollupDlg; + pScaleRollupDlg=NULL; +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXMDIFrameWndSizeDock::OnCreate(lpCreateStruct) == -1) + return -1; + + // Install caption painter + m_Caption.Attach(this); + COXCaptionInfo* pCI=m_Caption.GetCaptionInfo(TRUE); + pCI->SetBackgroundColor(RGB(128,255,255)); + pCI=m_Caption.GetCaptionInfo(FALSE); + pCI->SetBackgroundColor(RGB(255,255,128)); + SendMessage(WM_NCPAINT); + + // Create cool bar + // create toolbar + if (!m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + // The following SetButtons() then specifies which buttons are actually present + m_wndToolBar.SetBitmapIds(allbuttons, sizeof(allbuttons)/sizeof(UINT)); + + m_wndToolBar.IniSizes(CSize(16,16)); + m_wndToolBar.UpdateSizes(); + m_wndToolBar.SetHotImageList(m_wndToolBar.AddImageList(IDR_MAINFRAME_HOT)); + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + m_wndToolBar.SetButtonStyle(0,m_wndToolBar.GetButtonStyle(0)|TBSTYLE_DROPDOWN); + m_wndToolBar.SetDropDownArrow(TRUE); + + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + + + + // create standard statusbar? + // Wrong! This is our COXStatusBar object + 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 + } + + // set style of second pane in statusbar as pane with progressbar + UINT nID, nStyle; + int cxWidth; + m_wndStatusBar.GetPaneInfo( 1, nID, nStyle, cxWidth); + nStyle |= SBPS_PERCENT; + m_wndStatusBar.SetPaneInfo( 1, nID, nStyle, 100); + + ShowWindow(SW_SHOW); + if (!m_wndStatusBar.SetUpBar(1, TRUE, FALSE)) + return -1; + + // instantiate an object to show progress in specified pane + // (in this case pane=1) + m_pShowProgress=new CShowProgress(this,1); + + EnableDocking(CBRS_ALIGN_ANY); + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + DockControlBar(&m_wndToolBar); +// DockControlBar(&m_wndToolBar1); +// DockControlBar(&m_wndMenuBar); + + // create dockable TreeFilesBar dialog to show info about opened files + // ad ID use the same variable as in menu that we use to Show/Hide dialog + m_TreeFilesBar.SetSizeDockStyle(SZBARF_STDMOUSECLICKS | SZBARF_DLGAUTOSIZE); + if (!m_TreeFilesBar.Create(this, (UINT)IDD_DIALOG_TREE_FILES, CBRS_LEFT, + ID_TREEFILESBAR)) + { + TRACE0("Failed to create TreeFiles bar\n"); + return -1; + } + m_TreeFilesBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_TreeFilesBar); + + RecalcLayout(); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbar with corresponding items in menu + Organizer.AutoSetMenuImage(); + // set buttons + Organizer.SetMenuBitmap(ID_VIEW_TOOLBAR,IDB_CHECK); + Organizer.SetMenuBitmap(ID_VIEW_STATUS_BAR,IDB_CHECK); + Organizer.SetMenuBitmap(ID_VIEW_TREE_BAR,IDB_CHECK); + Organizer.SetMenuBitmap(ID_VIEW_ZOOM_LEVEL_DLG,IDB_CHECK); + Organizer.SetMenuBitmap(ID_TREEFILESBAR,IDB_CHECK); + + // get the number of colors that can be used on that display + // if it is <=256 than we have to dither DIB image before rendering to screen + GetNumColors(); + + // create the new roll_up ZoomLevel Dialog + ((CDIBManagerApp*)AfxGetApp())->GetScaleRollupDlg()=new CScaleRollupDlg(this); + + // hook the frame window in order to display tab control in client area + VERIFY(m_MTIClientWnd.Attach(this)); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_MAINFRAME)); + ASSERT(cs.lpszClass); + + return COXMDIFrameWndSizeDock::PreCreateWindow(cs); +} + +BOOL CMainFrame::OnQueryNewPalette() +{ + CView* pView=GetActiveFrame()->GetActiveView(); + if(pView) + pView->SendMessage(WM_QUERYNEWPALETTE); + return FALSE; +} + +void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd) +{ + UNREFERENCED_PARAMETER(pFocusWnd); + const MSG& msg=AfxGetThreadState()->m_lastSentMsg; + SendMessageToDescendants(WM_PALETTECHANGED, msg.wParam, msg.lParam); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + COXMDIFrameWndSizeDock::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + COXMDIFrameWndSizeDock::Dump(dc); +} + +#endif //_DEBUG + + +void CMainFrame::OnWindowSynchronize() +{ + // TODO: Add your command handler code here + + // synchronize current active window and + // element selected in TreeFilesBar + m_TreeFilesBar.SetActiveWindowInTree(GetActiveFrame()); +} + +void CMainFrame::OnUpdateWindowSynchronize(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->Enable(GetActiveFrame()!=this); +} + +void CMainFrame::OnUpdateFileSave(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->Enable(FALSE); +} + +void CMainFrame::OnUpdateZoom(CCmdUI* pCmdUI) +{ + CString string=""; + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + +void CMainFrame::OnUpdateSize(CCmdUI* pCmdUI) +{ + CString string=""; + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + +void CMainFrame::OnUpdateParameters(CCmdUI* pCmdUI) +{ + CString string=""; + pCmdUI->Enable(TRUE); + pCmdUI->SetText(string); +} + +void CMainFrame::OnFileImport() +{ + // TODO: Add your command handler code here + + // import JPEG file + CImportDlg importDlg; + if(importDlg.DoModal()==IDOK) + { + // use our own function to instantiate new Document object + // and corresponding classes + CreateDocumentFromOpenedFile(&importDlg.m_tmpBMPFile,importDlg.m_sFileName); + } +} + + +void CMainFrame::CreateDocumentFromOpenedFile(CString sFileName, + CDIBManagerDoc::TypeFile tf) +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + // check if we already opened the file + if(CheckFileAlreadyOpened(sFileName,TRUE)) + { + return; + } + + CFile m_file; + BOOL bSuccess=FALSE; + // check if we can open file on Read + TRY + { + bSuccess=m_file.Open(sFileName,CFile::modeRead); + } + CATCH(CFileException, e) + { + TCHAR szCause[255]; + CString strFormatted; + e->GetErrorMessage(szCause, 255); + strFormatted = _T("CDIBManagerDoc::OpenDocument:exception: "); + strFormatted += szCause; + TRACE(strFormatted); + + bSuccess=FALSE; + } + END_CATCH + + if(!bSuccess) + { + // send notification to Application object + // if errors occurs during loading workspace then + // application has an opportunity to hide and destroy splash window + pApp->ErrorNotify(_T("Cannot open file!")); + return; + } + + CreateDocumentFromOpenedFile(&m_file,sFileName,tf); +} + +void CMainFrame::CreateDocumentFromOpenedFile(CFile* pFile, CString sFileName, + CDIBManagerDoc::TypeFile tf) +{ + CDIBManagerDoc* pDocument=NULL; + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + // our own DocManager + // we use him to let multiselection in BitmapPreview Dialog + // as far as we have only one DocTemplate we simplified things + CDocTemplate* pTemplate=NULL; + POSITION posTemplate=pApp->GetFirstDocTemplatePosition(); + if(posTemplate!=NULL) + { + pTemplate=pApp->GetNextDocTemplate(posTemplate); + } + ASSERT_KINDOF(CDocTemplate, pTemplate); + + // create new document + pDocument=(CDIBManagerDoc*)pTemplate->CreateNewDocument(); + if (pDocument == NULL) + { + TRACE0("CDocTemplate::CreateNewDocument returned NULL.\n"); + AfxMessageBox(AFX_IDP_FAILED_TO_CREATE_DOC); + return; + } + + BOOL bAutoDelete=pDocument->m_bAutoDelete; + pDocument->m_bAutoDelete=FALSE; // don't destroy if something goes wrong + // create new frame for document + CFrameWnd* pFrame=pTemplate->CreateNewFrame(pDocument, NULL); + pDocument->m_bAutoDelete=bAutoDelete; + if (pFrame==NULL) + { + AfxMessageBox(AFX_IDP_FAILED_TO_CREATE_DOC); + delete pDocument; // explicit delete on error + return ; + } + ASSERT_VALID(pFrame); + + CWaitCursor wait; + if(!pDocument->OpenDocument(pFile,sFileName,tf)) + { + // if we didn't manage to create new document + // but already created a window for it then + // remove info from TreeFilesBar + m_TreeFilesBar.RemoveWindowFromTree(pFrame); + delete pDocument; // explicit delete on error + delete pFrame; // explicit delete on error + return; + } + + pDocument->SetPathName(pDocument->m_sNameFile,FALSE); + + pTemplate->InitialUpdateFrame(pFrame,pDocument,TRUE); +} + +BOOL CMainFrame::CheckFileAlreadyOpened(CString sFileName, BOOL bNotify) +{ + // check if file already opened + BOOL bOpened=FALSE; + + // get DocTemplate + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + // as far as we have only one DocTemplate we simplified things + CDocTemplate* pTemplate=NULL; + POSITION posTemplate=pApp->GetFirstDocTemplatePosition(); + if(posTemplate!=NULL) + { + pTemplate=pApp->GetNextDocTemplate(posTemplate); + } + ASSERT_KINDOF(CDocTemplate, pTemplate); + + // iterate documents and check their file name + CDIBManagerDoc* pDocument; + POSITION pos=pTemplate->GetFirstDocPosition(); + while(pos!=NULL) + { + pDocument=(CDIBManagerDoc*)pTemplate->GetNextDoc(pos); + if(sFileName==pDocument->m_sNameFile) + { + bOpened=TRUE; + if(bNotify) + { + CString sFileAlreadyOpened; + sFileAlreadyOpened.Format(_T("File %s already opened!"),sFileName); + pApp->ErrorNotify(sFileAlreadyOpened); + } + break; + } + } + + return bOpened; +} +void CMainFrame::OnUpdateFileProtected(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetCheck(FALSE); + pCmdUI->Enable(FALSE); +} + +void CMainFrame::OnClose() +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + // Save workspace if needed + if(pApp->m_bSaveWSOnExit) + { + SaveWorkspace(); + } + COXMDIFrameWndSizeDock::OnClose(); +} + +void CMainFrame::ResetProgress() +{ + // reset associated progress object + if(m_pShowProgress==NULL) + return; + m_pShowProgress->Reset(); +} + +void CMainFrame::ShowProgress() +{ + // iterate associated progress object + // progress object will show progress + if(m_pShowProgress==NULL) + return; + m_pShowProgress->Iterate(); +} + +BOOL CMainFrame::IniProgress(WORD nToDo, WORD nStep) +{ + // initialize associated progress object + if(m_pShowProgress==NULL) + return FALSE; + + if(nToDo==0 || nStep==0) + return FALSE; + + m_pShowProgress->Initialize(nToDo,nStep); + return TRUE; +} + +void CMainFrame::GetNumColors() +{ + // get the number of bits in current system pallete + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CWindowDC dc(this); + pApp->m_nColors=(UINT)dc.GetDeviceCaps(BITSPIXEL); +} + +BOOL CMainFrame::OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID) +{ + // notification from roll-up ZoomLevel Dialog + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CScaleRollupDlg *pScaleRollupDlg=pApp->GetScaleRollupDlg(); + if (pScaleRollupDlg->GetRollupID() == rollupID) + { + switch (message) + { + // if it is closed then destroy it + case IDCANCEL: + { + pWndRollup->DestroyWindow(); + m_bShowZoomLevelDlg=FALSE; + } + default: + { + TRACE2("Unhandled message %d from Rollup %d\n",message,rollupID); + break; + } + } + } + // messages from other rollups are being ignored!!! + return TRUE; +} + +void CMainFrame::OnUpdateViewZoomLevelDlg(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->SetCheck(m_bShowZoomLevelDlg); +} + +void CMainFrame::SaveWorkspace() +{ + + SaveSizeBarState(_T("SizeBarState")); + + // common procedure to save workspace + COXWorkspaceState workspaceState; + workspaceState.IncludeMainWindow(FALSE); + if (!workspaceState.StoreToRegistry()) + { + TRACE0("CMainFrame::OnClose : Failed to save workspace to registry, continuing\n"); + } + // If some of files are dirty then when we save workspace it asks + // whether we want to save dirty doc if we choose No then + // it does not unmark the document as dirty + // so let us do that + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + POSITION posTemplate=pApp->GetFirstDocTemplatePosition(); + while(posTemplate!=NULL) + { + CDocTemplate* pTemplate=pApp->GetNextDocTemplate(posTemplate); + POSITION pos=pTemplate->GetFirstDocPosition(); + while (pos != NULL) + { + CDocument* pDoc = pTemplate->GetNextDoc(pos); + pDoc->SetModifiedFlag(FALSE); + } + } + +} + +void CMainFrame::LoadWorkspace() +{ + LockWindowUpdate(); + + // Since we allow floating control bars MDI child windows, + // and these can only be created once + // we have a main window, we need to restore the bar size state here. + // (not on CMainFrame::OnCreate()) + LoadSizeBarState(_T("SizeBarState")); + + COXWorkspaceState workspaceState; + workspaceState.IncludeMainWindow(FALSE); + if (!workspaceState.LoadFromRegistry()) + { + TRACE(_T("CWorkspaceDemoApp::InitInstance : Failed to load workspace from registry, continuing\n")); + } + + m_wndToolBar.LoadBarState(_T("CoolToolBars"),_T("Bar1")); + + UnlockWindowUpdate(); +} + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + // this function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBar.GetItemRect(m_wndToolBar.CommandToIndex(pNMToolBar->iItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + if(pNMToolBar->iItem == ID_FILE_OPEN) + { + CMenu menu; + CMenu* pPopup; + + // the font popup is stored in a resource + menu.LoadMenu(IDR_MAINFRAME); + pPopup = menu.GetSubMenu(0); + pPopup->RemoveMenu(ID_FILE_NEW,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_SEPARATOR,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_FILE_IMPORT,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_SEPARATOR,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_FILE_PRINT_SETUP,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_APP_EXIT,MF_BYCOMMAND); + pPopup->RemoveMenu(pPopup->GetMenuItemCount()-1,MF_BYPOSITION); + pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, + rect.top + 1, AfxGetMainWnd()); + } + *pResult = TBDDRET_DEFAULT; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.h new file mode 100644 index 0000000..c747508 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/MainFrm.h @@ -0,0 +1,187 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__D2552D12_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_MAINFRM_H__D2552D12_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "TreeFilesDlg.h" +#include "DIBManagerDoc.h" + +#include "OXFrameWndDock.h" +#include "OXSizeToolBar.h" +#include "OXSizeDlgBar.h" +#include "OXSizeDockBar.h" +#include "OXBitmapMenuOrganizer.h" +#include "xstatus4.h" + +#include "OXCoolToolBar.h" +#include "OXCoolBar.h" + +#include "OXCaptionPainter.h" +#include "OXTabClientWnd.h" +#include "OXMenuBar.h" + +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: +// CButtonsPaneDlg m_ButtonsPaneBar; + // TreeFilesDlg - dialog with tree control to show all opened window + CTreeFilesDlg m_TreeFilesBar; + // special statusbar with progressbar + COXStatusBar m_wndStatusBar; + + // defines if roll-up ZoomLevel Dialog is active + BOOL m_bShowZoomLevelDlg; + +// Operations +public: + void LoadWorkspace(); + void SaveWorkspace(); + + BOOL IniProgress(WORD nToDo, WORD nStep=1); + void ShowProgress(); + void ResetProgress(); + void GetNumColors(); + + void CreateDocumentFromOpenedFile(CString sFileName, + CDIBManagerDoc::TypeFile tf=CDIBManagerDoc::TF_DIB); + void CreateDocumentFromOpenedFile(CFile* pFile, CString sFileName, + CDIBManagerDoc::TypeFile tf=CDIBManagerDoc::TF_JPEG); + BOOL CheckFileAlreadyOpened(CString sFileName, BOOL bNotify); +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + COXCaptionPainter m_Caption; + COXCoolToolBar m_wndToolBar; +// COXCoolToolBar m_wndToolBar1; +// COXCoolBar m_wndCoolBar; + // to show bitmaps in menu + COXBitmapMenuOrganizer Organizer; + // to trace the progress of some process + // tightly tied witn mainframe and statusbar window + class CShowProgress* m_pShowProgress; + + // MTI client window + COXTabClientWnd m_MTIClientWnd; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg BOOL OnQueryNewPalette(); + afx_msg void OnPaletteChanged(CWnd*); + afx_msg void OnWindowSynchronize(); + afx_msg void OnUpdateWindowSynchronize(CCmdUI* pCmdUI); + afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI); + afx_msg void OnUpdateZoom(CCmdUI* pCmdUI); + afx_msg void OnUpdateSize(CCmdUI* pCmdUI); + afx_msg void OnUpdateParameters(CCmdUI* pCmdUI); + afx_msg void OnFileImport(); + afx_msg void OnUpdateFileProtected(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewZoomLevelDlg(CCmdUI* pCmdUI); + afx_msg void OnHandleDummy(); + //}}AFX_MSG + afx_msg BOOL OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID); + afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + DECLARE_MESSAGE_MAP() +}; + +// Progress Class to iterates step of working of some cycle process +// and showing it in progress bar of COXStatusBar control +class CShowProgress +{ +public: + CShowProgress() {} + CShowProgress(CMainFrame* pMainFrame, WORD nProgressIndex) + { + m_pMainFrame=pMainFrame; + m_nProgressIndex=nProgressIndex; + } + ~CShowProgress() {} + +protected: + // the size of step + UINT m_nStep; + // iterator within 0 to m_nStep-1 + UINT m_nStepIterator; + // steps done + UINT m_nDone; + // steps to do + UINT m_nToDo; + + // index of progressbar pane in statusbar + UINT m_nProgressIndex; + // owner window + CMainFrame* m_pMainFrame; + +public: + void SetStep(UINT nStep) { m_nStep=nStep; } + void SetStepIterator(UINT nStepIterator) { m_nStepIterator=nStepIterator; } + void SetDone(UINT nDone) { m_nDone=nDone; } + void SetToDo(UINT nToDo) { m_nToDo=nToDo; } + void Initialize(UINT nToDo, UINT nStep=1) + { + SetStep(nStep); + SetToDo(nToDo/nStep); + SetStepIterator(0); + SetDone(0); + m_pMainFrame->m_wndStatusBar.ResetBar(m_nProgressIndex); + } + void Reset() + { + SetStep(0); + SetToDo(0); + SetStepIterator(0); + SetDone(0); + m_pMainFrame->m_wndStatusBar.ResetBar(m_nProgressIndex); + } + void Iterate() + { + m_nStepIterator++; + if(m_nStepIterator==m_nStep) + { + SetStepIterator(0); + m_nDone++; + DWORD wPercent=((DWORD)m_nDone*(DWORD)100)/(DWORD)m_nToDo; + if(wPercent>100) + { + wPercent=100; + } + m_pMainFrame->m_wndStatusBar. + SetBarProgress(m_nProgressIndex,TRUE,100,wPercent); + } + } +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__D2552D12_7143_11D1_A3D5_0080C83F712F__INCLUDED_) + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.cpp new file mode 100644 index 0000000..890f1f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.cpp @@ -0,0 +1,152 @@ +#include "stdafx.h" + +#include "OXDocMgr.h" +#include "OXWinApp.h" + +#include "MainFrm.h" + +#include "OXPrvDlg.h" + +IMPLEMENT_DYNAMIC(COXDocManager, CDocManager) + +// standard function +// emulate the same function for CDocManager +static void AppendFilterSuffix(CString& filter, OPENFILENAME& ofn, + CDocTemplate* pTemplate, CString* pstrDefaultExt) +{ + ASSERT_VALID(pTemplate); + ASSERT_KINDOF(CDocTemplate, pTemplate); + + CString strFilterExt, strFilterName; + if (pTemplate->GetDocString(strFilterExt, CDocTemplate::filterExt) && + !strFilterExt.IsEmpty() && + pTemplate->GetDocString(strFilterName, CDocTemplate::filterName) && + !strFilterName.IsEmpty()) + { + // a file based document template - add to filter list +#ifndef _MAC + ASSERT(strFilterExt[0] == '.'); +#endif + if (pstrDefaultExt != NULL) + { + // set the default extension +#ifndef _MAC + *pstrDefaultExt = ((LPCTSTR)strFilterExt) + 1; // skip the '.' +#else + *pstrDefaultExt = strFilterExt; +#endif + ofn.lpstrDefExt = (LPTSTR)(LPCTSTR)(*pstrDefaultExt); + ofn.nFilterIndex = ofn.nMaxCustFilter + 1; // 1 based number + } + + // add to filter + filter += strFilterName; + ASSERT(!filter.IsEmpty()); // must have a file type name + filter += (TCHAR)'\0'; // next string please +#ifndef _MAC + filter += (TCHAR)'*'; +#endif + filter += strFilterExt; + filter += (TCHAR)'\0'; // next string please + ofn.nMaxCustFilter++; + } +} + +COXDocManager::COXDocManager() +{ +} + +// use to provide multiselection and BitmapPreview +BOOL COXDocManager::DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate) +{ + ASSERT(AfxGetApp()->IsKindOf(RUNTIME_CLASS(COXWinApp))); + + // get the dialog from COXWinApp + CFileDialog* pDlgFile=((COXWinApp*) AfxGetApp())-> + NewFileDialog(bOpenFileDialog,lFlags); + + CString title; + VERIFY(title.LoadString(nIDSTitle)); + + CString strFilter; + CString strDefault; + if (pTemplate != NULL) + { + ASSERT_VALID(pTemplate); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, &strDefault); + } + else + { + // do for all doc template + POSITION pos = m_templateList.GetHeadPosition(); + BOOL bFirst = TRUE; + while (pos != NULL) + { + CDocTemplate* pTemplate = (CDocTemplate*)m_templateList.GetNext(pos); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, + bFirst ? &strDefault : NULL); + bFirst = FALSE; + } + } + + // append the "*.*" all files filter + CString allFilter; + VERIFY(allFilter.LoadString(AFX_IDS_ALLFILTER)); + strFilter += allFilter; + strFilter += (TCHAR)'\0'; // next string please +#ifndef _MAC + strFilter += _T("*.*"); +#else + strFilter += _T("****"); +#endif + strFilter += (TCHAR)'\0'; // last string + pDlgFile->m_ofn.nMaxCustFilter++; + + pDlgFile->m_ofn.lpstrFilter = strFilter; +#ifndef _MAC + pDlgFile->m_ofn.lpstrTitle = title; +#else + pDlgFile->m_ofn.lpstrPrompt = title; +#endif + if(bOpenFileDialog) + { + // set sound space to get multiselection + pDlgFile->m_ofn.nMaxFile=128*_MAX_PATH; + } + else + { + pDlgFile->m_ofn.Flags&=~OFN_ALLOWMULTISELECT; + pDlgFile->m_ofn.nMaxFile=_MAX_PATH; + } + pDlgFile->m_ofn.lpstrFile = fileName.GetBuffer(pDlgFile->m_ofn.nMaxFile); + + BOOL bResult = pDlgFile->DoModal() == IDOK ? TRUE : FALSE; + fileName.ReleaseBuffer(); + + if(bOpenFileDialog && bResult) + { + CMainFrame* pMainFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + + // go through all names of multiselected files + // and try to create document + POSITION pos=pDlgFile->GetStartPosition(); + while(pos!=NULL) + { + CString sFileName=pDlgFile->GetNextPathName(pos); + pMainFrame->CreateDocumentFromOpenedFile(sFileName); + } + } + + delete pDlgFile; + + if(bOpenFileDialog) + { + // we don't want to call standard OnOpenDocument + return FALSE; + } + else + { + return bResult; + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.h new file mode 100644 index 0000000..4ea50fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXDocMgr.h @@ -0,0 +1,11 @@ +class COXDocManager : public CDocManager +{ + DECLARE_DYNAMIC(COXDocManager) +public: + + COXDocManager(); + + // helper for standard commdlg dialogs + virtual BOOL DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate); +}; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.cpp new file mode 100644 index 0000000..d338a05 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.cpp @@ -0,0 +1,40 @@ +#include "stdafx.h" +#include "OXWinApp.h" +#include "OXDocMgr.h" +#include "OXPrvDlg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp + + +IMPLEMENT_DYNAMIC(COXWinApp, CWinApp) + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp construction + +COXWinApp::COXWinApp() +{ +} + +void COXWinApp::AddDocTemplate(CDocTemplate* pTemplate) +{ + if (m_pDocManager == NULL) + m_pDocManager = new COXDocManager; + m_pDocManager->AddDocTemplate(pTemplate); +} + +CFileDialog* COXWinApp::NewFileDialog(BOOL bOpenFileDialog, DWORD lFlags) +{ + UNREFERENCED_PARAMETER(lFlags); + // this function is called by COXDocManager + // to get a pointer to save and/or open dialog + // here we can instantiate dialog object of user-defined style + return new CFileDialog(bOpenFileDialog); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.h new file mode 100644 index 0000000..8c7a917 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/OXWinApp.h @@ -0,0 +1,36 @@ + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp: +// +// + +class COXWinApp : public CWinApp +{ +DECLARE_DYNAMIC(COXWinApp) +// Data Members +public: + +protected: + +private: + +// Member Functions +public: + COXWinApp(); + void AddDocTemplate(CDocTemplate* pTemplate); + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog, DWORD lFlags); + +protected: + +private: + + +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.cpp new file mode 100644 index 0000000..34f3838 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.cpp @@ -0,0 +1,361 @@ +#include "stdafx.h" +#include "ProtectedFile.h" + +#include "DibManager.h" +#include "MainFrm.h" + +#include "OXcmpfl.h" + +IMPLEMENT_SERIAL(CProtectedFile, CObject, 1) + +////////////////////////////////////////////////////// +////////////////////////////////////////////////////// + +BOOL CProtectedFile::Open(CFile* pFile) +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + // to make sure that we are going to work with correct protected file + // we have to check some additional info that we add to every protected file + pFile->SeekToBegin(); + CArchive ar(pFile, CArchive::load); + TRY + { + // if we threw an exception then + // header of file is of wrong format + Serialize(ar); + } + CATCH(CArchiveException,e) + { + pApp->ErrorNotify(_T("Unknown file format!")); + return FALSE; + } + END_CATCH + ar.Close(); + + // if header is correct then run decryption + if(RemoveProtection()) + { + pFile->SetLength(0); + m_file.SeekToBegin(); + CopyFile(pFile,&m_file); + return TRUE; + } + else + { + return FALSE; + } +} + +BOOL CProtectedFile::Save(CFile* pFile) +{ + // encrypt file + if(!SetProtection(pFile)) + return FALSE; + + // set header info to identify file as encrypted when open + pFile->SetLength(0); + CArchive ar(pFile, CArchive::store); + TRY + { + Serialize(ar); + } + CATCH(CArchiveException,e) + { + return FALSE; + } + END_CATCH + ar.Close(); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// serialization + +void CProtectedFile::Serialize(CArchive& ar) +{ + // Only CObject-derived objects and six data-type + // primitives are serializable. However, you + // can cast any data type to a serializable data type, + // and then you can serialize your data. The serializable + // data types are + + // BYTE: 8 bits unsigned + // WORD: 16 bits unsigned + // LONG: 32 bits unsigned + // DWORD: 32 bits unsigned + // float 32 bits + // double 64 bits, IEEE standard + + // we use some control sum to check whether + // opened file is encrypted or not + if (ar.IsStoring()) + { + // TODO: add storing code here + ar << m_dwSignature; + + WORD randNumber; + WORD m_headLength=(WORD)(rand()%10+5); + ar << m_headLength; + WORD m_headMultiplier=(WORD)(rand()%4+1); + ar << m_headMultiplier; + DWORD m_headSum=0; + for(WORD i=0;i> signature; + if(signature!=m_dwSignature) + { + AfxThrowArchiveException(CArchiveException::badIndex); + } + + WORD randNumber,m_headLength,m_headMultiplier; + DWORD headSum=0, m_headSum; + ar >> m_headLength; + ar >> m_headMultiplier; + for(WORD i=0;i> randNumber; + headSum+=randNumber*m_headMultiplier; + } + ar >> m_headSum; + if(m_headSum!=headSum) + { + AfxThrowArchiveException(CArchiveException::badIndex); + } + + m_file.SeekToBegin(); + if(!CopyArchiveToFile(ar,&m_file)) + { + AfxThrowArchiveException(CArchiveException::badIndex); + } + } +} + +/////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////// + +BOOL CProtectedFile::SetProtection(CFile* pFile) +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + pFile->SeekToBegin(); + + // we use either compression and encryption + // or just copression to protect file + // by means of delegatin rights to read and write operations +#ifdef _UT_DIBMANAGER_ENCRYPTION + COXCryptFile EncryptFile(40); + COXCompressedFile CompressFile; + EncryptFile.DelegateOpen(&m_file,CFile::modeReadWrite); + CompressFile.DelegateOpen(&EncryptFile,CFile::modeWrite); +#else + COXCompressedFile CompressFile; + CompressFile.DelegateOpen(&m_file,CFile::modeWrite); +#endif + + if(!CopyFile(&CompressFile,pFile,TRUE)) + { + pApp->ErrorNotify(_T("Cannot protect image!")); + return FALSE; + } + return TRUE; +} + +BOOL CProtectedFile::RemoveProtection() +{ + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + + ////////////// + // we can try to open file encrypted using + // different version of the program + // in that case we are not going to read file + ////////// + // To enable encryption and compression transformations, setup + // the encryptfile and compress file with delegation opens and Write state +#ifdef _UT_DIBMANAGER_ENCRYPTION + COXCompressedFile CompressFile; + COXCryptFile EncryptFile(40); + CompressFile.DelegateOpen(&EncryptFile, CFile::modeRead); + EncryptFile.DelegateOpen(&m_file, CFile::modeRead); +#else + COXCompressedFile CompressFile; + CompressFile.DelegateOpen(&m_file, CFile::modeRead); +#endif + + CMemFile tmpFile; + if(!CopyFile(&tmpFile,&CompressFile,TRUE)) + { + pApp->ErrorNotify(_T("Failed to read file!")); + return FALSE; + } + + m_file.SetLength(0); + tmpFile.SeekToBegin(); + CopyFile(&m_file,&tmpFile); + + return TRUE; +} + +BOOL CProtectedFile::CopyFile(CFile* pDestFile, CFile* pSourceFile, BOOL bShowProgress) +{ + // use buffers + const int nBufferLength = 2048; + BYTE pBuffer[nBufferLength + 1]; + int nLengthRead(0); + BOOL bSuccess = TRUE; + + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + if(bShowProgress) + { + // initialize progress object to show progress of protecting image + bShowProgress=pMainFrame-> + IniProgress((WORD)(pSourceFile->GetLength()/nBufferLength),10); + } + + TRY + { + do + { + nLengthRead = pSourceFile->Read(pBuffer, nBufferLength); + pDestFile->Write(pBuffer, nLengthRead); + + if(bShowProgress) + { + // after every copy operation call Progress object iterator + pMainFrame->ShowProgress(); + } + } + while (nLengthRead == nBufferLength); // So while not EOF + } + CATCH(CFileException, pxFile) + { + TRACE(_T("CDIBManagerDoc::CopyFile : Catching FileException (%XH)\n"), + pxFile->m_cause); + bSuccess = FALSE; + } + END_CATCH + + if(bShowProgress) + { + pMainFrame->ResetProgress(); + } + + return bSuccess; +} + +BOOL CProtectedFile::CopyFileToArchive(CArchive& ar, CFile* pSourceFile, BOOL bShowProgress) +{ + const int nBufferLength = 2048; + BYTE pBuffer[nBufferLength + 1]; + int nLengthRead(0); + BOOL bSuccess = TRUE; + + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + if(bShowProgress) + { + // initialize progress object to show progress of protecting image + bShowProgress=pMainFrame-> + IniProgress((WORD)(pSourceFile->GetLength()/nBufferLength),10); + } + + TRY + { + do + { + nLengthRead = pSourceFile->Read(pBuffer, nBufferLength); + ar.Write(pBuffer, nLengthRead); + + if(bShowProgress) + { + // after every copy operation call Progress object iterator + pMainFrame->ShowProgress(); + } + } + while (nLengthRead == nBufferLength); // So while not EOF + } + CATCH(CFileException,pxFile) + { + TRACE(_T("CDIBManagerDoc::CopyFileToArchive : Catching FileException (%XH)\n"), + pxFile->m_cause); + return FALSE; + } + END_CATCH + + if(bShowProgress) + { + pMainFrame->ResetProgress(); + } + + return bSuccess; +} + +BOOL CProtectedFile::CopyArchiveToFile(CArchive& ar, CFile* pDestFile, BOOL bShowProgress) +{ + const int nBufferLength = 2048; + BYTE pBuffer[nBufferLength + 1]; + int nLengthRead(0); + BOOL bSuccess = TRUE; + + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + if(bShowProgress) + { + // initialize progress object to show progress of protecting image + bShowProgress=pMainFrame-> + IniProgress((WORD)(ar.GetFile()->GetLength()/nBufferLength),10); + } + + TRY + { + do + { + nLengthRead = ar.Read(pBuffer, nBufferLength); + pDestFile->Write(pBuffer, nLengthRead); + + if(bShowProgress) + { + // after every copy operation call Progress object iterator + pMainFrame->ShowProgress(); + } + } + while (nLengthRead == nBufferLength); // So while not EOF + } + CATCH(CFileException,pxFile) + { + TRACE(_T("CDIBManagerDoc::CopyArchiveToFile : Catching FileException (%XH)\n"), + pxFile->m_cause); + return FALSE; + } + END_CATCH + + if(bShowProgress) + { + pMainFrame->ResetProgress(); + } + + return bSuccess; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.h new file mode 100644 index 0000000..66b32db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ProtectedFile.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// ProtectedFile.h +// +// CProtectedFile class definition +// + +// comment this definition if we are not going yo supply +// encryption classes +// if we are going to use encryption make sure you include +// crypfile.cpp and mdccrypt.cpp files into SourceFiles/UTSourse/ section + + +class CProtectedFile : public CObject +{ + DECLARE_SERIAL(CProtectedFile) + +public: + // mem file that we associate with + CMemFile m_file; +protected: + // signature that we use in header to check the correctness of opening file + DWORD m_dwSignature; + +public: + BOOL Open(CFile* pFile); + BOOL Save(CFile* pFile); + BOOL CopyFile(CFile* pDestFile, CFile* pSourceFile, BOOL bShowProgress=FALSE); + BOOL CopyFileToArchive(CArchive& ar, CFile* pSourceFile, BOOL bShowProgress=FALSE); + BOOL CopyArchiveToFile(CArchive& ar, CFile* pDestFile, BOOL bShowProgress=FALSE); + + void Serialize(CArchive& ar); + +protected: + BOOL SetProtection(CFile* pFile); + BOOL RemoveProtection(); + +public: + CProtectedFile() { m_dwSignature=0x00010001; } + ~CProtectedFile() {} +}; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ReadMe.txt new file mode 100644 index 0000000..38bf2bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ReadMe.txt @@ -0,0 +1,102 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : DIBManager +======================================================================== + + +AppWizard has created this DIBManager 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 DIBManager application. + +DIBManager.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CDIBManagerApp application class. + +DIBManager.cpp + This is the main application source file that contains the application + class CDIBManagerApp. + +DIBManager.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 + Developer Studio. + +res\DIBManager.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file DIBManager.rc. + +res\DIBManager.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +DIBManager.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +DIBManagerDoc.h, DIBManagerDoc.cpp - the document + These files contain your CDIBManagerDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CDIBManagerDoc::Serialize). + +DIBManagerView.h, DIBManagerView.cpp - the view of the document + These files contain your CDIBManagerView class. + CDIBManagerView objects are used to view CDIBManagerDoc objects. + +res\DIBManagerDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CDIBManagerDoc class. This icon is included by the main + resource file DIBManager.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named DIBManager.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.cpp new file mode 100644 index 0000000..e7a4847 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.cpp @@ -0,0 +1,284 @@ +// ResampleImageDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "dibmanager.h" +#include "ResampleImageDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CResampleImageDlg dialog + + +CResampleImageDlg::CResampleImageDlg(CWnd* pParent /*=NULL*/) + : CDialog(CResampleImageDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CResampleImageDlg) + m_bMaintainRatio = FALSE; + m_bMatchZoomLevel = FALSE; + m_sHeightOrig = _T(""); + m_sWidthOrig = _T(""); + m_nWidthPercents = 0; + m_nWidthPixels = 0; + m_nHeightPercents = 0; + m_nHeightPixels = 0; + m_bConvertTo = FALSE; + m_nConvertTo = -1; + //}}AFX_DATA_INIT + m_nCurrentZoomLevel=0; + m_bCanConvert=FALSE; + m_bCanResize=FALSE; + m_nOrigHeight=0; + m_nOrigWidth=0; +} + + +void CResampleImageDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CResampleImageDlg) + DDX_Control(pDX, IDC_CHECK_MATCH_ZOOM_LEVEL, m_ctlCheckMatchZoomLevel); + DDX_Control(pDX, IDC_CHECK_CONVERT_TO, m_ctlCheckConvertTo); + DDX_Control(pDX, IDC_WIDTH_PIXELS, m_ctlEditWidthPixels); + DDX_Control(pDX, IDC_WIDTH_PERCENTS, m_ctlEditWidthPercents); + DDX_Control(pDX, IDC_SPIN_WIDTH_PIXELS, m_ctlSpinWidthPixels); + DDX_Control(pDX, IDC_SPIN_WIDTH_PERCENTS, m_ctlSpinWidthPercents); + DDX_Control(pDX, IDC_SPIN_HEIGHT_PIXELS, m_ctlSpinHeightPixels); + DDX_Control(pDX, IDC_SPIN_HEIGHT_PERCENTS, m_ctlSpinHeightPercents); + DDX_Control(pDX, IDC_HEIGHT_PIXELS, m_ctlEditHeightPixels); + DDX_Control(pDX, IDC_HEIGHT_PERCENTS, m_ctlEditHeightPercents); + DDX_Control(pDX, IDC_COMBO_CONVERT_TO, m_ctlComboConvertTo); + DDX_Control(pDX, IDC_CHECK_MAINTAIN_RATIO, m_ctlCheckMaintainRatio); + DDX_Check(pDX, IDC_CHECK_MAINTAIN_RATIO, m_bMaintainRatio); + DDX_Check(pDX, IDC_CHECK_MATCH_ZOOM_LEVEL, m_bMatchZoomLevel); + DDX_Text(pDX, IDC_HEIGHT_ORIG, m_sHeightOrig); + DDX_Text(pDX, IDC_WIDTH_ORIG, m_sWidthOrig); + DDX_Text(pDX, IDC_WIDTH_PERCENTS, m_nWidthPercents); + DDX_Text(pDX, IDC_WIDTH_PIXELS, m_nWidthPixels); + DDX_Text(pDX, IDC_HEIGHT_PERCENTS, m_nHeightPercents); + DDX_Text(pDX, IDC_HEIGHT_PIXELS, m_nHeightPixels); + DDX_Check(pDX, IDC_CHECK_CONVERT_TO, m_bConvertTo); + DDX_CBIndex(pDX, IDC_COMBO_CONVERT_TO, m_nConvertTo); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CResampleImageDlg, CDialog) + //{{AFX_MSG_MAP(CResampleImageDlg) + ON_BN_CLICKED(IDC_CHECK_CONVERT_TO, OnCheckConvertTo) + ON_BN_CLICKED(IDC_CHECK_MAINTAIN_RATIO, OnCheckMaintainRatio) + ON_BN_CLICKED(IDC_CHECK_MATCH_ZOOM_LEVEL, OnCheckMatchZoomLevel) + ON_EN_CHANGE(IDC_HEIGHT_PERCENTS, OnChangeHeightPercents) + ON_EN_CHANGE(IDC_HEIGHT_PIXELS, OnChangeHeightPixels) + ON_EN_CHANGE(IDC_WIDTH_PERCENTS, OnChangeWidthPercents) + ON_EN_CHANGE(IDC_WIDTH_PIXELS, OnChangeWidthPixels) + ON_BN_CLICKED(ID_BUTTON_RESET, OnButtonReset) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CResampleImageDlg message handlers + +BOOL CResampleImageDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // Define array of possible types of convertion + m_ctlComboConvertTo.AddString(_T("256 color (8-bit)")); + m_nConvertTo=0; + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinWidthPixels.SetBuddy(&m_ctlEditWidthPixels); + m_ctlSpinWidthPixels.SetRange(0,32767); + m_ctlSpinWidthPixels.SetPos(m_nWidthPixels); + + // Set a default COXSpinCtrl method of delta value computation (Delta pixel = Delta value). + m_ctlSpinWidthPixels.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinHeightPixels.SetBuddy(&m_ctlEditHeightPixels); + m_ctlSpinHeightPixels.SetRange(0,32767); + m_ctlSpinHeightPixels.SetPos(m_nHeightPixels); + + // Set a default COXSpinCtrl method of delta value computation (Delta pixel = Delta value). + m_ctlSpinHeightPixels.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinWidthPercents.SetBuddy(&m_ctlEditWidthPercents); + m_ctlSpinWidthPercents.SetRange(0,32767); + m_ctlSpinWidthPercents.SetPos(m_nWidthPercents); + + // Set a default COXSpinCtrl method of delta value computation (Delta pixel = Delta value). + m_ctlSpinWidthPercents.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinHeightPercents.SetBuddy(&m_ctlEditHeightPercents); + m_ctlSpinHeightPercents.SetRange(0,32767); + m_ctlSpinHeightPercents.SetPos(m_nHeightPercents); + + // Set a default COXSpinCtrl method of delta value computation (Delta pixel = Delta value). + m_ctlSpinHeightPercents.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + + UpdateData(FALSE); + + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CResampleImageDlg::ShowControls(BOOL bHeightChanged) +{ + UpdateData(TRUE); + + if(!m_bCanConvert) + { + // enable convertion controls only if we can do convertion + m_bConvertTo=FALSE; + m_ctlCheckConvertTo.EnableWindow(FALSE); + } + m_nConvertTo=0; + m_ctlComboConvertTo.EnableWindow(m_bConvertTo); + + if(m_bMaintainRatio) + { + if(bHeightChanged) + { + // if we are going to maintain aspect ratio then + // recalculate width of image based on height + m_nWidthPercents=m_nHeightPercents; + m_nWidthPixels=((long)m_nOrigWidth* + (long)m_nHeightPixels)/((long)m_nOrigHeight); + } + else + { + // if we are going to maintain aspect ratio then + // recalculate height of image based on width + m_nHeightPercents=m_nWidthPercents; + m_nHeightPixels=((long)m_nOrigHeight* + (long)m_nWidthPixels)/((long)m_nOrigWidth); + } + } + + if(m_bMatchZoomLevel) + { + // set height and width corresponding to current zoom level + m_bMaintainRatio=TRUE; + m_nWidthPercents=m_nCurrentZoomLevel; + m_nHeightPercents=m_nCurrentZoomLevel; + m_nWidthPixels=((long)m_nOrigWidth*(long)m_nCurrentZoomLevel)/(100L); + m_nHeightPixels=((long)m_nOrigHeight*(long)m_nCurrentZoomLevel)/(100L); + } + // set controls enable on/off + m_ctlCheckMatchZoomLevel.EnableWindow(m_bCanResize); + m_ctlCheckMaintainRatio.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlEditWidthPixels.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlSpinWidthPixels.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlEditHeightPixels.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlSpinHeightPixels.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlEditWidthPercents.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlSpinWidthPercents.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlEditHeightPercents.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + m_ctlSpinHeightPercents.EnableWindow(!m_bMatchZoomLevel && m_bCanResize); + + UpdateData(FALSE); +} + +void CResampleImageDlg::OnCheckConvertTo() +{ + // TODO: Add your control notification handler code here + ShowControls(); +} + +void CResampleImageDlg::OnCheckMaintainRatio() +{ + // TODO: Add your control notification handler code here + ShowControls(); +} + +void CResampleImageDlg::OnCheckMatchZoomLevel() +{ + // TODO: Add your control notification handler code here + ShowControls(); +} + +void CResampleImageDlg::OnChangeHeightPercents() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + UpdateData(TRUE); + m_nHeightPixels=((long)m_nOrigHeight* + (long)m_nHeightPercents)/((long)100); + UpdateData(FALSE); + ShowControls(TRUE); +} + +void CResampleImageDlg::OnChangeHeightPixels() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + UpdateData(TRUE); + m_nHeightPercents=((long)100*(long)m_nHeightPixels)/ + ((long)m_nOrigHeight); + UpdateData(FALSE); + ShowControls(TRUE); +} + +void CResampleImageDlg::OnChangeWidthPercents() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + UpdateData(TRUE); + m_nWidthPixels=((long)m_nOrigWidth* + (long)m_nWidthPercents)/((long)100); + UpdateData(FALSE); + ShowControls(); +} + +void CResampleImageDlg::OnChangeWidthPixels() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + UpdateData(TRUE); + m_nWidthPercents=((long)100*(long)m_nWidthPixels)/ + ((long)m_nOrigWidth); + UpdateData(FALSE); + ShowControls(); +} + +void CResampleImageDlg::OnButtonReset() +{ + // TODO: Add your control notification handler code here + // set size of image to original + m_nWidthPercents=m_nCurrentZoomLevel; + m_nHeightPercents=m_nCurrentZoomLevel; + m_nWidthPixels=((long)m_nOrigWidth*(long)m_nCurrentZoomLevel)/(100L); + m_nHeightPixels=((long)m_nOrigHeight*(long)m_nCurrentZoomLevel)/(100L); + m_bMatchZoomLevel=FALSE; + UpdateData(FALSE); + ShowControls(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.h new file mode 100644 index 0000000..d7da402 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ResampleImageDlg.h @@ -0,0 +1,87 @@ +#if !defined(AFX_RESAMPLEIMAGEDLG_H__366C6742_8B7A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_RESAMPLEIMAGEDLG_H__366C6742_8B7A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ResampleImageDlg.h : header file +// + +#include "OXSpinCtrl.h" +#include "DIBManagerDoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CResampleImageDlg dialog + +class CResampleImageDlg : public CDialog +{ +// Construction +public: + CResampleImageDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CResampleImageDlg) + enum { IDD = IDD_DIALOG_RESAMPLE }; + CButton m_ctlCheckMatchZoomLevel; + CButton m_ctlCheckConvertTo; + CEdit m_ctlEditWidthPixels; + CEdit m_ctlEditWidthPercents; + COXSpinCtrl m_ctlSpinWidthPixels; + COXSpinCtrl m_ctlSpinWidthPercents; + COXSpinCtrl m_ctlSpinHeightPixels; + COXSpinCtrl m_ctlSpinHeightPercents; + CEdit m_ctlEditHeightPixels; + CEdit m_ctlEditHeightPercents; + CComboBox m_ctlComboConvertTo; + CButton m_ctlCheckMaintainRatio; + BOOL m_bMaintainRatio; + BOOL m_bMatchZoomLevel; + CString m_sHeightOrig; + CString m_sWidthOrig; + UINT m_nWidthPercents; + UINT m_nWidthPixels; + UINT m_nHeightPercents; + UINT m_nHeightPixels; + BOOL m_bConvertTo; + int m_nConvertTo; + //}}AFX_DATA + UINT m_nCurrentZoomLevel; + // we provide convertion only of 24-bit image to 8-bit + BOOL m_bCanConvert; + // we provide resizing only of 24-bit or 8-bit images + BOOL m_bCanResize; + // original height and width + // of the current image + UINT m_nOrigHeight; + UINT m_nOrigWidth; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResampleImageDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + void ShowControls(BOOL bHeightChanged=FALSE); + + // Generated message map functions + //{{AFX_MSG(CResampleImageDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnCheckConvertTo(); + afx_msg void OnCheckMaintainRatio(); + afx_msg void OnCheckMatchZoomLevel(); + afx_msg void OnChangeHeightPercents(); + afx_msg void OnChangeHeightPixels(); + afx_msg void OnChangeWidthPercents(); + afx_msg void OnChangeWidthPixels(); + afx_msg void OnButtonReset(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_RESAMPLEIMAGEDLG_H__366C6742_8B7A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/SSEXP.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/SSEXP.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/SSEXP.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.cpp new file mode 100644 index 0000000..5bc9e21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.cpp @@ -0,0 +1,148 @@ +// ScaleRollupDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "dibmanager.h" +#include "mainfrm.h" +#include "ScaleRollupDlg.h" + +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScaleRollupDlg dialog + + +CScaleRollupDlg::CScaleRollupDlg(CWnd* pParent /*=NULL*/) + : COXRollup(CScaleRollupDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CScaleRollupDlg) + m_nScaledHeight = 0; + m_nScaledWidth = 0; + m_nZoomLevel = 0; + //}}AFX_DATA_INIT + m_nOrigHeight=0; + m_nOrigWidth=0; +} + + +void CScaleRollupDlg::DoDataExchange(CDataExchange* pDX) +{ + COXRollup::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CScaleRollupDlg) + DDX_Control(pDX, IDC_ZOOM_LEVEL, m_ctlZoomLevel); + DDX_Control(pDX, IDC_SPIN_ZOOM_LEVEL, m_ctlSpinZoom); + DDX_Control(pDX, IDC_PICTURE, m_ctlPicture); + DDX_Text(pDX, IDC_SCALED_HEIGHT, m_nScaledHeight); + DDX_Text(pDX, IDC_SCALED_WIDTH, m_nScaledWidth); + DDX_Text(pDX, IDC_ZOOM_LEVEL, m_nZoomLevel); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CScaleRollupDlg, COXRollup) + //{{AFX_MSG_MAP(CScaleRollupDlg) + ON_BN_CLICKED(IDC_BUTTON_APPLY, OnButtonApply) + ON_EN_CHANGE(IDC_ZOOM_LEVEL, OnChangeZoomLevel) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScaleRollupDlg message handlers + +void CScaleRollupDlg::OnButtonApply() +{ + // TODO: Add your control notification handler code here + + if(m_nZoomLevelID_MAX_ZOOM_LEVEL) + m_nZoomLevel=ID_MAX_ZOOM_LEVEL; + + CRect rectPicture, rectNewPicture; + CPoint ptPictureCenter; + + m_nScaledWidth=((long)m_nOrigWidth*(long)m_nZoomLevel)/(100L); + m_nScaledHeight=((long)m_nOrigHeight*(long)m_nZoomLevel)/(100L); + + m_ctlPicture.GetWindowRect(&rectPicture); + ScreenToClient(&rectPicture); + + ptPictureCenter.x=rectPicture.left+rectPicture.Width()/2; + ptPictureCenter.y=rectPicture.top+rectPicture.Height()/2; + + // we chose this formula because it let the picture control + // to go from 10% to 1000% + int nPictureWidth=(3*(int)sqrt((float)m_nZoomLevel)-(int)sqrt((float)m_nZoomLevel)/2)*2; + + rectNewPicture.left=ptPictureCenter.x-nPictureWidth/2; + rectNewPicture.top=ptPictureCenter.y-nPictureWidth/2; + rectNewPicture.right=rectNewPicture.left+nPictureWidth; + rectNewPicture.bottom=rectNewPicture.top+nPictureWidth; + + if(rectNewPicture.left-rectPicture.left!=0) + { + m_ctlPicture.MoveWindow(rectNewPicture.left, rectNewPicture.top, + rectNewPicture.Width(), rectNewPicture.Height()); + } + + UpdateData(FALSE); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.h new file mode 100644 index 0000000..989f9ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ScaleRollupDlg.h @@ -0,0 +1,63 @@ +#if !defined(AFX_SCALEROLLUPDLG_H__FA4A5D82_7AB2_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_SCALEROLLUPDLG_H__FA4A5D82_7AB2_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ScaleRollupDlg.h : header file +// + +#include "oxrollup.h" +#include "OXSpinCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CScaleRollupDlg dialog + +class CScaleRollupDlg : public COXRollup +{ +// Construction +public: + CScaleRollupDlg(CWnd* pParent = NULL); // standard constructor + // overridden from base class + LPCTSTR GetTitleBarBitmap() { return _T("TITLEBAR_BMP"); } + + void ShowControls(); + +// Dialog Data + //{{AFX_DATA(CScaleRollupDlg) + enum { IDD = IDD_DIALOG_ROLLUP }; + CEdit m_ctlZoomLevel; + COXSpinCtrl m_ctlSpinZoom; + CStatic m_ctlPicture; + UINT m_nScaledHeight; + UINT m_nScaledWidth; + int m_nZoomLevel; + //}}AFX_DATA + // original height and width + // of the current image + UINT m_nOrigHeight; + UINT m_nOrigWidth; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScaleRollupDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CScaleRollupDlg) + afx_msg void OnButtonApply(); + afx_msg void OnChangeZoomLevel(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SCALEROLLUPDLG_H__FA4A5D82_7AB2_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ShowProgress.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ShowProgress.h new file mode 100644 index 0000000..85ee894 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/ShowProgress.h @@ -0,0 +1,57 @@ +#include "MainFrm.h" + +//class CMainFrame; + +class CShowProgress +{ +public: + CShowProgress(CMainFrame* pMainFrame, WORD nProgressIndex) + { + m_pMainFrame=pMainFrame; + m_nProgressIndex=nProgressIndex; + } + ~CShowProgress() {} + +protected: + WORD m_nStep; + WORD m_nStepIterator; + WORD m_nDone; + WORD m_nToDo; + + WORD m_nProgressIndex; + CMainFrame* m_pMainFrame; + +public: + void SetStep(WORD nStep) { m_nStep=nStep; } + void SetStepIterator(WORD nStepIterator) { m_nStepIterator=nStepIterator; } + void SetDone(WORD nDone) { m_nDone=nDone; } + void SetToDo(WORD nToDo) { m_nToDo=nToDo; } + void Initialize(WORD nStep, WORD nToDo) + { + SetStep(nStep); + SetToDo(nToDo); + SetStepIterator(0); + SetDone(0); + m_pMainFrame->m_wndStatusBar.ResetBar(m_nProgressIndex); + } + void Reset() + { + SetStep(0); + SetToDo(0); + SetStepIterator(0); + SetDone(0); + m_pMainFrame->m_wndStatusBar.ResetBar(m_nProgressIndex); + } + void Iterate() + { + m_nStepIterator++; + if(m_nStepIterator==m_nStep) + { + SetStepIterator(0); + m_nDone++; + DWORD wPercent=((DWORD)m_nDone*(DWORD)100)/(DWORD)m_nToDo; + m_pMainFrame->m_wndStatusBar. + SetBarProgress(m_nProgressIndex,TRUE,100,wPercent); + } + } +}; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.cpp new file mode 100644 index 0000000..9147a25 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// DIBManager.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.h new file mode 100644 index 0000000..2c356e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/StdAfx.h @@ -0,0 +1,52 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__D2552D10_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__D2552D10_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE extensions + +// some extended styles that come in handy occasionally. +#ifndef WS_EX_CONTEXTHELP +#define WS_EX_CONTEXTHELP 0x0400L +#endif + +#ifndef WS_EX_CLIENTEDGE +#define WS_EX_CLIENTEDGE 0x0200L +#endif + +#include // MFC extensions for help constants + +#ifdef WIN32 + #include // MFC extensions for Templates +#endif + +#ifndef _AFX_NO_AFXCMN_SUPPORT + #include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#define OX_PREVIEW_GRAPHICS +#define OX_PREVIEW_BMP + +// If TEXT macro not defined in WIN16, define now +#if !defined(WIN32) && !defined(TEXT) +#define TEXT(s) s +#define _T(s) s +#endif + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__D2552D10_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.cpp new file mode 100644 index 0000000..bcc7627 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.cpp @@ -0,0 +1,263 @@ +// TreeFilesDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "DIBManager.h" +#include "TreeFilesDlg.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "DIBManagerDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTreeFilesDlg dialog + + +CTreeFilesDlg::CTreeFilesDlg(CWnd* pParent /*=NULL*/) + : COXSizeDialogBar() +{ + UNREFERENCED_PARAMETER(pParent); + //{{AFX_DATA_INIT(CTreeFilesDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // use imagelist to show TreeFilesDlg + m_ilTypeFile.Create(IDB_IMAGELIST, 16, 0, RGB(255,0,255)); +} + + +void CTreeFilesDlg::DoDataExchange(CDataExchange* pDX) +{ + COXSizeDialogBar::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTreeFilesDlg) + DDX_Control(pDX, IDC_TREE_FILES, m_TreeFiles); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTreeFilesDlg, COXSizeDialogBar) + //{{AFX_MSG_MAP(CTreeFilesDlg) + ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_FILES, OnSelchangedTreeFiles) + ON_NOTIFY(NM_CLICK, IDC_TREE_FILES, OnClickTreeFiles) + ON_WM_RBUTTONUP() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTreeFilesDlg message handlers + +BOOL CTreeFilesDlg::Create(CWnd* pParentWnd, UINT nIDTemplate, + UINT nStyle, UINT nID) +{ + if (!COXSizeDialogBar::Create(pParentWnd, MAKEINTRESOURCE(nIDTemplate), + nStyle, nID)) + return FALSE; + + UpdateData(FALSE); + + BOOL bSuccess=IniTreeFiles(); + if(!bSuccess) + { + AfxMessageBox(_T("Cannot create Tree Files Bar!")); + } + return bSuccess; +} + +BOOL CTreeFilesDlg::IniTreeFiles() +{ + // initialize info in TreeFilesDlg + m_TreeFiles.SetImageList(&m_ilTypeFile,TVSIL_NORMAL); + + TV_ITEM item; + TV_INSERTSTRUCT InsertStruct; + + // root - Bitmaps + item.mask=TVIF_CHILDREN|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_STATE|TVIF_TEXT; + item.cChildren=1; + item.state=TVIS_BOLD|TVIS_EXPANDED; + item.stateMask=TVIS_BOLD|TVIS_EXPANDED; + item.pszText=_T("Opened Files"); + item.iImage=0; + item.iSelectedImage=0; + item.lParam=(DWORD)CDIBManagerDoc::TF_DIB; + + InsertStruct.hParent=NULL; + InsertStruct.hInsertAfter=TVI_LAST; + InsertStruct.item=item; + + if(m_TreeFiles.InsertItem(&InsertStruct)==NULL) + { + return FALSE; + } + + return TRUE; +} + +void CTreeFilesDlg::AddNewWindowToTree(CWnd* pWnd) +{ + ASSERT_VALID(pWnd); + if(!pWnd->IsKindOf(RUNTIME_CLASS(CChildFrame))) + return; + + if(FindWindowInTree(pWnd)!=NULL) + return; + + CString sWindowText; + pWnd->GetWindowText(sWindowText); + + TV_ITEM item; + item.mask=TVIF_CHILDREN|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT; + item.cChildren=0; + item.pszText=(LPTSTR)(LPCTSTR)sWindowText; + item.iImage=1; + item.iSelectedImage=1; + item.lParam=(DWORD)pWnd; + + TV_INSERTSTRUCT InsertStruct; + InsertStruct.hParent=m_TreeFiles.GetRootItem(); + InsertStruct.hInsertAfter=TVI_SORT; + InsertStruct.item=item; + m_TreeFiles.InsertItem(&InsertStruct); + + m_TreeFiles.RedrawWindow(NULL,NULL,RDW_INVALIDATE | RDW_ERASE); +} + +void CTreeFilesDlg::RemoveWindowFromTree(CWnd* pWnd) +{ + if(!pWnd->IsKindOf(RUNTIME_CLASS(CChildFrame))) + return; + + HTREEITEM deleteItem=FindWindowInTree(pWnd); + if(deleteItem!=NULL) + m_TreeFiles.DeleteItem(deleteItem); + +} + +void CTreeFilesDlg::SetTextForWindowInTree(CWnd* pWnd, const CString& string) +{ + // rename the name of opened document + if(!pWnd->IsKindOf(RUNTIME_CLASS(CChildFrame))) + return; + + HTREEITEM setItem=FindWindowInTree(pWnd); + if(setItem!=NULL) + { + m_TreeFiles.SetItemText(setItem,string); + m_TreeFiles.SortChildren(m_TreeFiles.GetRootItem()); + m_TreeFiles.RedrawWindow(NULL,NULL,RDW_INVALIDATE | RDW_ERASE); + } + +} + +void CTreeFilesDlg::SetActiveWindowInTree(CWnd* pWnd) +{ + if(!pWnd->IsKindOf(RUNTIME_CLASS(CChildFrame))) + return; + + HTREEITEM setItem=FindWindowInTree(pWnd); + if(setItem!=NULL) + { + HTREEITEM selectedItem=m_TreeFiles.GetSelectedItem(); + if(setItem!=selectedItem) + { + if(selectedItem!=NULL) + { + m_TreeFiles.SetItemState(selectedItem,TVIS_SELECTED,TVIS_SELECTED); + } + m_TreeFiles.EnsureVisible(setItem); + m_TreeFiles.Select(setItem,TVGN_CARET); + } + } + +} + +HTREEITEM CTreeFilesDlg::FindWindowInTree(CWnd* pWnd) +{ + // find window with given pWnd + HTREEITEM result=NULL; + + if(!pWnd->IsKindOf(RUNTIME_CLASS(CChildFrame))) + return result; + + HTREEITEM childItem=m_TreeFiles.GetRootItem(); + while(childItem!=NULL) + { + DWORD itemData=m_TreeFiles.GetItemData(childItem); + if(itemData==(DWORD)pWnd) + { + result=childItem; + break; + } + childItem=m_TreeFiles.GetNextItem(childItem,TVGN_NEXTVISIBLE); + } + + return result; +} + + +void CTreeFilesDlg::OnSelchangedTreeFiles(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + + // if we poke some element in TreeFilesDlg then + // activate corresponding window + ActivateWindowInTree((DWORD)pNMTreeView->itemNew.lParam); + + *pResult = 0; +} + + +void CTreeFilesDlg::ActivateWindowInTree(DWORD itemData) +{ + if(itemData!=m_TreeFiles.GetItemData(m_TreeFiles.GetRootItem())) + { + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + CMainFrame* pMainFrame=(CMainFrame*)pApp->m_pMainWnd; + + pMainFrame->LockWindowUpdate(); + pMainFrame->MDIActivate((CWnd*)itemData); + m_TreeFiles.SetActiveWindow(); + m_TreeFiles.SetFocus(); + pMainFrame->UnlockWindowUpdate(); + } +} + + +void CTreeFilesDlg::OnClickTreeFiles(NMHDR* pNMHDR, LRESULT* pResult) +{ + // TODO: Add your control notification handler code here + UNREFERENCED_PARAMETER(pNMHDR); + + // if we poke some element in TreeFilesDlg then + // activate corresponding window + HTREEITEM selectedItem=m_TreeFiles.GetSelectedItem(); + if(selectedItem!=NULL) + { + ActivateWindowInTree(m_TreeFiles.GetItemData(selectedItem)); + } + + *pResult = 0; +} + +void CTreeFilesDlg::OnRButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + COXSizeDialogBar::OnRButtonUp(nFlags, point); +} + +BOOL CTreeFilesDlg::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL,NULL); + ASSERT(cs.lpszClass); + + return COXSizeDialogBar::PreCreateWindow(cs); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.h new file mode 100644 index 0000000..bc3f1ef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/TreeFilesDlg.h @@ -0,0 +1,64 @@ +#if !defined(AFX_TREEFILESDLG_H__D2552D20_7143_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_TREEFILESDLG_H__D2552D20_7143_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// TreeFilesDlg.h : header file +// + +#include "OXSizeDlgBar.h" +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTreeFilesDlg dialog + +class CTreeFilesDlg : public COXSizeDialogBar +{ +// Construction +public: + CTreeFilesDlg(CWnd* pParent = NULL); // standard constructor + + void AddNewWindowToTree(CWnd* pWnd); + void RemoveWindowFromTree(CWnd* pWnd); + void SetTextForWindowInTree(CWnd* pWnd, const CString& string); + void SetActiveWindowInTree(CWnd* pWnd); + +// Dialog Data + //{{AFX_DATA(CTreeFilesDlg) + enum { IDD = IDD_DIALOG_TREE_FILES }; + CTreeCtrl m_TreeFiles; + //}}AFX_DATA + // list of images to use in tree control + CImageList m_ilTypeFile; + + BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTreeFilesDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + + BOOL IniTreeFiles(); + HTREEITEM FindWindowInTree(CWnd* pWnd); + void ActivateWindowInTree(DWORD itemData); + + // Generated message map functions + //{{AFX_MSG(CTreeFilesDlg) + afx_msg void OnSelchangedTreeFiles(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnClickTreeFiles(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TREEFILESDLG_H__D2552D20_7143_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.cpp new file mode 100644 index 0000000..0131b7e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.cpp @@ -0,0 +1,54 @@ +// WorkspaceDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "dibmanager.h" +#include "WorkspaceDlg.h" +#include "Mainfrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + + +CWorkspaceDlg::CWorkspaceDlg(CWnd* pParent /*=NULL*/) + : CDialog(CWorkspaceDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CWorkspaceDlg) + m_bLoadOnEnter = FALSE; + m_bSaveOnExit = FALSE; + //}}AFX_DATA_INIT +} + + +void CWorkspaceDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceDlg) + DDX_Check(pDX, IDC_CHECK_LOAD_ON_ENTER, m_bLoadOnEnter); + DDX_Check(pDX, IDC_CHECK_SAVE_ON_EXIT, m_bSaveOnExit); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CWorkspaceDlg, CDialog) + //{{AFX_MSG_MAP(CWorkspaceDlg) + ON_BN_CLICKED(IDC_SAVE_WORKSPACE, OnSaveWorkspace) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg message handlers + +void CWorkspaceDlg::OnSaveWorkspace() +{ + // TODO: Add your control notification handler code here + + CDIBManagerApp* pApp=(CDIBManagerApp*)AfxGetApp(); + ((CMainFrame*)pApp->m_pMainWnd)->SaveWorkspace(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.h new file mode 100644 index 0000000..867fac4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/WorkspaceDlg.h @@ -0,0 +1,47 @@ +#if !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// WorkspaceDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + +class CWorkspaceDlg : public CDialog +{ +// Construction +public: + CWorkspaceDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CWorkspaceDlg) + enum { IDD = IDD_DIALOG_WORKSPACE }; + BOOL m_bLoadOnEnter; + BOOL m_bSaveOnExit; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CWorkspaceDlg) + afx_msg void OnSaveWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/BMPdemo.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/BMPdemo.BMP new file mode 100644 index 0000000..169bb5d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/BMPdemo.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.ico new file mode 100644 index 0000000..2075ea2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.rc2 new file mode 100644 index 0000000..7be5810 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManager.rc2 @@ -0,0 +1,13 @@ +// +// DIBMANAGER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManagerDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManagerDoc.ico new file mode 100644 index 0000000..9d11332 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/DIBManagerDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Dog.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Dog.bmp new file mode 100644 index 0000000..bfc2231 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Dog.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Logo.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Logo.BMP new file mode 100644 index 0000000..9370c08 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/Logo.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/ToolbarHot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/ToolbarHot.bmp new file mode 100644 index 0000000..53f6b52 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/ToolbarHot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/check.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/check.bmp new file mode 100644 index 0000000..96094b6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/check.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummy.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummy.bmp new file mode 100644 index 0000000..bb00e3a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummy.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummyhot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummyhot.bmp new file mode 100644 index 0000000..223c621 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/dummyhot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/icsreportlogo.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/icsreportlogo.bmp new file mode 100644 index 0000000..d3e37f9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/icsreportlogo.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/imagelis.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/imagelis.bmp new file mode 100644 index 0000000..2ba4594 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/imagelis.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/logo_dum.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/logo_dum.bmp new file mode 100644 index 0000000..cc47ba5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/logo_dum.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram.bmp new file mode 100644 index 0000000..63bdd7b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram_copy.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram_copy.bmp new file mode 100644 index 0000000..63bdd7b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/mainfram_copy.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/toolbar.bmp new file mode 100644 index 0000000..dd33fea Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/resource.h new file mode 100644 index 0000000..ff6ff8b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/DIBManager/resource.h @@ -0,0 +1,122 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by DIBManager.rc +// +#define IDC_SAVE_WORKSPACE 3 +#define ID_MIN_ZOOM_LEVEL 10 +#define IDR_MAINFRAME 128 +#define IDR_DIBMANTYPE 129 +#define IDR_DUMMY 129 +#define IDD_DIALOG_TREE_FILES 130 +#define ID_INDICATOR_SIZE 130 +#define IDR_DUMMY_HOT 130 +#define IDB_IMAGELIST 131 +#define ID_INDICATOR_ZOOM 131 +#define IDB_CHECK 132 +#define ID_INDICATOR_PARAMETERS 132 +#define ID_INDICATOR_PROGRESS 133 +#define IDR_MAINFRAME_COPY 133 +#define ID_DESCRIPTION_FILE 134 +#define IDR_MAINFRAME_HOT 135 +#define IDB_LOGO 140 +#define IDB_LOGO_DUMMY 141 +#define IDD_DIALOG_EXPORT 142 +#define IDD_DIALOG_IMPORT 143 +#define IDD_DIALOG_WORKSPACE 144 +#define IDD_DIALOG_ROLLUP 159 +#define IDD_IMAGE_INFO_DIALOG 164 +#define IDD_DIALOG_RESAMPLE 165 +#define IDB_LOGO_TEST 172 +#define SIZE_ERROR_BUF 255 +#define ID_MAX_ZOOM_LEVEL 800 +#define IDC_TREE_FILES 1000 +#define IDC_FILENAME 1001 +#define IDC_QUALITY 1002 +#define IDC_SPIN_QUALITY 1003 +#define IDC_CHECK_SMOOTH 1004 +#define IDC_SMOOTH 1005 +#define IDC_SPIN_SMOOTH 1006 +#define IDC_CHECK_GRAYSCALE 1007 +#define IDC_CHECK_OPTIMIZE 1008 +#define IDC_CHECK_PROGRESSIVE 1009 +#define IDC_CHECK_BASELINE 1010 +#define IDC_RADIO_DCT_INT 1011 +#define IDC_RADIO_DCT_FAST 1012 +#define IDC_RADIO_DCT_FLOAT 1013 +#define IDC_CHECK_COLORS 1015 +#define IDC_COLORS 1016 +#define IDC_SPIN_COLORS 1017 +#define IDC_RADIO_ONE_TO_ONE 1018 +#define IDC_RADIO_ONE_TO_TWO 1019 +#define IDC_RADIO_ONE_TO_FOUR 1020 +#define IDC_RADIO_ONE_TO_EIGHT 1021 +#define IDC_CHECK_ONE_PASS 1022 +#define IDC_CHECK_NO_SMOOTH 1023 +#define IDC_RADIO_DM_FLOYD_STEIN 1024 +#define IDC_CHECK_SAVE_ON_EXIT 1024 +#define IDC_RADIO_DM_ORDERED 1025 +#define IDC_CHECK_LOAD_ON_ENTER 1025 +#define IDC_RADIO_DM_NONE 1026 +#define IDC_ZOOM_LEVEL 1026 +#define IDC_SPIN_ZOOM_LEVEL 1028 +#define IDC_BUTTON_APPLY 1029 +#define IDC_PICTURE 1030 +#define IDC_SPIN_WIDTH_PIXELS 1030 +#define IDC_SCALED_WIDTH 1031 +#define IDC_SPIN_HEIGHT_PIXELS 1031 +#define IDC_SCALED_HEIGHT 1032 +#define IDC_SPIN_WIDTH_PERCENTS 1032 +#define IDC_SPIN_HEIGHT_PERCENTS 1033 +#define IDC_FILE_NAME 1035 +#define IDC_WIDTH 1036 +#define IDC_HEIGHT 1037 +#define IDC_WIDTH_PIXELS 1037 +#define IDC_SIZE_IN_MEMORY 1038 +#define IDC_HEIGHT_PIXELS 1038 +#define IDC_FILE_SIZE 1039 +#define IDC_WIDTH_PERCENTS 1039 +#define IDC_FORMAT 1040 +#define IDC_HEIGHT_PERCENTS 1040 +#define IDC_TYPE 1041 +#define IDC_WIDTH_ORIG 1041 +#define IDC_FILE_STATUS 1042 +#define IDC_HEIGHT_ORIG 1042 +#define IDC_CHECK_MAINTAIN_RATIO 1043 +#define IDC_CHECK_MATCH_ZOOM_LEVEL 1044 +#define IDC_COMBO_CONVERT_TO 1045 +#define IDC_CHECK_CONVERT_TO 1046 +#define ID_BUTTON_RESET 1047 +#define IDC_BUTTON_DUMMY 1048 +#define ID_TIME_SHOWING_LOGO 5500 +#define MAX_INT 32767 +#define ID_WINDOW_SYNCHRONIZE 32772 +#define ID_VIEW_ZOOM_IN 32776 +#define ID_VIEW_ZOOM_OUT 32777 +#define ID_VIEW_ZOOM_TO_WINDOW 32778 +#define ID_VIEW_ZOOM_TO_100 32779 +#define ID_TREEFILESBAR 32781 +#define ID_FILE_EXPORT 32786 +#define ID_FILE_IMPORT 32787 +#define ID_FILE_SET_PROTECTION 32788 +#define ID_FILE_REMOVE_PROTECTION 32789 +#define ID_FILE_PROTECTED 32796 +#define ID_VIEW_WORKSPACE 32798 +#define ID_VIEW_SCALE_DLG 32803 +#define ID_VIEW_ZOOM_LEVEL_DLG 32804 +#define ID_VIEW_TREE_BAR 32805 +#define ID_VIEW_IMAGE_INFO 32808 +#define ID_VIEW_RESAMPLE_IMAGE 32809 +#define ID_VIEW_ZOOM 32810 +#define ID_VIEW_ZOOM_TOOLBAR 0xe883 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 173 +#define _APS_NEXT_COMMAND_VALUE 32820 +#define _APS_NEXT_CONTROL_VALUE 1055 +#define _APS_NEXT_SYMED_VALUE 112 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.clw new file mode 100644 index 0000000..84ae33c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.clw @@ -0,0 +1,121 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CFileExplorerView +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "fileexplorer.h" +LastPage=0 + +ClassCount=7 +Class1=CFileExplorerApp +Class2=CAboutDlg +Class3=CFileExplorerDoc +Class4=CFileExplorerView +Class5=CLeftView +Class6=CMainFrame +Class7=COXShellObjectList + +ResourceCount=2 +Resource1=IDR_VIEWTYPE +Resource2=IDR_MAINFRAME + +[CLS:CFileExplorerApp] +Type=0 +BaseClass=CWinApp +HeaderFile=FileExplorer.h +ImplementationFile=FileExplorer.cpp +Filter=N +VirtualFilter=AC +LastObject=CFileExplorerApp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=FileExplorer.cpp +ImplementationFile=FileExplorer.cpp +LastObject=CAboutDlg + +[CLS:CFileExplorerDoc] +Type=0 +BaseClass=CDocument +HeaderFile=FileExplorerDoc.h +ImplementationFile=FileExplorerDoc.cpp + +[CLS:CFileExplorerView] +Type=0 +BaseClass=CView +HeaderFile=FileExplorerView.h +ImplementationFile=FileExplorerView.cpp +Filter=C +VirtualFilter=VWC +LastObject=CFileExplorerView + +[CLS:CLeftView] +Type=0 +BaseClass=CView +HeaderFile=LeftView.h +ImplementationFile=LeftView.cpp +Filter=C +VirtualFilter=VWC +LastObject=CLeftView + +[CLS:CMainFrame] +Type=0 +BaseClass=CFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:COXShellObjectList] +Type=0 +BaseClass=CListCtrl +HeaderFile=OXShellObjectList.h +ImplementationFile=OXShellObjectList.cpp + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_VIEW_LARGEICON +Command2=ID_VIEW_SMALLICON +Command3=ID_VIEW_LIST +Command4=ID_VIEW_DETAILS +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_APP_EXIT +Command2=ID_VIEW_TOOLBAR +Command3=ID_VIEW_STATUS_BAR +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_VIEWTYPE] +Type=1 +Class=? +Command1=ID_VIEW_LARGEICON +Command2=ID_VIEW_SMALLICON +Command3=ID_VIEW_LIST +Command4=ID_VIEW_DETAILS +CommandCount=4 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.cpp new file mode 100644 index 0000000..2fd4804 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.cpp @@ -0,0 +1,131 @@ +// FileExplorer.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "FileExplorer.h" + +#include "MainFrm.h" +#include "FileExplorerDoc.h" +#include "LeftView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerApp + +BEGIN_MESSAGE_MAP(CFileExplorerApp, CWinApp) + //{{AFX_MSG_MAP(CFileExplorerApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerApp construction + +CFileExplorerApp::CFileExplorerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CFileExplorerApp object + +CFileExplorerApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerApp initialization + +BOOL CFileExplorerApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CFileExplorerDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CLeftView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + + +// App command to run the dialog +void CFileExplorerApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerApp message handlers + + +int CFileExplorerApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsp new file mode 100644 index 0000000..acfd7ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsp @@ -0,0 +1,441 @@ +# Microsoft Developer Studio Project File - Name="FileExplorer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FileExplorer - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FileExplorer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FileExplorer.mak" CFG="FileExplorer - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FileExplorer - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FileExplorer - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileExplorer - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "FileExplorer - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileExplorer - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FileExplorer - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileExplorer.exe" + +!ELSEIF "$(CFG)" == "FileExplorer - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileExplorer.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FileExplorer - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileExplorer___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "FileExplorer___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileExplorer.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileExplorer.exe" + +!ELSEIF "$(CFG)" == "FileExplorer - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FileExplorer___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "FileExplorer___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileExplorer.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FileExplorer.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FileExplorer - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileExplorer___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "FileExplorer___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSHELLTREE_WATCHFORDIR" /D "OXSHELLLIST_WATCHFORDIR" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileExplorer.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FileExplorer.exe" + +!ENDIF + +# Begin Target + +# Name "FileExplorer - Win32 Release" +# Name "FileExplorer - Win32 Debug" +# Name "FileExplorer - Win32 Release_Shared" +# Name "FileExplorer - Win32 Unicode_Debug" +# Name "FileExplorer - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFileWatcher.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFileWatchNotifier.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellFolderTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellNamespaceNavigator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellObjectList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWatchedDir.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FileExplorer.cpp +# End Source File +# Begin Source File + +SOURCE=.\FileExplorer.rc +# End Source File +# Begin Source File + +SOURCE=.\FileExplorerDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\FileExplorerView.cpp +# End Source File +# Begin Source File + +SOURCE=.\LeftView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\FileExplorer.h +# End Source File +# Begin Source File + +SOURCE=.\FileExplorerDoc.h +# End Source File +# Begin Source File + +SOURCE=.\FileExplorerView.h +# End Source File +# Begin Source File + +SOURCE=.\LeftView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShellFolderTree.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShellNamespaceNavigator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShellObjectList.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bm_file.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\FileExplorer.ico +# End Source File +# Begin Source File + +SOURCE=.\res\FileExplorer.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\FileExplorerDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\tb_file_disabled.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\tb_file_hot.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsw new file mode 100644 index 0000000..9133646 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FileExplorer"=".\FileExplorer.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.h new file mode 100644 index 0000000..79b4cd9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.h @@ -0,0 +1,50 @@ +// FileExplorer.h : main header file for the FILEEXPLORER application +// + +#if !defined(AFX_FILEEXPLORER_H__10814F89_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_FILEEXPLORER_H__10814F89_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerApp: +// See FileExplorer.cpp for the implementation of this class +// + +class CFileExplorerApp : public CWinApp +{ +public: + CFileExplorerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileExplorerApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CFileExplorerApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FILEEXPLORER_H__10814F89_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.rc new file mode 100644 index 0000000..f23959f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.rc @@ -0,0 +1,380 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\FileExplorer.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc"" \r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXFileWatcher.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "#include ""OXShellFolderTree.rc""\r\n" + "#include ""OXShellObjectList.rc""\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 DISCARDABLE "res\\FileExplorer.ico" +IDR_FILEEXTYPE ICON DISCARDABLE "res\\FileExplorerDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDB_TB_FILE_DISABLED BITMAP DISCARDABLE "res\\tb_file_disabled.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_VIEW_LARGEICON + BUTTON ID_VIEW_SMALLICON + BUTTON ID_VIEW_LIST + BUTTON ID_VIEW_DETAILS + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + 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 FileExplorer...", ID_APP_ABOUT + END +END + +IDR_VIEWTYPE MENU DISCARDABLE +BEGIN + POPUP "Popup" + BEGIN + MENUITEM "Lar&ge Icons", ID_VIEW_LARGEICON + MENUITEM "S&mall Icons", ID_VIEW_SMALLICON + MENUITEM "&List", ID_VIEW_LIST + MENUITEM "&Details", ID_VIEW_DETAILS + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, 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 + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "FileExplorer MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "FileExplorer\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "FileExplorer.EXE\0" + VALUE "ProductName", "FileExplorer Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "FileExplorer\n\nFileEx\n\n\nFileExplorer.Document\nFileEx Document" + ID_VIEW_BACKWARD "Go back\nBack" + ID_VIEW_FORWARD "Go forward\nForward" + ID_VIEW_UP "Go to the parent folder\nUp" + ID_VIEW_PROPERTY "Display item properties\nProperties" + ID_VIEW_TYPE "Display items in the list view as ...\nViews" + ID_EDIT_DELETE "Delete item\nDelete" + ID_DESCRIPTION_FILE "FileExplorerInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "FileExplorer" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" + ID_VIEW_AUTOARRANGE "Arrange icons on a grid." +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_SMALLICON "Display items by using small icons.\nSmall Icons" + ID_VIEW_LARGEICON "Display items by using large icons.\nLarge Icons" + ID_VIEW_LIST "Displays items in a list.\nList" + ID_VIEW_DETAILS "Displays detailed information about each item in the window.\nDetails" + ID_VIEW_LINEUP "Arranges icons in a grid." + ID_VIEW_BYNAME "Sorts the icons alphabetically." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_TB_FILE BITMAP DISCARDABLE "res\\bm_file.bmp" +IDB_TB_FILE_HOT BITMAP DISCARDABLE "res\\tb_file_hot.bmp" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\FileExplorer.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#include "OXCoolToolBar.rc" +#include "OXFileWatcher.rc" +#include "OXMenuBar.rc" +#include "OXShellFolderTree.rc" +#include "OXShellObjectList.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.vcproj new file mode 100644 index 0000000..892790f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorer.vcproj @@ -0,0 +1,2501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.cpp new file mode 100644 index 0000000..01d3375 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.cpp @@ -0,0 +1,84 @@ +// FileExplorerDoc.cpp : implementation of the CFileExplorerDoc class +// + +#include "stdafx.h" +#include "FileExplorer.h" + +#include "FileExplorerDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerDoc + +IMPLEMENT_DYNCREATE(CFileExplorerDoc, CDocument) + +BEGIN_MESSAGE_MAP(CFileExplorerDoc, CDocument) + //{{AFX_MSG_MAP(CFileExplorerDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerDoc construction/destruction + +CFileExplorerDoc::CFileExplorerDoc() +{ + // TODO: add one-time construction code here + +} + +CFileExplorerDoc::~CFileExplorerDoc() +{ +} + +BOOL CFileExplorerDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerDoc serialization + +void CFileExplorerDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerDoc diagnostics + +#ifdef _DEBUG +void CFileExplorerDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CFileExplorerDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.h new file mode 100644 index 0000000..bdda07a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerDoc.h @@ -0,0 +1,57 @@ +// FileExplorerDoc.h : interface of the CFileExplorerDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FILEEXPLORERDOC_H__10814F8F_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_FILEEXPLORERDOC_H__10814F8F_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CFileExplorerDoc : public CDocument +{ +protected: // create from serialization only + CFileExplorerDoc(); + DECLARE_DYNCREATE(CFileExplorerDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileExplorerDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CFileExplorerDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CFileExplorerDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FILEEXPLORERDOC_H__10814F8F_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerInfo.rtf new file mode 100644 index 0000000..c3d5f07 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.cpp new file mode 100644 index 0000000..93b979d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.cpp @@ -0,0 +1,309 @@ +// FileExplorerView.cpp : implementation of the CFileExplorerView class +// + +#include "stdafx.h" +#include "FileExplorer.h" + +#include "FileExplorerDoc.h" +#include "FileExplorerView.h" + +#include "MainFrm.h" +#include "LeftView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerView + +IMPLEMENT_DYNCREATE(CFileExplorerView, CView) + +BEGIN_MESSAGE_MAP(CFileExplorerView, CView) + //{{AFX_MSG_MAP(CFileExplorerView) + ON_WM_CREATE() + ON_WM_SIZE() + ON_WM_ERASEBKGND() + ON_COMMAND(ID_EDIT_COPY, OnEditCopy) + ON_COMMAND(ID_EDIT_CUT, OnEditCut) + ON_COMMAND(ID_EDIT_PASTE, OnEditPaste) + ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy) + ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut) + ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) + //}}AFX_MSG_MAP + ON_NOTIFY(NM_DBLCLK,IDC_FILELIST,OnSelectFolder) + ON_COMMAND(ID_EDIT_DELETE, OnEditDelete) + ON_COMMAND(ID_VIEW_PROPERTY, OnViewProperties) + ON_UPDATE_COMMAND_UI(ID_EDIT_DELETE, OnUpdateEditDelete) + ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTY, OnUpdateViewProperties) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerView construction/destruction + +CFileExplorerView::CFileExplorerView() +{ + // TODO: add construction code here + +} + +CFileExplorerView::~CFileExplorerView() +{ +} + +BOOL CFileExplorerView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerView drawing + +void CFileExplorerView::OnDraw(CDC* pDC) +{ + CFileExplorerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here + + UNREFERENCED_PARAMETER(pDC); +} + +void CFileExplorerView::OnInitialUpdate() +{ + CView::OnInitialUpdate(); + + + // TODO: You may populate your ListView with items by directly accessing + // its list control through a call to GetListCtrl(). + + ASSERT(::IsWindow(m_filesList.GetSafeHwnd())); + + m_filesList.SetEnableContextMenu(TRUE); + m_filesList.SetOnlyFileSystemItems(FALSE); + m_filesList.SetNotifyError(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerView diagnostics + +#ifdef _DEBUG +void CFileExplorerView::AssertValid() const +{ + CView::AssertValid(); +} + +void CFileExplorerView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CFileExplorerDoc* CFileExplorerView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFileExplorerDoc))); + return (CFileExplorerDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CFileExplorerView message handlers +int CFileExplorerView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + if(!m_filesList.Create(WS_VISIBLE|WS_CHILD|LVS_REPORT| + LVS_EDITLABELS|LVS_SHOWSELALWAYS, + CRect(0,0,0,0),this,IDC_FILELIST)) + { + return -1; + } + + + return 0; +} + +void CFileExplorerView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + if(::IsWindow(m_filesList.GetSafeHwnd())) + m_filesList.MoveWindow(0,0,cx,cy); +} + +BOOL CFileExplorerView::OnEraseBkgnd(CDC* pDC) +{ + // TODO: Add your message handler code here and/or call default + UNREFERENCED_PARAMETER(pDC); + + return TRUE; +} + +void CFileExplorerView::OnSelectFolder(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + *result=0; + + CPoint ptMouseCursor; + ::GetCursorPos(&ptMouseCursor); + m_filesList.ScreenToClient(&ptMouseCursor); + + // Use HitTest function to define the list item by coordinate + UINT nFlags=NULL; + int nItem=m_filesList.HitTest(ptMouseCursor,&nFlags); + + if(nItem!=-1 && (nFlags&LVHT_ONITEM)!=0) + { + // Get folder info associated with item + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_filesList.GetItemData(nItem); + ASSERT(lpNameSpaceObject!=NULL); + + if(lpNameSpaceObject->dwFlags&SFGAO_HASSUBFOLDER || + lpNameSpaceObject->dwFlags&SFGAO_FOLDER) + { + COXShellNamespaceNavigator navigator; + LPSHELLFOLDER lpsfSelected= + navigator.GetShellFolder(lpNameSpaceObject->lpsfParent, + lpNameSpaceObject->lpRelativeIDL); + if(lpsfSelected!=NULL) + { + m_filesList.PopulateList(lpsfSelected,lpNameSpaceObject->lpFullIDL); + + CMainFrame* pMainFrame=(CMainFrame*)AfxGetMainWnd(); + ASSERT(pMainFrame!=NULL); + CLeftView* pTreeView=pMainFrame->GetLeftPane(); + pTreeView->m_bPopulateList=FALSE; + pTreeView->m_folderTree.OpenFolder(lpNameSpaceObject->lpFullIDL); + pTreeView->m_bPopulateList=TRUE; + } + } + } +} + +void CFileExplorerView::OnEditPaste() +{ + // TODO: Add your command handler code here + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + ASSERT(nItem!=-1); + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_filesList.GetItemData(nItem); + ASSERT(lpNameSpaceObject!=NULL); + ASSERT((lpNameSpaceObject->dwFlags&SFGAO_FOLDER)==SFGAO_FOLDER); + m_filesList.InvokeCommand(nItem,IDCMD_PASTE); +} + +void CFileExplorerView::OnEditCopy() +{ + // TODO: Add your command handler code here + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + ASSERT(nItem!=-1); + m_filesList.InvokeCommand(nItem,IDCMD_COPY); +} + +void CFileExplorerView::OnEditCut() +{ + // TODO: Add your command handler code here + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + ASSERT(nItem!=-1); + m_filesList.InvokeCommand(nItem,IDCMD_CUT); +} + +void CFileExplorerView::OnEditDelete() +{ + // TODO: Add your command handler code here + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + ASSERT(nItem!=-1); + m_filesList.InvokeCommand(nItem,IDCMD_DELETE); +} + +void CFileExplorerView::OnViewProperties() +{ + // TODO: Add your command handler code here + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + ASSERT(nItem!=-1); + m_filesList.InvokeCommand(nItem,IDCMD_PROPERTIES); +} + + +void CFileExplorerView::OnUpdateEditPaste(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_PASTE); +} + +void CFileExplorerView::OnUpdateEditCopy(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_COPY); +} + +void CFileExplorerView::OnUpdateEditCut(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_CUT); +} + +void CFileExplorerView::OnUpdateEditDelete(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_DELETE); +} + +void CFileExplorerView::OnUpdateViewProperties(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_VIEW_PROPERTY); +} + +void CFileExplorerView::OnUpdate(CCmdUI* pCmdUI, UINT nID) +{ + int nItem=m_filesList.GetNextItem(-1,LVNI_SELECTED); + if(nItem==-1) + { + pCmdUI->Enable(FALSE); + return; + } + + // Get folder info associated with item + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_filesList.GetItemData(nItem); + ASSERT(lpNameSpaceObject!=NULL); + + switch(nID) + { + case ID_EDIT_PASTE: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_FOLDER); + break; + case ID_EDIT_COPY: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_CANCOPY); + break; + case ID_EDIT_CUT: + pCmdUI->Enable((lpNameSpaceObject->dwFlags&SFGAO_CANCOPY)!=0 && + (lpNameSpaceObject->dwFlags&SFGAO_CANDELETE)!=0); + break; + case ID_EDIT_DELETE: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_CANDELETE); + break; + case ID_VIEW_PROPERTY: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_HASPROPSHEET); + break; + default: + ASSERT(FALSE); + } +} + +void CFileExplorerView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + CView::OnActivateView(bActivate, pActivateView, pDeactiveView); + + m_filesList.SetFocus(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.h new file mode 100644 index 0000000..a8fafc5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/FileExplorerView.h @@ -0,0 +1,85 @@ +// FileExplorerView.h : interface of the CFileExplorerView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FILEEXPLORERVIEW_H__10814F91_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_FILEEXPLORERVIEW_H__10814F91_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXShellObjectList.h" + +const int IDC_FILELIST=1000; + +class CFileExplorerView : public CView +{ +protected: // create from serialization only + CFileExplorerView(); + DECLARE_DYNCREATE(CFileExplorerView) + +// Attributes +public: + CFileExplorerDoc* GetDocument(); + + COXShellObjectList m_filesList; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileExplorerView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnInitialUpdate(); // called first time after construct + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CFileExplorerView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CFileExplorerView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + afx_msg void OnEditCopy(); + afx_msg void OnEditCut(); + afx_msg void OnEditPaste(); + afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI); + afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI); + afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI); + //}}AFX_MSG + afx_msg void OnSelectFolder(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnEditDelete(); + afx_msg void OnViewProperties(); + afx_msg void OnUpdateEditDelete(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewProperties(CCmdUI* pCmdUI); + DECLARE_MESSAGE_MAP() + + void OnUpdate(CCmdUI* pCmdUI, UINT nID); +}; + +#ifndef _DEBUG // debug version in FileExplorerView.cpp +inline CFileExplorerDoc* CFileExplorerView::GetDocument() + { return (CFileExplorerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FILEEXPLORERVIEW_H__10814F91_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.cpp new file mode 100644 index 0000000..d6461ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.cpp @@ -0,0 +1,339 @@ +// LeftView.cpp : implementation of the CLeftView class +// + +#include "stdafx.h" +#include "FileExplorer.h" + +#include "FileExplorerDoc.h" +#include "LeftView.h" + +#include "MainFrm.h" +#include "FileExplorerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLeftView + +IMPLEMENT_DYNCREATE(CLeftView, CView) + +BEGIN_MESSAGE_MAP(CLeftView, CView) + //{{AFX_MSG_MAP(CLeftView) + ON_WM_CREATE() + ON_WM_SIZE() + ON_WM_ERASEBKGND() + ON_COMMAND(ID_EDIT_COPY, OnEditCopy) + ON_COMMAND(ID_EDIT_CUT, OnEditCut) + ON_COMMAND(ID_EDIT_PASTE, OnEditPaste) + ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy) + ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut) + ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) + //}}AFX_MSG_MAP + ON_NOTIFY(TVN_SELCHANGED,IDC_FOLDERTREE,OnSelectFolder) + ON_COMMAND(ID_EDIT_DELETE, OnEditDelete) + ON_COMMAND(ID_VIEW_PROPERTY, OnViewProperties) + ON_UPDATE_COMMAND_UI(ID_EDIT_DELETE, OnUpdateEditDelete) + ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTY, OnUpdateViewProperties) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLeftView construction/destruction + +CLeftView::CLeftView() +{ + // TODO: add construction code here + m_nCurrentItemInHistory=-1; + m_bPopulateList=TRUE; +} + +CLeftView::~CLeftView() +{ +} + +BOOL CLeftView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CLeftView drawing + +void CLeftView::OnDraw(CDC* pDC) +{ + CFileExplorerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + UNREFERENCED_PARAMETER(pDC); +} + + +void CLeftView::OnInitialUpdate() +{ + CView::OnInitialUpdate(); + + ASSERT(::IsWindow(m_folderTree.GetSafeHwnd())); + + m_folderTree.SetEnableContextMenu(TRUE); + m_folderTree.SetOnlyFileSystemFolders(FALSE); + m_folderTree.SetNotifyError(TRUE); + + m_folderTree.InitializeTree(); + + m_folderTree.SelectItem(m_folderTree.GetNextItem(TVI_ROOT,TVGN_CHILD)); +} + +///////////////////////////////////////////////////////////////////////////// +// CLeftView diagnostics + +#ifdef _DEBUG +void CLeftView::AssertValid() const +{ + CView::AssertValid(); +} + +void CLeftView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CFileExplorerDoc* CLeftView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFileExplorerDoc))); + return (CFileExplorerDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLeftView message handlers + +int CLeftView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + if(!m_folderTree.Create(WS_VISIBLE|WS_CHILD|TVS_HASLINES|TVS_LINESATROOT| + TVS_HASBUTTONS|TVS_EDITLABELS|TVS_SHOWSELALWAYS,CRect(0,0,0,0),this, + IDC_FOLDERTREE)) + { + return -1; + } + + return 0; +} + +void CLeftView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + if(::IsWindow(m_folderTree.GetSafeHwnd())) + m_folderTree.MoveWindow(0,0,cx,cy); +} + +BOOL CLeftView::OnEraseBkgnd(CDC* pDC) +{ + // TODO: Add your message handler code here and/or call default + UNREFERENCED_PARAMETER(pDC); + + return TRUE; +} + +void CLeftView::OnSelectFolder(NMHDR* pNotifyStruct, LRESULT* result) +{ + *result=0; + + LPNMTREEVIEW pnmtv=(LPNMTREEVIEW)pNotifyStruct; + + if(pnmtv->itemNew.hItem==NULL) + return; + + // Get folder info associated with item + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_folderTree.GetItemData(pnmtv->itemNew.hItem); + ASSERT(lpNameSpaceObject!=NULL || m_folderTree.GetShowDesktopItem()); + + CMainFrame* pMainFrame=(CMainFrame*)AfxGetMainWnd(); + ASSERT(pMainFrame!=NULL); + + // get shell folder object from saved PIDLs + if(m_bPopulateList) + { + if(lpNameSpaceObject!=NULL) + { + COXShellNamespaceNavigator navigator; + LPSHELLFOLDER lpsfSelected=navigator. + GetShellFolder(lpNameSpaceObject->lpsfParent, + lpNameSpaceObject->lpRelativeIDL); + if(lpsfSelected!=NULL) + { + CFileExplorerView* pListView=pMainFrame->GetRightPane(); + pListView->m_filesList.PopulateList(lpsfSelected, + lpNameSpaceObject->lpFullIDL); + lpsfSelected->Release(); + } + } + else + { + CFileExplorerView* pListView=pMainFrame->GetRightPane(); + pListView->m_filesList.PopulateList(); + } + } + + BOOL bExistInHistory=FALSE; + if(m_arrHistory.GetSize()>m_nCurrentItemInHistory && m_nCurrentItemInHistory>=0) + { + if(lpNameSpaceObject==NULL) + bExistInHistory=(m_arrHistory.GetAt(m_nCurrentItemInHistory)==NULL); + else + bExistInHistory=(m_arrHistory.GetAt(m_nCurrentItemInHistory)== + lpNameSpaceObject->lpFullIDL); + if(!bExistInHistory) + { + m_arrHistory.RemoveAt(m_nCurrentItemInHistory+1, + m_arrHistory.GetSize()-m_nCurrentItemInHistory-1); + } + } + if(!bExistInHistory) + { + m_nCurrentItemInHistory++; + // ??? IDL might be deleted in the future, probably have to copy it + if(lpNameSpaceObject==NULL) + m_arrHistory.SetAtGrow(m_nCurrentItemInHistory,NULL); + else + m_arrHistory.SetAtGrow(m_nCurrentItemInHistory,lpNameSpaceObject->lpFullIDL); + } +} + + +void CLeftView::OnEditPaste() +{ + // TODO: Add your command handler code here + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_folderTree.GetItemData(hItem); + ASSERT(lpNameSpaceObject!=NULL); + ASSERT((lpNameSpaceObject->dwFlags&SFGAO_FOLDER)==SFGAO_FOLDER); + m_folderTree.InvokeCommand(hItem,IDCMD_PASTE); +} + +void CLeftView::OnEditCopy() +{ + // TODO: Add your command handler code here + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + m_folderTree.InvokeCommand(hItem,IDCMD_COPY); +} + +void CLeftView::OnEditCut() +{ + // TODO: Add your command handler code here + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + m_folderTree.InvokeCommand(hItem,IDCMD_CUT); +} + +void CLeftView::OnEditDelete() +{ + // TODO: Add your command handler code here + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + m_folderTree.InvokeCommand(hItem,IDCMD_DELETE); +} + +void CLeftView::OnViewProperties() +{ + // TODO: Add your command handler code here + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + m_folderTree.InvokeCommand(hItem,IDCMD_PROPERTIES); +} + + +void CLeftView::OnUpdateEditPaste(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_PASTE); +} + +void CLeftView::OnUpdateEditCopy(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_COPY); +} + +void CLeftView::OnUpdateEditCut(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_CUT); +} + +void CLeftView::OnUpdateEditDelete(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_EDIT_DELETE); +} + +void CLeftView::OnUpdateViewProperties(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + OnUpdate(pCmdUI,ID_VIEW_PROPERTY); +} + +void CLeftView::OnUpdate(CCmdUI* pCmdUI, UINT nID) +{ + HTREEITEM hItem=m_folderTree.GetSelectedItem(); + if(hItem==NULL) + { + pCmdUI->Enable(FALSE); + return; + } + + // Get folder info associated with item + LPNAMESPACEOBJECT lpNameSpaceObject= + (LPNAMESPACEOBJECT)m_folderTree.GetItemData(hItem); + if(lpNameSpaceObject==NULL) + { + pCmdUI->Enable(FALSE); + return; + } + + switch(nID) + { + case ID_EDIT_PASTE: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_FOLDER); + break; + case ID_EDIT_COPY: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_CANCOPY); + break; + case ID_EDIT_CUT: + pCmdUI->Enable((lpNameSpaceObject->dwFlags&SFGAO_CANCOPY)!=0 && + (lpNameSpaceObject->dwFlags&SFGAO_CANDELETE)!=0); + break; + case ID_EDIT_DELETE: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_CANDELETE); + break; + case ID_VIEW_PROPERTY: + pCmdUI->Enable(lpNameSpaceObject->dwFlags&SFGAO_HASPROPSHEET); + break; + default: + ASSERT(FALSE); + } +} + +void CLeftView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + CView::OnActivateView(bActivate, pActivateView, pDeactiveView); + + m_folderTree.SetFocus(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.h new file mode 100644 index 0000000..36343ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/LeftView.h @@ -0,0 +1,98 @@ +// LeftView.h : interface of the CLeftView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_LEFTVIEW_H__10814F93_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_LEFTVIEW_H__10814F93_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "afxtempl.h" + +#include "OXShellFolderTree.h" + + +const UINT IDC_FOLDERTREE=1000; + +class CFileExplorerDoc; + +class CLeftView : public CView +{ +protected: // create from serialization only + CLeftView(); + DECLARE_DYNCREATE(CLeftView) + +// Attributes +public: + CFileExplorerDoc* GetDocument(); + + COXShellFolderTree m_folderTree; + + CArray m_arrHistory; + int m_nCurrentItemInHistory; + + // flag that defines if right pane list control wiil be repopulated + // when new folder in the tree is selected + BOOL m_bPopulateList; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLeftView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnInitialUpdate(); // called first time after construct + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLeftView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CLeftView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + afx_msg void OnEditCopy(); + afx_msg void OnEditCut(); + afx_msg void OnEditPaste(); + afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI); + afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI); + afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI); + //}}AFX_MSG + afx_msg void OnSelectFolder(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnEditDelete(); + afx_msg void OnViewProperties(); + afx_msg void OnUpdateEditDelete(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewProperties(CCmdUI* pCmdUI); + DECLARE_MESSAGE_MAP() + + void OnUpdate(CCmdUI* pCmdUI, UINT nID); +}; + +#ifndef _DEBUG // debug version in LeftView.cpp +inline CFileExplorerDoc* CLeftView::GetDocument() + { return (CFileExplorerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LEFTVIEW_H__10814F93_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.cpp new file mode 100644 index 0000000..5c8918e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.cpp @@ -0,0 +1,589 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "FileExplorer.h" + +#include "MainFrm.h" +#include "LeftView.h" +#include "FileExplorerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +const int ID_MAXHISTORYITEMDISPLAYED=20; +const int ID_BACKWARD_BASE=18000; +const int ID_FORWARD_BASE=19000; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI_RANGE(AFX_ID_VIEW_MINIMUM, AFX_ID_VIEW_MAXIMUM, OnUpdateViewStyles) + ON_COMMAND_RANGE(AFX_ID_VIEW_MINIMUM, AFX_ID_VIEW_MAXIMUM, OnViewStyle) + ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR, OnDropDown) + ON_COMMAND(ID_VIEW_TYPE, OnViewType) + ON_COMMAND(ID_VIEW_UP, OnViewUp) + ON_COMMAND(ID_VIEW_BACKWARD, OnViewBackward) + ON_COMMAND(ID_VIEW_FORWARD, OnViewForward) + ON_UPDATE_COMMAND_UI(ID_VIEW_UP, OnUpdateViewUp) + ON_UPDATE_COMMAND_UI(ID_VIEW_BACKWARD, OnUpdateViewBackward) + ON_UPDATE_COMMAND_UI(ID_VIEW_FORWARD, OnUpdateViewForward) + ON_COMMAND_RANGE(ID_BACKWARD_BASE, ID_BACKWARD_BASE+ID_MAXHISTORYITEMDISPLAYED, OnBackwardItem) + ON_COMMAND_RANGE(ID_FORWARD_BASE, ID_FORWARD_BASE+ID_MAXHISTORYITEMDISPLAYED, OnForwardItem) +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +static UINT buttons[] = +{ + ID_VIEW_BACKWARD, + ID_VIEW_FORWARD, + ID_VIEW_UP, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_EDIT_DELETE, + ID_SEPARATOR, + ID_VIEW_PROPERTY, + ID_VIEW_TYPE, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this,WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS| + CBRS_FLYBY|CBRS_SIZE_DYNAMIC) || + !m_wndToolBar.SetButtons(buttons,sizeof(buttons)/sizeof(buttons[1])) || + m_wndToolBar.GetToolBarCtrl(). + AddBitmap(sizeof(buttons)/sizeof(buttons[1]),IDB_TB_FILE)==-1) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBar.IniSizes(CSize(24,22)); + m_wndToolBar.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBar.SetMaxTextRows(1); + m_wndToolBar.SetButtonsMinMaxWidth(0,80); + m_wndToolBar.SetHotImageList(m_wndToolBar.AddImageList(IDB_TB_FILE_HOT,24, + RGB(192,192,192),ILC_COLOR8|ILC_MASK)); +// m_wndToolBar.SetDisabledImageList(m_wndToolBar.AddImageList(IDB_TB_FILE_DISABLED,24, +// RGB(255,0,255),ILC_COLOR8|ILC_MASK)); + m_wndToolBar.UpdateSizes(); + + m_wndToolBar.SetButtonStyle(0,m_wndToolBar.GetButtonStyle(0)|TBSTYLE_DROPDOWN); + m_wndToolBar.SetButtonStyle(1,m_wndToolBar.GetButtonStyle(1)|TBSTYLE_DROPDOWN); + m_wndToolBar.SetButtonStyle(10,m_wndToolBar.GetButtonStyle(10)|TBSTYLE_DROPDOWN); + m_wndToolBar.SetDropDownArrow(TRUE); + //////////// + + 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_TOP|CBRS_ALIGN_BOTTOM); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; +} + +BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, + CCreateContext* pContext) +{ + // create splitter window + if (!m_wndSplitter.CreateStatic(this, 1, 2)) + return FALSE; + + if (!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLeftView),CSize(0,0),pContext) || + !m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CFileExplorerView), + CSize(0,0),pContext)) + { + m_wndSplitter.DestroyWindow(); + return FALSE; + } + + m_wndSplitter.SetColumnInfo(0,200,0); + m_wndSplitter.SetActivePane(0,0); + + return TRUE; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +CFileExplorerView* CMainFrame::GetRightPane() +{ + CWnd* pWnd = m_wndSplitter.GetPane(0, 1); + CFileExplorerView* pView = DYNAMIC_DOWNCAST(CFileExplorerView, pWnd); + return pView; +} + +CLeftView* CMainFrame::GetLeftPane() +{ + CWnd* pWnd = m_wndSplitter.GetPane(0, 0); + CLeftView* pView = DYNAMIC_DOWNCAST(CLeftView, pWnd); + return pView; +} + +void CMainFrame::OnUpdateViewStyles(CCmdUI* pCmdUI) +{ + // TODO: customize or extend this code to handle choices on the + // View menu. + + CFileExplorerView* pView = GetRightPane(); + + // if the right-hand pane hasn't been created or isn't a view, + // disable commands in our range + + if (pView == NULL) + pCmdUI->Enable(FALSE); + else + { + DWORD dwStyle = pView->m_filesList.GetStyle() & LVS_TYPEMASK; + + // if the command is ID_VIEW_LINEUP, only enable command + // when we're in LVS_ICON or LVS_SMALLICON mode + + if (pCmdUI->m_nID == ID_VIEW_LINEUP) + { + if (dwStyle == LVS_ICON || dwStyle == LVS_SMALLICON) + pCmdUI->Enable(); + else + pCmdUI->Enable(FALSE); + } + else + { + // otherwise, use dots to reflect the style of the view + pCmdUI->Enable(); + BOOL bChecked = FALSE; + + switch (pCmdUI->m_nID) + { + case ID_VIEW_DETAILS: + bChecked = (dwStyle == LVS_REPORT); + break; + + case ID_VIEW_SMALLICON: + bChecked = (dwStyle == LVS_SMALLICON); + break; + + case ID_VIEW_LARGEICON: + bChecked = (dwStyle == LVS_ICON); + break; + + case ID_VIEW_LIST: + bChecked = (dwStyle == LVS_LIST); + break; + + default: + bChecked = FALSE; + break; + } + + pCmdUI->SetRadio(bChecked ? 1 : 0); + } + } +} + + +void CMainFrame::OnViewStyle(UINT nCommandID) +{ + // TODO: customize or extend this code to handle choices on the + // View menu. + CFileExplorerView* pView = GetRightPane(); + + // if the right-hand pane has been created and is a CFileExplorerView, + // process the menu commands... + if (pView != NULL) + { + DWORD dwStyle=(DWORD)-1; + + switch (nCommandID) + { + case ID_VIEW_LINEUP: + { + // ask the list control to snap to grid + pView->m_filesList.Arrange(LVA_SNAPTOGRID); + } + break; + + // other commands change the style on the list control + case ID_VIEW_DETAILS: + dwStyle = LVS_REPORT; + break; + + case ID_VIEW_SMALLICON: + dwStyle = LVS_SMALLICON; + break; + + case ID_VIEW_LARGEICON: + dwStyle = LVS_ICON; + break; + + case ID_VIEW_LIST: + dwStyle = LVS_LIST; + break; + } + + // change the style; window will repaint automatically + if (dwStyle != -1) + pView->m_filesList.ModifyStyle(LVS_TYPEMASK, dwStyle); + } +} + + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + // this function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBar.GetItemRect(m_wndToolBar.CommandToIndex(pNMToolBar->iItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + switch(pNMToolBar->iItem) + { + case ID_VIEW_BACKWARD: + { + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT(pTreeView->m_arrHistory.GetSize()>1 && + pTreeView->m_nCurrentItemInHistory!=0); + + CMenu menuPopup; + VERIFY(menuPopup.CreatePopupMenu()); + int nMenuItemCount=0; + int nHistoryItemIndex=pTreeView->m_nCurrentItemInHistory-1; + while(nMenuItemCount=0) + { + LPITEMIDLIST lpFullIDL=pTreeView->m_arrHistory.GetAt(nHistoryItemIndex); + if(lpFullIDL==NULL) + { + menuPopup.AppendMenu(MF_STRING,ID_BACKWARD_BASE+nMenuItemCount, + _T("Desktop")); + nHistoryItemIndex--; + nMenuItemCount++; + } + else + { + HTREEITEM hItem=pTreeView->m_folderTree.FindFolder(lpFullIDL); + if(hItem==NULL) + { + pTreeView->m_arrHistory.RemoveAt(nHistoryItemIndex); + pTreeView->m_nCurrentItemInHistory--; + nHistoryItemIndex--; + } + else + { + CString sText=pTreeView->m_folderTree.GetItemText(hItem); + menuPopup.AppendMenu(MF_STRING,ID_BACKWARD_BASE+nMenuItemCount, + sText); + nHistoryItemIndex--; + nMenuItemCount++; + } + } + + } + menuPopup.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rect.left, + rect.top+1,AfxGetMainWnd()); + break; + } + + case ID_VIEW_FORWARD: + { + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT((pTreeView->m_arrHistory.GetSize()-1)> + pTreeView->m_nCurrentItemInHistory); + + CMenu menuPopup; + VERIFY(menuPopup.CreatePopupMenu()); + int nMenuItemCount=0; + int nHistoryItemIndex=pTreeView->m_nCurrentItemInHistory+1; + while(nMenuItemCountm_arrHistory.GetSize()) + { + LPITEMIDLIST lpFullIDL=pTreeView->m_arrHistory.GetAt(nHistoryItemIndex); + if(lpFullIDL==NULL) + { + menuPopup.AppendMenu(MF_STRING,ID_FORWARD_BASE+nMenuItemCount, + _T("Desktop")); + nHistoryItemIndex++; + nMenuItemCount++; + } + else + { + HTREEITEM hItem=pTreeView->m_folderTree.FindFolder(lpFullIDL); + if(hItem==NULL) + { + pTreeView->m_arrHistory.RemoveAt(nHistoryItemIndex); + } + else + { + CString sText=pTreeView->m_folderTree.GetItemText(hItem); + menuPopup.AppendMenu(MF_STRING,ID_FORWARD_BASE+nMenuItemCount, + sText); + nHistoryItemIndex++; + nMenuItemCount++; + } + } + + } + menuPopup.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rect.left, + rect.top+1,AfxGetMainWnd()); + break; + } + + case ID_VIEW_TYPE: + { + CMenu menu; + CMenu* pPopup; + menu.LoadMenu(IDR_VIEWTYPE); + pPopup=menu.GetSubMenu(0); + pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON,rect.left, + rect.top+1,AfxGetMainWnd()); + break; + } + } + *pResult=TBDDRET_DEFAULT; +} + + +void CMainFrame::OnBackwardItem(UINT nCommandID) +{ + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT(pTreeView->m_arrHistory.GetSize()>1 && pTreeView->m_nCurrentItemInHistory!=0); + int nItemIndex=pTreeView->m_nCurrentItemInHistory-1-nCommandID+ID_BACKWARD_BASE; + ASSERT(nItemIndex>=0); + LPITEMIDLIST lpFullIDLPrev=pTreeView->m_arrHistory.GetAt(nItemIndex); + HTREEITEM hPrevItem=NULL; + if(lpFullIDLPrev!=NULL) + { + hPrevItem=pTreeView->m_folderTree.FindFolder(lpFullIDLPrev); + } + else + { + hPrevItem=pTreeView->m_folderTree.GetRootItem(); + } + if(hPrevItem!=NULL) + { + pTreeView->m_nCurrentItemInHistory=nItemIndex; + pTreeView->m_folderTree.SelectItem(hPrevItem); + } +} + + +void CMainFrame::OnForwardItem(UINT nCommandID) +{ + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT((pTreeView->m_arrHistory.GetSize()-1)>pTreeView->m_nCurrentItemInHistory); + int nItemIndex=pTreeView->m_nCurrentItemInHistory+1+nCommandID-ID_FORWARD_BASE; + ASSERT(nItemIndexm_arrHistory.GetSize()); + LPITEMIDLIST lpFullIDLNext=pTreeView->m_arrHistory.GetAt(nItemIndex); + HTREEITEM hNextItem=NULL; + if(lpFullIDLNext!=NULL) + { + hNextItem=pTreeView->m_folderTree.FindFolder(lpFullIDLNext); + } + else + { + hNextItem=pTreeView->m_folderTree.GetRootItem(); + } + if(hNextItem!=NULL) + { + pTreeView->m_nCurrentItemInHistory=nItemIndex; + pTreeView->m_folderTree.SelectItem(hNextItem); + } +} + + +void CMainFrame::OnViewType() +{ + // TODO: Add your command handler code here + OnViewStyle(ID_VIEW_LARGEICON); +} + +void CMainFrame::OnViewUp() +{ + // TODO: Add your command handler code here + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + HTREEITEM hItem=pTreeView->m_folderTree.GetSelectedItem(); + ASSERT(hItem!=NULL); + HTREEITEM hParentItem=pTreeView->m_folderTree.GetParentItem(hItem); + ASSERT(hParentItem!=NULL); + pTreeView->m_folderTree.SelectItem(hParentItem); +} + +void CMainFrame::OnViewBackward() +{ + // TODO: Add your command handler code here + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT(pTreeView->m_arrHistory.GetSize()>1 && pTreeView->m_nCurrentItemInHistory!=0); + LPITEMIDLIST lpFullIDLPrev=pTreeView->m_arrHistory. + GetAt(pTreeView->m_nCurrentItemInHistory-1); + HTREEITEM hPrevItem=NULL; + if(lpFullIDLPrev!=NULL) + { + hPrevItem=pTreeView->m_folderTree.FindFolder(lpFullIDLPrev); + } + else + { + hPrevItem=pTreeView->m_folderTree.GetRootItem(); + } + if(hPrevItem!=NULL) + { + pTreeView->m_nCurrentItemInHistory--; + pTreeView->m_folderTree.SelectItem(hPrevItem); + } +} + +void CMainFrame::OnViewForward() +{ + // TODO: Add your command handler code here + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + ASSERT((pTreeView->m_arrHistory.GetSize()-1)>pTreeView->m_nCurrentItemInHistory); + LPITEMIDLIST lpFullIDLNext=pTreeView->m_arrHistory. + GetAt(pTreeView->m_nCurrentItemInHistory+1); + HTREEITEM hNextItem=NULL; + if(lpFullIDLNext!=NULL) + { + hNextItem=pTreeView->m_folderTree.FindFolder(lpFullIDLNext); + } + else + { + hNextItem=pTreeView->m_folderTree.GetRootItem(); + } + if(hNextItem!=NULL) + { + pTreeView->m_nCurrentItemInHistory++; + pTreeView->m_folderTree.SelectItem(hNextItem); + } +} + +void CMainFrame::OnUpdateViewForward(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + pCmdUI->Enable((pTreeView->m_arrHistory.GetSize()-1)> + pTreeView->m_nCurrentItemInHistory); +} + +void CMainFrame::OnUpdateViewBackward(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + + pCmdUI->Enable(pTreeView->m_arrHistory.GetSize()>1 && + pTreeView->m_nCurrentItemInHistory!=0); +} + +void CMainFrame::OnUpdateViewUp(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + BOOL bEnabled=FALSE; + CWnd* pWnd=m_wndSplitter.GetPane(0,0); + ASSERT(pWnd!=NULL); + CLeftView* pTreeView=DYNAMIC_DOWNCAST(CLeftView,pWnd); + HTREEITEM hItem=pTreeView->m_folderTree.GetSelectedItem(); + if(hItem!=NULL) + { + HTREEITEM hParentItem=pTreeView->m_folderTree.GetParentItem(hItem); + if(hParentItem!=NULL) + bEnabled=TRUE; + } + + pCmdUI->Enable(bEnabled); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.h new file mode 100644 index 0000000..8a6db9a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/MainFrm.h @@ -0,0 +1,81 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__10814F8D_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__10814F8D_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXCoolToolBar.h" +#include "OXMenuBar.h" + +class CFileExplorerView; +class CLeftView; + +class CMainFrame : public COXMenuBarFrame +{ + +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +protected: + CSplitterWnd m_wndSplitter; +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); + CFileExplorerView* GetRightPane(); + CLeftView* GetLeftPane(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + CStatusBar m_wndStatusBar; + COXCoolToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + afx_msg void OnUpdateViewStyles(CCmdUI* pCmdUI); + afx_msg void OnViewStyle(UINT nCommandID); + afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + afx_msg void OnViewType(); + afx_msg void OnViewUp(); + afx_msg void OnViewBackward(); + afx_msg void OnViewForward(); + afx_msg void OnUpdateViewUp(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewBackward(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewForward(CCmdUI* pCmdUI); + afx_msg void OnBackwardItem(UINT nCommandID); + afx_msg void OnForwardItem(UINT nCommandID); + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__10814F8D_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/ReadMe.txt new file mode 100644 index 0000000..c2bb841 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/ReadMe.txt @@ -0,0 +1,105 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : FileExplorer +======================================================================== + + +AppWizard has created this FileExplorer 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 FileExplorer application. + +FileExplorer.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +FileExplorer.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CFileExplorerApp application class. + +FileExplorer.cpp + This is the main application source file that contains the application + class CFileExplorerApp. + +FileExplorer.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++. + +FileExplorer.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\FileExplorer.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file FileExplorer.rc. + +res\FileExplorer.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CFrameWnd and controls all SDI 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 FileExplorer.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +FileExplorerDoc.h, FileExplorerDoc.cpp - the document + These files contain your CFileExplorerDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CFileExplorerDoc::Serialize). + +FileExplorerView.h, FileExplorerView.cpp - the view of the document + These files contain your CFileExplorerView class. + CFileExplorerView objects are used to view CFileExplorerDoc objects. + + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named FileExplorer.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.cpp new file mode 100644 index 0000000..7ac5a94 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// FileExplorer.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.h new file mode 100644 index 0000000..080a984 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__10814F8B_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__10814F8B_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__10814F8B_EC24_11D2_A7FB_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.rc2 new file mode 100644 index 0000000..ddf0bed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorer.rc2 @@ -0,0 +1,13 @@ +// +// FILEEXPLORER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorerDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorerDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/FileExplorerDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/Toolbar.bmp new file mode 100644 index 0000000..80f1040 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bitmap1.bmp new file mode 100644 index 0000000..a19f862 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bm_file.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bm_file.bmp new file mode 100644 index 0000000..db3d0aa Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/bm_file.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_disabled.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_disabled.bmp new file mode 100644 index 0000000..e450e7f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_disabled.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_hot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_hot.bmp new file mode 100644 index 0000000..4ae6df3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/res/tb_file_hot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/resource.h new file mode 100644 index 0000000..830985a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/FileExplorer/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by FileExplorer.rc +// +#define IDD_ABOUTBOX 100 +#define ID_VIEW_ARRANGE 127 +#define IDR_MAINFRAME 128 +#define IDR_FILEEXTYPE 129 +#define ID_VIEW_BACKWARD 129 +#define ID_VIEW_FORWARD 130 +#define ID_VIEW_UP 131 +#define IDB_TB_FILE 132 +#define ID_VIEW_PROPERTY 132 +#define IDB_TB_FILE_HOT 133 +#define ID_VIEW_TYPE 133 +#define IDR_VIEWTYPE 133 +#define ID_EDIT_DELETE 134 +#define IDB_TB_FILE_DISABLED 134 +#define ID_DESCRIPTION_FILE 135 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 135 +#define _APS_NEXT_COMMAND_VALUE 32780 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.cpp new file mode 100644 index 0000000..75280cf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.cpp @@ -0,0 +1,199 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Outlook.h" + +#include "MainFrm.h" + +#include "OutlookView.h" +#include "OutlookFormView.h" +#include "OutlookTreeView.h" +#include "OutlookListView.h" + +#include "OXSzMiniDockFrmWnd.h" +#include "OXBitmapMenu.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + ON_NOTIFY(TBN_DROPDOWN, ID_VIEW_TOOLBAR, OnDropDown) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_DESTROY() + //}}AFX_MSG_MAP +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() : + COXMenuBarFrame(CBRS_ALIGN_ANY, + RUNTIME_CLASS(COXSizableMiniDockFrameWnd)) +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + 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: Remove this if you don't want tool tips or a resizeable toolbar + if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER, + CRect(2, 2, 2, 2), ID_VIEW_TOOLBAR) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + m_wndToolBar.IniSizes(CSize(16,16)); + m_wndToolBar.SetWindowText(_T("Toolbar")); + m_wndToolBar.SetDropDownArrow(TRUE); + + m_wndToolBar.SetButtonStyle(0, m_wndToolBar.GetButtonStyle(0) | TBSTYLE_DROPDOWN); + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBar.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); + + { + // Create the combo box + //m_wndToolBar.SetButtonInfo(18, IDC_COMBO, TBBS_SEPARATOR, 200); + m_iCombo = COXCoolToolBar::AddCustomButton(&m_Combo, IDC_COMBO, 100, 100); + m_wndToolBar.InsertComboBox(18,m_iCombo); + + // add some stuff + m_Combo.AddString(_T("Messages")); + m_Combo.AddString(_T("Messages with AutoPreview")); + m_Combo.AddString(_T("By Message Flag")); + m_Combo.AddString(_T("Last Seven Days")); + m_Combo.AddString(_T("Flagged For Next Seven Days")); + m_Combo.AddString(_T("By Conversation Topic")); + m_Combo.AddString(_T("By Sender")); + m_Combo.AddString(_T("Unread Messages")); + m_Combo.AddString(_T("Sent To")); + m_Combo.AddString(_T("Message Timeline")); + + m_wndToolBar.m_font.CreatePointFont(85, _T("Arial")); + m_Combo.SetFont(&m_wndToolBar.m_font); + } + + m_wndToolBar.UpdateSizes(); + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + m_menuOrganizer.AttachFrameWnd(this); + m_menuOrganizer.AutoSetMenuImage(); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + cs.style &= ~FWS_ADDTOTITLE; + + return CFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + UNREFERENCED_PARAMETER(lpcs); + + if (!m_wndSplitter1.CreateStatic(this, 1, 2)) + return FALSE; + + if (!m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(COutlookView), CSize(0, 0), pContext)) + return FALSE; + + if (!m_wndSplitter2.CreateStatic(&m_wndSplitter1, 1, 2, WS_CHILD | WS_VISIBLE, m_wndSplitter1.IdFromRowCol(0, 1))) + return FALSE; + + if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(COutlookTreeView), CSize(0, 0), pContext)) + return FALSE; + + if (!m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(COutlookListView), CSize(0, 0), pContext)) + return FALSE; + + m_wndSplitter1.SetColumnInfo(0, 150, 0); + m_wndSplitter2.SetColumnInfo(0, 150, 0); + + return TRUE; +} + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*) pNotifyStruct; + CRect rect; + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBar.GetItemRect(m_wndToolBar.CommandToIndex(pNMToolBar->iItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + + if (pNMToolBar->iItem == ID_NEW_MESSAGE) + { + CMenu menu; + CMenu* pPopup; + + menu.LoadMenu(IDR_POPUP_MENU); + pPopup = menu.GetSubMenu(0); + COXBitmapMenu menuPopup; + menuPopup.Attach(pPopup->Detach()); + menuPopup.TrackPopupMenu(&m_wndToolBar, AfxGetMainWnd()); + } + *pResult = TBDDRET_DEFAULT; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.h new file mode 100644 index 0000000..4e27482 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/MainFrm.h @@ -0,0 +1,82 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__DA7AA82C_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_MAINFRM_H__DA7AA82C_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXSkinnedComboBox.h" +#include "OXMenuBar.h" +#include "XStatus4.h" + +class CMyToolBar : public COXCoolToolBar +{ +public: + CComboBox m_combo; + CFont m_font; +}; + +class CMainFrame : public COXMenuBarFrame +{ +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + COXStatusBar m_wndStatusBar; + CMyToolBar m_wndToolBar; + + CSplitterWnd m_wndSplitter1; + CSplitterWnd m_wndSplitter2; + + COXBitmapMenuOrganizer m_menuOrganizer; + + // Custom buttons for the toolbar + int m_iCombo; + COXCustomTBComboBox m_Combo; + +// Generated message map functions +protected: + afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__DA7AA82C_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.clw new file mode 100644 index 0000000..eb28b9d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.clw @@ -0,0 +1,324 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=COutlookApp +LastTemplate=CFormView +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "Outlook.h" +LastPage=0 + +ClassCount=8 +Class1=COutlookApp +Class2=COutlookDoc +Class3=COutlookView +Class4=CMainFrame + +ResourceCount=7 +Resource1=IDR_MAINFRAME (English (U.S.)) +Class5=CAboutDlg +Class6=COutlookTreeView +Resource2=IDD_SHBPROPERTIES_DIALOG +Class7=COutlookListView +Resource3=IDR_POPUP_MENU (English (U.S.)) +Class8=COutlookFormView +Resource4=IDR_POPUP_MENU +Resource5=IDD_FORMVIEW (English (U.S.)) +Resource6=IDR_MAINFRAME +Resource7=IDD_SHBPROPERTIES_DIALOG (English (U.S.)) + +[CLS:COutlookApp] +Type=0 +HeaderFile=Outlook.h +ImplementationFile=Outlook.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=COutlookApp + +[CLS:COutlookDoc] +Type=0 +HeaderFile=OutlookDoc.h +ImplementationFile=OutlookDoc.cpp +Filter=N +LastObject=ID_VIEW_TOOLBAR +BaseClass=CDocument +VirtualFilter=DC + +[CLS:COutlookView] +Type=0 +HeaderFile=OutlookView.h +ImplementationFile=OutlookView.cpp +Filter=C +BaseClass=CView +VirtualFilter=VWC +LastObject=COutlookView + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CFrameWnd +VirtualFilter=fWC +LastObject=ID_VIEW_OUTLOOKBAR + + + +[CLS:CAboutDlg] +Type=0 +HeaderFile=Outlook.cpp +ImplementationFile=Outlook.cpp +Filter=D + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_PRINT +Command2=ID_FILE_PRINT_PREVIEW +Command3=ID_APP_EXIT +Command4=ID_REPLY +Command5=ID_REPLY_TO_ALL +Command6=ID_FORWARD_MESSAGE +Command7=ID_MOVE_TO_FOLDER +Command8=ID_DELETE +Command9=ID_FORWARD +Command10=ID_BACK +Command11=ID_UP_ONE_FOLDER +Command12=ID_VIEW_TOOLBAR +Command13=ID_VIEW_STATUS_BAR +Command14=ID_APP_ABOUT +CommandCount=14 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_NEW_MESSAGE +Command2=ID_BACK +Command3=ID_FORWARD +Command4=ID_UP_ONE_FOLDER +Command5=ID_TOGGLE_TREE +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_MOVE_TO_FOLDER +Command9=ID_DELETE +Command10=ID_REPLY +Command11=ID_REPLY_TO_ALL +Command12=ID_FORWARD_MESSAGE +Command13=ID_ADDRESS_BOOK +Command14=ID_GROUP_BY_BOX +Command15=ID_AUTO_PREVIEW +Command16=ID_FIND_ITEMS +Command17=ID_OFFICE_ASSISTANT +CommandCount=17 + +[CLS:COutlookTreeView] +Type=0 +HeaderFile=OutlookTreeView.h +ImplementationFile=OutlookTreeView.cpp +BaseClass=CTreeView +Filter=C +LastObject=COutlookTreeView +VirtualFilter=VWC + +[CLS:COutlookListView] +Type=0 +HeaderFile=OutlookListView.h +ImplementationFile=OutlookListView.cpp +BaseClass=CListView +Filter=C +LastObject=COutlookListView +VirtualFilter=VWC + +[DLG:IDD_SHBPROPERTIES_DIALOG] +Type=1 +Class=? +ControlCount=32 +Control1=IDC_CLRBACK,button,1342242827 +Control2=IDC_HDRCLRBACK,button,1342242827 +Control3=IDC_TEXTFONT,button,1342242816 +Control4=IDC_HDRFONT,button,1342242816 +Control5=IDC_EDIT_HDRHEIGHT,edit,1350631552 +Control6=IDC_CHECK_APPLYTOEXPANDED,button,1342242819 +Control7=IDC_EDIT_GRPMARGIN,edit,1350631552 +Control8=IDC_EDIT_LEFTMARGIN,edit,1350631552 +Control9=IDC_EDIT_TOPMARGIN,edit,1350631552 +Control10=IDC_EDIT_RIGHTMARGIN,edit,1350631552 +Control11=IDC_EDIT_BOTTOMMARGIN,edit,1350631552 +Control12=IDC_EDIT_SCROLLBTNWIDTH,edit,1350631552 +Control13=IDC_EDIT_SCROLLBTNHEIGHT,edit,1350631552 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_NAMETEXTFONT,static,1342312459 +Control21=IDC_NAMEHDRFONT,static,1342312460 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 + +[CLS:COutlookFormView] +Type=0 +HeaderFile=OutlookFormView.h +ImplementationFile=OutlookFormView.cpp +BaseClass=CFormView +Filter=D +LastObject=COutlookFormView + +[MNU:IDR_POPUP_MENU] +Type=1 +Class=? +Command1=ID_NEW_MESSAGE +Command2=ID_POST_IN_FOLDER +Command3=ID_APPOINTMENT +Command4=ID_MEETING_REQUEST +Command5=ID_CONTACT +Command6=ID_TASK +Command7=ID_TASK_REQUEST +Command8=ID_NOTE +Command9=ID_OFFICE_DOCUMENT +CommandCount=9 + +[DLG:IDD_FORMVIEW (English (U.S.))] +Type=1 +ControlCount=1 +Control1=IDC_LIST,SysListView32,1350631425 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_NEW_MESSAGE +Command2=ID_BACK +Command3=ID_FORWARD +Command4=ID_UP_ONE_FOLDER +Command5=ID_TOGGLE_TREE +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_MOVE_TO_FOLDER +Command9=ID_DELETE +Command10=ID_REPLY +Command11=ID_REPLY_TO_ALL +Command12=ID_FORWARD_MESSAGE +Command13=ID_ADDRESS_BOOK +Command14=ID_GROUP_BY_BOX +Command15=ID_AUTO_PREVIEW +Command16=ID_FIND_ITEMS +Command17=ID_OFFICE_ASSISTANT +CommandCount=17 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_PRINT +Command2=ID_FILE_PRINT_PREVIEW +Command3=ID_APP_EXIT +Command4=ID_REPLY +Command5=ID_REPLY_TO_ALL +Command6=ID_FORWARD_MESSAGE +Command7=ID_MOVE_TO_FOLDER +Command8=ID_DELETE +Command9=ID_FORWARD +Command10=ID_BACK +Command11=ID_UP_ONE_FOLDER +Command12=ID_VIEW_TOOLBAR +Command13=ID_VIEW_STATUS_BAR +Command14=ID_APP_ABOUT +CommandCount=14 + +[MNU:IDR_POPUP_MENU (English (U.S.))] +Type=1 +Class=? +Command1=ID_NEW_MESSAGE +Command2=ID_POST_IN_FOLDER +Command3=ID_APPOINTMENT +Command4=ID_MEETING_REQUEST +Command5=ID_CONTACT +Command6=ID_TASK +Command7=ID_TASK_REQUEST +Command8=ID_NOTE +Command9=ID_OFFICE_DOCUMENT +CommandCount=9 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[DLG:IDD_SHBPROPERTIES_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=32 +Control1=IDC_CLRBACK,button,1342242827 +Control2=IDC_HDRCLRBACK,button,1342242827 +Control3=IDC_TEXTFONT,button,1342242816 +Control4=IDC_HDRFONT,button,1342242816 +Control5=IDC_EDIT_HDRHEIGHT,edit,1350631552 +Control6=IDC_CHECK_APPLYTOEXPANDED,button,1342242819 +Control7=IDC_EDIT_GRPMARGIN,edit,1350631552 +Control8=IDC_EDIT_LEFTMARGIN,edit,1350631552 +Control9=IDC_EDIT_TOPMARGIN,edit,1350631552 +Control10=IDC_EDIT_RIGHTMARGIN,edit,1350631552 +Control11=IDC_EDIT_BOTTOMMARGIN,edit,1350631552 +Control12=IDC_EDIT_SCROLLBTNWIDTH,edit,1350631552 +Control13=IDC_EDIT_SCROLLBTNHEIGHT,edit,1350631552 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_NAMETEXTFONT,static,1342312459 +Control21=IDC_NAMEHDRFONT,static,1342312460 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.cpp new file mode 100644 index 0000000..6b52c6a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.cpp @@ -0,0 +1,137 @@ +// Outlook.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Outlook.h" + +#include "MainFrm.h" +#include "OutlookDoc.h" +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COutlookApp + +BEGIN_MESSAGE_MAP(COutlookApp, CWinApp) + //{{AFX_MSG_MAP(COutlookApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookApp construction + +COutlookApp::COutlookApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only COutlookApp object + +COutlookApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// COutlookApp initialization + +BOOL COutlookApp::InitInstance() +{ + 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. + + // Initialize OLE libraries + if (!AfxOleInit()) + { + TRACE(_T("CShortcutBarApp::InitInstance: failed to initialize OLE libraries")); + return FALSE; + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // Change the registry key under which our settings are stored. + // 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(0); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(COutlookDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + NULL); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + SetCurrentSkin(_T("Office 2003")); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookApp commands + +void COutlookApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +int COutlookApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsp new file mode 100644 index 0000000..c0dcd6c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsp @@ -0,0 +1,456 @@ +# Microsoft Developer Studio Project File - Name="Outlook" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Outlook - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Outlook.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Outlook.mak" CFG="Outlook - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Outlook - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Outlook - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Outlook - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Outlook - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Outlook - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Outlook - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OutlookLikeDemo.exe" + +!ELSEIF "$(CFG)" == "Outlook - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"OutlookLikeDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Outlook - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Outlook_" +# PROP BASE Intermediate_Dir "Outlook_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OutlookLikeDemo.exe" + +!ELSEIF "$(CFG)" == "Outlook - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Outlook0" +# PROP BASE Intermediate_Dir "Outlook0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"OutlookLikeDemo.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"OutlookLikeDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Outlook - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Outlook1" +# PROP BASE Intermediate_Dir "Outlook1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"OutlookLikeDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"OutlookLikeDemo.exe" + +!ENDIF + +# Begin Target + +# Name "Outlook - Win32 Release" +# Name "Outlook - Win32 Debug" +# Name "Outlook - Win32 Release_Shared" +# Name "Outlook - Win32 Unicode_Debug" +# Name "Outlook - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\Outlook.cpp +# End Source File +# Begin Source File + +SOURCE=.\Outlook.rc +# End Source File +# Begin Source File + +SOURCE=.\OutlookDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\OutlookFormView.cpp +# End Source File +# Begin Source File + +SOURCE=.\OutlookListView.cpp +# End Source File +# Begin Source File + +SOURCE=.\OutlookTreeView.cpp +# End Source File +# Begin Source File + +SOURCE=.\OutlookView.cpp +# End Source File +# Begin Source File + +SOURCE=.\SHBPropertiesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Outlook.h +# End Source File +# Begin Source File + +SOURCE=.\OutlookDoc.h +# End Source File +# Begin Source File + +SOURCE=.\OutlookFormView.h +# End Source File +# Begin Source File + +SOURCE=.\OutlookListView.h +# End Source File +# Begin Source File + +SOURCE=.\OutlookTreeView.h +# End Source File +# Begin Source File + +SOURCE=.\OutlookView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXShortcutBar.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SHBPropertiesDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap4.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\large.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Outlook.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Outlook.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\OutlookDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\small.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\TreeImages.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsw new file mode 100644 index 0000000..4620e72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Outlook"=".\Outlook.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.h new file mode 100644 index 0000000..6b68fdc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.h @@ -0,0 +1,52 @@ +// Outlook.h : main header file for the OUTLOOK application +// + +#if !defined(AFX_OUTLOOK_H__DA7AA828_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOK_H__DA7AA828_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols +#include "OXSkins.h" + +///////////////////////////////////////////////////////////////////////////// +// COutlookApp: +// See Outlook.cpp for the implementation of this class +// + +class COutlookApp : public COXSkinnedApp//CWinApp +{ +public: + COutlookApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(COutlookApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOK_H__DA7AA828_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.rc new file mode 100644 index 0000000..0d33501 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.rc @@ -0,0 +1,520 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP5 BITMAP MOVEABLE PURE "res\\outlook2003.bmp" +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDB_BITMAP1 BITMAP MOVEABLE PURE "res\\large.bmp" +IDB_BITMAP2 BITMAP MOVEABLE PURE "res\\small.bmp" +IDB_BITMAP3 BITMAP MOVEABLE PURE "res\\TreeImages.bmp" +IDB_BITMAP4 BITMAP MOVEABLE PURE "res\\bitmap4.bmp" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE MOVEABLE PURE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Outlook.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#include ""OXShortcutBar.rc""\r\n" + "#include ""OXMenubar.rc""\r\n" + "#endif\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 DISCARDABLE "res\\Outlook.ico" +IDR_OUTLOOTYPE ICON DISCARDABLE "res\\OutlookDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR MOVEABLE PURE 16, 16 +BEGIN + BUTTON ID_NEW_MESSAGE + SEPARATOR + BUTTON ID_BACK + BUTTON ID_FORWARD + SEPARATOR + BUTTON ID_UP_ONE_FOLDER + BUTTON ID_TOGGLE_TREE + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_MOVE_TO_FOLDER + BUTTON ID_DELETE + SEPARATOR + BUTTON ID_REPLY + BUTTON ID_REPLY_TO_ALL + BUTTON ID_FORWARD_MESSAGE + SEPARATOR + BUTTON ID_ADDRESS_BOOK + SEPARATOR + BUTTON ID_GROUP_BY_BOX + BUTTON ID_AUTO_PREVIEW + SEPARATOR + BUTTON ID_FIND_ITEMS + SEPARATOR + BUTTON ID_OFFICE_ASSISTANT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Print", ID_FILE_PRINT + MENUITEM "Print Pre&view", ID_FILE_PRINT_PREVIEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "Message" + BEGIN + MENUITEM "&Reply", ID_REPLY + MENUITEM "Reply to &all", ID_REPLY_TO_ALL + MENUITEM "&Forward", ID_FORWARD_MESSAGE + MENUITEM SEPARATOR + MENUITEM "&Move to folder", ID_MOVE_TO_FOLDER + MENUITEM "&Delete", ID_DELETE + END + POPUP "&View" + BEGIN + MENUITEM "&Forward", ID_FORWARD + MENUITEM "&Back", ID_BACK + MENUITEM "&Up", ID_UP_ONE_FOLDER + MENUITEM SEPARATOR + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Skin" + BEGIN + MENUITEM "&Classic", ID_SKIN_CLASSIC + MENUITEM "Office &XP", ID_SKIN_OFFICEXP + MENUITEM "&Office 2003", ID_SKIN_OFFICE2003 + END + POPUP "&Help" + BEGIN + MENUITEM "&About OutlookLikeDemo...", ID_APP_ABOUT + END +END + +IDR_POPUP_MENU MENU DISCARDABLE +BEGIN + POPUP "_POPUP_" + BEGIN + MENUITEM "&New Message", ID_NEW_MESSAGE + MENUITEM "&Post in this Folder", ID_POST_IN_FOLDER + MENUITEM SEPARATOR + MENUITEM "&Appointment", ID_APPOINTMENT + MENUITEM "&Meeting Request", ID_MEETING_REQUEST + MENUITEM "&Contact", ID_CONTACT + MENUITEM "&Task", ID_TASK + MENUITEM "Task &Request", ID_TASK_REQUEST + MENUITEM "N&ote", ID_NOTE + MENUITEM "&Office Document...", ID_OFFICE_DOCUMENT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS MOVEABLE PURE +BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, 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_SHBPROPERTIES_DIALOG DIALOGEX 0, 0, 280, 146 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "ShortcutBar properties" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_CLRBACK,"Button",BS_OWNERDRAW | WS_TABSTOP,87,16, + 55,14 + CONTROL "",IDC_HDRCLRBACK,"Button",BS_OWNERDRAW | WS_TABSTOP,87, + 33,55,14 + PUSHBUTTON "Text...",IDC_TEXTFONT,13,68,39,13 + PUSHBUTTON "Header...",IDC_HDRFONT,13,85,39,13 + EDITTEXT IDC_EDIT_HDRHEIGHT,61,108,27,12,ES_AUTOHSCROLL + CONTROL "Apply to expanded group only",IDC_CHECK_APPLYTOEXPANDED, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,126,109,10 + EDITTEXT IDC_EDIT_GRPMARGIN,242,18,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_LEFTMARGIN,183,50,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_TOPMARGIN,242,50,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_RIGHTMARGIN,183,66,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_BOTTOMMARGIN,242,66,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SCROLLBTNWIDTH,183,101,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SCROLLBTNHEIGHT,242,101,26,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,154,125,50,14 + PUSHBUTTON "Cancel",IDCANCEL,223,125,50,14 + GROUPBOX "Colors",IDC_STATIC,7,7,141,44 + LTEXT "Background",IDC_STATIC,14,19,40,8 + LTEXT "Header Background",IDC_STATIC,14,36,65,8 + GROUPBOX "Fonts",IDC_STATIC,7,56,141,48 + CONTROL "Static",IDC_NAMETEXTFONT,"Static",SS_SIMPLE | SS_SUNKEN | + WS_GROUP,61,68,81,12,WS_EX_STATICEDGE + CONTROL "Static",IDC_NAMEHDRFONT,"Static",SS_LEFTNOWORDWRAP | + SS_SUNKEN | WS_GROUP,61,85,81,12,WS_EX_STATICEDGE + GROUPBOX "Static",IDC_STATIC,154,7,119,112 + LTEXT "Margin between groups",IDC_STATIC,161,20,75,8 + LTEXT "Child Window Margins",IDC_STATIC,161,38,71,8 + LTEXT "Left",IDC_STATIC,161,52,13,8 + LTEXT "Top",IDC_STATIC,216,52,14,8 + LTEXT "Right",IDC_STATIC,161,68,18,8 + LTEXT "Bottom",IDC_STATIC,216,68,23,8 + LTEXT "Scroll Button Size",IDC_STATIC,160,90,56,8 + LTEXT "Width",IDC_STATIC,161,103,20,8 + LTEXT "Height",IDC_STATIC,216,103,22,8 + LTEXT "Header Height",IDC_STATIC,7,111,47,8 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "Outlook MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Outlook\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "OriginalFilename", "Outlook.EXE\0" + VALUE "ProductName", "Outlook Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO MOVEABLE PURE +BEGIN + IDD_SHBPROPERTIES_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 273 + TOPMARGIN, 7 + BOTTOMMARGIN, 139 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "OutlookLikeDemo" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Outlook" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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_PRINT "Print the active document\nPrint" + ID_FILE_PRINT_PREVIEW "Look at a print preview of the active document\nPrint Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEW_MESSAGE "Compose a E-mail New Message\nNew Message" + ID_BACK "Go Back\nBack" + ID_FORWARD "Go Forward\nForward" + ID_UP_ONE_FOLDER "Move Up One Folder\nUp One Level" + ID_TOGGLE_TREE "Shows or hides the Tree Window\nTree View" + ID_MOVE_TO_FOLDER "Move to the selected Folder\nMove to Folder" + ID_DELETE "Delete the selected item\nDelete" + ID_REPLY "Reply to the current message\nReply" + ID_REPLY_TO_ALL "Reply to all receipients in the message\nReply to All" + ID_ADDRESS_BOOK "Shows the address book\nAddress Book" + ID_GROUP_BY_BOX "Group by Box\nGroup by Box" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_AUTO_PREVIEW "See an Auto Preview\nAuto Preview" + ID_FIND_ITEMS "Find the selected items\nFind Items" + ID_OFFICE_ASSISTANT "Popup the Office Assistant for help\nOffice Assistant" + IDC_COMBO "Combobox of items\nItem list" + ID_FORWARD_MESSAGE "Forward the current message\nForward Message" + ID_POST_IN_FOLDER "Post a new item into this folder\nPost in this Folder" + ID_APPOINTMENT "Schedule a new appointment\nAppointment" + ID_MEETING_REQUEST "Allows you to request a meeting\nMeeting Request" + ID_CONTACT "Add a new contact\nContact" + ID_TASK "Task\nTask" + ID_TASK_REQUEST "Request a task\nTask Request" + ID_NOTE "Add a note\nNote" + ID_OFFICE_DOCUMENT "Open an existing office document\nOffice Document" + ID_VIEW_OUTLOOKBAR "Shows or hides the Outlook Bar\nOutlook Bar" + ID_VIEW_FOLDERVIEW "Shows or hides the folder list\nFolder List" + ID_DESCRIPTION_FILE "OutlookInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Outlook.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXBitmapButton.rc" +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXPopupBarCtrl.rc" +#include "OXShortcutBar.rc" +#include "OXMenubar.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.vcproj new file mode 100644 index 0000000..433b14e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/Outlook.vcproj @@ -0,0 +1,2649 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.cpp new file mode 100644 index 0000000..f63728d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.cpp @@ -0,0 +1,226 @@ +// OutlookDoc.cpp : implementation of the COutlookDoc class +// + +#include "stdafx.h" +#include "Outlook.h" + +#include "OutlookDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COutlookDoc + +IMPLEMENT_DYNCREATE(COutlookDoc, CDocument) + +BEGIN_MESSAGE_MAP(COutlookDoc, CDocument) + //{{AFX_MSG_MAP(COutlookDoc) + ON_COMMAND(ID_ADDRESS_BOOK, OnAddressBook) + ON_COMMAND(ID_AUTO_PREVIEW, OnAutoPreview) + ON_COMMAND(ID_BACK, OnBack) + ON_COMMAND(ID_DELETE, OnDelete) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview) + ON_COMMAND(ID_FIND_ITEMS, OnFindItems) + ON_COMMAND(ID_FORWARD, OnForward) + ON_COMMAND(ID_FORWARD_MESSAGE, OnForwardMessage) + ON_COMMAND(ID_GROUP_BY_BOX, OnGroupByBox) + ON_COMMAND(ID_MOVE_TO_FOLDER, OnMoveToFolder) + ON_COMMAND(ID_NEW_MESSAGE, OnNewMessage) + ON_COMMAND(ID_OFFICE_ASSISTANT, OnOfficeAssistant) + ON_COMMAND(ID_REPLY_TO_ALL, OnReplyToAll) + ON_COMMAND(ID_TOGGLE_TREE, OnToggleTree) + ON_COMMAND(ID_UP_ONE_FOLDER, OnUpOneFolder) + ON_COMMAND(ID_REPLY, OnReply) + ON_COMMAND(ID_APPOINTMENT, OnAppointment) + ON_COMMAND(ID_CONTACT, OnContact) + ON_COMMAND(ID_MEETING_REQUEST, OnMeetingRequest) + ON_COMMAND(ID_NOTE, OnNote) + ON_COMMAND(ID_OFFICE_DOCUMENT, OnOfficeDocument) + ON_COMMAND(ID_POST_IN_FOLDER, OnPostInFolder) + ON_COMMAND(ID_TASK, OnTask) + ON_COMMAND(ID_TASK_REQUEST, OnTaskRequest) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookDoc construction/destruction + +COutlookDoc::COutlookDoc() +{ + // TODO: add one-time construction code here + +} + +COutlookDoc::~COutlookDoc() +{ +} + +BOOL COutlookDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// COutlookDoc serialization + +void COutlookDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookDoc diagnostics + +#ifdef _DEBUG +void COutlookDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void COutlookDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COutlookDoc commands + +void COutlookDoc::OnAddressBook() +{ + AfxMessageBox(_T("OnAddressBook")); +} + +void COutlookDoc::OnAutoPreview() +{ + AfxMessageBox(_T("OnAutoPreview")); +} + +void COutlookDoc::OnBack() +{ + AfxMessageBox(_T("OnBack")); +} + +void COutlookDoc::OnDelete() +{ + AfxMessageBox(_T("OnDelete")); +} + +void COutlookDoc::OnFilePrintPreview() +{ + AfxMessageBox(_T("OnFilePrintPreview")); +} + +void COutlookDoc::OnFindItems() +{ + AfxMessageBox(_T("OnFindItems")); +} + +void COutlookDoc::OnForward() +{ + AfxMessageBox(_T("OnForward")); +} + +void COutlookDoc::OnForwardMessage() +{ + AfxMessageBox(_T("OnForwardMessage")); +} + +void COutlookDoc::OnGroupByBox() +{ + AfxMessageBox(_T("OnGroupByBox")); +} + +void COutlookDoc::OnMoveToFolder() +{ + AfxMessageBox(_T("OnMoveToFolder")); +} + +void COutlookDoc::OnNewMessage() +{ + AfxMessageBox(_T("OnNewMessage")); +} + +void COutlookDoc::OnOfficeAssistant() +{ + AfxMessageBox(_T("OnOfficeAssistant")); +} + +void COutlookDoc::OnReplyToAll() +{ + AfxMessageBox(_T("OnReplyToAll")); +} + +void COutlookDoc::OnToggleTree() +{ + AfxMessageBox(_T("OnToggleTree")); +} + +void COutlookDoc::OnUpOneFolder() +{ + AfxMessageBox(_T("OnUpOneFolder")); +} + +void COutlookDoc::OnReply() +{ + AfxMessageBox(_T("OnReply")); +} + +void COutlookDoc::OnAppointment() +{ + AfxMessageBox(_T("OnAppointment")); +} + +void COutlookDoc::OnContact() +{ + AfxMessageBox(_T("OnContact")); +} + +void COutlookDoc::OnMeetingRequest() +{ + AfxMessageBox(_T("OnMeetingRequest")); +} + +void COutlookDoc::OnNote() +{ + AfxMessageBox(_T("OnNote")); +} + +void COutlookDoc::OnOfficeDocument() +{ + AfxMessageBox(_T("OnOfficeDocument")); +} + +void COutlookDoc::OnPostInFolder() +{ + AfxMessageBox(_T("OnPostInFolder")); +} + +void COutlookDoc::OnTask() +{ + AfxMessageBox(_T("OnTask")); +} + +void COutlookDoc::OnTaskRequest() +{ + AfxMessageBox(_T("OnTaskRequest")); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.h new file mode 100644 index 0000000..5d6f72b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookDoc.h @@ -0,0 +1,79 @@ +// OutlookDoc.h : interface of the COutlookDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_OUTLOOKDOC_H__DA7AA82E_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOKDOC_H__DA7AA82E_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +class COutlookDoc : public CDocument +{ +protected: // create from serialization only + COutlookDoc(); + DECLARE_DYNCREATE(COutlookDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COutlookDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(COutlookDoc) + afx_msg void OnAddressBook(); + afx_msg void OnAutoPreview(); + afx_msg void OnBack(); + afx_msg void OnDelete(); + afx_msg void OnFilePrintPreview(); + afx_msg void OnFindItems(); + afx_msg void OnForward(); + afx_msg void OnForwardMessage(); + afx_msg void OnGroupByBox(); + afx_msg void OnMoveToFolder(); + afx_msg void OnNewMessage(); + afx_msg void OnOfficeAssistant(); + afx_msg void OnReplyToAll(); + afx_msg void OnToggleTree(); + afx_msg void OnUpOneFolder(); + afx_msg void OnReply(); + afx_msg void OnAppointment(); + afx_msg void OnContact(); + afx_msg void OnMeetingRequest(); + afx_msg void OnNote(); + afx_msg void OnOfficeDocument(); + afx_msg void OnPostInFolder(); + afx_msg void OnTask(); + afx_msg void OnTaskRequest(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOKDOC_H__DA7AA82E_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.cpp new file mode 100644 index 0000000..0eec15b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.cpp @@ -0,0 +1,62 @@ +// OutlookFormView.cpp : implementation file +// + +#include "stdafx.h" +#include "Outlook.h" +#include "OutlookFormView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COutlookFormView + +IMPLEMENT_DYNCREATE(COutlookFormView, CFormView) + +COutlookFormView::COutlookFormView() + : CFormView(COutlookFormView::IDD) +{ + //{{AFX_DATA_INIT(COutlookFormView) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +COutlookFormView::~COutlookFormView() +{ +} + +void COutlookFormView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COutlookFormView) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(COutlookFormView, CFormView) + //{{AFX_MSG_MAP(COutlookFormView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookFormView diagnostics + +#ifdef _DEBUG +void COutlookFormView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void COutlookFormView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COutlookFormView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.h new file mode 100644 index 0000000..7b07fd1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookFormView.h @@ -0,0 +1,63 @@ +#if !defined(AFX_OUTLOOKFORMVIEW_H__D6095444_2C7B_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOKFORMVIEW_H__D6095444_2C7B_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// OutlookFormView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// COutlookFormView form view + +#ifndef __AFXEXT_H__ +#include +#endif + +class COutlookFormView : public CFormView +{ +protected: + COutlookFormView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(COutlookFormView) + +// Form Data +public: + //{{AFX_DATA(COutlookFormView) + enum { IDD = IDD_FORMVIEW }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookFormView) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~COutlookFormView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions + //{{AFX_MSG(COutlookFormView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOKFORMVIEW_H__D6095444_2C7B_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookInfo.rtf new file mode 100644 index 0000000..a81f348 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookLikeDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookLikeDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookLikeDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.cpp new file mode 100644 index 0000000..01a9c45 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.cpp @@ -0,0 +1,134 @@ +// OutlookListView.cpp : implementation file +// + +#include "stdafx.h" +#include "Outlook.h" +#include "OutlookListView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COutlookListView + +IMPLEMENT_DYNCREATE(COutlookListView, CListView) + +COutlookListView::COutlookListView() +{ +} + +COutlookListView::~COutlookListView() +{ +} + + +BEGIN_MESSAGE_MAP(COutlookListView, CListView) + //{{AFX_MSG_MAP(COutlookListView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookListView drawing + +void COutlookListView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + // TODO: add draw code here +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookListView diagnostics + +#ifdef _DEBUG +void COutlookListView::AssertValid() const +{ + CListView::AssertValid(); +} + +void COutlookListView::Dump(CDumpContext& dc) const +{ + CListView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COutlookListView message handlers + +BOOL COutlookListView::PreCreateWindow(CREATESTRUCT& cs) +{ + cs.style |= LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL | LVS_SORTASCENDING; + + return CListView::PreCreateWindow(cs); +} + +void COutlookListView::OnInitialUpdate() +{ + CListView::OnInitialUpdate(); + + static LPTSTR lpszColumns[3] = { _T("Name"), _T("City"), _T("Title") }; + + m_ilList.Create(IDB_BITMAP4, 16, 1, RGB(255, 0, 255)); + GetListCtrl().SetImageList(&m_ilList, LVSIL_SMALL); + + LV_COLUMN lvc; + ZeroMemory((void*) &lvc, sizeof(lvc)); + + int i = 0; + for (i = 0; i < 3; i++) + { + lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH; + lvc.fmt = LVCFMT_LEFT; + lvc.pszText = lpszColumns[i]; + lvc.cx = i == 0 ? 200 : 100; + lvc.cchTextMax = 30; + + GetListCtrl().InsertColumn(i, &lvc); + } + + static const int nCount = 8; + static LPCTSTR lpszNames[nCount] = + { + _T("John McDonald"), + _T("Mary Bolten"), + _T("Bob Jackson"), + _T("Markus Brody"), + _T("Elizabeth Sizeberg"), + _T("Janna Stevens"), + _T("Martha Lenton"), + _T("Margaret Atwal") + }; + static LPCTSTR lpszCities[nCount] = + { + _T("Toronto"), + _T("New York"), + _T("Neice"), + _T("Mexico City"), + _T("Berlin"), + _T("Zurich"), + _T("Rome"), + _T("Madrid") + }; + static LPCTSTR lpszTitle[nCount] = + { + _T("CEO"), + _T("Head Chef"), + _T("Computer Programmer"), + _T("Engineer"), + _T("Shipper"), + _T("Consultant"), + _T("Professional Athlete"), + _T("Singer") + }; + + for (i = 0; i < nCount; i++) + { + int iItem = GetListCtrl().InsertItem(LVIF_TEXT | LVIF_IMAGE, i, lpszNames[i], NULL, NULL, 0, NULL); + GetListCtrl().SetItem(iItem, 1, LVIF_TEXT, lpszCities[i], NULL, NULL, NULL, NULL); + GetListCtrl().SetItem(iItem, 2, LVIF_TEXT, lpszTitle[i], NULL, NULL, NULL, NULL); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.h new file mode 100644 index 0000000..9d35423 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookListView.h @@ -0,0 +1,59 @@ +#if !defined(AFX_OUTLOOKLISTVIEW_H__DA7AA839_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOKLISTVIEW_H__DA7AA839_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// OutlookListView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// COutlookListView view + +class COutlookListView : public CListView +{ +protected: + COutlookListView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(COutlookListView) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookListView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~COutlookListView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CImageList m_ilList; + + // Generated message map functions +protected: + //{{AFX_MSG(COutlookListView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOKLISTVIEW_H__DA7AA839_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.cpp new file mode 100644 index 0000000..e2e67fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.cpp @@ -0,0 +1,95 @@ +// OutlookTreeView.cpp : implementation file +// + +#include "stdafx.h" +#include "Outlook.h" +#include "OutlookTreeView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COutlookTreeView + +IMPLEMENT_DYNCREATE(COutlookTreeView, CTreeView) + +COutlookTreeView::COutlookTreeView() +{ +} + +COutlookTreeView::~COutlookTreeView() +{ +} + + +BEGIN_MESSAGE_MAP(COutlookTreeView, CTreeView) + //{{AFX_MSG_MAP(COutlookTreeView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookTreeView drawing + +void COutlookTreeView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + // TODO: add draw code here +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookTreeView diagnostics + +#ifdef _DEBUG +void COutlookTreeView::AssertValid() const +{ + CTreeView::AssertValid(); +} + +void COutlookTreeView::Dump(CDumpContext& dc) const +{ + CTreeView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COutlookTreeView message handlers + +void COutlookTreeView::OnInitialUpdate() +{ + CTreeView::OnInitialUpdate(); + + const COLORREF rgb = RGB(255, 0, 255); + + TV_INSERTSTRUCT tvstruct; + TCHAR rgszItems[][20] = { _T("Mail Box"), _T("Calendar"), _T("Deleted Items"), _T("Inbox"), _T("Journal"), _T("Notes"), _T("Outbox"), _T("Sent Items") }; + + VERIFY(m_ilTree.Create(IDB_BITMAP3, 16, 8, rgb)); + GetTreeCtrl().SetImageList(&m_ilTree, TVSIL_NORMAL); + + HTREEITEM hParent = NULL; + for (int nIndex = 0; nIndex < (sizeof(rgszItems) / sizeof(rgszItems[0])); nIndex++) + { + tvstruct.hParent = nIndex == 0 ? NULL : hParent; + tvstruct.hInsertAfter = TVI_LAST; + tvstruct.item.iImage = nIndex; + tvstruct.item.iSelectedImage = nIndex; + tvstruct.item.pszText = rgszItems[nIndex]; + tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT; + HTREEITEM hItem = GetTreeCtrl().InsertItem(&tvstruct); + hParent = hParent == NULL ? hItem : hParent; + } + + GetTreeCtrl().Expand(GetTreeCtrl().GetRootItem(), TVE_EXPAND); +} + +BOOL COutlookTreeView::PreCreateWindow(CREATESTRUCT& cs) +{ + cs.style |= TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | TVS_HASBUTTONS; + + return CTreeView::PreCreateWindow(cs); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.h new file mode 100644 index 0000000..d284b62 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookTreeView.h @@ -0,0 +1,59 @@ +#if !defined(AFX_OUTLOOKTREEVIEW_H__DA7AA838_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOKTREEVIEW_H__DA7AA838_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// OutlookTreeView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// COutlookTreeView view + +class COutlookTreeView : public CTreeView +{ +protected: + COutlookTreeView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(COutlookTreeView) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookTreeView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~COutlookTreeView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CImageList m_ilTree; + + // Generated message map functions +protected: + //{{AFX_MSG(COutlookTreeView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOKTREEVIEW_H__DA7AA838_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.cpp new file mode 100644 index 0000000..6b8aa9d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.cpp @@ -0,0 +1,325 @@ +// OutlookView.cpp : implementation of the COutlookView class +// + +#include "stdafx.h" +#include "Outlook.h" + +#include "OutlookDoc.h" +#include "OutlookView.h" + +#include "SHBPropertiesDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define IDC_START (100) +#define IDC_OUTLOOKBAR (IDC_START + 1) +#define IDC_TREE (IDC_START + 2) + +#define SHB_IDMPROPERTIES (SHB_IDMUSER + 1) + +///////////////////////////////////////////////////////////////////////////// +// COutlookView + +IMPLEMENT_DYNCREATE(COutlookView, CView) + +BEGIN_MESSAGE_MAP(COutlookView, CView) + //{{AFX_MSG_MAP(COutlookView) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP + ON_NOTIFY(SHBN_CONTEXTMENU, IDC_OUTLOOKBAR, OnSHBContextMenu) + ON_COMMAND(SHB_IDMPROPERTIES, OnProperties) + ON_COMMAND(ID_SKIN_CLASSIC, OnSkinClassic) + ON_COMMAND(ID_SKIN_OFFICEXP, OnSkinOfficexp) + ON_COMMAND(ID_SKIN_OFFICE2003, OnSkinOffice2003) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COutlookView construction/destruction + +COutlookView::COutlookView() +{ + // TODO: add construction code here + +} + +COutlookView::~COutlookView() +{ +} + +BOOL COutlookView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookView drawing + +void COutlookView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + COutlookDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// COutlookView diagnostics + +#ifdef _DEBUG +void COutlookView::AssertValid() const +{ + CView::AssertValid(); +} + +void COutlookView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +COutlookDoc* COutlookView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COutlookDoc))); + return (COutlookDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// COutlookView message handlers + +int COutlookView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + const COLORREF rgb = RGB(255, 0, 255); + + m_shb.Create(this, CRect(0,0,0,0), + SHBS_EDITHEADERS | SHBS_EDITITEMS | SHBS_DRAWHEADERDRAGIMAGE | SHBS_BOLDEXPANDEDGROUP | SHBS_SHOWACTIVEALWAYS | SHBS_DRAWITEMDRAGIMAGE | SHBS_ANIMATEEXPAND | SHBS_FLATGROUPBUTTON, + IDC_OUTLOOKBAR, + WS_CHILD | WS_VISIBLE, + NULL); + + // create tree control + m_tree.Create(TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_EDITLABELS, CRect(0,0,0,0), &m_shb, IDC_TREE); + + TV_INSERTSTRUCT tvstruct; + TCHAR rgszItems[][20] = { _T("Mail Box"), _T("Calendar"), _T("Deleted Items"), _T("Inbox"), _T("Journal"), _T("Notes"), _T("Outbox"), _T("Sent Items") }; + VERIFY(m_ilTree.Create(IDB_BITMAP3, 16, 8, rgb)); + m_tree.SetImageList(&m_ilTree, TVSIL_NORMAL); + + HTREEITEM hParent = NULL; + int nIndex = 0; + for (nIndex = 0; nIndex < (sizeof(rgszItems) / sizeof(rgszItems[0])); nIndex++) + { + tvstruct.hParent = nIndex == 0 ? NULL : hParent; + tvstruct.hInsertAfter = TVI_LAST; + tvstruct.item.iImage = nIndex; + tvstruct.item.iSelectedImage = nIndex; + tvstruct.item.pszText = rgszItems[nIndex]; + tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT; + HTREEITEM hItem = m_tree.InsertItem(&tvstruct); + hParent = hParent == NULL ? hItem : hParent; + } + + { + +// VERIFY(m_ilTree2003.Create(25, 22, ILC_COLOR24 | ILC_MASK, 0, 10)); + + CBitmap bm; + bm.LoadBitmap(IDB_BITMAP5); + + BITMAP b; + bm.GetBitmap(&b); + + const int imageCount = 5; + + VERIFY(m_ilTree2003.Create(25, 22, ILC_COLOR32 | ILC_MASK, imageCount, imageCount) > 0); + + CDC dc; + dc.CreateCompatibleDC(NULL); + + CDC srcDC; + srcDC.CreateCompatibleDC(&dc); + CBitmap * pOldSrcBmp = srcDC.SelectObject(&bm); + + for(int i=0;i<=imageCount; ++i) + { + CBitmap bitmap; + bitmap.CreateBitmap(25, b.bmHeight, 1, 32, NULL); + CBitmap * pOldDestBmp = dc.SelectObject(&bitmap); + + dc.BitBlt(0, 0, 25, b.bmHeight, &srcDC, 25 * i, 0, SRCCOPY); + + dc.SelectObject(pOldDestBmp); + + m_ilTree2003.Add(&bitmap, RGB(255, 0, 255)); + } + + srcDC.SelectObject(pOldSrcBmp); + } + + // populate shortcut bar + m_shb.SetImageList(&m_ilTree2003); + + SHB_GROUPINFO shbGroup; + CString sText; + + // create image lists + VERIFY(m_ilLarge.Create(IDB_BITMAP1, 32, 11, rgb)); + VERIFY(m_ilSmall.Create(IDB_BITMAP2, 16, 11, rgb)); + + // outlook group + sText = _T("Outlook"); + shbGroup.nMask = SHBIF_TEXT; + shbGroup.nTextMax = sText.GetLength(); + shbGroup.pszText = sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + HSHBGROUP group = m_shb.InsertGroup(&shbGroup); + m_shb.SetGroupImage(group, 0); + + // mail group + sText = _T("Mail"); + shbGroup.nMask = SHBIF_TEXT; + shbGroup.nTextMax = sText.GetLength(); + shbGroup.pszText = sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + group = m_shb.InsertGroup(&shbGroup); + m_shb.SetGroupImage(group, 1); + + // group with tree control child window + sText = _T("Other"); + shbGroup.nMask = SHBIF_TEXT | SHBIF_CHILDWND; + shbGroup.nTextMax = sText.GetLength(); + shbGroup.pszText = sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + shbGroup.hwndChild = m_tree.GetSafeHwnd(); + group = m_shb.InsertGroup(&shbGroup); + m_shb.SetGroupImage(group, 2); + HSHBGROUP hGroup = m_shb.FindGroup(&shbGroup); + m_shb.SetGroupBkColor(hGroup, ::GetSysColor(COLOR_WINDOW)); + + // fill standard list controls + TCHAR shbszItems[][20]= { _T("Inbox"), _T("Calendar"), _T("Contacts"), _T("Tasks"), _T("Journal"), _T("Notes"), _T("Deleted Items"), _T("Inbox"), _T("Sent Items"), _T("Outbox"), _T("Deleted Items") }; + + // find outlook group and populate it + sText = _T("Outlook"); + shbGroup.nMask = SHBIF_TEXT; + shbGroup.nTextMax = sText.GetLength(); + shbGroup.pszText = sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + hGroup = m_shb.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_shb.SetLCImageList(hGroup, &m_ilLarge, LVSIL_NORMAL); + m_shb.SetLCImageList(hGroup, &m_ilSmall, LVSIL_SMALL); + + for(nIndex = 0; nIndex < 7 ; nIndex++) + { + CString sText = shbszItems[nIndex]; + LV_ITEM lvi; + lvi.iItem = nIndex; + lvi.iSubItem = 0; + lvi.mask = LVIF_TEXT|LVIF_IMAGE; + lvi.iImage = nIndex; + lvi.cchTextMax = sText.GetLength(); + lvi.pszText = sText.GetBuffer(lvi.cchTextMax); + sText.ReleaseBuffer(); + m_shb.InsertLCItem(hGroup, &lvi); + } + m_shb.ExpandGroup(hGroup); + + // find mail group and populate it + sText = _T("Mail"); + shbGroup.nMask = SHBIF_TEXT; + shbGroup.nTextMax = sText.GetLength(); + shbGroup.pszText = sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + hGroup = m_shb.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_shb.SetLCImageList(hGroup, &m_ilLarge, LVSIL_NORMAL); + m_shb.SetLCImageList(hGroup, &m_ilSmall, LVSIL_SMALL); + + for (nIndex = 7; nIndex < (sizeof(shbszItems) / sizeof(shbszItems[0])); nIndex++) + { + CString sText = shbszItems[nIndex]; + LV_ITEM lvi; + lvi.iItem = nIndex - 7; + lvi.iSubItem = 0; + lvi.mask = LVIF_TEXT | LVIF_IMAGE; + lvi.iImage = nIndex; + lvi.cchTextMax = sText.GetLength(); + lvi.pszText = sText.GetBuffer(lvi.cchTextMax); + sText.ReleaseBuffer(); + m_shb.InsertLCItem(hGroup, &lvi); + } + + return 0; +} + +void COutlookView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + CRect rect(0, 0, cx, cy); + + if (::IsWindow(m_shb.GetSafeHwnd())) + m_shb.MoveWindow(&rect); +} + +void COutlookView::OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + LPSHBCONTEXTMENU pSHBCM = (LPSHBCONTEXTMENU)((LPNMSHORTCUTBAR) pNotifyStruct)->lParam; + if (pSHBCM->pShortcutBar->GetSafeHwnd() == m_shb.GetSafeHwnd() && m_shb.GetExpandedGroup() != NULL) + { + CMenu* pMenu = pSHBCM->pMenu; + if (pMenu->GetMenuItemCount() > 0) + pMenu->AppendMenu(MF_SEPARATOR); + pMenu->AppendMenu(MF_STRING, SHB_IDMPROPERTIES, _T("Properties...")); + } + + *pResult = 0; +} + +void COutlookView::OnProperties() +{ + CSHBPropertiesDlg propertiesDlg(&m_shb); + propertiesDlg.DoModal(); +} +void COutlookView::OnSkinClassic() +{ + m_shb.SetImageList(&m_ilTree); + + COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp()); + if (pSkinnedApp != NULL) + pSkinnedApp->SetCurrentSkin(OXSkinClassic); +} + + +void COutlookView::OnSkinOfficexp() +{ + m_shb.SetImageList(&m_ilTree); + + COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp()); + if (pSkinnedApp != NULL) + pSkinnedApp->SetCurrentSkin(OXSkinOfficeXP); +} + +void COutlookView::OnSkinOffice2003() +{ + m_shb.SetImageList(&m_ilTree2003); + + COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp()); + if (pSkinnedApp != NULL) + pSkinnedApp->SetCurrentSkin(OXSkinOffice2003); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.h new file mode 100644 index 0000000..5b40f5e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/OutlookView.h @@ -0,0 +1,78 @@ +// OutlookView.h : interface of the COutlookView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_OUTLOOKVIEW_H__DA7AA830_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_OUTLOOKVIEW_H__DA7AA830_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class COutlookDoc; + +class COutlookView : public CView +{ +protected: // create from serialization only + COutlookView(); + DECLARE_DYNCREATE(COutlookView) + +// Attributes +public: + COutlookDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COutlookView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COutlookView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXShortcutBar m_shb; + CTreeCtrl m_tree; + + CImageList m_ilLarge; + CImageList m_ilSmall; + CImageList m_ilTree; + CImageList m_ilTree2003; + +// Generated message map functions +protected: + afx_msg void OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* pResult); + afx_msg void OnProperties(); + + //{{AFX_MSG(COutlookView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnSkinClassic(); + afx_msg void OnSkinOfficexp(); + afx_msg void OnSkinOffice2003(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in OutlookView.cpp +inline COutlookDoc* COutlookView::GetDocument() + { return (COutlookDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OUTLOOKVIEW_H__DA7AA830_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.cpp new file mode 100644 index 0000000..7712d4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.cpp @@ -0,0 +1,226 @@ +// SHBPropertiesDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Outlook.h" +#include "SHBPropertiesDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg dialog + + +CSHBPropertiesDlg::CSHBPropertiesDlg(COXShortcutBar* pShortcutBar, + CWnd* pParent /*=NULL*/) + : CDialog(CSHBPropertiesDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSHBPropertiesDlg) + m_bApplyOnlyToExpanded = TRUE; + m_nBottomMargin = 0; + m_nGroupMargin = 0; + m_nRightMargin = 0; + m_nLeftMargin = 0; + m_nScrollBtnHeight = 0; + m_nScrollBtnWidth = 0; + m_nTopMargin = 0; + m_sNameTextFont = _T(""); + m_sNameHeaderFont = _T(""); + m_nHeaderHeight = 0; + //}}AFX_DATA_INIT + + ASSERT(pShortcutBar); + m_pShortcutBar=pShortcutBar; +} + + +void CSHBPropertiesDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSHBPropertiesDlg) + DDX_Control(pDX, IDC_NAMETEXTFONT, m_ctlNameTextFont); + DDX_Control(pDX, IDC_NAMEHDRFONT, m_ctlNameHeaderFont); + DDX_Control(pDX, IDC_HDRCLRBACK, m_btnHeaderClrBack); + DDX_Control(pDX, IDC_CLRBACK, m_btnClrBack); + DDX_Check(pDX, IDC_CHECK_APPLYTOEXPANDED, m_bApplyOnlyToExpanded); + DDX_Text(pDX, IDC_EDIT_BOTTOMMARGIN, m_nBottomMargin); + DDX_Text(pDX, IDC_EDIT_GRPMARGIN, m_nGroupMargin); + DDX_Text(pDX, IDC_EDIT_RIGHTMARGIN, m_nRightMargin); + DDX_Text(pDX, IDC_EDIT_LEFTMARGIN, m_nLeftMargin); + DDX_Text(pDX, IDC_EDIT_SCROLLBTNHEIGHT, m_nScrollBtnHeight); + DDX_Text(pDX, IDC_EDIT_SCROLLBTNWIDTH, m_nScrollBtnWidth); + DDX_Text(pDX, IDC_EDIT_TOPMARGIN, m_nTopMargin); + DDX_Text(pDX, IDC_NAMETEXTFONT, m_sNameTextFont); + DDX_Text(pDX, IDC_NAMEHDRFONT, m_sNameHeaderFont); + DDX_Text(pDX, IDC_EDIT_HDRHEIGHT, m_nHeaderHeight); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_CLRBACK, m_clrBackground); + DDX_ColorPicker(pDX, IDC_HDRCLRBACK, m_clrHeaderBackground); +} + + +BEGIN_MESSAGE_MAP(CSHBPropertiesDlg, CDialog) + //{{AFX_MSG_MAP(CSHBPropertiesDlg) + ON_BN_CLICKED(IDC_HDRFONT, OnHdrfont) + ON_BN_CLICKED(IDC_TEXTFONT, OnTextfont) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg message handlers + +void CSHBPropertiesDlg::OnHdrfont() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + // Use font common dialog + CFontDialog fontDlg(&m_lfHeader); + fontDlg.m_cf.rgbColors=m_clrHeaderText; + if(fontDlg.DoModal()==IDOK) + { + m_clrHeaderText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&m_lfHeader); + m_sNameHeaderFont.Format(_T("%d pt, %s"),abs(m_lfHeader.lfHeight), + m_lfHeader.lfFaceName); + m_ctlNameHeaderFont.SetTextLogFont(&m_lfHeader); + m_ctlNameHeaderFont.SetTextColor(m_clrHeaderText,TRUE); + UpdateData(FALSE); + } +} + +void CSHBPropertiesDlg::OnTextfont() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + // Use font common dialog + CFontDialog fontDlg(&m_lfText); + fontDlg.m_cf.rgbColors=m_clrText; + if(fontDlg.DoModal()==IDOK) + { + m_clrText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&m_lfText); + m_sNameTextFont.Format(_T("%d pt, %s"),abs(m_lfText.lfHeight), + m_lfText.lfFaceName); + m_ctlNameTextFont.SetTextLogFont(&m_lfText); + m_ctlNameTextFont.SetTextColor(m_clrText); + UpdateData(FALSE); + } +} + +void CSHBPropertiesDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +BOOL CSHBPropertiesDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CSHBPropertiesDlg::GetVars() +{ + m_nLeftMargin=m_pShortcutBar->GetChildWndMargins().left; + m_nTopMargin=m_pShortcutBar->GetChildWndMargins().top; + m_nRightMargin=m_pShortcutBar->GetChildWndMargins().right; + m_nBottomMargin=m_pShortcutBar->GetChildWndMargins().bottom; + + m_nGroupMargin=m_pShortcutBar->GetGroupMargin(); + + m_nScrollBtnHeight=m_pShortcutBar->GetScrollButtonSize().cy; + m_nScrollBtnWidth=m_pShortcutBar->GetScrollButtonSize().cx; + + HSHBGROUP hGroup=m_pShortcutBar->GetExpandedGroup(); + ASSERT(hGroup); + + m_nHeaderHeight=m_pShortcutBar->GetGroupHeaderHeight(hGroup); + + m_clrBackground=m_pShortcutBar->GetGroupBkColor(hGroup); + m_clrHeaderBackground=m_pShortcutBar->GetGroupHeaderBkColor(hGroup); + m_clrText=m_pShortcutBar->GetGroupTextColor(hGroup); + m_clrHeaderText=m_pShortcutBar->GetGroupHeaderTextColor(hGroup); + + CFont font; + LPLOGFONT plf=m_pShortcutBar->GetGroupTextFont(hGroup); + ASSERT(plf); + VERIFY(font.CreateFontIndirect(plf)); + VERIFY(font.GetLogFont(&m_lfText)); + + plf=m_pShortcutBar->GetGroupHeaderTextFont(hGroup); + ASSERT(plf); + if((HFONT)font) + font.DeleteObject(); + VERIFY(font.CreateFontIndirect(plf)); + VERIFY(font.GetLogFont(&m_lfHeader)); + + m_sNameTextFont.Format(_T("%d pt, %s"),abs(m_lfText.lfHeight),m_lfText.lfFaceName); + m_ctlNameTextFont.SetTextColor(m_clrText); + m_ctlNameTextFont.SetTextLogFont(&m_lfText); + + m_sNameHeaderFont.Format(_T("%d pt, %s"),abs(m_lfHeader.lfHeight), + m_lfHeader.lfFaceName); + m_ctlNameHeaderFont.SetTextColor(m_clrHeaderText); + m_ctlNameHeaderFont.SetTextLogFont(&m_lfHeader); + + m_btnHeaderClrBack.SetDefaultColor(::GetSysColor(COLOR_BTNFACE)); + m_btnClrBack.SetDefaultColor(::GetSysColor(COLOR_3DSHADOW)); + + UpdateData(FALSE); + + ShowControls(); +} + +void CSHBPropertiesDlg::SetVars() +{ + UpdateData(); + + m_pShortcutBar->SetChildWndMargins(CRect(m_nLeftMargin,m_nTopMargin, + m_nRightMargin,m_nBottomMargin)); + m_pShortcutBar->SetGroupMargin(m_nGroupMargin); + + m_pShortcutBar->SetScrollButtonSize(CSize(m_nScrollBtnWidth,m_nScrollBtnHeight)); + + HSHBGROUP hGroup=NULL; + if(m_bApplyOnlyToExpanded) + { + hGroup=m_pShortcutBar->GetExpandedGroup(); + ASSERT(hGroup); + } + + m_pShortcutBar->SetGroupHeaderHeight(hGroup,m_nHeaderHeight); + + m_pShortcutBar->SetGroupBkColor(hGroup,m_clrBackground); + m_pShortcutBar->SetGroupHeaderBkColor(hGroup,m_clrHeaderBackground); + m_pShortcutBar->SetGroupTextColor(hGroup,m_clrText); + m_pShortcutBar->SetGroupHeaderTextColor(hGroup,m_clrHeaderText); + + m_pShortcutBar->SetGroupHeaderTextFont(hGroup,&m_lfHeader); + m_pShortcutBar->SetGroupTextFont(hGroup,&m_lfText); + + m_pShortcutBar->RedrawBar(); +} + +void CSHBPropertiesDlg::ShowControls() +{ +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.h new file mode 100644 index 0000000..92e947c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/SHBPropertiesDlg.h @@ -0,0 +1,79 @@ +#if !defined(AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_) +#define AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// SHBPropertiesDlg.h : header file +// + +#include "OXColorPickerButton.h" +#include "OXStatic.h" +#include "OXShortcutBar.h" + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg dialog + +class CSHBPropertiesDlg : public CDialog +{ +// Construction +public: + CSHBPropertiesDlg(COXShortcutBar* pShortcutBar, CWnd* pParent = NULL); + +// Dialog Data + //{{AFX_DATA(CSHBPropertiesDlg) + enum { IDD = IDD_SHBPROPERTIES_DIALOG }; + COXStatic m_ctlNameTextFont; + COXStatic m_ctlNameHeaderFont; + COXColorPickerButton m_btnHeaderClrBack; + COXColorPickerButton m_btnClrBack; + BOOL m_bApplyOnlyToExpanded; + int m_nBottomMargin; + int m_nGroupMargin; + int m_nRightMargin; + int m_nLeftMargin; + UINT m_nScrollBtnHeight; + UINT m_nScrollBtnWidth; + int m_nTopMargin; + CString m_sNameTextFont; + CString m_sNameHeaderFont; + int m_nHeaderHeight; + //}}AFX_DATA + COLORREF m_clrBackground; + COLORREF m_clrHeaderBackground; + COLORREF m_clrText; + COLORREF m_clrHeaderText; + LOGFONT m_lfText; + LOGFONT m_lfHeader; + +protected: + COXShortcutBar* m_pShortcutBar; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSHBPropertiesDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void GetVars(); + void SetVars(); + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CSHBPropertiesDlg) + afx_msg void OnHdrfont(); + afx_msg void OnTextfont(); + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.cpp new file mode 100644 index 0000000..255f360 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Outlook.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.h new file mode 100644 index 0000000..e4b5f58 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__DA7AA82A_2C67_11D2_88E3_0080C859A484__INCLUDED_) +#define AFX_STDAFX_H__DA7AA82A_2C67_11D2_88E3_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include +#include "OXShortcutBar.h" +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__DA7AA82A_2C67_11D2_88E3_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.rc2 new file mode 100644 index 0000000..77906ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Outlook.rc2 @@ -0,0 +1,13 @@ +// +// OUTLOOK.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/OutlookDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/OutlookDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/OutlookDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Toolbar.bmp new file mode 100644 index 0000000..0342657 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/TreeImages.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/TreeImages.bmp new file mode 100644 index 0000000..a54ea46 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/TreeImages.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/bitmap4.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/bitmap4.bmp new file mode 100644 index 0000000..e7c7a28 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/bitmap4.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/icon1.ico new file mode 100644 index 0000000..01b9c8a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/large.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/large.bmp new file mode 100644 index 0000000..b48a47a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/large.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/outlook2003.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/outlook2003.bmp new file mode 100644 index 0000000..e15d8d3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/outlook2003.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/small.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/small.bmp new file mode 100644 index 0000000..5ffe09a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/res/small.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/resource.h new file mode 100644 index 0000000..17031ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/OutlookLikedemo/resource.h @@ -0,0 +1,75 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Outlook.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_FORMVIEW 101 +#define IDR_MAINFRAME 128 +#define IDR_OUTLOOTYPE 129 +#define IDB_BITMAP1 130 +#define IDB_BITMAP2 131 +#define IDB_BITMAP3 132 +#define IDD_SHBPROPERTIES_DIALOG 132 +#define IDR_POPUP_MENU 133 +#define IDI_ICON 134 +#define IDB_BITMAP4 135 +#define IDB_BITMAP5 136 +#define IDC_LIST 1000 +#define IDC_CLRBACK 1023 +#define IDC_TEXTFONT 1024 +#define IDC_HDRCLRBACK 1026 +#define IDC_NAMETEXTFONT 1027 +#define IDC_CHECK_APPLYTOEXPANDED 1028 +#define IDC_EDIT_GRPMARGIN 1029 +#define IDC_HDRFONT 1030 +#define IDC_NAMEHDRFONT 1031 +#define IDC_EDIT_LEFTMARGIN 1032 +#define IDC_EDIT_TOPMARGIN 1033 +#define IDC_EDIT_RIGHTMARGIN 1034 +#define IDC_EDIT_BOTTOMMARGIN 1035 +#define IDC_EDIT_SCROLLBTNWIDTH 1036 +#define IDC_EDIT_SCROLLBTNHEIGHT 1037 +#define IDC_EDIT_HDRHEIGHT 1038 +#define ID_NEW_MESSAGE 32771 +#define ID_BACK 32772 +#define ID_FORWARD 32773 +#define ID_UP_ONE_FOLDER 32774 +#define ID_TOGGLE_TREE 32775 +#define ID_MOVE_TO_FOLDER 32777 +#define ID_DELETE 32778 +#define ID_REPLY 32779 +#define ID_REPLY_TO_ALL 32780 +#define ID_ADDRESS_BOOK 32782 +#define ID_GROUP_BY_BOX 32783 +#define ID_AUTO_PREVIEW 32784 +#define ID_FIND_ITEMS 32785 +#define ID_OFFICE_ASSISTANT 32786 +#define IDC_COMBO 32787 +#define ID_FORWARD_MESSAGE 32788 +#define ID_POST_IN_FOLDER 32789 +#define ID_APPOINTMENT 32790 +#define ID_MEETING_REQUEST 32791 +#define ID_CONTACT 32792 +#define ID_TASK 32793 +#define ID_TASK_REQUEST 32794 +#define ID_NOTE 32795 +#define ID_OFFICE_DOCUMENT 32796 +#define ID_VIEW_OUTLOOKBAR 32797 +#define ID_VIEW_FOLDERVIEW 32798 +#define ID_DESCRIPTION_FILE 32799 +#define ID_FILE_EXIT 32799 +#define ID_SKIN_CLASSIC 32800 +#define ID_SKIN_OFFICEXP 32801 +#define ID_SKIN_OFFICE2003 32802 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 137 +#define _APS_NEXT_COMMAND_VALUE 32803 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.cpp new file mode 100644 index 0000000..55f7d21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.cpp @@ -0,0 +1,51 @@ +#include "stdafx.h" +#include "CaptureTaskbarIcon.h" + +#include "resource.h" // main symbols + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCaptureTaskbarIcon + +BEGIN_MESSAGE_MAP(CCaptureTaskbarIcon, COXTaskbarIcon) + //{{AFX_MSG_MAP(CCaptureTaskbarIcon) + ON_WM_LBUTTONDBLCLK() + ON_WM_RBUTTONDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +void CCaptureTaskbarIcon::OnRButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + // on right click show menu + DoPopupMenu(); +} + +void CCaptureTaskbarIcon::OnLButtonDblClk(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + // on double click restore the position of window on screen + ::PostMessage(m_pPopupOwner->m_hWnd, WM_COMMAND, ID_OPEN, (LPARAM)m_hWnd); +} + +void CCaptureTaskbarIcon::DoPopupMenu() +{ + CMenu popMenu; + VERIFY(popMenu.LoadMenu(IDR_POPUPMENU)); + + CPoint posMouse; + GetCursorPos(&posMouse); + + // show menu + popMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, + posMouse.x, posMouse.y, m_pPopupOwner); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.h new file mode 100644 index 0000000..6848506 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/CaptureTaskbarIcon.h @@ -0,0 +1,19 @@ +#include "OXTaskbarIcon.h" + +class CCaptureTaskbarIcon : public COXTaskbarIcon +{ +public: + CCaptureTaskbarIcon() { }; + void DoPopupMenu(); + // pointer to window to send messages + CWnd* m_pPopupOwner; + + //{{AFX_VIRTUAL(CCaptureTaskbarIcon) + //}}AFX_VIRTUAL + + //{{AFX_MSG(CCaptureTaskbarIcon) + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/HelpIDs.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/HelpIDs.h new file mode 100644 index 0000000..66a7a14 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/HelpIDs.h @@ -0,0 +1,34 @@ +#define IDH_STATIC_HOT_KEY 1000 +#define IDH_COMBO_HOT_KEY 1001 +#define IDH_CHECK_INITIAL_DELAY 1002 +#define IDH_EDIT_INITIAL_DELAY 1003 +#define IDH_SPIN_INITIAL_DELAY 1004 +#define IDH_CHECK_FILE 2000 +#define IDH_CHECK_CLIPBOARD 2001 +#define IDH_STATIC_FILE_NAME 3000 +#define IDH_COMBO_FILE_NAME 3001 +#define IDH_STATIC_FILE_TYPE 3002 +#define IDH_COMBO_FILE_TYPE 3003 +#define IDH_CHECK_AUTOMATIC_NAMING 3004 +#define IDH_BUTTON_CAPTURE_DIR 3005 +#define IDH_STATIC_CAPTURE_DIR 3006 +#define IDH_CHECK_RESIZE 4000 +#define IDH_STATIC_WIDTH 4001 +#define IDH_EDIT_WIDTH 4002 +#define IDH_SPIN_WIDTH 4003 +#define IDH_STATIC_HEIGHT 4004 +#define IDH_EDIT_HEIGHT 4005 +#define IDH_SPIN_HEIGHT 4006 +#define IDH_CHECK_MAINTAIN_RATIO 4007 +#define IDH_CHECK_HIDE_ICON 5000 +#define IDH_CHECK_NOTIFY_END 5001 +#define IDH_RADIO_CURRENT_WINDOW 6000 +#define IDH_RADIO_CLIENT_WINDOW 6001 +#define IDH_RADIO_FULL_SCREEN 6002 +#define IDH_RADIO_RECT_AREA 6003 + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.cpp new file mode 100644 index 0000000..ba05fcb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.cpp @@ -0,0 +1,204 @@ +// PropertyPageActivation.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ScreenGrabber.h" +#include "PropertyPageActivation.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageActivation dialog + +//IMPLEMENT_DYNCREATE(CPropertyPageActivation, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPageActivation::m_nHelpIDs[] = +{ + IDC_STATIC_HOT_KEY, IDH_STATIC_HOT_KEY, + IDC_COMBO_HOT_KEY, IDH_COMBO_HOT_KEY, + IDC_CHECK_INITIAL_DELAY, IDH_CHECK_INITIAL_DELAY, + IDC_EDIT_INITIAL_DELAY, IDH_EDIT_INITIAL_DELAY, + IDC_SPIN_INITIAL_DELAY, IDH_SPIN_INITIAL_DELAY, + 0, 0 +}; + + +CPropertyPageActivation::CPropertyPageActivation() + : COXContextHelpPropertyPage(CPropertyPageActivation::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageActivation) + m_sHotKey = _T(""); + m_nInitialDelay = 0; + m_bInitialDelay = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageActivation::~CPropertyPageActivation() +{ +} + +void CPropertyPageActivation::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageActivation) + DDX_Control(pDX, IDC_CHECK_INITIAL_DELAY, m_ctlCheckInitialDelay); + DDX_Control(pDX, IDC_STATIC_HOT_KEY, m_ctlStaticHotKey); + DDX_Control(pDX, IDC_SPIN_INITIAL_DELAY, m_ctlSpinInitialDelay); + DDX_Control(pDX, IDC_EDIT_INITIAL_DELAY, m_ctlEditInitialDelay); + DDX_Control(pDX, IDC_COMBO_HOT_KEY, m_ctlComboHotKey); + DDX_CBString(pDX, IDC_COMBO_HOT_KEY, m_sHotKey); + DDX_Text(pDX, IDC_EDIT_INITIAL_DELAY, m_nInitialDelay); + DDV_MinMaxUInt(pDX, m_nInitialDelay, 1, 60); + DDX_Check(pDX, IDC_CHECK_INITIAL_DELAY, m_bInitialDelay); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPageActivation, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageActivation) + ON_BN_CLICKED(IDC_CHECK_INITIAL_DELAY, OnCheckInitialDelay) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageActivation message handlers + +BOOL CPropertyPageActivation::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlStaticHotKey, + _T("Define the hot key to start capturing")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckInitialDelay, + _T("Define delay in seconds before capture")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlSpinInitialDelay, + _T("Change value of initial delay from 1 to 60 seconds")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlEditInitialDelay, + _T("Change value of initial delay from 1 to 60 seconds")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlComboHotKey, + _T("Pick hot key to start capturing")); + ASSERT(result != 0) ; + + return result; +} + +BOOL CPropertyPageActivation::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_TIMING)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_TIMING, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_TIMING, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_SPIN_INITIAL_DELAY)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_SPIN_INITIAL_DELAY, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + + GetDlgItem(IDC_EDIT_INITIAL_DELAY)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_EDIT_INITIAL_DELAY, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + + GetDlgItem(IDC_CHECK_INITIAL_DELAY)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_CHECK_INITIAL_DELAY, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_CHECK_INITIAL_DELAY, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_COMBO_HOT_KEY)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_COMBO_HOT_KEY, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_COMBO_HOT_KEY, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + // Define array of possible hot keys + m_ctlComboHotKey.AddString(_T("F1")); + m_ctlComboHotKey.AddString(_T("F2")); + m_ctlComboHotKey.AddString(_T("F3")); + m_ctlComboHotKey.AddString(_T("F4")); + m_ctlComboHotKey.AddString(_T("F5")); + m_ctlComboHotKey.AddString(_T("F6")); + m_ctlComboHotKey.AddString(_T("F7")); + m_ctlComboHotKey.AddString(_T("F8")); + m_ctlComboHotKey.AddString(_T("F9")); + m_ctlComboHotKey.AddString(_T("F10")); + + // check if all variables are correct + CheckVars(); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinInitialDelay.SetBuddy(&m_ctlEditInitialDelay); + m_ctlSpinInitialDelay.SetRange(ID_MIN_INITIAL_DELAY,ID_MAX_INITIAL_DELAY); + m_ctlSpinInitialDelay.SetPos(m_nInitialDelay); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinInitialDelay.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + UpdateData(FALSE); + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageActivation::OnCheckInitialDelay() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + ShowControls(); +} + +void CPropertyPageActivation::ShowControls() +{ + if(m_bInitialDelay) + { + m_ctlEditInitialDelay.EnableWindow(TRUE); + m_ctlSpinInitialDelay.EnableWindow(TRUE); + } + else + { + m_ctlEditInitialDelay.EnableWindow(FALSE); + m_ctlSpinInitialDelay.EnableWindow(FALSE); + } + + UpdateData(FALSE); +} + +void CPropertyPageActivation::CheckVars() +{ + if(m_nInitialDelayID_MAX_INITIAL_DELAY) + { + m_nInitialDelay=ID_MIN_INITIAL_DELAY; + } + if(m_ctlComboHotKey.FindStringExact(-1,m_sHotKey)==CB_ERR) + { + if(m_ctlComboHotKey.GetCount()>0) + { + m_ctlComboHotKey.GetLBText(0,m_sHotKey); + } + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.h new file mode 100644 index 0000000..818b708 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageActivation.h @@ -0,0 +1,69 @@ +#if !defined(AFX_PROPERTYPAGEACTIVATION_H__ACC74CA2_804B_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGEACTIVATION_H__ACC74CA2_804B_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPageActivation.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXSpinCtrl.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageActivation dialog + +class CPropertyPageActivation : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPageActivation) + +// Construction +public: + CPropertyPageActivation(); // standard constructor + ~CPropertyPageActivation(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageActivation) + enum { IDD = IDD_PROPPAGE_ACTIVATION }; + CButton m_ctlCheckInitialDelay; + CStatic m_ctlStaticHotKey; + COXSpinCtrl m_ctlSpinInitialDelay; + CEdit m_ctlEditInitialDelay; + CComboBox m_ctlComboHotKey; + CString m_sHotKey; + UINT m_nInitialDelay; + BOOL m_bInitialDelay; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageActivation) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPageActivation) + virtual BOOL OnInitDialog(); + afx_msg void OnCheckInitialDelay(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEACTIVATION_H__ACC74CA2_804B_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.cpp new file mode 100644 index 0000000..c89df60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.cpp @@ -0,0 +1,115 @@ +// PropertyPageDestination.cpp : implementation file +// + +#include "stdafx.h" +#include "ScreenGrabber.h" +#include "PropertyPageDestination.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageDestination property page + +//IMPLEMENT_DYNCREATE(CPropertyPageDestination, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPageDestination::m_nHelpIDs[] = +{ + IDC_CHECK_FILE, IDH_CHECK_FILE, + IDC_CHECK_CLIPBOARD, IDH_CHECK_CLIPBOARD, + 0, 0 +}; + + +CPropertyPageDestination::CPropertyPageDestination() : + COXContextHelpPropertyPage(CPropertyPageDestination::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageDestination) + m_bClipboard = FALSE; + m_bFile = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageDestination::~CPropertyPageDestination() +{ +} + +void CPropertyPageDestination::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageDestination) + DDX_Control(pDX, IDC_CHECK_FILE, m_ctlCheckFile); + DDX_Control(pDX, IDC_CHECK_CLIPBOARD, m_ctlCheckClipboard); + DDX_Check(pDX, IDC_CHECK_CLIPBOARD, m_bClipboard); + DDX_Check(pDX, IDC_CHECK_FILE, m_bFile); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPageDestination, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageDestination) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageDestination message handlers + +BOOL CPropertyPageDestination::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlCheckFile, + _T("Save the captured image into file")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckClipboard, + _T("Copy the captured image into clipboard")); + ASSERT(result != 0) ; + + return result; +} + + + +BOOL CPropertyPageDestination::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_DESTINATION)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_DESTINATION, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_DESTINATION, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + // check if all variables are correct + CheckVars(); + + UpdateData(FALSE); + + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageDestination::ShowControls() +{ +} + +void CPropertyPageDestination::CheckVars() +{ +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.h new file mode 100644 index 0000000..dc64ea1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageDestination.h @@ -0,0 +1,64 @@ +#if !defined(AFX_PROPERTYPAGEDESTINATION_H__E32DDA23_805A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGEDESTINATION_H__E32DDA23_805A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPageDestination.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageDestination dialog + +class CPropertyPageDestination : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPageDestination) + +// Construction +public: + CPropertyPageDestination(); + ~CPropertyPageDestination(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageDestination) + enum { IDD = IDD_PROPPAGE_DESTINATION }; + CButton m_ctlCheckFile; + CButton m_ctlCheckClipboard; + BOOL m_bClipboard; + BOOL m_bFile; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageDestination) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPageDestination) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEDESTINATION_H__E32DDA23_805A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.cpp new file mode 100644 index 0000000..9c5fb18 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.cpp @@ -0,0 +1,295 @@ +// PropertyPageFile.cpp : implementation file +// + +#include "stdafx.h" +#include "ScreenGrabber.h" +#include "PropertyPageFile.h" + +#include "oxdirdlg.h" +#include "path.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageFile property page + +//IMPLEMENT_DYNCREATE(CPropertyPageFile, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPageFile::m_nHelpIDs[] = +{ + IDC_STATIC_FILE_NAME, IDH_STATIC_FILE_NAME, + IDC_COMBO_FILE_NAME, IDH_COMBO_FILE_NAME, + IDC_STATIC_FILE_TYPE, IDH_STATIC_FILE_TYPE, + IDC_COMBO_FILE_TYPE, IDH_COMBO_FILE_TYPE, + IDC_CHECK_AUTOMATIC_NAMING, IDH_CHECK_AUTOMATIC_NAMING, + IDC_BUTTON_CAPTURE_DIR, IDH_BUTTON_CAPTURE_DIR, + IDC_STATIC_CAPTURE_DIR, IDH_STATIC_CAPTURE_DIR, + 0, 0 +}; + + +CPropertyPageFile::CPropertyPageFile() : + COXContextHelpPropertyPage(CPropertyPageFile::IDD), + m_ctlComboFileName(COXHistoryCombo::TBPHorizontalRightCenter,FALSE) +{ + //{{AFX_DATA_INIT(CPropertyPageFile) + m_bAutomaticNaming = FALSE; + m_sFileName = _T(""); + m_sFileType = _T(""); + m_sCaptureDir = _T(""); + //}}AFX_DATA_INIT + m_bInitialized=FALSE; +} + +CPropertyPageFile::~CPropertyPageFile() +{ +} + +void CPropertyPageFile::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageFile) + DDX_Control(pDX, IDC_COMBO_FILE_NAME, m_ctlComboFileName); + DDX_Control(pDX, IDC_COMBO_FILE_TYPE, m_ctlComboFileType); + DDX_Control(pDX, IDC_STATIC_FILE_TYPE, m_ctlStaticFileType); + DDX_Control(pDX, IDC_STATIC_FILE_NAME, m_ctlStaticFileName); + DDX_Control(pDX, IDC_STATIC_CAPTURE_DIR, m_ctlStaticCaptureDir); + DDX_Control(pDX, IDC_CHECK_AUTOMATIC_NAMING, m_ctlCheckAutomaticNaming); + DDX_Control(pDX, IDC_BUTTON_CAPTURE_DIR, m_ctlButtonDir); + DDX_CBString(pDX, IDC_COMBO_FILE_NAME, m_sFileName); + DDX_CBString(pDX, IDC_COMBO_FILE_TYPE, m_sFileType); + DDX_Text(pDX, IDC_STATIC_CAPTURE_DIR, m_sCaptureDir); + DDX_Check(pDX, IDC_CHECK_AUTOMATIC_NAMING, m_bAutomaticNaming); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPageFile, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageFile) + ON_BN_CLICKED(IDC_BUTTON_CAPTURE_DIR, OnButtonCaptureDir) + ON_BN_CLICKED(IDC_CHECK_AUTOMATIC_NAMING, OnCheckAutomaticNaming) + ON_WM_SIZE() + //}}AFX_MSG_MAP + ON_MESSAGE(WM_KICKIDLE, OnKickIdle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageFile message handlers + +BOOL CPropertyPageFile::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlStaticFileType, + _T("Define the type of file to save captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlStaticFileName, + _T("Define the name of file to save captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlStaticCaptureDir, + _T("The name of directory where the file will be saved")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlComboFileType, + _T("Change the type of file to save captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlComboFileName, + _T("Change the name of file to save captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckAutomaticNaming, + _T("Automatically set a name of file to save captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlButtonDir, + _T("Change the name of directory where the file will be saved")); + ASSERT(result != 0) ; + + return result; +} + +BOOL CPropertyPageFile::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_DIR)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_DIR, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_DIR, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_COMBO_FILE_NAME)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_COMBO_FILE_NAME, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_COMBO_FILE_NAME, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_COMBO_FILE_TYPE)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_COMBO_FILE_TYPE, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_COMBO_FILE_TYPE, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_STATIC_CAPTURE_DIR)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_CAPTURE_DIR, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_CAPTURE_DIR, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_BUTTON_CAPTURE_DIR)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_BUTTON_CAPTURE_DIR, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + + // Define array of possible types of file + m_ctlComboFileType.AddString(_T("Windows Bitmap (*.bmp)")); + m_ctlComboFileType.AddString(_T("JPEG Bitmap (*.jpg)")); + // check if all variables are correct + CheckVars(); + + // Use auto persistence + m_ctlComboFileName.SetAutoPersistent(_T("History - FileName")); + m_ctlComboFileName.SetMaxHistoryCount(-1); + m_ctlComboFileName.ShowButton(2,FALSE); + m_ctlComboFileName.RefreshToolbar(); + COXHistoryCombo::EToolbarPosition eToolbarPosition= + m_ctlComboFileName.GetToolbarPosition(); + m_ctlComboFileName.PositionToolbar(eToolbarPosition, TRUE); + + UpdateData(FALSE); + ShowControls(); + + m_bInitialized=TRUE; + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageFile::OnButtonCaptureDir() +{ + // TODO: Add your control notification handler code here + + TRY + { + // try to get new capture directory + UpdateData(TRUE); + + DWORD flags = OFN_SHOWHELP | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; + + // Ask the user to select a directory + COXDirectoryDialog dirDlg(m_sCaptureDir,_T("Pick Capture Directory"),TRUE,flags); + if (dirDlg.DoModal()==IDOK) + { + m_sCaptureDir=dirDlg.GetDirectory(); + UpdateData(FALSE); + } + } + CATCH_ALL(px) + { + // Catch all exception and NEVER pass them on to the calling + // function (may not be MFC) ! + TRACE(_T("CPropertyPageFile::OnButtonCaptureDir() : Catching exception, aborting function\n")); + } + END_CATCH_ALL +} + +void CPropertyPageFile::OnCheckAutomaticNaming() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CPropertyPageFile::ShowControls() +{ + UpdateData(TRUE); + if(m_bAutomaticNaming) + { + m_ctlComboFileName.EnableWindow(FALSE); + } + else + { + m_ctlComboFileName.EnableWindow(TRUE); + } + + UpdateData(FALSE); +} + +void CPropertyPageFile::CheckVars() +{ + if(m_ctlComboFileType.FindStringExact(-1,m_sFileType)==CB_ERR) + { + if(m_ctlComboFileType.GetCount()>0) + { + m_ctlComboFileType.GetLBText(0,m_sFileType); + } + } + + // check if Capture Directory exists + COXPathSpec pathSpec; + if(!pathSpec.SetDirectory(m_sCaptureDir)) + { + // if Capture Directory doesn't exist then + // set it to Current Directory + pathSpec.DoGetCurrentDir(); + } + + if(m_bAutomaticNaming) + { + // check if we are capable of automatically naming Capture File + if(!pathSpec.MakeUnique()) + { + m_bAutomaticNaming=FALSE; + } + } + + if(!m_bAutomaticNaming) + { + if(m_sFileName.IsEmpty()) + { + m_sFileName=_T("ScreenShot"); + } + } + +} + +LRESULT CPropertyPageFile::OnKickIdle(WPARAM wParam, LPARAM /*lParam*/) +{ + UNREFERENCED_PARAMETER(wParam); + //use this function to let History Combo's toolbars to get messages + ASSERT_VALID(this); + ASSERT(wParam == MSGF_DIALOGBOX); + BOOL bContinueIdle = TRUE; + + // Pass on to the history combo + m_ctlComboFileName.OnIdle(); + + return bContinueIdle; +} + + +void CPropertyPageFile::OnSize(UINT nType, int cx, int cy) +{ + COXContextHelpPropertyPage::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + + if(m_bInitialized && UpdateData()) + { + m_ctlComboFileName.RefreshToolbar(); + UpdateData(FALSE); + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.h new file mode 100644 index 0000000..de90946 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageFile.h @@ -0,0 +1,78 @@ +#if !defined(AFX_PROPERTYPAGEFILE_H__E32DDA25_805A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGEFILE_H__E32DDA25_805A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPageFile.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXHistoryCombo.h" +#include "OXLayoutManager.h" + + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageFile dialog + +class CPropertyPageFile : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPageFile) + +// Construction +public: + CPropertyPageFile(); + ~CPropertyPageFile(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageFile) + enum { IDD = IDD_PROPPAGE_FILE }; + CStatic m_ctlStaticFileType; + CStatic m_ctlStaticFileName; + CStatic m_ctlStaticCaptureDir; + CComboBox m_ctlComboFileType; + COXHistoryCombo m_ctlComboFileName; + CButton m_ctlCheckAutomaticNaming; + CButton m_ctlButtonDir; + BOOL m_bAutomaticNaming; + CString m_sFileName; + CString m_sFileType; + CString m_sCaptureDir; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageFile) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + BOOL m_bInitialized; + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPageFile) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonCaptureDir(); + afx_msg void OnCheckAutomaticNaming(); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEFILE_H__E32DDA25_805A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.cpp new file mode 100644 index 0000000..d76ef75 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.cpp @@ -0,0 +1,209 @@ +// PropertyPageImage.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ScreenGrabber.h" +#include "PropertyPageImage.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageImage property page + +//IMPLEMENT_DYNCREATE(CPropertyPageImage, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPageImage::m_nHelpIDs[] = +{ + IDC_CHECK_RESIZE, IDH_CHECK_RESIZE, + IDC_STATIC_WIDTH, IDH_STATIC_WIDTH, + IDC_EDIT_WIDTH, IDH_EDIT_WIDTH, + IDC_SPIN_WIDTH, IDH_SPIN_WIDTH, + IDC_STATIC_HEIGHT, IDH_STATIC_HEIGHT, + IDC_EDIT_HEIGHT, IDH_EDIT_HEIGHT, + IDC_SPIN_HEIGHT, IDH_SPIN_HEIGHT, + IDC_CHECK_MAINTAIN_RATIO, IDH_CHECK_MAINTAIN_RATIO, + 0, 0 +}; + + +CPropertyPageImage::CPropertyPageImage() : + COXContextHelpPropertyPage(CPropertyPageImage::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageImage) + m_bMaintainRatio = FALSE; + m_bResize = FALSE; + m_nHeight = 0; + m_nWidth = 0; + //}}AFX_DATA_INIT +} + +CPropertyPageImage::~CPropertyPageImage() +{ +} + +void CPropertyPageImage::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageImage) + DDX_Control(pDX, IDC_STATIC_WIDTH, m_ctlStaticWidth); + DDX_Control(pDX, IDC_STATIC_HEIGHT, m_ctlStaticHeight); + DDX_Control(pDX, IDC_SPIN_WIDTH, m_ctlSpinWidth); + DDX_Control(pDX, IDC_SPIN_HEIGHT, m_ctlSpinHeight); + DDX_Control(pDX, IDC_EDIT_WIDTH, m_ctlEditWidth); + DDX_Control(pDX, IDC_EDIT_HEIGHT, m_ctlEditHeight); + DDX_Control(pDX, IDC_CHECK_RESIZE, m_ctlCheckResize); + DDX_Control(pDX, IDC_CHECK_MAINTAIN_RATIO, m_ctlCheckMaintainRatio); + DDX_Text(pDX, IDC_EDIT_HEIGHT, m_nHeight); + DDV_MinMaxUInt(pDX, m_nHeight, 1, 16384); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + DDV_MinMaxUInt(pDX, m_nWidth, 1, 16384); + DDX_Check(pDX, IDC_CHECK_MAINTAIN_RATIO, m_bMaintainRatio); + DDX_Check(pDX, IDC_CHECK_RESIZE, m_bResize); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPageImage, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageImage) + ON_BN_CLICKED(IDC_CHECK_RESIZE, OnCheckResize) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageImage message handlers + +BOOL CPropertyPageImage::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlStaticWidth, + _T("Define the width of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlStaticHeight, + _T("Define the height of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlSpinWidth, + _T("Change the width of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlSpinHeight, + _T("Change the height of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlEditWidth, + _T("Change the width of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlEditHeight, + _T("Change the height of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckResize, + _T("Lets customize the height and width of captured image")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckMaintainRatio, + _T("Maintains aspect ratio of captured image")); + ASSERT(result != 0) ; + + return result; +} + + + +BOOL CPropertyPageImage::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_RESIZING)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_RESIZING, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_RESIZING, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + GetDlgItem(IDC_CHECK_MAINTAIN_RATIO)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_CHECK_MAINTAIN_RATIO, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + + // check if all variables are correct + CheckVars(); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinWidth.SetBuddy(&m_ctlEditWidth); + m_ctlSpinWidth.SetRange(ID_MIN_WIDTH,ID_MAX_WIDTH); + m_ctlSpinWidth.SetPos(m_nWidth); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinWidth.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + // Set the COXSpinCtrl object, which is mapped to a common Spin Control. + m_ctlSpinHeight.SetBuddy(&m_ctlEditHeight); + m_ctlSpinHeight.SetRange(ID_MIN_HEIGHT,ID_MAX_HEIGHT); + m_ctlSpinHeight.SetPos(m_nHeight); + + // Set a default COXSpinCtrl method of delta value computation + // (Delta pixel = Delta value). + m_ctlSpinHeight.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + + UpdateData(FALSE); + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageImage::OnCheckResize() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + ShowControls(); +} + +void CPropertyPageImage::ShowControls() +{ + if(m_bResize) + { + m_ctlEditWidth.EnableWindow(TRUE); + m_ctlSpinWidth.EnableWindow(TRUE); + m_ctlEditHeight.EnableWindow(TRUE); + m_ctlSpinHeight.EnableWindow(TRUE); + m_ctlCheckMaintainRatio.EnableWindow(TRUE); + } + else + { + m_ctlEditWidth.EnableWindow(FALSE); + m_ctlSpinWidth.EnableWindow(FALSE); + m_ctlEditHeight.EnableWindow(FALSE); + m_ctlSpinHeight.EnableWindow(FALSE); + m_ctlCheckMaintainRatio.EnableWindow(FALSE); + } + + UpdateData(FALSE); +} + +void CPropertyPageImage::CheckVars() +{ + if(m_nWidthID_MAX_WIDTH) + { + m_nWidth=::GetSystemMetrics(SM_CXSCREEN); + } + if(m_nHeightID_MAX_HEIGHT) + { + m_nHeight=::GetSystemMetrics(SM_CYSCREEN); + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.h new file mode 100644 index 0000000..a4cb24e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageImage.h @@ -0,0 +1,75 @@ +#if !defined(AFX_PROPERTYPAGEIMAGE_H__E32DDA24_805A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGEIMAGE_H__E32DDA24_805A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPageImage.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXSpinCtrl.h" +#include "OXLayoutManager.h" + + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageImage dialog + +class CPropertyPageImage : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPageImage) + +// Construction +public: + CPropertyPageImage(); + ~CPropertyPageImage(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageImage) + enum { IDD = IDD_PROPPAGE_IMAGE }; + CStatic m_ctlStaticWidth; + CStatic m_ctlStaticHeight; + COXSpinCtrl m_ctlSpinWidth; + COXSpinCtrl m_ctlSpinHeight; + CEdit m_ctlEditWidth; + CEdit m_ctlEditHeight; + CButton m_ctlCheckResize; + CButton m_ctlCheckMaintainRatio; + BOOL m_bMaintainRatio; + BOOL m_bResize; + UINT m_nHeight; + UINT m_nWidth; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageImage) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPageImage) + virtual BOOL OnInitDialog(); + afx_msg void OnCheckResize(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEIMAGE_H__E32DDA24_805A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.cpp new file mode 100644 index 0000000..85273a8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.cpp @@ -0,0 +1,115 @@ +// PropertyPagePreferences.cpp : implementation file +// + +#include "stdafx.h" +#include "ScreenGrabber.h" +#include "PropertyPagePreferences.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPagePreferences property page + +//IMPLEMENT_DYNCREATE(CPropertyPagePreferences, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPagePreferences::m_nHelpIDs[] = +{ + IDC_CHECK_HIDE_ICON, IDH_CHECK_HIDE_ICON, + IDC_CHECK_NOTIFY_END, IDH_CHECK_NOTIFY_END, + 0, 0 +}; + + +CPropertyPagePreferences::CPropertyPagePreferences() : + COXContextHelpPropertyPage(CPropertyPagePreferences::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPagePreferences) + m_bHideIcon = FALSE; + m_bNotifyEnd = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPagePreferences::~CPropertyPagePreferences() +{ +} + +void CPropertyPagePreferences::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPagePreferences) + DDX_Control(pDX, IDC_CHECK_NOTIFY_END, m_ctlCheckNotifyEnd); + DDX_Control(pDX, IDC_CHECK_HIDE_ICON, m_ctlCheckHideIcon); + DDX_Check(pDX, IDC_CHECK_HIDE_ICON, m_bHideIcon); + DDX_Check(pDX, IDC_CHECK_NOTIFY_END, m_bNotifyEnd); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPagePreferences, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPagePreferences) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPagePreferences message handlers + +BOOL CPropertyPagePreferences::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlCheckNotifyEnd, + _T("Displays dialog box notifying you about end of capturing")); + ASSERT(result != 0) ; + result=m_Tooltip.AddTool(&m_ctlCheckHideIcon, + _T("Hide icon when capture")); + ASSERT(result != 0) ; + + return result; +} + +BOOL CPropertyPagePreferences::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_SETTINGS)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_SETTINGS, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_SETTINGS, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + // check if all variables are correct + CheckVars(); + + UpdateData(FALSE); + + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPagePreferences::ShowControls() +{ +} + +void CPropertyPagePreferences::CheckVars() +{ +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.h new file mode 100644 index 0000000..090f38d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPagePreferences.h @@ -0,0 +1,64 @@ +#if !defined(AFX_PROPERTYPAGEPREFERENCES_H__E32DDA26_805A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGEPREFERENCES_H__E32DDA26_805A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPagePreferences.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPagePreferences dialog + +class CPropertyPagePreferences : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPagePreferences) + +// Construction +public: + CPropertyPagePreferences(); + ~CPropertyPagePreferences(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPagePreferences) + enum { IDD = IDD_PROPPAGE_PREFERENCES }; + CButton m_ctlCheckNotifyEnd; + CButton m_ctlCheckHideIcon; + BOOL m_bHideIcon; + BOOL m_bNotifyEnd; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPagePreferences) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPagePreferences) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEPREFERENCES_H__E32DDA26_805A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.cpp new file mode 100644 index 0000000..cd53a7f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.cpp @@ -0,0 +1,117 @@ +// PropertyPageSource.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ScreenGrabber.h" +#include "PropertyPageSource.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSource property page + +//IMPLEMENT_DYNCREATE(CPropertyPageSource, COXContextHelpPropertyPage) + +// array of control IDs and corresponding help IDs +const DWORD CPropertyPageSource::m_nHelpIDs[] = +{ + IDC_RADIO_CURRENT_WINDOW, IDH_RADIO_CURRENT_WINDOW, + IDC_RADIO_CLIENT_WINDOW, IDH_RADIO_CLIENT_WINDOW, + IDC_RADIO_FULL_SCREEN, IDH_RADIO_FULL_SCREEN, + IDC_RADIO_RECT_AREA, IDH_RADIO_RECT_AREA, + 0, 0 +}; + + +CPropertyPageSource::CPropertyPageSource() : + COXContextHelpPropertyPage(CPropertyPageSource::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageSource) + m_nRadioCapturedArea = -1; + //}}AFX_DATA_INIT +} + +CPropertyPageSource::~CPropertyPageSource() +{ +} + +void CPropertyPageSource::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageSource) + DDX_Control(pDX, IDC_RADIO_CURRENT_WINDOW, m_ctlRadioCurrentWindow); + DDX_Radio(pDX, IDC_RADIO_CURRENT_WINDOW, m_nRadioCapturedArea); + //}}AFX_DATA_MAP + // check if all variables are correct + CheckVars(); +} + + +BEGIN_MESSAGE_MAP(CPropertyPageSource, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageSource) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSource message handlers + +BOOL CPropertyPageSource::AdjustToolTips() +{ + //Set up the Tooltip + BOOL result; + + result=m_Tooltip.AddTool(&m_ctlRadioCurrentWindow, + _T("Pick the capturing area")); + ASSERT(result != 0) ; + + return result; +} + + + +BOOL CPropertyPageSource::OnInitDialog() +{ + COXContextHelpPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + CRect rectDialog; + GetWindowRect(&rectDialog); + + CRect rectItem; + + GetDlgItem(IDC_STATIC_AREA)->GetWindowRect(&rectItem); + m_LayoutManager.SetConstraint(IDC_STATIC_AREA, OX_LMS_RIGHT, OX_LMT_SAME, + rectItem.right-rectDialog.right); + m_LayoutManager.SetConstraint(IDC_STATIC_AREA, OX_LMS_LEFT, OX_LMT_SAME, + rectItem.left-rectDialog.left); + + // check if all variables are correct + CheckVars(); + + UpdateData(FALSE); + + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageSource::ShowControls() +{ +} + +void CPropertyPageSource::CheckVars() +{ + if(m_nRadioCapturedArea<0 || + m_nRadioCapturedArea>IDC_RADIO_RECT_AREA-IDC_RADIO_CURRENT_WINDOW) + { + m_nRadioCapturedArea=0; + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.h new file mode 100644 index 0000000..b089123 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertyPageSource.h @@ -0,0 +1,62 @@ +#if !defined(AFX_PROPERTYPAGESOURCE_H__E32DDA22_805A_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PROPERTYPAGESOURCE_H__E32DDA22_805A_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PropertyPageSource.h : header file +// + +#include "OXContextHelpPropertyPage.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSource dialog + +class CPropertyPageSource : public COXContextHelpPropertyPage +{ +// DECLARE_DYNCREATE(CPropertyPageSource) + +// Construction +public: + CPropertyPageSource(); + ~CPropertyPageSource(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageSource) + enum { IDD = IDD_PROPPAGE_SOURCE }; + CButton m_ctlRadioCurrentWindow; + int m_nRadioCapturedArea; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageSource) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void CheckVars(); + void ShowControls(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + COXLayoutManager m_LayoutManager; + + // Generated message map functions + //{{AFX_MSG(CPropertyPageSource) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGESOURCE_H__E32DDA22_805A_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.cpp new file mode 100644 index 0000000..ec0e68e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.cpp @@ -0,0 +1,903 @@ +// PropertySheetCapture.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ScreenGrabber.h" +#include "PropertySheetCapture.h" + +#include "PropertyPageActivation.h" +#include "PropertyPageSource.h" +#include "PropertyPageDestination.h" +#include "PropertyPageImage.h" +#include "PropertyPageFile.h" +#include "PropertyPagePreferences.h" + +#include "UTSampleAbout.h" + +#include "path.h" +#include "OXScreenGrab.h" + +#include "oxbmpfle.h" +#include "oxjpgfle.h" +#include "oxjpgcom.h" +#include "oxjpgdom.h" +#include "oxjpgexp.h" + +// GIF classes available at additional request (due to patent fee) +//#include "oxgiffle.h" + +#include "OXMainRes.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +static CWnd* g_pWndLastForeground; +///////////////////////////////////////////////////////////////////////////// +// CPropertySheetCapture dialog + +// array of control IDs and corresponding help IDs +const DWORD CPropertySheetCapture::m_nHelpIDs[] = +{ + 0, 0 +}; + +CPropertySheetCapture::CPropertySheetCapture(UINT nIDCaption, CWnd *pParentWnd, + UINT iSelectPage) : COXContextHelpPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + IniPropertySheet(); +} + +CPropertySheetCapture::CPropertySheetCapture(LPCTSTR pszCaption, CWnd *pParentWnd, + UINT iSelectPage) : COXContextHelpPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + IniPropertySheet(); +} + +void CPropertySheetCapture::IniPropertySheet() +{ + m_bInitialized=FALSE; + + pWndTrackingHelper=NULL; + + m_bIsCapturing=FALSE; + m_nTimerCaptureDelay=0; + m_bGettingRectArea=FALSE; + + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + // initialize Taskbar Icon + IniTaskbarIcon(); +} + +void CPropertySheetCapture::IniTaskbarIcon() +{ + m_TaskbarIcon.Create(); + // When there is only one taskbar icon, you don't need to specify an ID. + // The ID is useful only when implementing two (or more) taskbar icons, AND you want + // to handle mouse messages from both icons within one message handler (therefore, you + // need that ID to tell which icon posted the msg). However, it might be a good idea to + // assign an ID, and check the ID in the message handler, especially when you may need + // to derive your classes (somebody else may add another taskbar icon). + + // Note: you don't need to detroy a taskbar icon. It's done in its own destructor. + + m_TaskbarIcon.m_pPopupOwner = this; + // let this dialog handle popup menu's message + // Note: m_pPopupOwner is NOT a member of COXTaskbarIcon. + + m_TaskbarIcon.SetIcon(IDR_MAINFRAME); + m_TaskbarIcon.SetTooltipText(AFX_IDS_APP_TITLE); + m_TaskbarIcon.Show(); +} + +BEGIN_MESSAGE_MAP(CPropertySheetCapture, COXContextHelpPropertySheet) + //{{AFX_MSG_MAP(CPropertySheetCapture) + ON_WM_SYSCOMMAND() + ON_BN_CLICKED(IDOK, OnButtonCapture) + ON_BN_CLICKED(IDCANCEL, OnButtonClose) + ON_WM_TIMER() + ON_WM_LBUTTONDOWN() + ON_WM_CREATE() + ON_WM_DESTROY() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_SIZE() + ON_WM_GETMINMAXINFO() + //}}AFX_MSG_MAP + ON_COMMAND(ID_OPEN, OnOpen) + ON_COMMAND(ID_CLOSE, OnButtonClose) + ON_COMMAND(ID_ABOUT, OnAppAbout) + ON_MESSAGE(WM_HOTKEY,OnHotKey) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertySheetCapture message handlers + +int CPropertySheetCapture::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXContextHelpPropertySheet::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + // Make it resizable + ModifyStyle(0,WS_THICKFRAME); +// ModifyStyle(0,WS_MAXIMIZEBOX); + + // create window that we use to show tracking rectangle + // while capturing rectangular area + pWndTrackingHelper=new CWndTrackingHelper; + // make it transparent + if(!pWndTrackingHelper->CreateEx(WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW, + AfxRegisterWndClass(0), _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL)) + { + TRACE0("Warning: unable to create tracking helper window!\n"); + AfxThrowResourceException(); + } + ASSERT(pWndTrackingHelper->m_hWnd != NULL); + + return 0; +} + +void CPropertySheetCapture::OnDestroy() +{ + COXContextHelpPropertySheet::OnDestroy(); + + // TODO: Add your message handler code here + if(pWndTrackingHelper!=NULL) + { + // delete helper window + pWndTrackingHelper->DestroyWindow(); + delete pWndTrackingHelper; + pWndTrackingHelper=NULL; + } +} + +BOOL CPropertySheetCapture::OnInitDialog() +{ + COXContextHelpPropertySheet::OnInitDialog(); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Remove standard Restore, Maximize & Minimize items out of system menu. + + if (pSysMenu != NULL) + { + pSysMenu->RemoveMenu(SC_RESTORE,MF_BYCOMMAND); + pSysMenu->RemoveMenu(SC_MINIMIZE,MF_BYCOMMAND); + pSysMenu->RemoveMenu(SC_MAXIMIZE,MF_BYCOMMAND); + } + // Add "Minimize" menu item to system menu. + + // IDM_MINIMIZE must be in the system command range. + ASSERT((IDM_MINIMIZE & 0xFFF0) == IDM_MINIMIZE); + ASSERT(IDM_MINIMIZE < 0xF000); + + if (pSysMenu != NULL) + { + CString strMinimizeMenu(_T("Mi&nimize")); + if (!strMinimizeMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_STRING, IDM_MINIMIZE, strMinimizeMenu); + } + } + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_LayoutManager.Attach(this); + + m_LayoutManager.SetConstraint(IDOK, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -6, IDCANCEL); + m_LayoutManager.SetConstraint(IDOK, OX_LMS_BOTTOM, OX_LMT_SAME, -5); + + + m_LayoutManager.SetConstraint(IDCANCEL, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -6, IDHELP); + m_LayoutManager.SetConstraint(IDCANCEL, OX_LMS_BOTTOM, OX_LMT_SAME, -5); + + m_LayoutManager.SetConstraint(IDHELP, OX_LMS_RIGHT, OX_LMT_SAME, -4); + m_LayoutManager.SetConstraint(IDHELP, OX_LMS_BOTTOM, OX_LMT_SAME, -5); + + m_LayoutManager.SetConstraint(GetTabControl()->GetDlgCtrlID(), + OX_LMS_LEFT, OX_LMT_SAME, 4); + m_LayoutManager.SetConstraint(GetTabControl()->GetDlgCtrlID(), + OX_LMS_RIGHT, OX_LMT_SAME, -4); + m_LayoutManager.SetConstraint(GetTabControl()->GetDlgCtrlID(), + OX_LMS_BOTTOM, OX_LMT_OPPOSITE, -7, IDOK); + m_LayoutManager.SetConstraint(GetTabControl()->GetDlgCtrlID(), + OX_LMS_TOP, OX_LMT_SAME, 7); + + // Draw the layout with the new constraints + // This is necessary when constraints are implemented and the window must be refreshed + CRect rect; + GetWindowRect(&rect); + GetTabControl()->AdjustRect(FALSE,&rect); + m_LayoutManager.OnSize(rect.Width(),rect.Height()); + + + // rename standard OK button + CWnd* pButtonOK=GetDlgItem(IDOK); + pButtonOK->SetWindowText(_T("Capture")); + + // rename standard Cancel button + CWnd* pButtonCancel=GetDlgItem(IDCANCEL); + pButtonCancel->SetWindowText(_T("Close")); + + m_bInitialized=TRUE; + + GetTabControl()->GetWindowRect(&m_rectPage); + GetTabControl()->AdjustRect(FALSE,&m_rectPage); + ScreenToClient(&m_rectPage); + GetActivePage()->MoveWindow(&m_rectPage); + + return TRUE; +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CPropertySheetCapture::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + COXContextHelpPropertySheet::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CPropertySheetCapture::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CPropertySheetCapture::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnAppAbout(); + } + else + { + if ((nID & 0xFFF0) == IDM_MINIMIZE) + { + OnMinimize(); + } + else + { + COXContextHelpPropertySheet::OnSysCommand(nID, lParam); + } + } +} + +LRESULT CPropertySheetCapture::OnHotKey(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + + if((int)wParam!=ID_HOTKEY || m_nTimerCaptureDelay!=0 || m_bIsCapturing) + return 0; + + // user pressed hot key + CPropertyPageActivation* pActivation=(CPropertyPageActivation*)GetPage(0); + if(pActivation->m_bInitialDelay) + { + // if needed set initial delay + m_nTimerCaptureDelay=SetTimer(ID_TIMER_CAPTURE_DELAY, + (DWORD)pActivation->m_nInitialDelay*(DWORD)1000,NULL); + if(m_nTimerCaptureDelay==0) + { + AfxMessageBox(_T("Cannot create timer to set initial delay!"), + MB_OK|MB_ICONEXCLAMATION); + } + } + else + { + // start capturing + DoCapture(); + } + + return 0; +} + +void CPropertySheetCapture::OnLButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + if(m_bGettingRectArea) + { + // if capture area is rectangle + ReleaseCapture(); + m_bGettingRectArea=FALSE; + COXScreenGrabber ScreenGrabber; + ScreenGrabber.GrabTracker(this,point,pWndTrackingHelper); + + // remove helper window from screen + RemoveTrackingHelper(); + + // try to stream captured image to the destination(s) + StreamCapture(ScreenGrabber.GetGrabDIB()); + } +} + +void CPropertySheetCapture::OnButtonCapture() +{ + // refresh all vars + PressButton(PSBTN_APPLYNOW); + + // + if(!DoRegisterHotKey()) + { + AfxMessageBox(_T("Cannot register Hot Key!")); + } + else + { + // remove property sheet from screen + OnMinimize(); + } +} + +void CPropertySheetCapture::OnTimer(UINT nIDEvent) +{ + switch(nIDEvent) + { + case ID_TIMER_CAPTURE_DELAY: + { + KillTimer(m_nTimerCaptureDelay); + m_nTimerCaptureDelay=0; + + // start capturing + DoCapture(); + + break; + } + default: + break; + } +} + +BOOL CPropertySheetCapture::DoRegisterHotKey() +{ +// BOOL bProcessed=FALSE; + UINT vk; + + // define hot key to register + CPropertyPageActivation* pActivation=(CPropertyPageActivation*)GetPage(0); + if(pActivation->m_sHotKey==_T("F1")) + vk=VK_F1; + else + if(pActivation->m_sHotKey==_T("F2")) + vk=VK_F2; + else + if(pActivation->m_sHotKey==_T("F3")) + vk=VK_F3; + else + if(pActivation->m_sHotKey==_T("F4")) + vk=VK_F4; + else + if(pActivation->m_sHotKey==_T("F5")) + vk=VK_F5; + else + if(pActivation->m_sHotKey==_T("F6")) + vk=VK_F6; + else + if(pActivation->m_sHotKey==_T("F7")) + vk=VK_F7; + else + if(pActivation->m_sHotKey==_T("F8")) + vk=VK_F8; + else + if(pActivation->m_sHotKey==_T("F9")) + vk=VK_F9; + else + if(pActivation->m_sHotKey==_T("F10")) + vk=VK_F10; + else + return FALSE; + + return RegisterHotKey(GetSafeHwnd(),ID_HOTKEY,0,vk); +} + +BOOL CPropertySheetCapture::AdjustToolTips() +{ + return TRUE; +} + +void CPropertySheetCapture::OnMinimize() +{ + m_TaskbarIcon.SetOwner(NULL); // let taskbar icon do it + // This is only one way to hide the dialog window. In real situation, you may + // want to try DestroyWindow() to conserve system resource if possible (in this + // demo, this dialog is the main window). + ShowWindow(SW_HIDE); +} + +void CPropertySheetCapture::OnButtonClose() +{ + // try to cleanup everything + if(!CleanupCapture()) + { + return; + } + + // simulate pressing OK button to save all changes + PressButton(PSBTN_OK); +} + +// handling popup menu commands sent by the taskbar icon object +void CPropertySheetCapture::OnOpen() +{ + // try to cleanup everything + if(!CleanupCapture()) + { + return; + } + + SetForegroundWindow(); + ShowWindow(SW_SHOW); +} + +BOOL CPropertySheetCapture::CleanupCapture() +{ + // if we are capturing image then return unsuccess + if(m_bIsCapturing) + { + return FALSE; + } + + // unregister hot key if we close application + // when capturing is started + UnregisterHotKey(GetSafeHwnd(),ID_HOTKEY); + + // if we close while waiting for initial delay then + // kill timer + if(m_nTimerCaptureDelay!=0) + { + KillTimer(m_nTimerCaptureDelay); + m_nTimerCaptureDelay=0; + } + + // if we close while getting capture rectangular area then + // release capture and remove helper window + if(m_bGettingRectArea) + { + ReleaseCapture(); + RemoveTrackingHelper(); + m_bGettingRectArea=FALSE; + } + + return TRUE; +} + +void CPropertySheetCapture::DoCapture() +{ + m_bIsCapturing=TRUE; + + // get needed property pages + CPropertyPageSource* pSource=(CPropertyPageSource*)GetPage(1); + CPropertyPagePreferences* pPreferences=(CPropertyPagePreferences*)GetPage(5); + + // hide TaskbarIcon if needed + if(pPreferences->m_bHideIcon) + { + m_TaskbarIcon.Hide(); + } + + COXScreenGrabber ScreenGrabber; + switch(pSource->m_nRadioCapturedArea) + { + case 0: + { + ScreenGrabber.GrabFullWindow(CWnd::GetActiveWindow()); + break; + } + case 1: + { + ScreenGrabber.GrabClientWindow(CWnd::GetActiveWindow()); + break; + } + case 2: + { + ScreenGrabber.GrabFullWindow(CWnd::GetDesktopWindow()); + break; + } + case 3: + { + m_bGettingRectArea=TRUE; + + // activate helper window + SetTrackingHelper(); + SetCapture(); + + return; + } + default: + break; + } + + // try to stream captured image to the destination(s) + StreamCapture(ScreenGrabber.GetGrabDIB()); +} + +void CPropertySheetCapture::StreamCapture(COXDIB* pDIB) +{ + if(pDIB==NULL) + { + TRACE0("CPropertySheetCapture::StreamCapture - pDIB==NULL"); + return; + } + + CSize sizeDIB=pDIB->GetSize(); + if(sizeDIB.cx==0 && sizeDIB.cy==0) + { + TRACE0("CPropertySheetCapture::StreamCapture - pDIB is empty"); + return; + } + + // get needed property pages +// CPropertyPageActivation* pActivation=(CPropertyPageActivation*)GetPage(0); +// CPropertyPageSource* pSource=(CPropertyPageSource*)GetPage(1); + CPropertyPageDestination* pDestination=(CPropertyPageDestination*)GetPage(2); + CPropertyPageImage* pImage=(CPropertyPageImage*)GetPage(3); + CPropertyPageFile* pFile=(CPropertyPageFile*)GetPage(4); + CPropertyPagePreferences* pPreferences=(CPropertyPagePreferences*)GetPage(5); + + // resize image if needed + if(pImage->m_bResize) + { + UINT nHeight,nWidth; + nHeight=pImage->m_nHeight; + nWidth=pImage->m_nWidth; + + // take into account aspect ratio if needed + if(pImage->m_bMaintainRatio) + { + nHeight=(UINT)(((long)nWidth*(long)sizeDIB.cy)/ + ((long)sizeDIB.cx)); + } + + if(sizeDIB.cx!=(int)nWidth || sizeDIB.cy!=(int)nHeight) + { + pDIB->ResizeDIB(nWidth,nHeight); + } + } + + // copy captured image to clipboard if needed + if(pDestination->m_bClipboard) + { + SaveAsClipboard(pDIB); + } + + // copy captured image to file if needed + if(pDestination->m_bFile) + { + BOOL bSuccess=TRUE; + // check if Capture Directory exists + COXPathSpec pathSpec; + if(!pathSpec.SetDirectory(pFile->m_sCaptureDir)) + { + AfxMessageBox(_T("Specified Capture Directory is not valid!")); + bSuccess=FALSE; + } + else + { + CString sFileName; + if(pFile->m_bAutomaticNaming) + { + // check if we are capable of automatically naming Capture File + if(!pathSpec.MakeUnique()) + { + AfxMessageBox(_T("Cannot automatically name file!")); + bSuccess=FALSE; + } + sFileName=pathSpec.GetBaseName(); + } + else + { + sFileName=pFile->m_sFileName; + } + if(bSuccess) + { + if(pFile->m_sFileType==CString(_T("Windows Bitmap (*.bmp)"))) + { + sFileName+=CString(".bmp"); + } + else + { + if(pFile->m_sFileType==CString(_T("JPEG Bitmap (*.jpg)"))) + { + sFileName+=CString(".jpg"); + } + else + { + if(pFile->m_sFileType==CString(_T("GIF Image (*.gif)"))) + { + sFileName+=CString(".gif"); + } + } + } + + // check if we are capable of creating Capture File + if(!pathSpec.SetFileName(sFileName)) + { + AfxMessageBox(_T("Specified Capture Path is not valid"), + MB_OK|MB_ICONEXCLAMATION); + bSuccess=FALSE; + } + } + } + + // save captured image to file + if(bSuccess) + { + if(pFile->m_sFileType==CString(_T("Windows Bitmap (*.bmp)"))) + { + SaveAsBMP(pDIB,pathSpec.GetPath()); + } + else + { + if(pFile->m_sFileType==CString(_T("JPEG Bitmap (*.jpg)"))) + { + SaveAsJPEG(pDIB,pathSpec.GetPath()); + } + else + { + if(pFile->m_sFileType==CString(_T("GIF Image (*.gif)"))) + { + SaveAsGIF(pDIB,pathSpec.GetPath()); + } + } + } + } + } + + // restore TaskbarIcon if it was hidden + if(pPreferences->m_bHideIcon) + { + m_TaskbarIcon.Show(); + } + + m_bIsCapturing=FALSE; + + // notify about end of capture if needed + if(pPreferences->m_bNotifyEnd) + { + AfxMessageBox(_T("The capture has been completed!"), + MB_OK|MB_ICONINFORMATION); + } +} + +BOOL CPropertySheetCapture::SaveAsClipboard(COXDIB* pDIB) +{ + if(!OpenClipboard()) + { + AfxMessageBox("Cannot open the Clipboard!"); + return FALSE; + } + + // Remove the current Clipboard contents + if(!::EmptyClipboard()) + { + AfxMessageBox("Cannot empty the Clipboard!"); + ::CloseClipboard(); + return FALSE; + } + + // create a copy of DIB image + HDIB hDIB=pDIB->MakeCopy(); + // For the appropriate data formats... + if(::SetClipboardData(CF_DIB, hDIB)==NULL) + { + AfxMessageBox( "Unable to set Clipboard data!" ); + ::CloseClipboard(); + return FALSE; + } + // ... + ::CloseClipboard(); + return TRUE; +} + +BOOL CPropertySheetCapture::SaveAsBMP(COXDIB* pDIB, LPCTSTR lpszPathName) +{ + BOOL bSuccess=FALSE; + + // try to open or create file + CFile m_file; + TRY + { + bSuccess=m_file.Open(lpszPathName,CFile::modeCreate|CFile::modeReadWrite); + } + CATCH(CFileException,e) + { + TCHAR szCause[255]; + CString strFormatted; + e->GetErrorMessage(szCause, 255); + strFormatted = _T("CPropertySheetCapture::SaveAsBMP:exception: "); + strFormatted += szCause; + TRACE(strFormatted); + } + END_CATCH + + if(!bSuccess) + { + CString sMessage; + sMessage.Format(_T("Cannot open or create %s!"),lpszPathName); + AfxMessageBox(sMessage); + return FALSE; + } + + CArchive ar(&m_file, CArchive::store); + bSuccess=pDIB->Write(ar); + ar.Close(); + + return bSuccess; +} + +BOOL CPropertySheetCapture::SaveAsJPEG(COXDIB* pDIB, LPCTSTR lpszPathName) +{ + BOOL bSuccess=FALSE; + + BeginWaitCursor(); + + // mem file for captured image + CMemFile m_tmpBMPFile; + CArchive ar(&m_tmpBMPFile, CArchive::store); + bSuccess=pDIB->Write(ar); + ar.Close(); + m_tmpBMPFile.SeekToBegin(); + + // create bitmap file + COXBMPFile BMPFile(&m_tmpBMPFile); + COXJPEGFile jpgFile(lpszPathName); + COXJPEGCompressor JCompr; + + short nReturn(1); + TCHAR ErrorBuffer[SIZE_ERROR_BUF]; + TRY + { + // the only line of code we need to convert bitmap to JPEG + nReturn = JCompr.DoCompress(&BMPFile, &jpgFile); + if (nReturn == 2) + AfxMessageBox(JCompr.GetWarningMessages()); + } + CATCH(COXJPEGException, e) + { + e->GetErrorMessage(ErrorBuffer, SIZE_ERROR_BUF); + AfxMessageBox(CString("Exception : ") + ErrorBuffer); + + TRACE((LPCTSTR)ErrorBuffer); + } + END_CATCH + + EndWaitCursor(); + + return nReturn==0 ? TRUE : FALSE; +} + +BOOL CPropertySheetCapture::SaveAsGIF(COXDIB* pDIB, LPCTSTR lpszPathName) +{ + UNREFERENCED_PARAMETER(pDIB); + UNREFERENCED_PARAMETER(lpszPathName); + return FALSE; + + +} + +void CPropertySheetCapture::SetTrackingHelper() +{ + // set helper window for purpose of selecting rectangular area to capture + LockWindowUpdate(); + g_pWndLastForeground=GetForegroundWindow(); + if(g_pWndLastForeground==NULL) + { + g_pWndLastForeground=GetDesktopWindow(); + } + ::SetCursor(AfxGetApp()->LoadCursor(IDC_OX_HAND_CURSOR)); + pWndTrackingHelper->SetWindowPos(&wndTopMost,0,0,::GetSystemMetrics(SM_CXSCREEN), + ::GetSystemMetrics(SM_CYSCREEN),SWP_SHOWWINDOW); +} + +void CPropertySheetCapture::RemoveTrackingHelper() +{ + pWndTrackingHelper->SetWindowPos(&wndBottom,0,0,0,0,SWP_HIDEWINDOW); + ASSERT(g_pWndLastForeground->m_hWnd != NULL); + g_pWndLastForeground->SetForegroundWindow(); + UnlockWindowUpdate(); +} + +void CPropertySheetCapture::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +void CPropertySheetCapture::OnSize(UINT nType, int cx, int cy) +{ + COXContextHelpPropertySheet::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + if(m_bInitialized) + { + m_LayoutManager.OnSize(cx,cy); + GetTabControl()->GetWindowRect(&m_rectPage); + GetTabControl()->AdjustRect(FALSE,&m_rectPage); + ScreenToClient(&m_rectPage); + GetActivePage()->MoveWindow(&m_rectPage); + } +} + +BOOL CPropertySheetCapture::OnNotify(WPARAM wParam, + LPARAM lParam, LRESULT* pResult) +{ + BOOL result=COXContextHelpPropertySheet::OnNotify(wParam, lParam, pResult); + + if(result) + { + NMHDR* pnmh = (LPNMHDR) lParam; + + // the sheet resizes the page whenever it is activated + // so we need to resize it to what we want + if (TCN_SELCHANGE == pnmh->code) + { + // user-defined message needs to be posted because page must + // be resized after TCN_SELCHANGE has been processed + GetActivePage()->MoveWindow(&m_rectPage); + } + } + + return result; +} + +void CPropertySheetCapture::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) +{ + // TODO: Add your message handler code here and/or call default + COXContextHelpPropertySheet::OnGetMinMaxInfo(lpMMI); + +// lpMMI->ptMaxSize.x=540; +// lpMMI->ptMaxSize.y=360; +// lpMMI->ptMaxTrackSize.x=540; +// lpMMI->ptMaxTrackSize.y=360; + lpMMI->ptMinTrackSize.x=300; +// lpMMI->ptMinTrackSize.y=240; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.h new file mode 100644 index 0000000..7d97e4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/PropertySheetCapture.h @@ -0,0 +1,97 @@ +// PropertySheetCapture.h : header file +// + +#if !defined(AFX_PropertySheetCapture_H__B53D38E8_8037_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_PropertySheetCapture_H__B53D38E8_8037_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CPropertySheetCapture dialog + +#include "CaptureTaskbarIcon.h" +#include "OXContextHelpPropertySheet.h" +#include "oxdib.h" +#include "OXLayoutManager.h" + +#include "WndTrackingHelper.h" + +class CPropertySheetCapture : public COXContextHelpPropertySheet +{ +// Construction +public: + CPropertySheetCapture(UINT nIDCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + CPropertySheetCapture(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + +protected: + BOOL AdjustToolTips(); + void IniPropertySheet(); + void IniTaskbarIcon(); + + void DoCapture(); + void StreamCapture(COXDIB* pDIB); + BOOL SaveAsClipboard(COXDIB* pDIB); + BOOL SaveAsBMP(COXDIB* pDIB, LPCTSTR lpszPathName); + BOOL SaveAsJPEG(COXDIB* pDIB, LPCTSTR lpszPathName); + BOOL SaveAsGIF(COXDIB* pDIB, LPCTSTR lpszPathName); + BOOL CleanupCapture(); + + BOOL DoRegisterHotKey(); + + void SetTrackingHelper(); + void RemoveTrackingHelper(); + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} + +// Implementation +public: + +protected: + HICON m_hIcon; + CWndTrackingHelper* pWndTrackingHelper; + CCaptureTaskbarIcon m_TaskbarIcon; + COXLayoutManager m_LayoutManager; + + BOOL m_bInitialized; + CRect m_rectPage; + + // define if process of capturing is going + BOOL m_bIsCapturing; + // timer ID for initial delay + UINT m_nTimerCaptureDelay; + // define if process of getting rectangular area to capture is going + BOOL m_bGettingRectArea; + + // Generated message map functions + //{{AFX_MSG(CPropertySheetCapture) + virtual BOOL OnInitDialog(); + virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnButtonCapture(); + afx_msg void OnButtonClose(); + afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnDestroy(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); + //}}AFX_MSG + afx_msg void OnMinimize(); + afx_msg void OnOpen(); + afx_msg void OnAppAbout(); + afx_msg LRESULT OnHotKey(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PropertySheetCapture_H__B53D38E8_8037_11D1_A3D5_0080C83F712F__INCLUDED_) + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ReadMe.txt new file mode 100644 index 0000000..42bba85 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ScreenGrabber +======================================================================== + + +AppWizard has created this ScreenGrabber 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 ScreenGrabber application. + +ScreenGrabber.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CScreenGrabberApp application class. + +ScreenGrabber.cpp + This is the main application source file that contains the application + class CScreenGrabberApp. + +ScreenGrabber.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 + Developer Studio. + +res\ScreenGrabber.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ScreenGrabber.rc. + +res\ScreenGrabber.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ScreenGrabber.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ScreenGrabberDlg.h, ScreenGrabberDlg.cpp - the dialog + These files contain your CScreenGrabberDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ScreenGrabber.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ScreenGrabber.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.cpp new file mode 100644 index 0000000..ac230db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.cpp @@ -0,0 +1,255 @@ +// ScreenGrabber.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ScreenGrabber.h" + +#include "PropertySheetCapture.h" +#include "PropertyPageActivation.h" +#include "PropertyPageSource.h" +#include "PropertyPageDestination.h" +#include "PropertyPageImage.h" +#include "PropertyPageFile.h" +#include "PropertyPagePreferences.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScreenGrabberApp + +BEGIN_MESSAGE_MAP(CScreenGrabberApp, CWinApp) + //{{AFX_MSG_MAP(CScreenGrabberApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScreenGrabberApp construction + +CScreenGrabberApp::CScreenGrabberApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CScreenGrabberApp object + +CScreenGrabberApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CScreenGrabberApp initialization + +BOOL CScreenGrabberApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Change the registry key under which our settings are stored. + // You should modify this string to be something appropriate + // such as the name of your company or organization. + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + // initialize application variables using values from Registry + IniAppVars(); + + if(!m_wndInvisible.CreateEx(0, AfxRegisterWndClass(0), _T(""), 0, 0, 0, 0, 0, NULL, 0)) + { + TRACE(_T("CScreenGrabberApp::InitInstance: failed to create invisible window")); + return FALSE; + } + + CPropertySheetCapture dlgPropertySheet(AFX_IDS_APP_TITLE,&m_wndInvisible); + + // change property sheet properties + // to show icon and remove Apply Now button + HICON hIcon=LoadIcon(IDR_MAINFRAME); + dlgPropertySheet.m_psh.dwFlags|=PSH_NOAPPLYNOW; + dlgPropertySheet.m_psh.dwFlags|=PSH_USEHICON; + dlgPropertySheet.m_psh.hIcon=hIcon; + + CPropertyPageActivation pageActivation; + CPropertyPageSource pageSource; + CPropertyPageDestination pageDestination; + CPropertyPageImage pageImage; + CPropertyPageFile pageFile; + CPropertyPagePreferences pagePreferences; + + dlgPropertySheet.AddPage(&pageActivation); + dlgPropertySheet.AddPage(&pageSource); + dlgPropertySheet.AddPage(&pageDestination); + dlgPropertySheet.AddPage(&pageImage); + dlgPropertySheet.AddPage(&pageFile); + dlgPropertySheet.AddPage(&pagePreferences); + + m_pMainWnd = &dlgPropertySheet; + + + // Initialize vars + pageActivation.m_sHotKey=m_sHotKey; + pageActivation.m_nInitialDelay=m_nInitialDelay; + pageActivation.m_bInitialDelay=m_bInitialDelay; + + pageSource.m_nRadioCapturedArea=m_nRadioCapturedArea; + + pageDestination.m_bClipboard=m_bClipboard; + pageDestination.m_bFile=m_bFile; + + pageImage.m_bMaintainRatio=m_bMaintainRatio; + pageImage.m_bResize=m_bResize; + pageImage.m_nHeight=m_nHeight; + pageImage.m_nWidth=m_nWidth; + + pageFile.m_bAutomaticNaming=m_bAutomaticNaming; + pageFile.m_sFileName=m_sFileName; + pageFile.m_sFileType=m_sFileType; + pageFile.m_sCaptureDir=m_sCaptureDir; + + pagePreferences.m_bHideIcon=m_bHideIcon; + pagePreferences.m_bNotifyEnd=m_bNotifyEnd; + + switch(dlgPropertySheet.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Copy vars + m_sHotKey=pageActivation.m_sHotKey; + m_nInitialDelay=pageActivation.m_nInitialDelay; + m_bInitialDelay=pageActivation.m_bInitialDelay; + + m_nRadioCapturedArea=pageSource.m_nRadioCapturedArea; + + m_bClipboard=pageDestination.m_bClipboard; + m_bFile=pageDestination.m_bFile; + + m_bMaintainRatio=pageImage.m_bMaintainRatio; + m_bResize=pageImage.m_bResize; + m_nHeight=pageImage.m_nHeight; + m_nWidth=pageImage.m_nWidth; + + m_bAutomaticNaming=pageFile.m_bAutomaticNaming; + m_sFileName=pageFile.m_sFileName; + m_sFileType=pageFile.m_sFileType; + m_sCaptureDir=pageFile.m_sCaptureDir; + + m_bHideIcon=pagePreferences.m_bHideIcon; + m_bNotifyEnd=pagePreferences.m_bNotifyEnd; + + // save application variables to Registry + SaveAppVars(); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +void CScreenGrabberApp::IniAppVars() +{ + m_sHotKey=GetProfileString(_T("Activation"),_T("HotKey"),_T("F7")); + m_nInitialDelay=GetProfileInt(_T("Activation"),_T("InitialDelay"),5); + m_bInitialDelay=GetProfileInt(_T("Activation"), + _T("SetInitialDelay"),TRUE); + + m_nRadioCapturedArea=GetProfileInt(_T("Source"),_T("CapturedArea"),0); + + m_bClipboard=GetProfileInt(_T("Destination"),_T("Clipboard"),FALSE); + m_bFile=GetProfileInt(_T("Destination"),_T("File"),TRUE); + + m_bMaintainRatio=GetProfileInt(_T("Image"),_T("MaintainRatio"),TRUE); + m_bResize=GetProfileInt(_T("Image"),_T("Resize"),FALSE); + m_nHeight=GetProfileInt(_T("Image"),_T("Height"), + ::GetSystemMetrics(SM_CYSCREEN)); + m_nWidth=GetProfileInt(_T("Image"),_T("Width"), + ::GetSystemMetrics(SM_CXSCREEN)); + + m_bAutomaticNaming=GetProfileInt(_T("File"),_T("AutomaticNaming"),FALSE); + m_sFileName=GetProfileString(_T("File"),_T("FileName"),_T("ScreenShot")); + m_sFileType=GetProfileString(_T("File"),_T("FileType"),_T("Windows Bitmap (*.bmp)")); + /// set as default directory the current one + CString sCurDir; + LPTSTR sBuffer=sCurDir.GetBuffer(_MAX_PATH); + GetCurrentDirectory(_MAX_PATH,sBuffer); + sCurDir.ReleaseBuffer(); + /// + m_sCaptureDir=GetProfileString(_T("File"),_T("CaptureDir"),sCurDir); + + m_bHideIcon=GetProfileInt(_T("Prefences"),_T("HideIcon"),FALSE); + m_bNotifyEnd=GetProfileInt(_T("Prefences"),_T("NotifyEnd"),TRUE); +} + +void CScreenGrabberApp::SaveAppVars() +{ + WriteProfileString(_T("Activation"),_T("HotKey"),m_sHotKey); + WriteProfileInt(_T("Activation"),_T("InitialDelay"),m_nInitialDelay); + WriteProfileInt(_T("Activation"),_T("SetInitialDelay"), + m_bInitialDelay); + + WriteProfileInt(_T("Source"),_T("CapturedArea"),m_nRadioCapturedArea); + + WriteProfileInt(_T("Destination"),_T("Clipboard"),m_bClipboard); + WriteProfileInt(_T("Destination"),_T("File"),m_bFile); + + WriteProfileInt(_T("Image"),_T("MaintainRatio"),m_bMaintainRatio); + WriteProfileInt(_T("Image"),_T("Resize"),m_bResize); + WriteProfileInt(_T("Image"),_T("Height"),m_nHeight); + WriteProfileInt(_T("Image"),_T("Width"),m_nWidth); + + WriteProfileInt(_T("File"),_T("AutomaticNaming"),m_bAutomaticNaming); + WriteProfileString(_T("File"),_T("FileName"),m_sFileName); + WriteProfileString(_T("File"),_T("FileType"),m_sFileType); + WriteProfileString(_T("File"),_T("CaptureDir"),m_sCaptureDir); + + WriteProfileInt(_T("Prefences"),_T("HideIcon"),m_bHideIcon); + WriteProfileInt(_T("Prefences"),_T("NotifyEnd"),m_bNotifyEnd); +} + + +int CScreenGrabberApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsp new file mode 100644 index 0000000..a7eb93e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsp @@ -0,0 +1,459 @@ +# Microsoft Developer Studio Project File - Name="ScreenGrabber" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ScreenGrabber - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ScreenGrabber.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ScreenGrabber.mak" CFG="ScreenGrabber - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ScreenGrabber - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ScreenGrabber - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ScreenGrabber - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ScreenGrabber - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ScreenGrabber.exe" /libpath:"..\..\..\Lib\libs" + +!ELSEIF "$(CFG)" == "ScreenGrabber - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 jpgd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"ScreenGrabber.exe" /pdbtype:sept /libpath:"..\..\..\Lib\libs" + +!ELSEIF "$(CFG)" == "ScreenGrabber - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ScreenGr" +# PROP BASE Intermediate_Dir "ScreenGr" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ScreenGrabber.exe" +# ADD LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ScreenGrabber.exe" /libpath:"..\..\..\Lib\libs" + +!ENDIF + +# Begin Target + +# Name "ScreenGrabber - Win32 Release" +# Name "ScreenGrabber - Win32 Debug" +# Name "ScreenGrabber - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE="..\..\..\Source\Copytree.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Dir.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Dstrlist.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\File.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXBMPFle.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXContextHelpPropertyPage.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXContextHelpPropertySheet.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Oxdib.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXDirDlg.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXGphFle.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXHistoryCombo.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGCod.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGCom.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGDom.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGExp.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXJPGFle.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXLayoutManager.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXScreenGrab.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXSpinCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXTaskbarIcon.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Path.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\Xstring.cpp" +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CaptureTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageActivation.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageDestination.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageImage.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPagePreferences.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageSource.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertySheetCapture.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenGrabber.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenGrabber.rc +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\WndTrackingHelper.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CaptureTaskbarIcon.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXContextHelpPropertyPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXContextHelpPropertySheet.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageActivation.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageDestination.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageFile.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageImage.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPagePreferences.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageSource.h +# End Source File +# Begin Source File + +SOURCE=.\PropertySheetCapture.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\ScreenGrabber.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\WndTrackingHelper.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ScreenGrabber.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ScreenGrabber.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsw new file mode 100644 index 0000000..b802030 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ScreenGrabber"=".\ScreenGrabber.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.h new file mode 100644 index 0000000..d81df85 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.h @@ -0,0 +1,78 @@ +// ScreenGrabber.h : main header file for the SCREENGRABBER application +// + +#if !defined(AFX_SCREENGRABBER_H__B53D38E6_8037_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_SCREENGRABBER_H__B53D38E6_8037_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CScreenGrabberApp: +// See ScreenGrabber.cpp for the implementation of this class +// + +class CScreenGrabberApp : public CWinApp +{ +public: + CScreenGrabberApp(); + + CString m_sHotKey; + UINT m_nInitialDelay; + BOOL m_bInitialDelay; + + int m_nRadioCapturedArea; + + BOOL m_bClipboard; + BOOL m_bFile; + + BOOL m_bMaintainRatio; + BOOL m_bResize; + UINT m_nHeight; + UINT m_nWidth; + + BOOL m_bAutomaticNaming; + CString m_sFileName; + CString m_sFileType; + CString m_sCaptureDir; + + BOOL m_bHideIcon; + BOOL m_bNotifyEnd; + +protected: + void IniAppVars(); + void SaveAppVars(); + + CWnd m_wndInvisible; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScreenGrabberApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CScreenGrabberApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SCREENGRABBER_H__B53D38E6_8037_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.rc new file mode 100644 index 0000000..b6392c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.rc @@ -0,0 +1,358 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc"" \r\n" + "#include ""OXSpinCtrl.rc"" // Spin ctrl resources\r\n" + "#include ""OXHistoryCombo.rc"" \r\n" + "#include ""oxdirdlg.rc""\r\n" + "#include ""OXBitmapButton.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ScreenGrabber.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\r\n" + "\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 DISCARDABLE "res\\ScreenGrabber.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_PROPPAGE_ACTIVATION DIALOG DISCARDABLE 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "Activation" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "&Hot key",IDC_STATIC_HOT_KEY,7,7,26,8 + COMBOBOX IDC_COMBO_HOT_KEY,41,7,76,49,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + GROUPBOX "Timing",IDC_STATIC_TIMING,7,29,212,30 + EDITTEXT IDC_EDIT_INITIAL_DELAY,176,41,24,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_INITIAL_DELAY,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS,200,41,10,12 + CONTROL "Initial &delay before capture (1-60 sec)", + IDC_CHECK_INITIAL_DELAY,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,42,155,10 +END + +IDD_PROPPAGE_SOURCE DIALOG DISCARDABLE 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "Source" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "&Current Window",IDC_RADIO_CURRENT_WINDOW,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,26,20,135,8 + CONTROL "C&lient Window",IDC_RADIO_CLIENT_WINDOW,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,26,37,135,8 + CONTROL "&Full Screen",IDC_RADIO_FULL_SCREEN,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,26,54,135,8 + CONTROL "&Rectangular Area",IDC_RADIO_RECT_AREA,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,26,71,135,8 + GROUPBOX "Captured area",IDC_STATIC_AREA,7,7,212,80 +END + +IDD_PROPPAGE_DESTINATION DIALOG DISCARDABLE 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "Destination" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Copy captured area to",IDC_STATIC_DESTINATION,7,7,212, + 80 + CONTROL "&File",IDC_CHECK_FILE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,19,23,73,8 + CONTROL "&Clipboard",IDC_CHECK_CLIPBOARD,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,19,42,73,8 +END + +IDD_PROPPAGE_IMAGE DIALOG DISCARDABLE 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "Image" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "&Resize captured image",IDC_CHECK_RESIZE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,7,128,8 + EDITTEXT IDC_EDIT_WIDTH,48,37,24,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_WIDTH,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ARROWKEYS | UDS_NOTHOUSANDS,72,37,10,12 + EDITTEXT IDC_EDIT_HEIGHT,48,58,24,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_HEIGHT,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,72,58, + 10,12 + CONTROL "&Maintain aspect ratio",IDC_CHECK_MAINTAIN_RATIO,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,129,38,81,8 + GROUPBOX "Resizing",IDC_STATIC_RESIZING,7,22,212,65 + LTEXT "&Width",IDC_STATIC_WIDTH,13,39,20,8 + LTEXT "&Height",IDC_STATIC_HEIGHT,13,60,22,8 +END + +IDD_PROPPAGE_FILE DIALOGEX 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "File" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_COMBO_FILE_NAME,46,7,143,55,CBS_DROPDOWN | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_FILE_TYPE,46,24,174,55,CBS_DROPDOWNLIST | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + CONTROL "&Use automatic naming",IDC_CHECK_AUTOMATIC_NAMING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,42,86,10 + CONTROL "Static",IDC_STATIC_CAPTURE_DIR,"Static", + SS_LEFTNOWORDWRAP | WS_BORDER | WS_GROUP,10,69,189,13, + WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + PUSHBUTTON "...",IDC_BUTTON_CAPTURE_DIR,201,68,15,14 + LTEXT "File &name",IDC_STATIC_FILE_NAME,8,10,31,8 + LTEXT "&Type of file",IDC_STATIC_FILE_TYPE,8,27,36,8 + GROUPBOX "Capture Directory",IDC_STATIC_DIR,7,54,212,33 +END + +IDD_PROPPAGE_PREFERENCES DIALOG DISCARDABLE 0, 0, 226, 94 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | WS_THICKFRAME +CAPTION "Preferences" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Capture settings",IDC_STATIC_SETTINGS,7,7,212,48 + CONTROL "&Hide icon when capturing",IDC_CHECK_HIDE_ICON,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,19,21,97,10 + CONTROL "&Notify end of capture",IDC_CHECK_NOTIFY_END,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,19,35,82,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ScreenGrabber MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ScreenGrabber\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ScreenGrabber.EXE\0" + VALUE "ProductName", "ScreenGrabber Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_PROPPAGE_ACTIVATION, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + + IDD_PROPPAGE_SOURCE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + + IDD_PROPPAGE_DESTINATION, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + + IDD_PROPPAGE_IMAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + + IDD_PROPPAGE_FILE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + + IDD_PROPPAGE_PREFERENCES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_POPUPMENU MENU DISCARDABLE +BEGIN + POPUP "Popup" + BEGIN + MENUITEM "Open", ID_OPEN + MENUITEM "&Close", ID_CLOSE + MENUITEM SEPARATOR + MENUITEM "About ScreenGrabber...", ID_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About ScreenGrabber..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "ScreenGrabber" + ID_DESCRIPTION_FILE "ScreenGrabberInfo.rtf" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "ScreenGrabber" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "OXSpinCtrl.rc" // Spin ctrl resources +#include "OXHistoryCombo.rc" +#include "oxdirdlg.rc" +#include "OXBitmapButton.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ScreenGrabber.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.vcproj new file mode 100644 index 0000000..d3e3a38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabber.vcproj @@ -0,0 +1,2291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabberInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabberInfo.rtf new file mode 100644 index 0000000..1afa0d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/ScreenGrabberInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.cpp new file mode 100644 index 0000000..c023b62 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ScreenGrabber.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.h new file mode 100644 index 0000000..d9ca5ab --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/StdAfx.h @@ -0,0 +1,31 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__B53D38EA_8037_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__B53D38EA_8037_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#include +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__B53D38EA_8037_11D1_A3D5_0080C83F712F__INCLUDED_) + +#include "HelpIDs.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.cpp new file mode 100644 index 0000000..0913555 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.cpp @@ -0,0 +1,32 @@ +// WndTrackingHelper.cpp : implementation file +// + +#include "stdafx.h" +#include "ScreenGrabber.h" +#include "WndTrackingHelper.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWndTrackingHelper + +CWndTrackingHelper::CWndTrackingHelper() +{ +} + +CWndTrackingHelper::~CWndTrackingHelper() +{ +} + +BEGIN_MESSAGE_MAP(CWndTrackingHelper, CWnd) + //{{AFX_MSG_MAP(CWndTrackingHelper) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.h new file mode 100644 index 0000000..57b4011 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/WndTrackingHelper.h @@ -0,0 +1,46 @@ +#if !defined(AFX_WNDTRACKINGHELPER_H__CA0DF6A2_87B8_11D1_B475_444553540000__INCLUDED_) +#define AFX_WNDTRACKINGHELPER_H__CA0DF6A2_87B8_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// WndTrackingHelper.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWndTrackingHelper window + +class CWndTrackingHelper : public CWnd +{ +// Construction +public: + CWndTrackingHelper(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWndTrackingHelper) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CWndTrackingHelper(); + + // Generated message map functions +protected: + //{{AFX_MSG(CWndTrackingHelper) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_WNDTRACKINGHELPER_H__CA0DF6A2_87B8_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.ico new file mode 100644 index 0000000..7743221 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.rc2 new file mode 100644 index 0000000..81379f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/res/ScreenGrabber.rc2 @@ -0,0 +1,13 @@ +// +// SCREENGRABBER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/resource.h new file mode 100644 index 0000000..70f2fe0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/resource.h @@ -0,0 +1,73 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ScreenGrabber.rc +// +#define ID_MIN_INITIAL_DELAY 1 +#define ID_MIN_WIDTH 1 +#define ID_MIN_HEIGHT 1 +#define IDM_ABOUTBOX 0x0010 +#define ID_MAX_INITIAL_DELAY 60 +#define IDS_ABOUTBOX 101 +#define IDD_PROPPAGE_DESTINATION 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDD_PROPPAGE_ACTIVATION 129 +#define IDD_PROPPAGE_SOURCE 130 +#define IDD_PROPPAGE_IMAGE 132 +#define IDD_PROPPAGE_FILE 133 +#define IDD_PROPPAGE_PREFERENCES 134 +#define IDR_POPUPMENU 134 +#define IDM_MINIMIZE 0x00f0 +#define SIZE_ERROR_BUF 255 +#define IDC_COMBO_HOT_KEY 1000 +#define IDC_EDIT_INITIAL_DELAY 1001 +#define IDC_SPIN_INITIAL_DELAY 1002 +#define IDC_STATIC_HOT_KEY 1004 +#define IDC_RADIO_CURRENT_WINDOW 1006 +#define IDC_RADIO_CLIENT_WINDOW 1007 +#define IDC_CHECK_FILE 1007 +#define IDC_RADIO_FULL_SCREEN 1008 +#define IDC_CHECK_RESIZE 1008 +#define IDC_CHECK_CLIPBOARD 1008 +#define IDC_RADIO_RECT_AREA 1009 +#define IDC_STATIC_WIDTH 1009 +#define IDC_STATIC_HEIGHT 1010 +#define IDC_EDIT_WIDTH 1011 +#define IDC_SPIN_WIDTH 1012 +#define IDC_EDIT_HEIGHT 1013 +#define IDC_SPIN_HEIGHT 1014 +#define IDC_CHECK_MAINTAIN_RATIO 1015 +#define IDC_STATIC_FILE_NAME 1016 +#define IDC_STATIC_FILE_TYPE 1017 +#define IDC_CHECK_AUTOMATIC_NAMING 1018 +#define IDC_COMBO_FILE_NAME 1019 +#define IDC_COMBO_FILE_TYPE 1020 +#define IDC_BUTTON_CAPTURE_DIR 1021 +#define IDC_STATIC_CAPTURE_DIR 1022 +#define IDC_CHECK_HIDE_ICON 1023 +#define IDC_CHECK_NOTIFY_END 1024 +#define IDC_CHECK_INITIAL_DELAY 1025 +#define IDC_STATIC_TIMING 1026 +#define IDC_STATIC_AREA 1027 +#define IDC_STATIC_DIR 1028 +#define IDC_STATIC_RESIZING 1029 +#define IDC_STATIC_SETTINGS 1030 +#define IDC_STATIC_DESTINATION 1031 +#define ID_TIMER_CAPTURE_DELAY 1234 +#define ID_HOTKEY 0x1234 +#define ID_MAX_WIDTH 16384 +#define ID_MAX_HEIGHT 16384 +#define ID_OPEN 32771 +#define ID_ABOUT 32772 +#define ID_CLOSE 32773 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_COMMAND_VALUE 32774 +#define _APS_NEXT_CONTROL_VALUE 1032 +#define _APS_NEXT_SYMED_VALUE 114 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/screenshot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/screenshot.bmp new file mode 100644 index 0000000..b7b65ac Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/ScreenGrabber/screenshot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.cpp new file mode 100644 index 0000000..ebac2c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "SkinsDemo.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.h new file mode 100644 index 0000000..9b1ca0a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__AAB91F88_6F1B_4F8D_BF6E_95877D0227B9__INCLUDED_) +#define AFX_CHILDFRM_H__AAB91F88_6F1B_4F8D_BF6E_95877D0227B9__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__AAB91F88_6F1B_4F8D_BF6E_95877D0227B9__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.cpp new file mode 100644 index 0000000..2cdc629 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.cpp @@ -0,0 +1,66 @@ +// FoldersBar.cpp : implementation file +// + +#include "stdafx.h" +#include "skinsdemo.h" +#include "FoldersBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +const UINT IDC_FOLDERTREE = 1000; + +///////////////////////////////////////////////////////////////////////////// +// CFoldersBar + +CFoldersBar::CFoldersBar() +{ +} + +CFoldersBar::~CFoldersBar() +{ +} + + +BEGIN_MESSAGE_MAP(CFoldersBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CFoldersBar) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CFoldersBar message handlers + +int CFoldersBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + SetClientBorder(TRUE); + if (!m_FolderTree.Create(WS_VISIBLE | WS_CHILD | TVS_HASLINES | TVS_LINESATROOT | + TVS_HASBUTTONS | TVS_EDITLABELS | TVS_SHOWSELALWAYS, CRect(0,0,0,0), this, + IDC_FOLDERTREE)) + { + return -1; + } + + m_FolderTree.InitializeTree(); + + return 0; +} + +void CFoldersBar::OnSize(UINT nType, int cx, int cy) +{ + COXSizeControlBar::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + CRect rectClient; + GetClientRect(rectClient); + m_FolderTree.MoveWindow(rectClient); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.h new file mode 100644 index 0000000..3e026ab --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/FoldersBar.h @@ -0,0 +1,52 @@ +#if !defined(AFX_FOLDERSBAR_H__5D073941_54B9_4749_A865_7935F422220D__INCLUDED_) +#define AFX_FOLDERSBAR_H__5D073941_54B9_4749_A865_7935F422220D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// FoldersBar.h : header file +// + +#include "OXSizeCtrlBar.h" +#include "OXShellFolderTree.h" + +///////////////////////////////////////////////////////////////////////////// +// CFoldersBar window + +class CFoldersBar : public COXSizeControlBar +{ +// Construction +public: + CFoldersBar(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFoldersBar) + //}}AFX_VIRTUAL + +// Implementation +public: + COXShellFolderTree m_FolderTree; + virtual ~CFoldersBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CFoldersBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FOLDERSBAR_H__5D073941_54B9_4749_A865_7935F422220D__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.cpp new file mode 100644 index 0000000..e38b51b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.cpp @@ -0,0 +1,409 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "SkinsDemo.h" + +#include "MainFrm.h" +#include "OXWorkspaceState.h" +#include "OXChildFrameState.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_CHECKED, OnChecked) + ON_UPDATE_COMMAND_UI(ID_CHECKED, OnUpdateChecked) + ON_COMMAND(ID_MAIL, OnMail) + ON_COMMAND(ID_FILE_POPUP_ITEM1, OnFilePopupItem1) + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_FOLDERS, OnViewFolders) + ON_UPDATE_COMMAND_UI(ID_VIEW_FOLDERS, OnUpdateViewFolders) + ON_COMMAND(ID_VIEW_PROPERTIES, OnViewProperties) + ON_UPDATE_COMMAND_UI(ID_VIEW_PROPERTIES, OnUpdateViewProperties) + ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace) + ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateViewWorkspace) + //}}AFX_MSG_MAP + ON_COMMAND_RANGE(ID_BUTTON32773, ID_BUTTON32781, OnToolbar2) + ON_UPDATE_COMMAND_UI_RANGE(ID_BUTTON32773, ID_BUTTON32781, OnUpdateToolbar2) + ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR, OnDropDown) + ON_CBN_SELCHANGE(ID_CB_COMBO, OnSelChangeCombo) +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +// STEP 3 - Call the constructor of COXMenuBarFrame and +// pass CBRS_ALIGN_ANY for the first parameter and +// RUNTIME_CLASS(COXSizableMiniDockFrameWnd) for the second parameter +CMainFrame::CMainFrame() : + COXMenuBarFrame(CBRS_ALIGN_ANY, + RUNTIME_CLASS(COXSizableMiniDockFrameWnd)) +{ + // TODO: add member initialization code here + m_bChecked = FALSE; +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // Create and initialize the main toolbar + if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP + | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(1, 1, 1, 1), AFX_IDW_TOOLBAR) || + !m_wndToolBar.LoadToolBar(IDR_TOOLBAR)) + + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + InitToolBar(); + + // Create and initialize the second toolbar + if (!m_wndToolBar2.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP + | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(1, 1, 1, 1), 3344554) || + !m_wndToolBar2.LoadToolBar(IDR_TOOLBAR2)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + InitToolBar2(); + + // Create the status bar + 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 + } + + // Create the workspace bar + if (!m_WorkspaceBar.Create(this, _T("Workspace"), IDR_WORKSPACEBAR, + WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_SIZE_DYNAMIC, CRect(0, 0, 150, 200))) + { + TRACE(_T("CMainFrame::OnCreate: failed to create the workspace bar.\n")); + return -1; + } + + // Create the folders bar + if (!m_FoldersBar.Create(this, _T("Folders"), IDR_FOLDERSBAR, + WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_SIZE_DYNAMIC,CRect(0, 0, 150, 200))) + { + TRACE(_T("CMainFrame::OnCreate: failed to create the folders bar.\n")); + return -1; + } + + // Create the properties bar + if (!m_PropertiesBar.Create(this, _T("Properties"), IDR_PROPERTIESBAR, + WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_SIZE_DYNAMIC, CRect(0, 0, 220, 200))) + { + TRACE(_T("CMainFrame::OnCreate: failed to create the properties bar.\n")); + return -1; + } + + // Enable docking and dock all control bars + m_WorkspaceBar.EnableDocking(CBRS_ALIGN_ANY); + m_FoldersBar.EnableDocking(CBRS_ALIGN_ANY); + m_PropertiesBar.EnableDocking(CBRS_ALIGN_ANY); + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + + DockControlBar(&m_wndToolBar); + DockControlBar(&m_wndToolBar2); + DockControlBar(&m_WorkspaceBar, AFX_IDW_DOCKBAR_LEFT); + DockControlBar(&m_FoldersBar, AFX_IDW_DOCKBAR_RIGHT); + DockControlBar(&m_PropertiesBar, AFX_IDW_DOCKBAR_RIGHT); + + // Add the following 2 lines to tab all the windows docked to the right dock bar + // and have the properties bar as the selected tab. + COXSizeDockBar* pRightDockBar = (COXSizeDockBar*) m_PropertiesBar.m_pDockBar; + pRightDockBar->TabAllDockedControlBars(&m_PropertiesBar); + + // STEP 5 (Cont'd) - Call COXBitmapMenuOrganizer::AttachFrameWnd(...) and then + // COXBitmapMenuOrganizer::AttachFrameWnd(...) + m_BMO.AttachFrameWnd(this); + m_BMO.AutoSetMenuImage(); + + // STEP 6 (Cont'd) - Call COXTabClientWnd::Attach(...) + m_MTIClientWnd.Attach(this); + + // Enable the snapping and tear-off befavior for toolbars, + // menu bars and docking windows + EnableSnapping(); + + // Uncomment the following lines if you don't want the user to be able to move + // the menubar and the toolbars + GetMenuBar().EnableFloating(FALSE); + // m_wndToolBar.EnableFloating(FALSE); + // m_wndToolBar2.EnableFloating(FALSE); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + + +void CMainFrame::OnChecked() +{ + m_bChecked = !m_bChecked; +} + + +void CMainFrame::OnUpdateChecked(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(m_bChecked); +} + + +void CMainFrame::OnToolbar2(UINT /*nID*/) +{ + +} + +void CMainFrame::OnUpdateToolbar2(CCmdUI* /*pCmdUI*/) +{ + +} + +void CMainFrame::OnMail() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + // This function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + // Translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBar.GetItemRect( + m_wndToolBar.CommandToIndex(pNMToolBar->iItem),&rect); + rect.top=rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom,&rect.TopLeft()); + + COXBitmapMenu menuPopup; + VERIFY(menuPopup.CreatePopupMenu()); + + switch(pNMToolBar->iItem) + { + case ID_MAIL: + { + menuPopup.AppendMenu(MF_STRING,ID_MAIL,_T("Read Mail")); + menuPopup.AppendMenu(MF_STRING,ID_MAIL,_T("New Message...")); + menuPopup.AppendMenu(MF_STRING,ID_MAIL,_T("Send a Link...")); + menuPopup.AppendMenu(MF_STRING,ID_MAIL,_T("Send Page...")); + menuPopup.AppendMenu(MF_SEPARATOR); + menuPopup.AppendMenu(MF_STRING,ID_MAIL,_T("Read News")); + break; + } + + } + + menuPopup.TrackPopupMenu(&m_wndToolBar, AfxGetMainWnd()); + + *pResult = TBDDRET_DEFAULT; +} +void CMainFrame::OnFilePopupItem1() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::InitToolBar() +{ + m_wndToolBar.SetList(); // the text will appear to the right of the icon (Outlook style) + + // Make all the buttons as wide as their text needs to be + for (int i = 0; i < m_wndToolBar.GetToolBarCtrl().GetButtonCount(); i++) + { + if (!(m_wndToolBar.GetButtonStyle(i) & TBSTYLE_SEP)) + m_wndToolBar.SetButtonStyle(i, m_wndToolBar.GetButtonStyle(i) | TBSTYLE_AUTOSIZE); + } + + m_wndToolBar.SetButtonTextFromID();//COXCoolToolBar::TTID_PLAIN); + m_wndToolBar.SetButtonsMinMaxWidth(0, 180); + m_wndToolBar.UpdateSizes(); + + // Set the drop down style + m_wndToolBar.SetDropDownArrow(TRUE); + int iIndex = m_wndToolBar.CommandToIndex(ID_MAIL); + m_wndToolBar.SetButtonStyle(iIndex, + m_wndToolBar.GetButtonStyle(iIndex) | TBSTYLE_DROPDOWN | TBBS_CHECKBOX); + + // Insert a separator + TBBUTTON tbb; + ::memset(&tbb, 0, sizeof(tbb)); + tbb.fsStyle = TBSTYLE_SEP; + CToolBarCtrl& ctrl = m_wndToolBar.GetToolBarCtrl(); + ctrl.InsertButton(ctrl.GetButtonCount(), &tbb); + + // Create the custom buttons objects + // + static CFont font; + if(font.m_hObject == NULL) + font.CreatePointFont(-80,_T("MS Sans Serif")); + + // Add the skinned combo box + int iCombo = COXCoolToolBar::AddCustomButton(&m_Combo, ID_CB_COMBO, 100, 100); + m_wndToolBar.InsertComboBox(m_wndToolBar.GetToolBarCtrl().GetButtonCount(), iCombo); + m_Combo.SetFont(&font); + + m_Combo.AddString(_T("One")); + m_Combo.SetItemData(0, 500); + m_Combo.AddString(_T("Two")); + m_Combo.SetItemData(1, 1000); + m_Combo.AddString(_T("Three")); + m_Combo.SetItemData(2, 1500); + m_Combo.AddString(_T("Four")); + m_Combo.SetItemData(3, 2000); + m_Combo.AddString(_T("Five")); + m_Combo.SetItemData(4, 2500); + + // Add the skinned edit control + int iEdit = COXCoolToolBar::AddCustomButton(&m_Edit, ID_CB_EDIT, 100, 18); + m_wndToolBar.InsertEditBox(m_wndToolBar.GetToolBarCtrl().GetButtonCount(), iEdit); + m_Edit.SetFont(&font); + + m_wndToolBar.UpdateSizes(); + + m_wndToolBar.SetFlat(TRUE); + m_wndToolBar.SetGripper(TRUE); + m_wndToolBar.SetWindowText(_T("Standard")); +} + +void CMainFrame::InitToolBar2() +{ + // Set the normal image list + m_ilToolBar2Normal.Create(24, 22, ILC_COLOR8 | ILC_MASK, 9, 0); + CBitmap bmpImage; + bmpImage.LoadBitmap(IDB_TOOLBAR2_NORMAL); + m_ilToolBar2Normal.Add(&bmpImage, RGB(255, 0, 0)); + bmpImage.DeleteObject(); + m_wndToolBar2.GetToolBarCtrl().SetImageList(&m_ilToolBar2Normal); + + // Set the hot image list + m_ilToolBar2Hot.Create(24, 22, ILC_COLOR8 | ILC_MASK, 9, 0); + bmpImage.LoadBitmap(IDB_TOOLBAR2_HOT); + m_ilToolBar2Hot.Add(&bmpImage, RGB(0, 0, 255)); + bmpImage.DeleteObject(); + m_wndToolBar2.GetToolBarCtrl().SetHotImageList(&m_ilToolBar2Hot); + + // Set the disabled image list + m_ilToolBar2Disabled.Create(24, 22, ILC_COLOR8 | ILC_MASK, 9, 0); + bmpImage.LoadBitmap(IDB_TOOLBAR2_DISABLED); + m_ilToolBar2Disabled.Add(&bmpImage, RGB(255, 0, 0)); + bmpImage.DeleteObject(); + m_wndToolBar2.GetToolBarCtrl().SetDisabledImageList(&m_ilToolBar2Disabled); + + // Set the toolbar caption + m_wndToolBar2.SetWindowText(_T("Navigation")); +} + +void CMainFrame::OnSelChangeCombo() +{ + // Beep when the combo box selection changes + int iFrequency = (int) m_Combo.GetItemData(m_Combo.GetCurSel()); + Beep(iFrequency, 100); +} + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + + CMDIFrameWnd::OnClose(); +} + + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +void CMainFrame::OnViewFolders() +{ + // Toggle the folders window + m_FoldersBar.ShowBar(!m_FoldersBar.IsShown()); +} + +void CMainFrame::OnUpdateViewFolders(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(m_FoldersBar.IsShown()); +} + +void CMainFrame::OnViewProperties() +{ + // Toggle the properties window + m_PropertiesBar.ShowBar(!m_PropertiesBar.IsShown()); +} + +void CMainFrame::OnUpdateViewProperties(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(m_PropertiesBar.IsShown()); +} + +void CMainFrame::OnViewWorkspace() +{ + // Toggle the workspace window + m_WorkspaceBar.ShowBar(!m_WorkspaceBar.IsShown()); +} + +void CMainFrame::OnUpdateViewWorkspace(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(m_WorkspaceBar.IsShown()); +} + +BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) +{ + if (COXBitmapMenu::HandleMDICommandMessage(nID, nCode, pExtra, pHandlerInfo)) + return TRUE; + + return CMDIFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.h new file mode 100644 index 0000000..491c2a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/MainFrm.h @@ -0,0 +1,117 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__9EA6FFD0_CCDE_464F_A19C_497208BF4ECC__INCLUDED_) +#define AFX_MAINFRM_H__9EA6FFD0_CCDE_464F_A19C_497208BF4ECC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXCoolToolbar.h" +#include "OXFrameWndDock.h" +#include "OXMenuBar.h" +#include "OXSizeDockBar.h" + +#include "OXSkinnedComboBox.h" +#include "OXBitmapMenuOrganizer.h" +#include "WorkspaceBar.h" +#include "FoldersBar.h" +#include "OXTabClientWnd.h" +#include "XStatus4.h" +#include "PropertiesBar.h" + +// STEP 2 - Derive you main frame window from COXMenuBarFrame. +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + +protected: // control bar embedded members + + CWorkspaceBar m_WorkspaceBar; + CFoldersBar m_FoldersBar; + CPropertiesBar m_PropertiesBar; + + // STEP 4 - Derive or instantiate your toolbars from COXCoolToolBar instead of CToolBar. + COXCoolToolBar m_wndToolBar; + COXCoolToolBar m_wndToolBar2; + + // STEP 5 - Add an instance of COXBitmapMenuOrganizer to your main frame class. This will + // enable your menus to show bitmaps. + COXBitmapMenuOrganizer m_BMO; + + // STEP 6 - Add an instance of COXTabClientWnd to your main frame class. This will + // enable the MDI tabs. + COXTabClientWnd m_MTIClientWnd; + + // STEP 7 - Derive or instantiate your status bar from COXStatusBar instead of CStatusBar. + COXStatusBar m_wndStatusBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnChecked(); + afx_msg void OnUpdateChecked(CCmdUI* pCmdUI); + afx_msg void OnMail(); + afx_msg void OnFilePopupItem1(); + afx_msg void OnClose(); + afx_msg void OnViewFolders(); + afx_msg void OnUpdateViewFolders(CCmdUI* pCmdUI); + afx_msg void OnViewProperties(); + afx_msg void OnUpdateViewProperties(CCmdUI* pCmdUI); + afx_msg void OnViewWorkspace(); + afx_msg void OnUpdateViewWorkspace(CCmdUI* pCmdUI); + //}}AFX_MSG + void OnToolbar2(UINT nID); + void OnUpdateToolbar2(CCmdUI* pCmdUI); + void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + void OnSelChangeCombo(); + DECLARE_MESSAGE_MAP() + +private: + void InitToolBar2(); + void InitToolBar(); + BOOL m_bChecked; + CImageList m_ilToolBar2Normal; + CImageList m_ilToolBar2Hot; + CImageList m_ilToolBar2Disabled; + + // Custom buttons for the toolbar + COXCustomTBComboBox m_Combo; + COXCustomTBButtonWnd< COXSkinnedWnd > m_Edit; +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__9EA6FFD0_CCDE_464F_A19C_497208BF4ECC__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.cpp new file mode 100644 index 0000000..37b57c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.cpp @@ -0,0 +1,231 @@ +// PropertiesBar.cpp : implementation file +// + +#include "stdafx.h" +#include "skinsdemo.h" +#include "PropertiesBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertiesBar + +const UINT IDC_PROPERTIES = 1001; + +CPropertiesBar::CPropertiesBar() +{ +} + +CPropertiesBar::~CPropertiesBar() +{ +} + + +BEGIN_MESSAGE_MAP(CPropertiesBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CPropertiesBar) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CPropertiesBar message handlers + +int CPropertiesBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + if (!m_wndProperties.Create(NULL, NULL, WS_VISIBLE | WS_CHILD, CRect(0,0,0,0), this/*, + IDC_PROPERTIES*/)) + { + return -1; + } + + // Uncomment the next line if you want to hide the combo box + // m_wndProperties.ShowCombo(FALSE); + + // Put some items in the combo box + for (int i = 0; i < 10; i++) + { + COMBOBOXEXITEM cbi; + cbi.iItem = i; + cbi.mask = CBEIF_TEXT; + CString strText; + strText.Format(_T("Item %d"), i); + cbi.pszText = (TCHAR*)(LPCTSTR) strText; + m_wndProperties.GetComboBoxEx().InsertItem(&cbi); + } + + // Uncomment the next line if you want to hide the toolbar + // m_wndProperties.ShowToolBar(FALSE); + + InitProperties(); + + return 0; +} + +void CPropertiesBar::OnSize(UINT nType, int cx, int cy) +{ + COXSizeControlBar::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + CRect rectClient; + GetClientRect(rectClient); + m_wndProperties.MoveWindow(rectClient); +} + +void CPropertiesBar::InitProperties() +{ + ASSERT(::IsWindow(m_hWnd)); // this window must be already created + + HPROPERTY hProperty; + + // Text + hProperty= m_wndProperties.InsertProperty( + _T("Text"), // property name + _T(""), // initail value + _T("Demonstrates the use of a text field."), // property description + _T("Data"), // category + &m_textEditor); // editor window + + // Read-only field (no editor) + hProperty= m_wndProperties.InsertProperty( + _T("Serial Number"), // property name + _T("K67-FR45-5"), // initail value + _T("Demonstrates the use of a read-only field."), // property description + _T("Data")); // category + + // List of items + CStringArray items; + items.Add(_T("New York")); + items.Add(_T("Chicago")); + items.Add(_T("London")); + items.Add(_T("Paris")); + items.Add(_T("Toronto")); + items.Add(_T("Berlin")); + items.Add(_T("Rome")); + items.Add(_T("Los Angeles")); + + m_listEditor.SetListItems(&items, &m_wndProperties); // set the list of items + hProperty= m_wndProperties.InsertProperty( + _T("City"), // property name + _T(""), // initail value + _T("Demonstrates the use of a list field."), // property description + _T("Data"), // category + &m_listEditor); // editor window + + // Number + hProperty= m_wndProperties.InsertProperty( + _T("Number"), // property name + _T("0.00"), // initail value + _T("Demonstrates the use of a numeric field."), // property description + _T("Data"), // category + &m_numericEditor); // editor window + + // Phone number (using COXMaskedEdit) + m_phoneNumberEditor.SetMask(_T("(###) ###-#### Ex.###")); + hProperty= m_wndProperties.InsertProperty( + _T("Telephone"), // property name + _T("( ) - Ex."), // initail value + _T("Demonstrates the use of a masked field."), // property description + _T("Data"), // category + &m_phoneNumberEditor); // editor window + + // Currency + hProperty= m_wndProperties.InsertProperty( + _T("Currency"), // property name + _T("$0.00"), // initail value + _T("Demonstrates the use of a currency field."), // property description + _T("Data"), // category + &m_currencyEditor); // editor window + + // IP Address + hProperty= m_wndProperties.InsertProperty( + _T("IP Address"), // property name + _T(""), // initail value + _T("Demonstrates the use of a ip address field."), // property description + _T("Data"), // category + &m_ipAddressEditor); // editor window + + // Date (use "dd" to specify the day, "mm" to specify the month + // and either "yy" or "yyyy" to specify the year) + m_dateEditor.SetDateFormat(_T("dd/mm/yyyy")); + hProperty= m_wndProperties.InsertProperty( + _T("Date"), // property name + _T(""), // initail value + _T("Demonstrates the use of a date field."), // property description + _T("Data"), // category + &m_dateEditor); // editor window + + // Time + hProperty= m_wndProperties.InsertProperty( + _T("Time"), // property name + _T("1.00 s"), // initail value + _T("Demonstrates the use of a time field."), // property description + _T("Physical Fields"), // category + &m_timeEditor); // editor window + + // Angle + hProperty = m_wndProperties.InsertProperty( + _T("Angle"), // property name + _T("0.00 °"), // initail value + _T("Demonstrates the use of an angle field."), // property description + _T("Physical Fields"), // category + &m_angleEditor); // editor window + + // Length + hProperty = m_wndProperties.InsertProperty( + _T("Length"), // property name + _T("0.00 m"), // initail value + _T("Demonstrates the use of a length field."), // property description + _T("Physical Fields"), // category + &m_lengthEditor); // editor window + + // Temperature + hProperty = m_wndProperties.InsertProperty( + _T("Temperature"), // property name + _T("0.00 °C"), // initail value + _T("Demonstrates the use of a temparature field."), // property description + _T("Physical Fields"), // category + &m_temperatureEditor); // editor window + + // Color + hProperty = m_wndProperties.InsertProperty( + _T("Color"), // property name + _T("None"), // initail value + _T("Demonstrates the use of a color field."), // property description + _T("Miscellaneous"), // category + &m_colorEditor); // editor window + + // Calculator + hProperty = m_wndProperties.InsertProperty( + _T("Calculator"), // property name + _T("0.00"), // initail value + _T("Demonstrates the use of a calculator field."), // property description + _T("Miscellaneous"), // category + &m_calculatorEditor); // editor window + + // Directory + hProperty = m_wndProperties.InsertProperty( + _T("Directory"), // property name + _T(""), // initail value + _T("Demonstrates the use of a directory field."), // property description + _T("Miscellaneous"), // category + &m_directoryEditor); // editor window + + // Filename + hProperty = m_wndProperties.InsertProperty( + _T("Filename"), // property name + _T(""), // initail value + _T("Demonstrates the use of a filename field."), // property description + _T("Miscellaneous"), // category + &m_filenameEditor); // editor window +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.h new file mode 100644 index 0000000..a14763c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/PropertiesBar.h @@ -0,0 +1,79 @@ +#if !defined(AFX_PROPERTIESBAR_H__BE06B578_EC88_45B6_AC46_27A1F161A732__INCLUDED_) +#define AFX_PROPERTIESBAR_H__BE06B578_EC88_45B6_AC46_27A1F161A732__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// PropertiesBar.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPropertiesBar window + +#include "OXSizeCtrlBar.h" +#include "OXPropertiesWnd.h" // Added by ClassView + +#include "OXEdit.h" +#include "OXPhysicalEditEx.h" +#include "OXCalculatorEdit.h" +#include "OXBrowseDirEdit.h" +#include "OXListEdit.h" +#include "OXCalendarEdit.h" +#include "OXIPEdit.h" + +class CPropertiesBar : public COXSizeControlBar +{ +// Construction +public: + CPropertiesBar(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPropertiesBar) + //}}AFX_VIRTUAL + +// Implementation +public: + COXPropertiesWnd m_wndProperties; + virtual ~CPropertiesBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CPropertiesBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +private: + void InitProperties(); + + // Editor instances + COXEdit m_textEditor; + COXListEdit m_listEditor; + COXNumericEdit m_numericEditor; + COXMaskedEdit m_phoneNumberEditor; + COXCurrencyEdit m_currencyEditor; + COXIPEdit m_ipAddressEditor; + COXCalendarEdit m_dateEditor; + COXTimeEdit m_timeEditor; + COXAngleEdit m_angleEditor; + COXLengthEdit m_lengthEditor; + COXTempEdit m_temperatureEditor; + COXBrowseColorEdit m_colorEditor; + COXCalculatorEdit m_calculatorEditor; + COXBrowseDirEdit m_directoryEditor; + COXBrowseFileEdit m_filenameEditor; +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTIESBAR_H__BE06B578_EC88_45B6_AC46_27A1F161A732__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ReadMe.txt new file mode 100644 index 0000000..adb981e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/ReadMe.txt @@ -0,0 +1,117 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : SkinsDemo +======================================================================== + + +AppWizard has created this SkinsDemo 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 SkinsDemo application. + +SkinsDemo.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +SkinsDemo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSkinsDemoApp application class. + +SkinsDemo.cpp + This is the main application source file that contains the application + class CSkinsDemoApp. + +SkinsDemo.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++. + +SkinsDemo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\SkinsDemo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file SkinsDemo.rc. + +res\SkinsDemo.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 SkinsDemo.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +SkinsDemoDoc.h, SkinsDemoDoc.cpp - the document + These files contain your CSkinsDemoDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CSkinsDemoDoc::Serialize). + +SkinsDemoView.h, SkinsDemoView.cpp - the view of the document + These files contain your CSkinsDemoView class. + CSkinsDemoView objects are used to view CSkinsDemoDoc objects. + +res\SkinsDemoDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CSkinsDemoDoc class. This icon is included by the main + resource file SkinsDemo.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named SkinsDemo.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.clw new file mode 100644 index 0000000..2a9837d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.clw @@ -0,0 +1,316 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMainFrame +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "skinsdemo.h" +LastPage=0 + +ClassCount=9 +Class1=CChildFrame +Class2=CFoldersBar +Class3=CMainFrame +Class4=CPropertiesBar +Class5=CSkinsDemoApp +Class6=CAboutDlg +Class7=CSkinsDemoDoc +Class8=CSkinsDemoView +Class9=CWorkspaceBar + +ResourceCount=12 +Resource1=IDR_MAINFRAME +Resource2=IDR_TOOLBAR +Resource3=IDR_TOOLBAR2 +Resource4=IDR_POPUPS +Resource5=IDR_SKINSDTYPE +Resource6=IDD_ABOUTBOX +Resource7=IDR_TOOLBAR (English (U.S.)) +Resource8=IDR_POPUPS (English (U.S.)) +Resource9=IDR_SKINSDTYPE (English (U.S.)) +Resource10=IDR_TOOLBAR2 (English (U.S.)) +Resource11=IDR_MAINFRAME (English (U.S.)) +Resource12=IDD_ABOUTBOX (English (U.S.)) + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CFoldersBar] +Type=0 +BaseClass=COXSizeControlBar +HeaderFile=FoldersBar.h +ImplementationFile=FoldersBar.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +LastObject=CMainFrame +Filter=T +VirtualFilter=fWC + +[CLS:CPropertiesBar] +Type=0 +BaseClass=COXSizeControlBar +HeaderFile=PropertiesBar.h +ImplementationFile=PropertiesBar.cpp + +[CLS:CSkinsDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SkinsDemo.h +ImplementationFile=SkinsDemo.cpp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=SkinsDemo.cpp +ImplementationFile=SkinsDemo.cpp +LastObject=CAboutDlg + +[CLS:CSkinsDemoDoc] +Type=0 +BaseClass=CDocument +HeaderFile=SkinsDemoDoc.h +ImplementationFile=SkinsDemoDoc.cpp + +[CLS:CSkinsDemoView] +Type=0 +BaseClass=BASEVIEW +HeaderFile=SkinsDemoView.h +ImplementationFile=SkinsDemoView.cpp +LastObject=CSkinsDemoView + +[CLS:CWorkspaceBar] +Type=0 +BaseClass=COXSizeControlBar +HeaderFile=WorkspaceBar.h +ImplementationFile=WorkspaceBar.cpp +LastObject=CWorkspaceBar + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[TB:IDR_TOOLBAR] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_MAIL +Command5=ID_APP_ABOUT +Command6=ID_CHECKED +CommandCount=6 + +[TB:IDR_TOOLBAR2] +Type=1 +Class=? +Command1=ID_BUTTON32773 +Command2=ID_BUTTON32774 +Command3=ID_BUTTON32775 +Command4=ID_BUTTON32776 +Command5=ID_BUTTON32777 +Command6=ID_BUTTON32778 +Command7=ID_BUTTON32780 +CommandCount=7 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_WORKSPACE +Command7=ID_VIEW_PROPERTIES +Command8=ID_VIEW_FOLDERS +Command9=ID_VIEW_TOOLBAR +Command10=ID_VIEW_STATUS_BAR +Command11=ID_APP_ABOUT +CommandCount=11 + +[MNU:IDR_SKINSDTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_POPUP_ITEM1 +Command7=ID_FILE_POPUP_ITEM2 +Command8=ID_FILE_POPUP_ITEM3 +Command9=ID_FILE_PRINT +Command10=ID_FILE_PRINT_PREVIEW +Command11=ID_FILE_PRINT_SETUP +Command12=ID_CHECKED +Command13=ID_FILE_MRU_FILE1 +Command14=ID_APP_EXIT +Command15=ID_EDIT_UNDO +Command16=ID_EDIT_CUT +Command17=ID_EDIT_COPY +Command18=ID_EDIT_PASTE +Command19=ID_VIEW_WORKSPACE +Command20=ID_VIEW_PROPERTIES +Command21=ID_VIEW_FOLDERS +Command22=ID_VIEW_TOOLBAR +Command23=ID_VIEW_STATUS_BAR +Command24=ID_WINDOW_NEW +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +Command27=ID_WINDOW_ARRANGE +Command28=ID_APP_ABOUT +CommandCount=28 + +[MNU:IDR_POPUPS] +Type=1 +Class=? +Command1=ID_ITEM1 +Command2=ID_ITEM2 +Command3=ID_ITEM3 +Command4=ID_FILE_PRINT +Command5=ID_CHECKED +CommandCount=5 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[MNU:IDR_POPUPS (English (U.S.))] +Type=1 +Class=? +Command1=ID_ITEM1 +Command2=ID_ITEM2 +Command3=ID_ITEM3 +Command4=ID_FILE_PRINT +Command5=ID_CHECKED +CommandCount=5 + +[MNU:IDR_SKINSDTYPE (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_POPUP_ITEM1 +Command7=ID_FILE_POPUP_ITEM2 +Command8=ID_FILE_POPUP_ITEM3 +Command9=ID_FILE_PRINT +Command10=ID_FILE_PRINT_PREVIEW +Command11=ID_FILE_PRINT_SETUP +Command12=ID_CHECKED +Command13=ID_FILE_MRU_FILE1 +Command14=ID_APP_EXIT +Command15=ID_EDIT_UNDO +Command16=ID_EDIT_CUT +Command17=ID_EDIT_COPY +Command18=ID_EDIT_PASTE +Command19=ID_VIEW_WORKSPACE +Command20=ID_VIEW_PROPERTIES +Command21=ID_VIEW_FOLDERS +Command22=ID_VIEW_TOOLBAR +Command23=ID_VIEW_STATUS_BAR +Command24=ID_WINDOW_NEW +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +Command27=ID_WINDOW_ARRANGE +Command28=ID_APP_ABOUT +CommandCount=28 + +[TB:IDR_TOOLBAR (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_MAIL +Command5=ID_APP_ABOUT +Command6=ID_CHECKED +CommandCount=6 + +[TB:IDR_TOOLBAR2 (English (U.S.))] +Type=1 +Class=? +Command1=ID_BUTTON32773 +Command2=ID_BUTTON32774 +Command3=ID_BUTTON32775 +Command4=ID_BUTTON32776 +Command5=ID_BUTTON32777 +Command6=ID_BUTTON32778 +Command7=ID_BUTTON32780 +CommandCount=7 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_WORKSPACE +Command7=ID_VIEW_PROPERTIES +Command8=ID_VIEW_FOLDERS +Command9=ID_VIEW_TOOLBAR +Command10=ID_VIEW_STATUS_BAR +Command11=ID_APP_ABOUT +CommandCount=11 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.cpp new file mode 100644 index 0000000..d4048ab --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.cpp @@ -0,0 +1,195 @@ +// SkinsDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SkinsDemo.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "SkinsDemoDoc.h" +#include "SkinsDemoView.h" + +#include "OXShadowedWnd.h" +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoApp + +BEGIN_MESSAGE_MAP(CSkinsDemoApp, CWinApp) + //{{AFX_MSG_MAP(CSkinsDemoApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoApp construction + +CSkinsDemoApp::CSkinsDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSkinsDemoApp object + +CSkinsDemoApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoApp initialization + +BOOL CSkinsDemoApp::InitInstance() +{ + AfxEnableControlContainer(); + + SetCurrentSkin(_T("Office 2003")); + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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_SKINSDTYPE, + RUNTIME_CLASS(CSkinsDemoDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CSkinsDemoView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // Create 2 more child frames + OnFileNew(); + OnFileNew(); + + // Mazimize all MDI child windows + POSITION posDoc = pDocTemplate->GetFirstDocPosition(); + while (posDoc != NULL) + { + CDocument* pDoc = pDocTemplate->GetNextDoc(posDoc); + POSITION posView = pDoc->GetFirstViewPosition(); + while (posView != NULL) + { + CFrameWnd* pFrame = pDoc->GetNextView(posView)->GetParentFrame(); + pMainFrame->MDIMaximize(pFrame); + } + } + + // 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 COXShadowedWnd +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + CButton m_btnOK; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : COXShadowedWnd(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + DDX_Control(pDX, IDOK, m_btnOK); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CSkinsDemoApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoApp message handlers + + +int CSkinsDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsp new file mode 100644 index 0000000..f12dd9e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsp @@ -0,0 +1,692 @@ +# Microsoft Developer Studio Project File - Name="SkinsDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SkinsDemo - Win32 Unicode Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SkinsDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SkinsDemo.mak" CFG="SkinsDemo - Win32 Unicode Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SkinsDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SkinsDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SkinsDemo - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "SkinsDemo - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SkinsDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SkinsDemo.exe" + +!ELSEIF "$(CFG)" == "SkinsDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SkinsDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SkinsDemo - Win32 Unicode Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SkinsDemo___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "SkinsDemo___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseU" +# PROP Intermediate_Dir "ReleaseU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SkinsDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"SkinsDemo.exe" + +!ELSEIF "$(CFG)" == "SkinsDemo - Win32 Unicode Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SkinsDemo___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "SkinsDemo___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Fr /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SkinsDemo.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"SkinsDemo.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "SkinsDemo - Win32 Release" +# Name "SkinsDemo - Win32 Debug" +# Name "SkinsDemo - Win32 Unicode Release" +# Name "SkinsDemo - Win32 Unicode Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Ultimate Toolbox Source" + +# PROP Default_Filter "*.cpp" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBrowseColorEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBrowseDirEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalculatorCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalculatorEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalendarEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXChildFrameState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDocTemplateSpy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFolderPickerDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXIPEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXListEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMaskedEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPhysicalEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPhysicalEditEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPropertiesWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPropertyDescriptionPane.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxpropertytree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShdWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShellFolderTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShellNamespaceNavigator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterColRowState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXWorkspaceState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\FoldersBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertiesBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemoDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemoView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceBar.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\FoldersBar.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\PropertiesBar.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemo.h +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemoDoc.h +# End Source File +# Begin Source File + +SOURCE=.\SkinsDemoView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceBar.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\command_group.ico +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\custom_button.ico +# End Source File +# Begin Source File + +SOURCE=.\res\large.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\gui\Shortcutbar\res\large.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\new_popup_menu.ico +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\noimage.ico +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\OXHandCursor.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\OXNoHandCursor.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\OXNotes.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\OXSpinHor.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\OXSpinVer.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\oxtbcopy.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\oxtbmove.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\oxtbremove.cur +# End Source File +# Begin Source File + +SOURCE=.\res\properties_toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_all.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_bottomleft.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_bottomright.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_down.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_left.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_leftright.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_right.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_topbottom.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_topleft.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_topright.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\scrl_up.cur +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\res\separator.ico +# End Source File +# Begin Source File + +SOURCE=..\..\gui\Shortcutbar\res\ShortcutBar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SkinsDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SkinsDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\SkinsDemoDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\small.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\gui\Shortcutbar\res\small.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar2.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar2Disabled.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar2Hot.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar2Normal.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_buttons.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\TreeImages.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\gui\Shortcutbar\res\TreeImages.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsw new file mode 100644 index 0000000..07bc9c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SkinsDemo"=".\SkinsDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.h new file mode 100644 index 0000000..b6b694c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.h @@ -0,0 +1,52 @@ +// SkinsDemo.h : main header file for the SKINSDEMO application +// + +#if !defined(AFX_SKINSDEMO_H__698DEA13_A6F8_421B_810B_B8C827F5B9E3__INCLUDED_) +#define AFX_SKINSDEMO_H__698DEA13_A6F8_421B_810B_B8C827F5B9E3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols +#include "OXSkins.h" + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoApp: +// See SkinsDemo.cpp for the implementation of this class +// + +// STEP 1 - Derive your application class from COXSkinnedApp insted of CWinApp. +class CSkinsDemoApp : public COXSkinnedApp +{ +public: + CSkinsDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSkinsDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CSkinsDemoApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SKINSDEMO_H__698DEA13_A6F8_421B_810B_B8C827F5B9E3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.rc new file mode 100644 index 0000000..f7d40f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.rc @@ -0,0 +1,514 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\SkinsDemo.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" + "#include ""OXMain.rc""\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 DISCARDABLE "res\\SkinsDemo.ico" +IDR_SKINSDTYPE ICON DISCARDABLE "res\\SkinsDemoDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_TOOLBAR BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDR_TOOLBAR2 BITMAP DISCARDABLE "res\\toolbar2.bmp" +IDB_TOOLBAR2_HOT BITMAP DISCARDABLE "res\\Toolbar2Hot.bmp" +IDB_TOOLBAR2_NORMAL BITMAP DISCARDABLE "res\\Toolbar2Normal.bmp" +IDB_TOOLBAR2_DISABLED BITMAP DISCARDABLE "res\\Toolbar2Disabled.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + BUTTON ID_FILE_OPEN + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_MAIL + SEPARATOR + BUTTON ID_APP_ABOUT + BUTTON ID_CHECKED +END + +IDR_TOOLBAR2 TOOLBAR DISCARDABLE 24, 22 +BEGIN + BUTTON ID_BUTTON32773 + BUTTON ID_BUTTON32774 + BUTTON ID_BUTTON32775 + SEPARATOR + BUTTON ID_BUTTON32776 + BUTTON ID_BUTTON32777 + BUTTON ID_BUTTON32778 + SEPARATOR + BUTTON ID_BUTTON32780 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Properties", ID_VIEW_PROPERTIES + MENUITEM "&Folders", ID_VIEW_FOLDERS + MENUITEM SEPARATOR + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About SkinsDemo...", ID_APP_ABOUT + END +END + +IDR_SKINSDTYPE MENU PRELOAD DISCARDABLE +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 + POPUP "Popup" + BEGIN + MENUITEM "Item 1", ID_FILE_POPUP_ITEM1 + MENUITEM "Item 2", ID_FILE_POPUP_ITEM2 + MENUITEM "Item 3", ID_FILE_POPUP_ITEM3 + END + 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 "Checked", ID_CHECKED + 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 "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Properties", ID_VIEW_PROPERTIES + MENUITEM "&Folders", ID_VIEW_FOLDERS + MENUITEM SEPARATOR + 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 SkinsDemo...", ID_APP_ABOUT + END +END + +IDR_POPUPS MENU DISCARDABLE +BEGIN + POPUP "POPUP1" + BEGIN + MENUITEM "Item &1 (handled)", ID_ITEM1 + MENUITEM "Item &2 (handled and disabled)", ID_ITEM2 + MENUITEM "Item 3 (not handled)", ID_ITEM3 + MENUITEM "&Print", ID_FILE_PRINT + MENUITEM SEPARATOR + MENUITEM "&Check Item", ID_CHECKED + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 DIALOG DISCARDABLE 0, 0, 236, 87 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About SkinsDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "SkinsDemo Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2005 The Code Project",IDC_STATIC,40,25, + 119,8 + DEFPUSHBUTTON "OK",IDOK,179,7,50,14,WS_GROUP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SkinsDemo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SkinsDemo\0" + VALUE "LegalCopyright", "Copyright (C) 2002\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "SkinsDemo.EXE\0" + VALUE "ProductName", "SkinsDemo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 229 + TOPMARGIN, 7 + BOTTOMMARGIN, 80 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "SkinsDemo" + IDR_SKINSDTYPE "\nSkinsD\nSkinsD\n\n\nSkinsDemo.Document\nSkinsD Document" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "SkinsDemo" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_CB_EDIT "Edit control\nEdit control" + ID_CB_COMBO "Combo box\nCombo box" + ID_CB_CHECKBOX "Check box\nCheck box" + ID_CB_PROGRESS "Progress bar\nProgress bar" + ID_CB_SLIDER "Slider control\nSlider control" + ID_CB_DTP "Date-time picker\nDate-time picker" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_CHECKED "This is a stupid button\nRun" + ID_MAIL "Mail\nMail" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_LARGE BITMAP DISCARDABLE "res\\large.bmp" +IDB_SMALL BITMAP DISCARDABLE "res\\small.bmp" +IDB_TREE BITMAP DISCARDABLE "res\\TreeImages.bmp" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\SkinsDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXMain.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.sln new file mode 100644 index 0000000..7f67037 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkinsDemo", "SkinsDemo.vcproj", "{368A240D-155A-4971-A79C-EF524AEB5567}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Unicode Debug|Win32 = Unicode Debug|Win32 + Unicode Release|Win32 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug|Win32.ActiveCfg = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Debug|Win32.Build.0 = Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release|Win32.ActiveCfg = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Release|Win32.Build.0 = Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {368A240D-155A-4971-A79C-EF524AEB5567}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj new file mode 100644 index 0000000..8a9bc42 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj @@ -0,0 +1,3632 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj.vspscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj.vspscc new file mode 100644 index 0000000..6cb031b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.cpp new file mode 100644 index 0000000..8181355 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.cpp @@ -0,0 +1,84 @@ +// SkinsDemoDoc.cpp : implementation of the CSkinsDemoDoc class +// + +#include "stdafx.h" +#include "SkinsDemo.h" + +#include "SkinsDemoDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoDoc + +IMPLEMENT_DYNCREATE(CSkinsDemoDoc, CDocument) + +BEGIN_MESSAGE_MAP(CSkinsDemoDoc, CDocument) + //{{AFX_MSG_MAP(CSkinsDemoDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoDoc construction/destruction + +CSkinsDemoDoc::CSkinsDemoDoc() +{ + // TODO: add one-time construction code here + +} + +CSkinsDemoDoc::~CSkinsDemoDoc() +{ +} + +BOOL CSkinsDemoDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoDoc serialization + +void CSkinsDemoDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoDoc diagnostics + +#ifdef _DEBUG +void CSkinsDemoDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CSkinsDemoDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.h new file mode 100644 index 0000000..61908e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoDoc.h @@ -0,0 +1,57 @@ +// SkinsDemoDoc.h : interface of the CSkinsDemoDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SKINSDEMODOC_H__5DEE868B_D902_4983_87E2_89DEC3E5E609__INCLUDED_) +#define AFX_SKINSDEMODOC_H__5DEE868B_D902_4983_87E2_89DEC3E5E609__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CSkinsDemoDoc : public CDocument +{ +protected: // create from serialization only + CSkinsDemoDoc(); + DECLARE_DYNCREATE(CSkinsDemoDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSkinsDemoDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSkinsDemoDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CSkinsDemoDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SKINSDEMODOC_H__5DEE868B_D902_4983_87E2_89DEC3E5E609__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.cpp new file mode 100644 index 0000000..4cfc744 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.cpp @@ -0,0 +1,153 @@ +// SkinsDemoView.cpp : implementation of the CSkinsDemoView class +// + +#include "stdafx.h" +#include "SkinsDemo.h" + +#include "SkinsDemoDoc.h" +#include "SkinsDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView + +IMPLEMENT_DYNCREATE(CSkinsDemoView, BASEVIEW) + +BEGIN_MESSAGE_MAP(CSkinsDemoView, BASEVIEW) + //{{AFX_MSG_MAP(CSkinsDemoView) + ON_WM_CONTEXTMENU() + ON_COMMAND(ID_ITEM1, OnItem1) + ON_COMMAND(ID_ITEM2, OnItem2) + ON_UPDATE_COMMAND_UI(ID_ITEM2, OnUpdateItem2) + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView construction/destruction + +CSkinsDemoView::CSkinsDemoView() +{ + // TODO: add construction code here + +} + +CSkinsDemoView::~CSkinsDemoView() +{ +} + +BOOL CSkinsDemoView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView drawing + +void CSkinsDemoView::OnDraw(CDC* pDC) +{ + CSkinsDemoDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + CFont font; + font.CreatePointFont(80, _T("MS Sans Serif")); + CFont* pOldFont = pDC->SelectObject(&font); + + CRect rectClient; + GetClientRect(rectClient); + + CSkinsDemoApp* pApp = (CSkinsDemoApp*) AfxGetApp(); + + COLORREF clrOldColor = pDC->SetTextColor(pApp->GetCurrentSkin()->GetFrameSkin()->GetBorderColor()); + pDC->DrawText(_T("Right click to activate the context menu."), rectClient, DT_CENTER|DT_VCENTER|DT_SINGLELINE); + pDC->SetTextColor(clrOldColor); + pDC->SelectObject(pOldFont); +} + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView printing + +BOOL CSkinsDemoView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CSkinsDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CSkinsDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView diagnostics + +#ifdef _DEBUG +void CSkinsDemoView::AssertValid() const +{ + BASEVIEW::AssertValid(); +} + +void CSkinsDemoView::Dump(CDumpContext& dc) const +{ + BASEVIEW::Dump(dc); +} + +CSkinsDemoDoc* CSkinsDemoView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSkinsDemoDoc))); + return (CSkinsDemoDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSkinsDemoView message handlers + +void CSkinsDemoView::OnContextMenu(CWnd* /*pWnd*/, CPoint point) +{ + // TODO: Add your message handler code here + COXBitmapMenu menu; + menu.LoadMenu(IDR_POPUPS); + CMenu* pMenuPopup = menu.GetSubMenu(0); + + pMenuPopup->SetDefaultItem(0, MF_BYPOSITION | MF_ENABLED); + pMenuPopup->EnableMenuItem(1, MF_BYPOSITION | MF_ENABLED); + + pMenuPopup->TrackPopupMenu(TPM_LEFTALIGN, point.x, point.y, AfxGetMainWnd()); +} + +void CSkinsDemoView::OnItem1() +{ + // TODO: Add your command handler code here + AfxMessageBox(_T("Item 1 clicked."), MB_ICONWARNING); +} + +void CSkinsDemoView::OnItem2() +{ + // TODO: Add your command handler code here + +} + +void CSkinsDemoView::OnUpdateItem2(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + // Disable the item + pCmdUI->Enable(FALSE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.h new file mode 100644 index 0000000..c4baa38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemoView.h @@ -0,0 +1,72 @@ +// SkinsDemoView.h : interface of the CSkinsDemoView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SKINSDEMOVIEW_H__5CCC63AA_7818_4647_B917_01BF3EBC90A8__INCLUDED_) +#define AFX_SKINSDEMOVIEW_H__5CCC63AA_7818_4647_B917_01BF3EBC90A8__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXSkinnedView.h" + +// STEP 8: Derive your view class from COXSkinnedView<...> +#define BASEVIEW CView +class CSkinsDemoView : public COXSkinnedView +{ +protected: // create from serialization only + CSkinsDemoView(); + DECLARE_DYNCREATE(CSkinsDemoView) + +// Attributes +public: + CSkinsDemoDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSkinsDemoView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSkinsDemoView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CSkinsDemoView) + afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); + afx_msg void OnItem1(); + afx_msg void OnItem2(); + afx_msg void OnUpdateItem2(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in SkinsDemoView.cpp +inline CSkinsDemoDoc* CSkinsDemoView::GetDocument() + { return (CSkinsDemoDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SKINSDEMOVIEW_H__5CCC63AA_7818_4647_B917_01BF3EBC90A8__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.cpp new file mode 100644 index 0000000..f85ff22 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// SkinsDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.h new file mode 100644 index 0000000..2ee0459 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/StdAfx.h @@ -0,0 +1,40 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__2A523B18_F6F2_40CC_9854_0D98057F6B5F__INCLUDED_) +#define AFX_STDAFX_H__2A523B18_F6F2_40CC_9854_0D98057F6B5F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#ifndef WINVER +#define WINVER 0x0400 +#endif + + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +#include "OXAdvancedAssert.h" + +#include +#include + +// Add this line to statically link UTLib*.lib +//#include "UTStaticLib.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__2A523B18_F6F2_40CC_9854_0D98057F6B5F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.cpp new file mode 100644 index 0000000..1b49b2c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.cpp @@ -0,0 +1,195 @@ +// WorkspaceBar.cpp : implementation file +// + +#include "stdafx.h" +#include "skinsdemo.h" +#include "WorkspaceBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceBar + +#define IDC_SHORTCUT_BAR 7565 + +CWorkspaceBar::CWorkspaceBar() +{ +} + +CWorkspaceBar::~CWorkspaceBar() +{ +} + + +BEGIN_MESSAGE_MAP(CWorkspaceBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CWorkspaceBar) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP + ON_NOTIFY(SHBN_SELECTITEM, IDC_SHORTCUT_BAR, OnShortcutBarSelectItem) +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceBar message handlers + +int CWorkspaceBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + SetClientBorder(TRUE); + + // Create the shortcut bar + m_ShortcutBar.Create(this, CRect(0, 0, 0, 0), SHBS_EDITHEADERS | SHBS_EDITITEMS | SHBS_DISABLEDRAGDROPITEM | + SHBS_DISABLEDRAGDROPHEADER | SHBS_FLATGROUPBUTTON | SHBS_SHOWACTIVEALWAYS, IDC_SHORTCUT_BAR); + InitShortcutBar(); + + return 0; +} + +void CWorkspaceBar::OnSize(UINT nType, int cx, int cy) +{ + COXSizeControlBar::OnSize(nType, cx, cy); + + // Size the tabs container accordingly + CRect rectClient; + GetClientRect(rectClient); + m_ShortcutBar.MoveWindow(rectClient); +} + +void CWorkspaceBar::InitShortcutBar() +{ + // Populate shortcut bar + m_ShortcutBar.SetImageList(&m_ilTree); + + SHB_GROUPINFO shbGroup; + CString sText; + + // create image lists + VERIFY(m_ilLarge.Create(IDB_LARGE,32,11,RGB(255, 0, 0))); + VERIFY(m_ilSmall.Create(IDB_SMALL,16,11,RGB(255, 0, 0))); + + // Skins group + sText=_T("Skins"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + m_ShortcutBar.InsertGroup(&shbGroup); + + // outlook group + sText=_T("Outlook"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + m_ShortcutBar.InsertGroup(&shbGroup); + + // mail group + sText=_T("Mail"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + m_ShortcutBar.InsertGroup(&shbGroup); + + // find the skins group and populate it + sText=_T("Skins"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + HSHBGROUP hGroup=m_ShortcutBar.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_ShortcutBar.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_ShortcutBar.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + + m_ShortcutBar.InsertLCItem(hGroup, 0, _T("Classic"), 0); + m_ShortcutBar.InsertLCItem(hGroup, 1, _T("Office XP"), 1); + m_ShortcutBar.InsertLCItem(hGroup, 2, _T("Office 2003"), 2); + m_ShortcutBar.ExpandGroup(hGroup); + m_ShortcutBar.GetGroupListCtrl(hGroup)->ActivateItem(2); + + // fill standard list controls + TCHAR shbszItems[][20]={_T("Inbox"),_T("Calendar"),_T("Contracts"), + _T("Tasks"),_T("Journal"),_T("Notes"),_T("Deleted Items"),_T("Inbox"), + _T("Sent Items"),_T("Outbox"),_T("Deleted Items")}; + + // find outlook group and populate it + sText=_T("Outlook"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + hGroup=m_ShortcutBar.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_ShortcutBar.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_ShortcutBar.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + + for(int i=0 ; i<10; i++) + for(int nIndex=0; nIndex<7 ; nIndex++) + { + CString sText=shbszItems[nIndex]; + m_ShortcutBar.InsertLCItem(hGroup,nIndex+7*i,sText,nIndex); + } + + // find mail group and populate it + sText=_T("Mail"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + hGroup=m_ShortcutBar.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_ShortcutBar.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_ShortcutBar.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + + for(int nIndex=7; nIndex<(sizeof(shbszItems)/sizeof(shbszItems[0])); nIndex++) + { + CString sText=shbszItems[nIndex]; + LV_ITEM lvi; + lvi.iItem=nIndex-7; + lvi.iSubItem=0; + lvi.mask=LVIF_TEXT|LVIF_IMAGE; + lvi.iImage=nIndex; + lvi.cchTextMax=sText.GetLength(); + lvi.pszText=sText.GetBuffer(lvi.cchTextMax); + sText.ReleaseBuffer(); + m_ShortcutBar.InsertLCItem(hGroup,&lvi); + } + + DWORD dwBarStyle=m_ShortcutBar.GetBarStyle(); + dwBarStyle&=~(SHBS_DISABLEDRAGDROPHEADER|SHBS_DISABLEDRAGDROPITEM); + dwBarStyle|=SHBS_DRAWITEMDRAGIMAGE|SHBS_DRAWHEADERDRAGIMAGE|SHBS_INFOTIP| + SHBS_AUTOEXPAND|SHBS_ANIMATEEXPAND; + m_ShortcutBar.SetBarStyle(dwBarStyle); +} + +void CWorkspaceBar::OnShortcutBarSelectItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + LPNMSHORTCUTBAR pNMSHB = (LPNMSHORTCUTBAR) pNotifyStruct; + ASSERT(pNMSHB != NULL); + + if (pNMSHB->nItem != -1) + { + // Change the skin + if (m_ShortcutBar.GetGroupText(pNMSHB->hGroup) == _T("Skins")) + { + CString strSkinName = m_ShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)->GetItemText(pNMSHB->nItem, 0); + COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp()); + if (pSkinnedApp != NULL) + pSkinnedApp->SetCurrentSkin(strSkinName); + } + } + + *result=0; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.h new file mode 100644 index 0000000..8a61b84 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/WorkspaceBar.h @@ -0,0 +1,61 @@ +#if !defined(AFX_WORKSPACEBAR_H__1EC50BBE_B9C5_4FBF_8AA3_B149151D6DCD__INCLUDED_) +#define AFX_WORKSPACEBAR_H__1EC50BBE_B9C5_4FBF_8AA3_B149151D6DCD__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// WorkspaceBar.h : header file +// + +#include "OXSizeCtrlBar.h" +#include "OX3DTabView.h" +#include "OXShortcutBar.h" + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceBar window + +class CWorkspaceBar : public COXSizeControlBar +{ +// Construction +public: + CWorkspaceBar(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceBar) + //}}AFX_VIRTUAL + +// Implementation +public: + COXShortcutBar m_ShortcutBar; + virtual ~CWorkspaceBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CWorkspaceBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + afx_msg void OnShortcutBarSelectItem(NMHDR* pNotifyStruct, LRESULT* result); + DECLARE_MESSAGE_MAP() + + CImageList m_ilLarge; + CImageList m_ilSmall; + CImageList m_ilTree; + +private: + void InitShortcutBar(); +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_WORKSPACEBAR_H__1EC50BBE_B9C5_4FBF_8AA3_B149151D6DCD__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.rc2 new file mode 100644 index 0000000..76f75fb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemo.rc2 @@ -0,0 +1,13 @@ +// +// SKINSDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemoDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemoDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/SkinsDemoDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar.bmp new file mode 100644 index 0000000..f011567 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Disabled.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Disabled.bmp new file mode 100644 index 0000000..f189d5b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Disabled.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Hot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Hot.bmp new file mode 100644 index 0000000..edf42c6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Hot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Normal.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Normal.bmp new file mode 100644 index 0000000..bbd22f7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/Toolbar2Normal.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/TreeImages.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/TreeImages.bmp new file mode 100644 index 0000000..a54ea46 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/TreeImages.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/large.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/large.bmp new file mode 100644 index 0000000..303b1ed Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/large.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/small.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/small.bmp new file mode 100644 index 0000000..8644c57 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/small.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/toolbar2.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/toolbar2.bmp new file mode 100644 index 0000000..6f298f1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/res/toolbar2.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/resource.h new file mode 100644 index 0000000..0e1acbd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SkinsDemo/resource.h @@ -0,0 +1,58 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SkinsDemo.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_SKINSDTYPE 129 +#define IDB_LARGE 129 +#define IDR_TOOLBAR 130 +#define IDB_TREE 131 +#define IDR_TOOLBAR2 132 +#define IDB_TOOLBAR2_HOT 134 +#define IDB_TOOLBAR2_NORMAL 135 +#define IDB_TOOLBAR2_DISABLED 136 +#define IDB_SMALL 140 +#define IDR_POPUPS 141 +#define IDR_WORKSPACEBAR 143 +#define IDR_FOLDERSBAR 144 +#define IDR_PROPERTIESBAR 145 +#define IDC_EDIT1 1000 +#define ID_CHECKED 32772 +#define ID_BUTTON32773 32773 +#define ID_BUTTON32774 32774 +#define ID_BUTTON32775 32775 +#define ID_BUTTON32776 32776 +#define ID_BUTTON32777 32777 +#define ID_BUTTON32778 32778 +#define ID_BUTTON32779 32779 +#define ID_BUTTON32780 32780 +#define ID_BUTTON32781 32781 +#define ID_MAIL 32782 +#define ID_FILE_POPUP_ITEM1 32784 +#define ID_FILE_POPUP_ITEM2 32785 +#define ID_FILE_POPUP_ITEM3 32786 +#define ID_CB_EDIT 32787 +#define ID_CB_COMBO 32788 +#define ID_CB_CHECKBOX 32789 +#define ID_CB_PROGRESS 32790 +#define ID_CB_SLIDER 32791 +#define ID_CB_DTP 32792 +#define ID_ITEM1 32796 +#define ID_ITEM2 32797 +#define ID_ITEM3 32798 +#define ID_VIEW_WORKSPACE 32802 +#define ID_VIEW_PROPERTIES 32803 +#define ID_VIEW_FOLDERS 32804 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 146 +#define _APS_NEXT_COMMAND_VALUE 32805 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.cpp new file mode 100644 index 0000000..f0b9209 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.cpp @@ -0,0 +1,658 @@ +// ApplicationsDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "systemstateinfo.h" +#include "ApplicationsDialog.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +#define APPLICATIONREF_FLAG 0xffee0000 +#define WINDOWREF_FLAG 0xffdd0000 +#define PROCESSREF_FLAG 0xffcc0000 + +///////////////////////////////////////////////////////////////////////////// +// CApplicationsDialog dialog + + +CApplicationsDialog::CApplicationsDialog() : CPageDialog() +{ + //{{AFX_DATA_INIT(CApplicationsDialog) + m_nExpandLevel = 0; + m_nExpandType = 1; + //}}AFX_DATA_INIT + m_nCurrentIndex=-1; +} + + +void CApplicationsDialog::DoDataExchange(CDataExchange* pDX) +{ + CPageDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CApplicationsDialog) + DDX_Control(pDX, IDC_SPIN_EXPANDLEVEL, m_spinExpandLevel); + DDX_Control(pDX, IDC_EDIT_EXPANDLEVEL, m_editExpandLevel); + DDX_Control(pDX, IDC_TREE_APPLICATIONS, m_tree); + DDX_Text(pDX, IDC_EDIT_EXPANDLEVEL, m_nExpandLevel); + DDX_Radio(pDX, IDC_RADIO_EXPANDLEVEL, m_nExpandType); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CApplicationsDialog, CPageDialog) + //{{AFX_MSG_MAP(CApplicationsDialog) + ON_BN_CLICKED(IDC_RADIO_EXPANDALL, OnRadioExpandall) + ON_BN_CLICKED(IDC_RADIO_EXPANDLEVEL, OnRadioExpandlevel) + ON_NOTIFY(NM_DBLCLK, IDC_TREE_APPLICATIONS, OnDblclkTreeServices) + ON_NOTIFY(NM_RCLICK, IDC_TREE_APPLICATIONS, OnRclickTreeApplications) + //}}AFX_MSG_MAP + ON_COMMAND(IDM_APP_SWITCHTO, OnAppWndSwitchTo) + ON_COMMAND(IDM_APP_BRINGTOFRONT, OnAppWndBringToFront) + ON_COMMAND(IDM_APP_MINIMIZE, OnAppWndMinimize) + ON_COMMAND(IDM_APP_MAXIMIZE, OnAppWndMaximize) + ON_COMMAND(IDM_APP_RESTORE, OnAppWndRestore) + ON_COMMAND(IDM_APP_CLOSE, OnAppWndClose) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CApplicationsDialog message handlers +void CApplicationsDialog::OnInitDialog() +{ + CPageDialog::OnInitDialog(); + + // TODO: Add your specialized creation code here + + m_ilTree.Create(::GetSystemMetrics(SM_CXSMICON), + ::GetSystemMetrics(SM_CYSMICON),ILC_COLOR8|ILC_MASK,0,0); + m_tree.SetImageList(&m_ilTree,TVSIL_NORMAL); + + LV_COLUMN lvc={ sizeof(lvc) }; + lvc.fmt=LVCFMT_LEFT; + lvc.cx=237; + lvc.pszText=_T("Item"); + lvc.mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT; + m_tree.SetColumn(0,&lvc); + m_tree.InsertColumn(1,_T("Value"),LVCFMT_LEFT,200,1); + + // set COXTreeCtrl styles + m_tree.ModifyExStyle(0,TVOXS_PICKANYWHERE|TVOXS_ROWSEL); + m_tree.ModifyStyle(0,TVS_SHOWSELALWAYS|TVS_HASBUTTONS| + TVS_HASLINES|TVS_LINESATROOT); + + + // spin control + m_spinExpandLevel.SetRange(0,3); + m_spinExpandLevel.SetPos(0); + + // layout manager + // + m_LayoutManager.Attach(this); + + // tree control + m_LayoutManager.TieChild(IDC_TREE_APPLICATIONS,OX_LMS_ANY,OX_LMT_SAME); + ////////////////// + + // radio buttons and expand level edit control + m_LayoutManager.TieChild(IDC_RADIO_EXPANDALL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_RADIO_EXPANDLEVEL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_RADIO_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_EDIT_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + ////////////////// + + ////////////////////////////////////// + + PopulateTree(); + + ShowControls(); +} + +void CApplicationsDialog::Refresh() +{ + PopulateTree(); +} + +void CApplicationsDialog::PopulateTree() +{ + if(!UpdateData()) + return; + + CWaitCursor waitCursor; + + m_tree.SetRedraw(FALSE); + // kill and close all threads + CleanThreads(); + // remove all items + m_tree.DeleteAllItems(); + COXTreeHeader* pHeader=(COXTreeHeader*)m_tree.GetDlgItem(0); + ASSERT(pHeader); + pHeader->SortColumn(-1,0); + // clean up image list + for(int nIndex=0; nIndexGetLogFont(&lf)) + { + lf.lfHeight=-14; + UTBStr::tcsncpy(lf.lfFaceName, LF_FACESIZE,_T("Arial"),LF_FACESIZE); + fontRoot.CreateFontIndirect(&lf); + + lf.lfHeight=-12; + lf.lfWeight=FW_BOLD; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Times New Roman"),LF_FACESIZE); + fontSubRoot.CreateFontIndirect(&lf); + } + pFontRoot=((HFONT)fontRoot!=NULL) ? &fontRoot : NULL; +// CFont* pFontSubRoot=((HFONT)fontSubRoot!=NULL) ? &fontSubRoot : NULL; + + CString sValue; + HTREEITEM htiRoot=NULL; + HTREEITEM htiSelectItem=NULL; + HTREEITEM htiItem=NULL; + + COLORREF clrTopic=RGB(0,0,255); + COLORREF clrValue=RGB(0,128,0); + + m_arrAppInfo.RemoveAll(); + if(::EnumWindows(&EnumMainWindows,(LPARAM)&m_arrAppInfo)) + { + for(int nIndex=0; nIndexGetSafeHwnd())) + { + // main window text + CString sWindowText; + pAppWnd->GetWindowText(sWindowText); + /////////////////// + + // work out icon... + int nIconIndex=-1; + HICON hIcon=(HICON)(DWORD_PTR)::GetClassLongPtr(pAppWnd->m_hWnd,GCL_HICONSM); + if(hIcon==NULL) + hIcon=(HICON)(DWORD_PTR)::GetClassLongPtr(pAppWnd->m_hWnd,GCL_HICON); + if(hIcon==NULL && m_arrAppInfo[nIndex].bGotRespond) + { + if(!::SendMessageTimeout(m_arrAppInfo[nIndex].hMainWnd, + WM_GETICON,ICON_SMALL,0,SMTO_ABORTIFHUNG, + 1000,(LPDWORD)&hIcon) || hIcon==NULL) + { + ::SendMessageTimeout(m_arrAppInfo[nIndex].hMainWnd, + WM_GETICON,ICON_BIG,0,SMTO_ABORTIFHUNG, + 1000,(LPDWORD)&hIcon); + } + } + if(hIcon!=NULL) + // add icon + nIconIndex=m_ilTree.Add(hIcon); + /////////////////// + + htiRoot=InsertItem(sWindowText,NULL,nIconIndex, + pFontRoot,clrTopic); + VERIFY(m_tree.SetSubItem(htiRoot,1,OX_SUBITEM_TEXT| + OX_SUBITEM_COLOR,(m_arrAppInfo[nIndex].bGotRespond ? + _T("Running") : _T("Not reponding")),0,NULL,clrValue)); + VERIFY(m_tree.SetItemData(htiRoot,APPLICATIONREF_FLAG+nIndex)); + if(htiSelectItem==NULL) + htiSelectItem=htiRoot; + /////////////////// + + // Executable + if(m_process.GetProcessImageFileName( + m_arrAppInfo[nIndex].dwProcessID,sValue)) + { + htiItem=InsertItem(_T("Executable"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + VERIFY(m_tree. + SetItemDrawEllipsis(htiItem,DT_PATH_ELLIPSIS,1)); + } + /////////////////// + + // Process ID + htiItem=InsertItem(_T("Process ID"),htiRoot); + sValue.Format(_T("0x%x"),m_arrAppInfo[nIndex].dwProcessID); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + VERIFY(m_tree.SetItemData(htiItem,PROCESSREF_FLAG+nIndex)); + /////////////////// + + // Main Window + htiItem=InsertItem(_T("Main window handle"),htiRoot); + sValue.Format(_T("0x%x"),m_arrAppInfo[nIndex].hMainWnd); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + VERIFY(m_tree.SetItemData(htiItem,WINDOWREF_FLAG+nIndex)); + /////////////////// + + } + } + } + + ExpandTree((m_nExpandType==0 ? m_nExpandLevel : -1)); + + m_tree.SetFocus(); + m_tree.SelectItem(htiSelectItem); + + m_tree.SetRedraw(TRUE); +} + + +void CApplicationsDialog::ExpandTree(int nExpandLevel/*=-1*/, + HTREEITEM htiParent/*=NULL*/) +{ + if(nExpandLevel==0) + return; + + if(htiParent==NULL) + { + htiParent=m_tree.GetRootItem(); + ASSERT(htiParent!=NULL); + } + + HTREEITEM hti=m_tree.GetNextItem(htiParent,TVGN_CHILD); + while(hti!=NULL) + { + m_tree.Expand(hti,TVE_EXPAND); + + COXTreeItem* xti=m_tree.GetXItem(hti); + ASSERT(xti!=NULL); + if(xti->ItemHasChildren()) + ExpandTree((nExpandLevel==-1 ? -1 : nExpandLevel-1),hti); + + hti=m_tree.GetNextItem(hti,TVGN_NEXT); + } +} + +HTREEITEM CApplicationsDialog::InsertItem(CString sItem, + HTREEITEM htiParent/*=NULL*/, + int nImage/*=-1*/, + CFont* pFont/*=NULL*/, + COLORREF clr/*=CLR_NONE*/) +{ + HTREEITEM hti=m_tree.InsertItem(sItem,htiParent); + ASSERT(hti!=NULL); + + // associate new font + if(pFont!=NULL) + VERIFY(m_tree.SetItemFont(hti,pFont)); + // and new color + if(clr!=CLR_NONE) + VERIFY(m_tree.SetItemColor(hti,clr)); + + m_tree.SetItemImage(hti,nImage,nImage); + + return hti; +} + +void CApplicationsDialog::ShowControls() +{ + if(UpdateData()) + { + CWnd* pDlgItem=GetDlgItem(IDC_EDIT_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + pDlgItem=GetDlgItem(IDC_SPIN_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + } +} + +void CApplicationsDialog::OnRadioExpandall() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CApplicationsDialog::OnRadioExpandlevel() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CApplicationsDialog::OnDblclkTreeServices(NMHDR* pNMHDR, + LRESULT* pResult) +{ + // TODO: Add your control notification handler code here + UNREFERENCED_PARAMETER(pNMHDR); + + CPoint point; + if(::GetCursorPos(&point)) + { + m_tree.ScreenToClient(&point); + UINT nFlags; + int nItem=m_tree.HitTest(point,&nFlags); + if(nItem!=-1) + { + HTREEITEM hti=m_tree.GetItemFromIndex(nItem); + ASSERT(hti!=NULL); + if(m_tree.GetItemIndent(hti)=0 && nIndex=0 && nIndex + TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, + point.x, point.y,this); + } + } + } + } + + *pResult = 0; +} + +void CApplicationsDialog::OnAppWndSwitchTo() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + !m_arrAppInfo[m_nCurrentIndex].bGotRespond || + m_arrAppInfo[m_nCurrentIndex].dwProcessID==m_process.GetProcessID()) + return; + + ::SetForegroundWindow(m_arrAppInfo[m_nCurrentIndex].hMainWnd); + if((::GetWindowLong(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + GWL_STYLE)&WS_MINIMIZE)==WS_MINIMIZE) + { + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_RESTORE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); + } +} + +void CApplicationsDialog::OnAppWndBringToFront() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + !m_arrAppInfo[m_nCurrentIndex].bGotRespond || + m_arrAppInfo[m_nCurrentIndex].dwProcessID==m_process.GetProcessID()) + return; + + if(::GetWindowLong(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + GWL_STYLE)&WS_MINIMIZE) + { + OnAppWndRestore(); + AfxGetMainWnd()->SetForegroundWindow(); + } + else + { + ::SetWindowPos(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + AfxGetMainWnd()->GetSafeHwnd(),0,0,0,0, + SWP_SHOWWINDOW|SWP_ASYNCWINDOWPOS|SWP_NOACTIVATE| + SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW); + } +} + +void CApplicationsDialog::OnAppWndMinimize() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + !m_arrAppInfo[m_nCurrentIndex].bGotRespond) + return; + + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_MINIMIZE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); +} + +void CApplicationsDialog::OnAppWndMaximize() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + !m_arrAppInfo[m_nCurrentIndex].bGotRespond) + return; + + if(::GetWindowLong(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + GWL_STYLE)&WS_MINIMIZE) + { + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_MAXIMIZE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); + AfxGetMainWnd()->SetForegroundWindow(); + } + else + { + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_MAXIMIZE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); + } +} + +void CApplicationsDialog::OnAppWndRestore() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + !m_arrAppInfo[m_nCurrentIndex].bGotRespond) + return; + + if(::GetWindowLong(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + GWL_STYLE)&WS_MINIMIZE) + { + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_RESTORE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); + AfxGetMainWnd()->SetForegroundWindow(); + } + else + { + ::SendMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd, + WM_SYSCOMMAND,SC_RESTORE, + (LPARAM)m_arrAppInfo[m_nCurrentIndex].hMainWnd); + } +} + +void CApplicationsDialog::OnAppWndClose() +{ + ASSERT(m_nCurrentIndex>=0 && m_nCurrentIndex=m_arrAppInfo.GetSize() || + m_arrAppInfo[m_nCurrentIndex].dwProcessID==m_process.GetProcessID()) + return; + + if(m_arrAppInfo[m_nCurrentIndex].bGotRespond) + { + ::PostMessage(m_arrAppInfo[m_nCurrentIndex].hMainWnd,WM_QUIT,0,0); + Refresh(); + return; + } + + HANDLE hProcess=::OpenProcess(PROCESS_TERMINATE,FALSE, + m_arrAppInfo[m_nCurrentIndex].dwProcessID); + if(hProcess!=NULL) + { + ::TerminateProcess(hProcess,FALSE); + Refresh(); + } + +} + +void CApplicationsDialog::CleanThreads() +{ + // kill and close all threads + for(int nIndex=0; nIndexAdd(appInfo); + } + return TRUE; +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.h new file mode 100644 index 0000000..5b4d4ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ApplicationsDialog.h @@ -0,0 +1,121 @@ +#if !defined(AFX_APPLICATIONSDIALOG_H__0786AFA1_58C3_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_APPLICATIONSDIALOG_H__0786AFA1_58C3_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ApplicationsDialog.h : header file +// + +#include "afxtempl.h" + +#include "PageDialog.h" +#include "OXTreeCtrl.h" +#include "OXLayoutManager.h" +#include "OXSysInfo.h" +#include "OXProcess.h" + +///////////////////////////////////////////////////////////////////////////// +// CApplicationsDialog dialog + +typedef struct _tagAPPLICATIONINFO +{ + DWORD dwProcessID; + HWND hMainWnd; + BOOL bGotRespond; + + // constructor + _tagAPPLICATIONINFO() + { + dwProcessID=0xffffffff; + hMainWnd=NULL; + bGotRespond=TRUE; + } + + // copy constructor + _tagAPPLICATIONINFO& operator=(const _tagAPPLICATIONINFO& appInfo) + { + dwProcessID=appInfo.dwProcessID; + hMainWnd=appInfo.hMainWnd; + bGotRespond=appInfo.bGotRespond; + return *this; + } + +} APPLICATIONINFO; + +typedef CArray CAppInfoArray; + + +class CApplicationsDialog : public CPageDialog +{ +// Construction +public: + CApplicationsDialog(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CApplicationsDialog) + enum { IDD = IDD_APPLICATIONS_DIALOG }; + CSpinButtonCtrl m_spinExpandLevel; + CEdit m_editExpandLevel; + COXTreeCtrl m_tree; + UINT m_nExpandLevel; + int m_nExpandType; + //}}AFX_DATA + +protected: + void PopulateTree(); + void ExpandTree(int nExpandLevel=-1, HTREEITEM htiParent=NULL); + HTREEITEM InsertItem(CString sItem, HTREEITEM htiParent=NULL, int nImage=-1, + CFont* pFont=NULL, COLORREF clr=CLR_NONE); + +public: + virtual ~CApplicationsDialog() { + CleanThreads(); + } + virtual BOOL IsRefreshAvailable() { return TRUE; } + virtual void Refresh(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CApplicationsDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CImageList m_ilTree; + COXLayoutManager m_LayoutManager; + COXSysInfo m_SysInfo; + CAppInfoArray m_arrAppInfo; + CArray m_arrThreads; + int m_nCurrentIndex; + COXProcess m_process; + +protected: + virtual void OnInitDialog(); + void ShowControls(); + void CleanThreads(); + + static BOOL CALLBACK EnumMainWindows(HWND hWnd, LPARAM lParam); + + // Generated message map functions + //{{AFX_MSG(CApplicationsDialog) + afx_msg void OnRadioExpandall(); + afx_msg void OnRadioExpandlevel(); + afx_msg void OnDblclkTreeServices(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnRclickTreeApplications(NMHDR* pNMHDR, LRESULT* pResult); + //}}AFX_MSG + afx_msg void OnAppWndSwitchTo(); + afx_msg void OnAppWndBringToFront(); + afx_msg void OnAppWndMinimize(); + afx_msg void OnAppWndMaximize(); + afx_msg void OnAppWndRestore(); + afx_msg void OnAppWndClose(); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_APPLICATIONSDIALOG_H__0786AFA1_58C3_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.cpp new file mode 100644 index 0000000..999e366 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.cpp @@ -0,0 +1,416 @@ +// NetworkResourcesDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "systemstateinfo.h" +#include "NetworkResourcesDialog.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNetworkResourcesDialog dialog + + +CNetworkResourcesDialog::CNetworkResourcesDialog() : CPageDialog() +{ + //{{AFX_DATA_INIT(CNetworkResourcesDialog) + m_bShowComment = TRUE; + m_bShowDisks = TRUE; + m_bShowPrinters = TRUE; + m_bReportErrors = TRUE; + m_nResourceScope = -1; + m_nInitialLevel = 0; + m_nMaxLevel = 10; + //}}AFX_DATA_INIT +} + + +void CNetworkResourcesDialog::DoDataExchange(CDataExchange* pDX) +{ + CPageDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CNetworkResourcesDialog) + DDX_Control(pDX, IDC_SPIN_MAXLEVEL, m_spinMaxLevel); + DDX_Control(pDX, IDC_SPIN_INITIALLEVEL, m_spinInitialLevel); + DDX_Control(pDX, IDC_SEPARATOR2, m_ctlSeparator2); + DDX_Control(pDX, IDC_SEPARATOR1, m_ctlSeparator1); + DDX_Control(pDX, IDC_RESOURCES_TREE, m_treeNetBrowse); + DDX_Control(pDX, IDC_LIST_DETAILS, m_listDetails); + DDX_Control(pDX, IDC_EDIT_MAXLEVEL, m_editMaxLevel); + DDX_Control(pDX, IDC_EDIT_INITIALLEVEL, m_editInitialLevel); + DDX_Control(pDX, IDC_COMBO_SCOPE, m_cmbResourceScope); + DDX_Check(pDX, IDC_CHECK_COMMENTS, m_bShowComment); + DDX_Check(pDX, IDC_CHECK_DISKS, m_bShowDisks); + DDX_Check(pDX, IDC_CHECK_PRINTERS, m_bShowPrinters); + DDX_Check(pDX, IDC_CHECK_REPORT, m_bReportErrors); + DDX_CBIndex(pDX, IDC_COMBO_SCOPE, m_nResourceScope); + DDX_Text(pDX, IDC_EDIT_INITIALLEVEL, m_nInitialLevel); + DDX_Text(pDX, IDC_EDIT_MAXLEVEL, m_nMaxLevel); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CNetworkResourcesDialog, CPageDialog) + //{{AFX_MSG_MAP(CNetworkResourcesDialog) + ON_NOTIFY(TVN_SELCHANGED, IDC_RESOURCES_TREE, OnSelchangedResourcesTree) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNetworkResourcesDialog message handlers + +void CNetworkResourcesDialog::OnInitDialog() +{ + CPageDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // Fill combo box with values + m_cmbResourceScope.AddString(_T("Connected Resources")); + m_cmbResourceScope.AddString(_T("Global Resources")); + m_cmbResourceScope.AddString(_T("Persistent Connections")); + m_cmbResourceScope.AddString(_T("Recent Connections")); + m_cmbResourceScope.AddString(_T("Current Context Resources")); + // ... Net scope is 1-based, index in combo is 0-based + m_cmbResourceScope.SetCurSel(4); + m_nResourceScope=4; + + // Set the spin ranges + m_spinMaxLevel.SetRange(0,100); + m_spinInitialLevel.SetRange(0,100); + + // ... Set net browse tree initial values + SetTreeInitSettings(); + + // initialize list of network resource detailes + TCHAR rgtsz[][20] = {_T("Name"),_T("Value"),_T("Description")}; + LV_COLUMN lvcolumn; + for(int nIndex=0; nIndex<3; nIndex++) // add the columns to the list control + { + lvcolumn.mask=LVCF_FMT|LVCF_SUBITEM|LVCF_TEXT|LVCF_WIDTH; + lvcolumn.fmt=LVCFMT_LEFT; + lvcolumn.pszText=rgtsz[nIndex]; + lvcolumn.iSubItem=nIndex; + lvcolumn.cx=(nIndex==0 ? 70 : (nIndex==1 ? 40 : 150)); + VERIFY(m_listDetails.InsertColumn(nIndex,&lvcolumn)!=-1); + } + + + // layout manager + // + m_LayoutManager.Attach(this); + + // tree control + m_LayoutManager.TieChild(IDC_RESOURCES_TREE,OX_LMS_ANY,OX_LMT_SAME); + + // list control + m_LayoutManager.TieChild(IDC_LIST_DETAILS, + OX_LMS_RIGHT|OX_LMS_BOTTOM|OX_LMS_LEFT,OX_LMT_SAME); + + // separators, combo, check buttons and expand level edit controls + m_LayoutManager.TieChild(IDC_SEPARATOR1,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_SEPARATOR2,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_COMBO_SCOPE,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_CHECK_COMMENTS,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_CHECK_DISKS,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_CHECK_PRINTERS,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_CHECK_REPORT,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_STATIC_INITIALLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_EDIT_INITIALLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_SPIN_INITIALLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_STATIC_MAXLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_EDIT_MAXLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_SPIN_MAXLEVEL,OX_LMS_RIGHT|OX_LMS_BOTTOM, + OX_LMT_SAME); + ////////////////// + + // Perform first time initialization if necessary + if (!m_treeNetBrowse.IsInitialized()) + VERIFY(m_treeNetBrowse.Initialize()); + m_treeNetBrowse.SetFocus(); + m_treeNetBrowse.SelectItem(m_treeNetBrowse.GetRootItem()); + + // item tips for Details List control + m_ItemTip.Attach(&m_listDetails); + + ////////////////////////////////////// +} + + +void CNetworkResourcesDialog::Refresh() +{ + // Get the data from the GUI + if (!UpdateData(TRUE)) + // ... Data validation failed, user already warned, so just return + return; + + // ... Set new initial values + SetTreeInitSettings(); + // ... Build the contents of the tree again + m_treeNetBrowse.BuildTreeContents(); + // ... Select the root + m_treeNetBrowse.SelectItem(m_treeNetBrowse.GetRootItem()); + m_treeNetBrowse.SetFocus(); +} + +void CNetworkResourcesDialog::SetTreeInitSettings() +{ + // Set initial values of the net browse control + m_treeNetBrowse.ShowCommentName(m_bShowComment); + m_treeNetBrowse.ShowDisks(m_bShowDisks); + m_treeNetBrowse.ShowPrinters(m_bShowPrinters); + // ... Net scope is 1-based, index in combo is 0-based + m_treeNetBrowse.SetResourceScope(m_nResourceScope+1); + m_treeNetBrowse.SetMaxNumLevels(m_nMaxLevel); + m_treeNetBrowse.SetInitialExpandLevel(m_nInitialLevel); + m_treeNetBrowse.ReportErrors(m_bReportErrors); +} + +void CNetworkResourcesDialog::OnSelchangedResourcesTree(NMHDR* pNMHDR, + LRESULT* pResult) +{ + UNREFERENCED_PARAMETER(pNMHDR); + // TODO: Add your control notification handler code here + + // SHow the information about the currently selected resource + const NETRESOURCE* pNetResource=m_treeNetBrowse.GetCurrentNetResource(); + PopulateDetailsList(pNetResource); + + *pResult=0; +} + + +void CNetworkResourcesDialog::PopulateDetailsList(const NETRESOURCE* pNetResource) +{ + m_listDetails.SetRedraw(FALSE); + + VERIFY(m_listDetails.DeleteAllItems()); + if(pNetResource!=NULL) + { + int nIndex=0; + CString sValue; + + sValue.Format(_T("%i"),pNetResource->dwScope); + InsertDetailsListItem(nIndex,_T("Scope"),sValue, + GetScopeName(pNetResource)); + + sValue.Format(_T("%i"), pNetResource->dwType); + InsertDetailsListItem(nIndex,_T("Type"),sValue, + GetTypeName(pNetResource)); + + sValue.Format(_T("%i"), pNetResource->dwDisplayType); + InsertDetailsListItem(nIndex,_T("Display Type"),sValue, + GetDisplayTypeName(pNetResource)); + + sValue.Format(_T("0x%X"), pNetResource->dwUsage); + InsertDetailsListItem(nIndex,_T("Usage"),sValue, + GetUsageName(pNetResource)); + + if(pNetResource->lpLocalName!=NULL && + lstrlen(pNetResource->lpLocalName)>0) + InsertDetailsListItem(nIndex,_T("Local Name"),_T(""), + pNetResource->lpLocalName); + + if(pNetResource->lpRemoteName!=NULL && + lstrlen(pNetResource->lpRemoteName)>0) + InsertDetailsListItem(nIndex,_T("Remote Name"),_T(""), + pNetResource->lpRemoteName); + + if(pNetResource->lpComment!=NULL && + lstrlen(pNetResource->lpComment)>0) + InsertDetailsListItem(nIndex,_T("Comment"),_T(""), + pNetResource->lpComment); + + if(pNetResource->lpProvider!=NULL && + lstrlen(pNetResource->lpProvider)>0) + InsertDetailsListItem(nIndex,_T("Provider"),_T(""), + pNetResource->lpProvider); + } + + if(m_listDetails.GetItemCount()>0) + m_listDetails.SetItemState(0,LVIS_SELECTED|LVIS_FOCUSED, + LVIS_SELECTED|LVIS_FOCUSED); + + m_listDetails.SetRedraw(TRUE); + + UpdateData(FALSE); +} + +void CNetworkResourcesDialog::InsertDetailsListItem(int& nIndex, + const CString& sName, + const CString& sValue, + const CString& sDescription) +{ + ASSERT(nIndex>=0); + + LV_ITEM lvitem={ 0 }; + + // name + VERIFY(m_listDetails.InsertItem(nIndex,sName)!=-1); + + // value + lvitem.mask=LVIF_TEXT; + lvitem.iItem=nIndex; + lvitem.iSubItem=1; + lvitem.pszText=(LPTSTR)(LPCTSTR)sValue; + VERIFY(m_listDetails.SetItem(&lvitem)); + + // description + lvitem.mask=LVIF_TEXT; + lvitem.iItem=nIndex; + lvitem.iSubItem=2; + lvitem.pszText=(LPTSTR)(LPCTSTR)sDescription; + VERIFY(m_listDetails.SetItem(&lvitem)); + + nIndex++; +} + + +CString CNetworkResourcesDialog::GetScopeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sScopeName; + switch (pNetResource->dwScope) + { + case RESOURCE_CONNECTED: + sScopeName = _T("(Connected resources)"); + break; + case RESOURCE_GLOBALNET: + sScopeName = _T("(Global resources)"); + break; + case RESOURCE_REMEMBERED: + sScopeName = _T("(Persistent connections)"); + break; + case RESOURCE_RECENT: + sScopeName = _T("(Recent connections)"); + break; + case RESOURCE_CONTEXT: + sScopeName = _T("(Current context resources)"); + break; + default: + // Let string stay empty + break; + } + return sScopeName; +} + +CString CNetworkResourcesDialog::GetTypeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sTypeName; + switch (pNetResource->dwType) + { + case RESOURCETYPE_ANY: + sTypeName = _T("(Any resource)"); + break; + case RESOURCETYPE_DISK: + sTypeName = _T("(Disk resource)"); + break; + case RESOURCETYPE_PRINT: + sTypeName = _T("(Print resource)"); + break; + case RESOURCETYPE_RESERVED: + sTypeName = _T("(Reserved resource)"); + break; + case RESOURCETYPE_UNKNOWN: + sTypeName = _T("(Unknown resource)"); + break; + default: + // Let string stay empty + break; + } + return sTypeName; +} + +CString CNetworkResourcesDialog::GetDisplayTypeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sDisplayTypeName; + switch (pNetResource->dwDisplayType) + { + case RESOURCEDISPLAYTYPE_GENERIC: + sDisplayTypeName = _T("(Unspecified)"); + break; + case RESOURCEDISPLAYTYPE_DOMAIN: + sDisplayTypeName = _T("(Domain)"); + break; + case RESOURCEDISPLAYTYPE_SERVER: + sDisplayTypeName = _T("(Server)"); + break; + case RESOURCEDISPLAYTYPE_SHARE: + sDisplayTypeName = _T("(Share)"); + break; + case RESOURCEDISPLAYTYPE_FILE: + sDisplayTypeName = _T("(file)"); + break; + case RESOURCEDISPLAYTYPE_GROUP: + sDisplayTypeName = _T("(Broup)"); + break; + case RESOURCEDISPLAYTYPE_NETWORK: + sDisplayTypeName = _T("(Network)"); + break; + case RESOURCEDISPLAYTYPE_ROOT: + sDisplayTypeName = _T("(Network Root)"); + break; + case RESOURCEDISPLAYTYPE_SHAREADMIN: + sDisplayTypeName = _T("(Administrative Share)"); + break; + case RESOURCEDISPLAYTYPE_DIRECTORY: + sDisplayTypeName = _T("(Directory)"); + break; + case RESOURCEDISPLAYTYPE_TREE: + sDisplayTypeName = _T("(Tree)"); + break; + default: + // Let string stay empty + break; + } + return sDisplayTypeName; +} + +CString CNetworkResourcesDialog::GetUsageName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sUsageName; + if (pNetResource->dwScope == RESOURCE_GLOBALNET) + { + if ((pNetResource->dwUsage & RESOURCEUSAGE_CONNECTABLE) == RESOURCEUSAGE_CONNECTABLE) + sUsageName += _T("Connectable - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_CONTAINER) == RESOURCEUSAGE_CONTAINER) + sUsageName += _T("Container - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_NOLOCALDEVICE) == RESOURCEUSAGE_NOLOCALDEVICE) + sUsageName += _T("Local not needed - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_SIBLING) == RESOURCEUSAGE_SIBLING) + sUsageName += _T("Sibling - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_RESERVED) == RESOURCEUSAGE_RESERVED) + sUsageName += _T("Reserved - "); + if (!sUsageName.IsEmpty()) + { + // ... Remove trailing hyphen + sUsageName = sUsageName.Left(sUsageName.GetLength() - 3); + // ... Add parentheses + sUsageName = _T("(") + sUsageName + _T(")"); + } + } + return sUsageName; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.h new file mode 100644 index 0000000..59abfcb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/NetworkResourcesDialog.h @@ -0,0 +1,85 @@ +#if !defined(AFX_NETWORKRESOURCESDIALOG_H__33FD9B83_533B_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_NETWORKRESOURCESDIALOG_H__33FD9B83_533B_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// NetworkResourcesDialog.h : header file +// + +#include "PageDialog.h" +#include "OXNetBrowseTree.h" +#include "OXLayoutManager.h" +#include "OXItemTip.h" +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CNetworkResourcesDialog dialog + +class CNetworkResourcesDialog : public CPageDialog +{ +// Construction +public: + CNetworkResourcesDialog(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CNetworkResourcesDialog) + enum { IDD = IDD_NETWORKRESOURCES_DIALOG }; + CSpinButtonCtrl m_spinMaxLevel; + CSpinButtonCtrl m_spinInitialLevel; + COXSeparator m_ctlSeparator2; + COXSeparator m_ctlSeparator1; + COXNetBrowseTree m_treeNetBrowse; + CListCtrl m_listDetails; + CEdit m_editMaxLevel; + CEdit m_editInitialLevel; + CComboBox m_cmbResourceScope; + BOOL m_bShowComment; + BOOL m_bShowDisks; + BOOL m_bShowPrinters; + BOOL m_bReportErrors; + int m_nResourceScope; + UINT m_nInitialLevel; + UINT m_nMaxLevel; + //}}AFX_DATA + +public: + virtual BOOL IsRefreshAvailable() { return TRUE; } + virtual void Refresh(); + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNetworkResourcesDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + COXLayoutManager m_LayoutManager; + COXItemTip m_ItemTip; + + virtual void OnInitDialog(); + + void SetTreeInitSettings(); + void PopulateDetailsList(const NETRESOURCE* pNetResource); + void InsertDetailsListItem(int& nIndex, const CString& sName, + const CString& sValue, const CString& sDescription); + CString GetScopeName(const NETRESOURCE* pNetResource) const; + CString GetTypeName(const NETRESOURCE* pNetResource) const; + CString GetDisplayTypeName(const NETRESOURCE* pNetResource) const; + CString GetUsageName(const NETRESOURCE* pNetResource) const; + + + // Generated message map functions + //{{AFX_MSG(CNetworkResourcesDialog) + afx_msg void OnSelchangedResourcesTree(NMHDR* pNMHDR, LRESULT* pResult); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_NETWORKRESOURCESDIALOG_H__33FD9B83_533B_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.cpp new file mode 100644 index 0000000..5e3e4fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.cpp @@ -0,0 +1,82 @@ +// PageDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "PageDialog.h" + +#include +#ifndef __OXMFCIMPL_H__ +#if _MFC_VER >= 0x0700 + #include <..\src\mfc\afximpl.h> +#else + #include <..\src\afximpl.h> +#endif +#define __OXMFCIMPL_H__ +#endif + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPageDialog dialog + + +BEGIN_MESSAGE_MAP(CPageDialog, CWnd) + //{{AFX_MSG_MAP(CPageDialog) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPageDialog message handlers + +// virtual override of CWnd::Create +BOOL CPageDialog::Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd, CRect rect, + UINT nID, DWORD dwStyle/*=WS_VISIBLE|WS_CHILD*/) +{ + ASSERT(pParentWnd!=NULL); + ASSERT(lpszTemplateName!=NULL); + + // initialize common controls + VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTLS_REG)); + + // call PreCreateWindow to get prefered extended style + CREATESTRUCT cs={ 0 }; + cs.style=dwStyle; + if(!PreCreateWindow(cs)) + return FALSE; + + // create a modeless dialog + if (!CreateDlg(lpszTemplateName, pParentWnd)) + return FALSE; + + // we use the style from the template - but make sure that + // the WS_BORDER bit is correct + // the WS_BORDER bit will be whatever is in dwRequestedStyle + ModifyStyle(WS_BORDER|WS_CAPTION,(cs.style&(WS_BORDER|WS_CAPTION))|WS_CHILD); + ModifyStyleEx(WS_EX_CLIENTEDGE,(cs.dwExStyle&WS_EX_CLIENTEDGE)); + + SetDlgCtrlID(nID); + + // initialize controls etc + if (!ExecuteDlgInit(lpszTemplateName)) + return FALSE; + + OnInitDialog(); + + // force the size requested + SetWindowPos(NULL, rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, + SWP_NOZORDER|SWP_NOACTIVATE); + + // make visible if requested + if (dwStyle & WS_VISIBLE) + ShowWindow(SW_NORMAL); + + return TRUE; +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.h new file mode 100644 index 0000000..68826ac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/PageDialog.h @@ -0,0 +1,44 @@ +#if !defined(AFX_PAGEDIALOG_H__266F38B5_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) +#define AFX_PAGEDIALOG_H__266F38B5_4D6E_11D2_A730_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// PageDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPageDialog dialog + +class CPageDialog : public CWnd +{ +// Construction +public: + CPageDialog() : CWnd() { }; + + virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd, CRect rect, + UINT nID, DWORD dwStyle=WS_VISIBLE|WS_CHILD); + + virtual BOOL IsRefreshAvailable() { return FALSE; } + virtual void Refresh() { }; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPageDialog) + //}}AFX_VIRTUAL + +// Implementation +protected: + + virtual void OnInitDialog() { UpdateData(FALSE); } + + // Generated message map functions + //{{AFX_MSG(CPageDialog) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PAGEDIALOG_H__266F38B5_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.cpp new file mode 100644 index 0000000..5bcf817 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.cpp @@ -0,0 +1,371 @@ +// ProcessesDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "systemstateinfo.h" +#include "ProcessesDialog.h" + +#include "OXSysInfo.h" +#include "OXProcess.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CProcessesDialog dialog + + +CProcessesDialog::CProcessesDialog() : CPageDialog() +{ + //{{AFX_DATA_INIT(CProcessesDialog) + m_nExpandLevel = 0; + m_nExpandType = 1; + //}}AFX_DATA_INIT +} + + +void CProcessesDialog::DoDataExchange(CDataExchange* pDX) +{ + CPageDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CProcessesDialog) + DDX_Control(pDX, IDC_SPIN_EXPANDLEVEL, m_spinExpandLevel); + DDX_Control(pDX, IDC_EDIT_EXPANDLEVEL, m_editExpandLevel); + DDX_Control(pDX, IDC_TREE_PROCESSES, m_tree); + DDX_Text(pDX, IDC_EDIT_EXPANDLEVEL, m_nExpandLevel); + DDX_Radio(pDX, IDC_RADIO_EXPANDLEVEL, m_nExpandType); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CProcessesDialog, CPageDialog) + //{{AFX_MSG_MAP(CProcessesDialog) + ON_BN_CLICKED(IDC_RADIO_EXPANDALL, OnRadioExpandall) + ON_BN_CLICKED(IDC_RADIO_EXPANDLEVEL, OnRadioExpandlevel) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CProcessesDialog message handlers + +void CProcessesDialog::OnInitDialog() +{ + CPageDialog::OnInitDialog(); + + // TODO: Add your specialized creation code here + + m_ilTree.Create(IDB_PROCESSES_TREE_IMAGE,16,1,RGB(255,0,255)); + m_tree.SetImageList(&m_ilTree,TVSIL_NORMAL); + + LV_COLUMN lvc={ sizeof(lvc) }; + lvc.fmt=LVCFMT_LEFT; + lvc.cx=237; + lvc.pszText=_T("Process image name"); + lvc.mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT; + m_tree.SetColumn(0,&lvc); + m_tree.InsertColumn(1,_T("Process ID"),LVCFMT_LEFT,200,1); + + // set COXTreeCtrl styles + m_tree.ModifyExStyle(0,TVOXS_PICKANYWHERE|TVOXS_ROWSEL); + m_tree.ModifyStyle(0,TVS_SHOWSELALWAYS|TVS_HASBUTTONS| + TVS_HASLINES|TVS_LINESATROOT); + + + // spin control + m_spinExpandLevel.SetRange(0,1); + m_spinExpandLevel.SetPos(0); + + // layout manager + // + m_LayoutManager.Attach(this); + + // tree control + m_LayoutManager.TieChild(IDC_TREE_PROCESSES,OX_LMS_ANY,OX_LMT_SAME); + ////////////////// + + // radio buttons and expand level edit control + m_LayoutManager.TieChild(IDC_RADIO_EXPANDALL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_RADIO_EXPANDLEVEL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_RADIO_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_EDIT_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + ////////////////// + + ////////////////////////////////////// + + PopulateTree(); + + ShowControls(); +} + +void CProcessesDialog::Refresh() +{ + PopulateTree(); +} + +void CProcessesDialog::PopulateTree() +{ + if(!UpdateData()) + return; + + CWaitCursor waitCursor; + + COXProcessIterator processIterator; + if(!processIterator.MakeSnapshot()) + return; + + m_tree.SetRedraw(FALSE); + m_tree.DeleteAllItems(); + + // create fonts to customize tree items appearance + LOGFONT lf; + CFont fontRoot; + CFont fontSubRoot; + CFont* pFontRoot=GetFont(); + if(pFontRoot->GetLogFont(&lf)) + { + lf.lfHeight=-14; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Arial"),LF_FACESIZE); + fontRoot.CreateFontIndirect(&lf); + + lf.lfHeight=-12; + lf.lfWeight=FW_BOLD; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Times New Roman"),LF_FACESIZE); + fontSubRoot.CreateFontIndirect(&lf); + } + pFontRoot=((HFONT)fontRoot!=NULL) ? &fontRoot : NULL; + CFont* pFontSubRoot=((HFONT)fontSubRoot!=NULL) ? &fontSubRoot : NULL; + + CString sValue; + HTREEITEM htiRoot; + HTREEITEM htiItem; + + COLORREF clrTopic=RGB(0,0,255); + COLORREF clrValue=RGB(0,128,0); + + COXSysInfo m_SysInfo; + + HTREEITEM htiSelectItem=NULL; + /////////////////////////////////////////////////// + // + for(int nIndex=0; nIndex0) + { + htiItem=InsertItem(_T("Version"),htiRoot); + + sValue.Format(_T("%d.%d"),HIWORD(dwVersion),LOWORD(dwVersion)); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + + // priority boost + BOOL bDisabled; + if(processIterator.IsPriorityBoostDisabled(bDisabled)) + { + htiItem=InsertItem(_T("Priority Boost"),htiRoot); + + sValue=(bDisabled ? _T("Disabled") : _T("Enabled")); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + + // creation time + COleDateTime oleDateTime; + if(processIterator.GetCreationTime(oleDateTime)) + { + htiItem=InsertItem(_T("Creation Time"),htiRoot); + + sValue=oleDateTime.Format(); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + + // kernel time + DWORDLONG timeSpent; + if(processIterator.GetKernelTime(timeSpent) && timeSpent>0) + { + htiItem=InsertItem(_T("Kernel Time"),htiRoot); + + sValue.Format(_T("%d ms"),timeSpent/10000); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + + // user time + if(processIterator.GetUserTime(timeSpent) && timeSpent>0) + { + htiItem=InsertItem(_T("User Time"),htiRoot); + + sValue.Format(_T("%d ms"),timeSpent/10000); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + } + + ++processIterator; + } + // + //////////////////////////////////////////////// + + ExpandTree((m_nExpandType==0 ? m_nExpandLevel : -1)); + + m_tree.SetFocus(); + m_tree.SelectItem(htiSelectItem); + + m_tree.SetRedraw(TRUE); +} + + +void CProcessesDialog::ExpandTree(int nExpandLevel/*=-1*/, + HTREEITEM htiParent/*=NULL*/) +{ + if(nExpandLevel==0) + return; + + if(htiParent==NULL) + { + htiParent=m_tree.GetRootItem(); + ASSERT(htiParent!=NULL); + } + + HTREEITEM hti=m_tree.GetNextItem(htiParent,TVGN_CHILD); + while(hti!=NULL) + { + m_tree.Expand(hti,TVE_EXPAND); + + COXTreeItem* xti=m_tree.GetXItem(hti); + ASSERT(xti!=NULL); + if(xti->ItemHasChildren()) + ExpandTree((nExpandLevel==-1 ? -1 : nExpandLevel-1),hti); + + hti=m_tree.GetNextItem(hti,TVGN_NEXT); + } +} + +HTREEITEM CProcessesDialog::InsertItem(CString sItem, HTREEITEM htiParent/*=NULL*/, + int nImage/*=-1*/, CFont* pFont/*=NULL*/, + COLORREF clr/*=CLR_NONE*/) +{ + HTREEITEM hti=m_tree.InsertItem(sItem,htiParent); + ASSERT(hti!=NULL); + + // associate new font + if(pFont!=NULL) + VERIFY(m_tree.SetItemFont(hti,pFont)); + // and new color + if(clr!=CLR_NONE) + VERIFY(m_tree.SetItemColor(hti,clr)); + + m_tree.SetItemImage(hti,nImage,nImage); + + return hti; +} + + +void CProcessesDialog::ShowControls() +{ + if(UpdateData()) + { + CWnd* pDlgItem=GetDlgItem(IDC_EDIT_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + pDlgItem=GetDlgItem(IDC_SPIN_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + } +} + +void CProcessesDialog::OnRadioExpandall() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CProcessesDialog::OnRadioExpandlevel() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.h new file mode 100644 index 0000000..bed29f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ProcessesDialog.h @@ -0,0 +1,71 @@ +#if !defined(AFX_PROCESSESDIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) +#define AFX_PROCESSESDIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ProcessesDialog.h : header file +// + +#include "PageDialog.h" +#include "OXTreeCtrl.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CProcessesDialog dialog + +class CProcessesDialog : public CPageDialog +{ +// Construction +public: + CProcessesDialog(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CProcessesDialog) + enum { IDD = IDD_PROCESSES_DIALOG }; + CSpinButtonCtrl m_spinExpandLevel; + CEdit m_editExpandLevel; + COXTreeCtrl m_tree; + UINT m_nExpandLevel; + int m_nExpandType; + //}}AFX_DATA + +protected: + void PopulateTree(); + void ExpandTree(int nExpandLevel=-1, HTREEITEM htiParent=NULL); + HTREEITEM InsertItem(CString sItem, HTREEITEM htiParent=NULL, int nImage=-1, + CFont* pFont=NULL, COLORREF clr=CLR_NONE); + +public: + virtual BOOL IsRefreshAvailable() { return TRUE; } + virtual void Refresh(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CProcessesDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CImageList m_ilTree; + COXLayoutManager m_LayoutManager; + +protected: + virtual void OnInitDialog(); + + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CProcessesDialog) + afx_msg void OnRadioExpandall(); + afx_msg void OnRadioExpandlevel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROCESSESDIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ReadMe.txt new file mode 100644 index 0000000..7ec3815 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : SystemStateInfo +======================================================================== + + +AppWizard has created this SystemStateInfo 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 SystemStateInfo application. + +SystemStateInfo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSystemStateInfoApp application class. + +SystemStateInfo.cpp + This is the main application source file that contains the application + class CSystemStateInfoApp. + +SystemStateInfo.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 + Developer Studio. + +res\SystemStateInfo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file SystemStateInfo.rc. + +res\SystemStateInfo.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +SystemStateInfo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +SystemStateInfoDlg.h, SystemStateInfoDlg.cpp - the dialog + These files contain your CSystemStateInfoDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in SystemStateInfo.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named SystemStateInfo.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.cpp new file mode 100644 index 0000000..d50260b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.cpp @@ -0,0 +1,497 @@ +// SSIDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "SystemStateInfo.h" +#include "SSIDialog.h" + +#include "SysInfoDialog.h" +#include "NetworkResourcesDialog.h" +#include "ApplicationsDialog.h" +#include "ProcessesDialog.h" +#include "ServicesDialog.h" + +#include "OXSysInfo.h" +#include "OXSplashWnd.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +#define NUMTOPICS 5 + +///////////////////////////////////////////////////////////////////////////// +// CSSIDialog dialog + +CSSIDialog::CSSIDialog(CWnd* pParent /*=NULL*/) : + CDialog(CSSIDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSSIDialog) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + Initialize(); +} + +void CSSIDialog::Initialize() +{ + m_bInitialized=FALSE; + + m_nActivePage=-1; + + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + // initialize Taskbar Icon + IniTaskbarIcon(); +} + +void CSSIDialog::IniTaskbarIcon() +{ + m_TaskbarIcon.Create(); + // When there is only one taskbar icon, you don't need to specify an ID. + // The ID is useful only when implementing two (or more) taskbar icons, AND you want + // to handle mouse messages from both icons within one message handler (therefore, you + // need that ID to tell which icon posted the msg). However, it might be a good idea to + // assign an ID, and check the ID in the message handler, especially when you may need + // to derive your classes (somebody else may add another taskbar icon). + + // Note: you don't need to detroy a taskbar icon. It's done in its own destructor. + + m_TaskbarIcon.m_pPopupOwner = this; + // let this dialog handle popup menu's message + // Note: m_pPopupOwner is NOT a member of COXTaskbarIcon. + + m_TaskbarIcon.SetIcon(IDR_MAINFRAME); + m_TaskbarIcon.SetTooltipText(IDR_MAINFRAME); + m_TaskbarIcon.Show(); +} + +void CSSIDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSSIDialog) + DDX_Control(pDX, IDC_BOTTOMSEPARATOR, m_ctlBottomSeparator); + DDX_Control(pDX, IDC_BUTTON_REFRESH, m_btnRefresh); + DDX_Control(pDX, IDC_TOPIC, m_ctlTopic); + DDX_Control(pDX, IDC_SHB_TOPICS, m_shb); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSSIDialog, CDialog) + //{{AFX_MSG_MAP(CSSIDialog) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_SIZE() + ON_WM_GETMINMAXINFO() + ON_BN_CLICKED(IDC_BUTTON_REFRESH, OnButtonRefresh) + //}}AFX_MSG_MAP + ON_COMMAND(IDM_CLOSE, OnClose) + ON_COMMAND(IDM_ABOUTBOX, OnAbout) + ON_COMMAND(IDM_RESTORE, OnRestore) + + ON_NOTIFY(SHBN_ACTIVATEITEM,IDC_SHB_TOPICS,OnActivateItem) + ON_NOTIFY(SHBN_CONTEXTMENU, IDC_SHB_TOPICS, OnSHBContextMenu) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSSIDialog message handlers + +BOOL CSSIDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + + COXSplashWnd wndSplash; + // the fourth parameter is level of tolerance which + // indicates how much the color can be different from CLR_DEFAULT (which is white) + // before it is actaully accepted as a different color + // for bitmap that we use in this application value of 150 is the best + wndSplash.LoadBitmap(IDB_LOGO,CLR_NONE,NULL,0); + wndSplash.SetUserCancel(FALSE); + wndSplash.Show(SPLASH_NOTIMER,NULL); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Remove standard Restore, Maximize & Minimize items out of system menu. + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + COXSysInfo m_SysInfo; + BOOL bIsNTRunning=FALSE; + m_SysInfo.IsNT(&bIsNTRunning); + + // set text color and font for separator + static CFont font; + VERIFY(font.CreatePointFont(140,_T("Times New Roman"))); + m_ctlTopic.SetFont(&font); + m_ctlTopic.SetTextColor(RGB(128,0,0)); + + // setup bitmap button + VERIFY(m_btnRefresh.LoadBitmap(IDB_BITMAP_REFRESH,FALSE,RGB(255,0,255))); + m_btnRefresh.SetToolTip(TRUE); + m_btnRefresh.SetTrackLook(TRUE); + m_btnRefresh.SetImageOffset(CPoint(0,0)); + m_btnRefresh.SetInnerFocusOffset(CPoint(2,2)); + + // create image lists for shortcut bar + VERIFY(m_ilLarge.Create(IDB_SHB_LARGE,32,11,RGB(255,0,255))); + VERIFY(m_ilSmall.Create(IDB_SHB_SMALL,16,11,RGB(255,0,255))); + + // populate shortcut bar + SHB_GROUPINFO shbGroup; + + HSHBGROUP hGroup=m_shb.InsertGroup(_T("Topics")); + ASSERT(hGroup!=NULL); + m_shb.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_shb.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + // insert statements + // fill standard list controls + const int nNumTopics=NUMTOPICS-(bIsNTRunning ? 0 : 1); + TCHAR shbszItems[][20]={_T("System Info"),_T("Network Resources"), + _T("Applications"), _T("Processes"),_T("Services")/*,_T("DLLs"), + _T("Device Drivers"),_T("Perfomance")*/}; + for(int nIndex=0; nIndexActivateItem(0); + + wndSplash.Hide(); + + PostMessage(WM_NCACTIVATE,TRUE); + + return FALSE; +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSSIDialog::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSSIDialog::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSSIDialog::OnSysCommand(UINT nID, LPARAM lParam) +{ + if((nID & 0xFFF0) == IDM_ABOUTBOX) + OnAbout(); + else + CDialog::OnSysCommand(nID, lParam); +} + +void CSSIDialog::OnClose() +{ + OnCancel(); +} + +// handling popup menu commands sent by the taskbar icon object +void CSSIDialog::OnRestore() +{ + SetForegroundWindow(); + PostMessage(WM_SYSCOMMAND,SC_RESTORE); + ShowWindow(SW_SHOW); +} + +void CSSIDialog::OnAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +void CSSIDialog::OnSize(UINT nType, int cx, int cy) +{ + CDialog::OnSize(nType, cx, cy); + + if(nType==SIZE_MINIMIZED) + { + m_TaskbarIcon.SetOwner(NULL); // let taskbar icon do it + // This is only one way to hide the dialog window. In real situation, you may + // want to try DestroyWindow() to conserve system resource if possible (in this + // demo, this dialog is the main window). + ShowWindow(SW_HIDE); + } + + // TODO: Add your message handler code here + if(m_bInitialized) + { + m_LayoutManager.OnSize(cx,cy); + + if(m_nActivePage!=-1) + { + CPageDialog* pPageDialog=NULL; + pPageDialog=m_arrPages[m_nActivePage].pPageDialog; + ASSERT(pPageDialog!=NULL); + ASSERT(::IsWindow(pPageDialog->GetSafeHwnd())); + + pPageDialog->MoveWindow(GetPageRect()); + } + } +} + +void CSSIDialog::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) +{ + // TODO: Add your message handler code here and/or call default + CDialog::OnGetMinMaxInfo(lpMMI); + + lpMMI->ptMinTrackSize.x=400; + lpMMI->ptMinTrackSize.y=300; +} + +void CSSIDialog::OnCancel() +{ + m_arrPages.RemoveAll(); + + CDialog::OnCancel(); +} + +void CSSIDialog::OnActivateItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + if(pNMSHB->nItem!=m_nActivePage && pNMSHB->nItem>=0 && + pNMSHB->nItemGetSafeHwnd())); + pPageDialog->ShowWindow(SW_HIDE); + } + + CRect rectFrame=GetPageRect(); + + pPageDialog=m_arrPages[pNMSHB->nItem].pPageDialog; + ASSERT(pPageDialog!=NULL); + if(::IsWindow(pPageDialog->GetSafeHwnd())) + { + pPageDialog->ShowWindow(SW_SHOW); + pPageDialog->MoveWindow(rectFrame); + } + else + { + VERIFY(pPageDialog-> + Create(MAKEINTRESOURCE(m_arrPages[pNMSHB->nItem].nTemplateID), + this,rectFrame,pNMSHB->nItem)); + ASSERT(::IsWindow(pPageDialog->GetSafeHwnd())); + } + + pPageDialog->SetFocus(); + + m_btnRefresh.EnableWindow(pPageDialog->IsRefreshAvailable()); + + m_nActivePage=pNMSHB->nItem; + } + + ASSERT(m_shb.GetGroupListCtrl(pNMSHB->hGroup)!=NULL); + CString sTopic=m_shb.GetGroupListCtrl(pNMSHB->hGroup)-> + GetItemText(pNMSHB->nItem,0); + m_ctlTopic.SetWindowText(sTopic); + Invalidate(); + + *result=0; +} + + +void CSSIDialog::OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + *pResult=1; +} + + +CRect CSSIDialog::GetPageRect() +{ + CRect rectTopic; + m_ctlTopic.GetWindowRect(rectTopic); + ScreenToClient(rectTopic); + + CRect rectRefreshButton; + m_btnRefresh.GetWindowRect(rectRefreshButton); + ScreenToClient(rectRefreshButton); + + CRect rectBottomSeparator; + m_ctlBottomSeparator.GetWindowRect(rectBottomSeparator); + ScreenToClient(rectBottomSeparator); + + CRect rectPage(rectTopic.left, + __max(rectTopic.bottom,rectRefreshButton.bottom)+5, + rectRefreshButton.right,rectBottomSeparator.top); + return rectPage; +} + + +void CSSIDialog::OnButtonRefresh() +{ + // TODO: Add your control notification handler code here + + ASSERT(m_nActivePage>=0 && m_nActivePageRefresh(); +} + +BOOL CSSIDialog::PreTranslateMessage(MSG* pMsg) +{ + ASSERT_VALID(this); + + if (pMsg->message == WM_KEYDOWN) + { + if(m_nActivePage!=-1) + { + ASSERT(m_nActivePage>=0 && m_nActivePage + PreTranslateInput(pMsg)) + return TRUE; + } + } + + // handle rest with IsDialogMessage + return CDialog::PreTranslateMessage(pMsg); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.h new file mode 100644 index 0000000..3683e3c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSIDialog.h @@ -0,0 +1,128 @@ +// SSIDialog.h : header file +// + +#if !defined(_SSIDIALOG_H_) +#define _SSIDIALOG_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include + +#include "PageDialog.h" +#include "SSITaskbarIcon.h" + +#include "OXLayoutManager.h" +#include "OXShortcutBar.h" +#include "OXSeparator.h" +#include "OXBitmapButton.h" + +typedef struct _tagPAGEDIALOG +{ + CPageDialog* pPageDialog; + UINT nTemplateID; + + // constructor + _tagPAGEDIALOG(CPageDialog* pPage=NULL, UINT nID=0) + { + pPageDialog=pPage; + nTemplateID=nID; + } + + // destructor + ~_tagPAGEDIALOG() + { + if(pPageDialog!=NULL) + { + if(::IsWindow(pPageDialog->GetSafeHwnd())) + pPageDialog->DestroyWindow(); + delete pPageDialog; + } + } + + // copy constructor + _tagPAGEDIALOG& operator=(const _tagPAGEDIALOG& page) + { + pPageDialog=page.pPageDialog; + nTemplateID=page.nTemplateID; + return *this; + } + +} PAGEDIALOG; + +typedef CArray CPageArray; + +///////////////////////////////////////////////////////////////////////////// +// CSSIDialog dialog + +class CSSIDialog : public CDialog +{ +// Construction +public: + CSSIDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSSIDialog) + enum { IDD = IDD_SSI_DIALOG }; + COXSeparator m_ctlBottomSeparator; + COXBitmapButton m_btnRefresh; + COXSeparator m_ctlTopic; + COXShortcutBar m_shb; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSSIDialog) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +protected: + void Initialize(); + void IniTaskbarIcon(); + CRect GetPageRect(); + +// Implementation +public: + +protected: + CImageList m_ilLarge; + CImageList m_ilSmall; + + HICON m_hIcon; + CSSITaskbarIcon m_TaskbarIcon; + COXLayoutManager m_LayoutManager; + + BOOL m_bInitialized; + + CPageArray m_arrPages; + int m_nActivePage; + + // Generated message map functions + //{{AFX_MSG(CSSIDialog) + virtual void OnCancel(); + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); + afx_msg void OnButtonRefresh(); + //}}AFX_MSG + afx_msg void OnRestore(); + afx_msg void OnClose(); + afx_msg void OnAbout(); + + afx_msg void OnActivateItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* pResult); + + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_SSIDIALOG_H_) + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.cpp new file mode 100644 index 0000000..6009300 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.cpp @@ -0,0 +1,58 @@ +#include "stdafx.h" +#include "SSITaskbarIcon.h" + +#include "resource.h" // main symbols + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSSITaskbarIcon + +BEGIN_MESSAGE_MAP(CSSITaskbarIcon, COXTaskbarIcon) + //{{AFX_MSG_MAP(CSSITaskbarIcon) + ON_WM_LBUTTONDBLCLK() + ON_WM_RBUTTONUP() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +void CSSITaskbarIcon::OnRButtonUp(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + // on right click show menu + DoPopupMenu(); +} + +void CSSITaskbarIcon::OnLButtonDblClk(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + // on double click restore the position of window on screen + ::PostMessage(m_pPopupOwner->m_hWnd, WM_COMMAND, IDM_RESTORE, (LPARAM)m_hWnd); +} + +void CSSITaskbarIcon::DoPopupMenu() +{ + CMenu popMenu; + VERIFY(popMenu.LoadMenu(IDR_TRAYICON_POPUPMENU)); + + // set default item + MENUITEMINFO itemInfo={ sizeof(MENUITEMINFO) }; + itemInfo.fMask=MIIM_STATE; + itemInfo.fState=MFS_DEFAULT; + ::SetMenuItemInfo(popMenu.m_hMenu,IDM_RESTORE,FALSE,&itemInfo); + + CPoint posMouse; + GetCursorPos(&posMouse); + + // show menu + m_pPopupOwner->SendMessage(WM_NCACTIVATE,FALSE); + popMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, + posMouse.x, posMouse.y, m_pPopupOwner); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.h new file mode 100644 index 0000000..6f7faef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SSITaskbarIcon.h @@ -0,0 +1,24 @@ +#ifndef _SSITASKBARICON_H_ +#define _SSITASKBARICON_H_ + +#include "OXTaskbarIcon.h" + +class CSSITaskbarIcon : public COXTaskbarIcon +{ +public: + CSSITaskbarIcon() { }; + void DoPopupMenu(); + // pointer to window to send messages + CWnd* m_pPopupOwner; + + //{{AFX_VIRTUAL(CSSITaskbarIcon) + //}}AFX_VIRTUAL + + //{{AFX_MSG(CSSITaskbarIcon) + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#endif // _SSITASKBARICON_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ServicesDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ServicesDialog.cpp new file mode 100644 index 0000000..17c698e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/ServicesDialog.cpp @@ -0,0 +1,584 @@ +// ServicesDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "systemstateinfo.h" +#include "ServicesDialog.h" + +#include "OXIteratorService.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +#define SERVICEREF_FLAG 0x22663344 + +///////////////////////////////////////////////////////////////////////////// +// CServicesDialog dialog + + +CServicesDialog::CServicesDialog() : CPageDialog() +{ + //{{AFX_DATA_INIT(CServicesDialog) + m_nExpandLevel = 0; + m_nExpandType = 1; + //}}AFX_DATA_INIT + + BOOL bIsWindowsNT=FALSE; + m_SysInfo.IsNT(&bIsWindowsNT); + + if(!bIsWindowsNT) + AfxThrowNotSupportedException(); +} + + +void CServicesDialog::DoDataExchange(CDataExchange* pDX) +{ + CPageDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CServicesDialog) + DDX_Control(pDX, IDC_SPIN_EXPANDLEVEL, m_spinExpandLevel); + DDX_Control(pDX, IDC_EDIT_EXPANDLEVEL, m_editExpandLevel); + DDX_Control(pDX, IDC_TREE_SERVICES, m_tree); + DDX_Text(pDX, IDC_EDIT_EXPANDLEVEL, m_nExpandLevel); + DDX_Radio(pDX, IDC_RADIO_EXPANDLEVEL, m_nExpandType); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CServicesDialog, CPageDialog) + //{{AFX_MSG_MAP(CServicesDialog) + ON_BN_CLICKED(IDC_RADIO_EXPANDALL, OnRadioExpandall) + ON_BN_CLICKED(IDC_RADIO_EXPANDLEVEL, OnRadioExpandlevel) + ON_NOTIFY(NM_DBLCLK, IDC_TREE_SERVICES, OnDblclkTreeServices) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CServicesDialog message handlers + +void CServicesDialog::OnInitDialog() +{ + CPageDialog::OnInitDialog(); + + // TODO: Add your specialized creation code here + + m_ilTree.Create(IDB_SERVICES_TREE_IMAGE,16,1,RGB(255,0,255)); + m_tree.SetImageList(&m_ilTree,TVSIL_NORMAL); + + LV_COLUMN lvc={ sizeof(lvc) }; + lvc.fmt=LVCFMT_LEFT; + lvc.cx=237; + lvc.pszText=_T("Item"); + lvc.mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT; + m_tree.SetColumn(0,&lvc); + m_tree.InsertColumn(1,_T("Value"),LVCFMT_LEFT,200,1); + + // set COXTreeCtrl styles + m_tree.ModifyExStyle(0,TVOXS_PICKANYWHERE|TVOXS_ROWSEL); + m_tree.ModifyStyle(0,TVS_SHOWSELALWAYS|TVS_HASBUTTONS| + TVS_HASLINES|TVS_LINESATROOT); + + + // spin control + m_spinExpandLevel.SetRange(0,3); + m_spinExpandLevel.SetPos(0); + + // layout manager + // + m_LayoutManager.Attach(this); + + // tree control + m_LayoutManager.TieChild(IDC_TREE_SERVICES,OX_LMS_ANY,OX_LMT_SAME); + ////////////////// + + // radio buttons and expand level edit control + m_LayoutManager.TieChild(IDC_RADIO_EXPANDALL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_RADIO_EXPANDLEVEL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_RADIO_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_EDIT_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + ////////////////// + + ////////////////////////////////////// + + PopulateTree(); + + ShowControls(); +} + +void CServicesDialog::Refresh() +{ + PopulateTree(); +} + +void CServicesDialog::PopulateTree() +{ + if(!UpdateData()) + return; + + CWaitCursor waitCursor; + + m_tree.SetRedraw(FALSE); + m_tree.DeleteAllItems(); + COXTreeHeader* pHeader=(COXTreeHeader*)m_tree.GetDlgItem(0); + ASSERT(pHeader); + pHeader->SortColumn(-1,0); + + // create fonts to customize tree items appearance + LOGFONT lf; + CFont fontRoot; + CFont fontSubRoot; + CFont* pFontRoot=GetFont(); + if(pFontRoot->GetLogFont(&lf)) + { + lf.lfHeight=-14; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Arial"),LF_FACESIZE); + fontRoot.CreateFontIndirect(&lf); + + lf.lfHeight=-12; + lf.lfWeight=FW_BOLD; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Times New Roman"),LF_FACESIZE); + fontSubRoot.CreateFontIndirect(&lf); + } + pFontRoot=((HFONT)fontRoot!=NULL) ? &fontRoot : NULL; + CFont* pFontSubRoot=((HFONT)fontSubRoot!=NULL) ? &fontSubRoot : NULL; + + HTREEITEM htiRoot=NULL; + HTREEITEM htiSelectItem=NULL; + + COLORREF clrTopic=RGB(0,0,255); + + + COXIteratorService iterServices; + + // iterate through all services + // + + CStringArray arrAllServiceName; + CStringArray arrServiceName; + CStringArray arrDeviceName; + + VERIFY(iterServices.StartIteration()); + iterServices.GetKeyNames(arrAllServiceName); + int nIndex=0; + for(nIndex=0; nIndex0) + { + htiRoot=InsertItem(_T("Services"),NULL,0,pFontRoot,clrTopic); + htiSelectItem=htiRoot; + } + + for(nIndex=0; nIndex0) + { + htiRoot=InsertItem(_T("Devices"),NULL,1,pFontRoot,clrTopic); + if(htiSelectItem==NULL) + htiSelectItem=htiRoot; + } + + for(nIndex=0; nIndexItemHasChildren()) + ExpandTree((nExpandLevel==-1 ? -1 : nExpandLevel-1),hti); + + hti=m_tree.GetNextItem(hti,TVGN_NEXT); + } +} + +HTREEITEM CServicesDialog::InsertItem(CString sItem, HTREEITEM htiParent/*=NULL*/, + int nImage/*=-1*/, CFont* pFont/*=NULL*/, + COLORREF clr/*=CLR_NONE*/) +{ + HTREEITEM hti=m_tree.InsertItem(sItem,htiParent); + ASSERT(hti!=NULL); + + // associate new font + if(pFont!=NULL) + VERIFY(m_tree.SetItemFont(hti,pFont)); + // and new color + if(clr!=CLR_NONE) + VERIFY(m_tree.SetItemColor(hti,clr)); + + m_tree.SetItemImage(hti,nImage,nImage); + + return hti; +} + +void CServicesDialog::InsertServiceInfo(CString sServiceKeyName, + HTREEITEM htiRoot, + CFont* pFont, + BOOL bDevice) +{ + CString sValue; + DWORD dwValue; + HTREEITEM htiSubRoot; + HTREEITEM htiItem; + +// COLORREF clrTopic=RGB(0,0,255); + COLORREF clrValue=RGB(0,128,0); + + COXService service(sServiceKeyName); + SERVICE_STATUS ss; + + // Display name and status + htiSubRoot=InsertItem(service.QueryDisplayName(),htiRoot,-1,pFont); + + service.QueryStatus(&ss,TRUE); + switch(ss.dwCurrentState) + { + case SERVICE_STOPPED: + sValue=_T("Stopped"); + break; + case SERVICE_START_PENDING: + sValue=_T("Start pending"); + break; + case SERVICE_STOP_PENDING: + sValue=_T("Stop pending"); + break; + case SERVICE_RUNNING: + sValue=_T("Running"); + break; + case SERVICE_CONTINUE_PENDING: + sValue=_T("Continue pending"); + break; + case SERVICE_PAUSE_PENDING: + sValue=_T("Pause pending"); + break; + case SERVICE_PAUSED: + sValue=_T("Paused"); + break; + default: + if(ss.dwWin32ExitCode==NO_ERROR) + sValue=_T("Status:"); + else + sValue=_T("Stopped"); + } + VERIFY(m_tree.SetSubItem(htiSubRoot,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + ///////////////////////////////////////////// + + // Binary Path Name + CString sWindowsDirTag=_T("\\SystemRoot"); + CString sWindowsDir; + if(!m_SysInfo.GetWindowsDir(&sWindowsDir)) + sWindowsDir.Empty(); + sValue=service.QueryBinaryPathName(); + if(sValue.IsEmpty()) + sValue=_T(""); + if(!sWindowsDir.IsEmpty() && sValue.Find(sWindowsDirTag)==0) + sValue=sWindowsDir+sValue.Mid(sWindowsDirTag.GetLength()); + htiItem=InsertItem(_T("Pathname"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + VERIFY(m_tree.SetItemDrawEllipsis(htiItem,DT_PATH_ELLIPSIS,1)); + ///////////////////////////////////////////// + + // Service Type + sValue.Empty(); + htiItem=InsertItem(_T("Service Type"),htiSubRoot); + if((ss.dwServiceType&SERVICE_WIN32_OWN_PROCESS)== + SERVICE_WIN32_OWN_PROCESS) + { + ASSERT(!bDevice); + sValue=_T("Runs in its own process"); + } + else if((ss.dwServiceType&SERVICE_WIN32_SHARE_PROCESS)== + SERVICE_WIN32_SHARE_PROCESS) + { + ASSERT(!bDevice); + sValue=_T("Shares a process with other processes"); + } + else if((ss.dwServiceType&SERVICE_KERNEL_DRIVER)== + SERVICE_KERNEL_DRIVER) + { + ASSERT(bDevice); + sValue=_T("Kernel device driver"); + } + else if((ss.dwServiceType&SERVICE_FILE_SYSTEM_DRIVER)== + SERVICE_FILE_SYSTEM_DRIVER) + { + ASSERT(bDevice); + sValue=_T("File system driver"); + } + if((ss.dwServiceType&SERVICE_INTERACTIVE_PROCESS)== + SERVICE_INTERACTIVE_PROCESS) + { + ASSERT(!bDevice); + ASSERT(!sValue.IsEmpty()); + sValue=sValue+_T(" and can iteract with the desktop"); + } + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + ///////////////////////////////////////////// + + // Start Type + dwValue=service.QueryStartType(); + htiItem=InsertItem(_T("Start Type"),htiSubRoot); + switch(dwValue) + { + case SERVICE_BOOT_START: + ASSERT(bDevice); + sValue=_T("Boot"); + break; + case SERVICE_SYSTEM_START: + ASSERT(bDevice); + sValue=_T("System"); + break; + case SERVICE_AUTO_START: + sValue=_T("Automatic"); + break; + case SERVICE_DEMAND_START: + sValue=_T("Manual"); + break; + case SERVICE_DISABLED: + sValue=_T("Disabled"); + break; + default: + sValue=_T(""); + } + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + ///////////////////////////////////////////// + + // Error Severity + dwValue=service.QueryErrorControl(); + htiItem=InsertItem(_T("Error Severity"),htiSubRoot); + switch(dwValue) + { + case SERVICE_ERROR_IGNORE: + sValue=_T("Ignore"); + break; + case SERVICE_ERROR_NORMAL: + sValue=_T("Normal"); + break; + case SERVICE_ERROR_SEVERE: + sValue=_T("Severe"); + break; + case SERVICE_ERROR_CRITICAL: + sValue=_T("Critical"); + break; + default: + sValue=_T(""); + } + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + ///////////////////////////////////////////// + + // Load Order Group + sValue=service.QueryLoadOrderGroup(); + if(!sValue.IsEmpty()) + { + htiItem=InsertItem(_T("Group"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + ///////////////////////////////////////////// + + // + sValue=service.QueryStartName(); + if(!bDevice) + // Service Account Name + { + if(sValue.IsEmpty()) + sValue=_T("LocalSystem"); + htiItem=InsertItem(_T("Service Account Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + else + // Driver Object Name + { + if(!sValue.IsEmpty()) + { + htiItem=InsertItem(_T("Driver Object Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + } + ///////////////////////////////////////////// + + // Dependencies + CString sDependencies=service.QueryDependencies(); + if(!sDependencies.IsEmpty()) + { + htiItem=InsertItem(_T("Dependencies"),htiSubRoot,-1,pFont); + int nPos; + while((nPos=sDependencies.Find(_T("|")))!=-1) + { + ASSERT(nPos>1); + CString sName=sDependencies.Left(nPos); + if(sName.Left(1)==SC_GROUP_IDENTIFIER) + sName=sName.Mid(1)+_T(" (Group)"); + InsertItem(sName,htiItem); + sDependencies=sDependencies.Mid(nPos+1); + } + if(sDependencies.Left(1)==SC_GROUP_IDENTIFIER) + sDependencies=sDependencies.Mid(1)+_T(" (Group)"); + InsertItem(sDependencies,htiItem); + } + ///////////////////////////////////////////// + + // Dependents + COXIteratorService iterServices(service); + if(iterServices.StartDependentIteration()) + { + CStringArray arrAllServiceName; + iterServices.GetKeyNames(arrAllServiceName); + HTREEITEM htiItem=NULL; + if(arrAllServiceName.GetSize()>0) + htiItem=InsertItem(_T("Dependents"),htiSubRoot,-1,pFont); + for(int nIndex=0; nIndexEnableWindow((m_nExpandType==0)); + pDlgItem=GetDlgItem(IDC_SPIN_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + } +} + +void CServicesDialog::OnRadioExpandall() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CServicesDialog::OnRadioExpandlevel() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CServicesDialog::OnDblclkTreeServices(NMHDR* pNMHDR, LRESULT* pResult) +{ + // TODO: Add your control notification handler code here + UNREFERENCED_PARAMETER(pNMHDR); + + CPoint point; + if(::GetCursorPos(&point)) + { + m_tree.ScreenToClient(&point); + UINT nFlags; + int nItem=m_tree.HitTest(point,&nFlags); + if(nItem!=-1) + { + HTREEITEM hti=m_tree.GetItemFromIndex(nItem); + ASSERT(hti!=NULL); + if(m_tree.GetItemIndent(hti)= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ServicesDialog.h : header file +// + +#include "PageDialog.h" +#include "OXTreeCtrl.h" +#include "OXLayoutManager.h" +#include "OXSysInfo.h" + +///////////////////////////////////////////////////////////////////////////// +// CServicesDialog dialog + +class CServicesDialog : public CPageDialog +{ +// Construction +public: + CServicesDialog(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CServicesDialog) + enum { IDD = IDD_SERVICES_DIALOG }; + CSpinButtonCtrl m_spinExpandLevel; + CEdit m_editExpandLevel; + COXTreeCtrl m_tree; + UINT m_nExpandLevel; + int m_nExpandType; + //}}AFX_DATA + +protected: + void PopulateTree(); + void ExpandTree(int nExpandLevel=-1, HTREEITEM htiParent=NULL); + HTREEITEM InsertItem(CString sItem, HTREEITEM htiParent=NULL, int nImage=-1, + CFont* pFont=NULL, COLORREF clr=CLR_NONE); + void InsertServiceInfo(CString sServiceKeyName, HTREEITEM htiRoot, + CFont* pFont, BOOL bDevice); + +public: + virtual BOOL IsRefreshAvailable() { return TRUE; } + virtual void Refresh(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CServicesDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CImageList m_ilTree; + COXLayoutManager m_LayoutManager; + COXSysInfo m_SysInfo; + +protected: + virtual void OnInitDialog(); + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CServicesDialog) + afx_msg void OnRadioExpandall(); + afx_msg void OnRadioExpandlevel(); + afx_msg void OnDblclkTreeServices(NMHDR* pNMHDR, LRESULT* pResult); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERVICESDLG_H__FA9CB933_57BC_11D2_A73D_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.cpp new file mode 100644 index 0000000..0b795df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SystemStateInfo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.h new file mode 100644 index 0000000..374db00 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__367620AC_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__367620AC_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC templates +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__367620AC_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.cpp new file mode 100644 index 0000000..1f56839 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.cpp @@ -0,0 +1,1449 @@ +// SysInfoDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "systemstateinfo.h" +#include "SysInfoDialog.h" + +#include "OXSysInfo.h" +#include "OXInteger.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSysInfoDialog dialog + + +CSysInfoDialog::CSysInfoDialog() : CPageDialog() +{ + //{{AFX_DATA_INIT(CSysInfoDialog) + m_nExpandLevel = 0; + m_nExpandType = 1; + m_bShowPrinters = FALSE; + //}}AFX_DATA_INIT +} + + +void CSysInfoDialog::DoDataExchange(CDataExchange* pDX) +{ + CPageDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSysInfoDialog) + DDX_Control(pDX, IDC_SPIN_EXPANDLEVEL, m_spinExpandLevel); + DDX_Control(pDX, IDC_EDIT_EXPANDLEVEL, m_editExpandLevel); + DDX_Control(pDX, IDC_TREE_ITEMS, m_tree); + DDX_Text(pDX, IDC_EDIT_EXPANDLEVEL, m_nExpandLevel); + DDX_Radio(pDX, IDC_RADIO_EXPANDLEVEL, m_nExpandType); + DDX_Check(pDX, IDC_SHOWPRINTERS, m_bShowPrinters); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CSysInfoDialog, CPageDialog) + //{{AFX_MSG_MAP(CSysInfoDialog) + ON_BN_CLICKED(IDC_RADIO_EXPANDALL, OnRadioExpandall) + ON_BN_CLICKED(IDC_RADIO_EXPANDLEVEL, OnRadioExpandlevel) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSysInfoDialog message handlers + +void CSysInfoDialog::OnInitDialog() +{ + CPageDialog::OnInitDialog(); + + // TODO: Add your specialized creation code here + + m_ilTree.Create(IDB_SYSINFO_TREE_IMAGE,16,1,RGB(255,0,255)); + m_tree.SetImageList(&m_ilTree,TVSIL_NORMAL); + + LV_COLUMN lvc={ sizeof(lvc) }; + lvc.fmt=LVCFMT_LEFT; + lvc.cx=237; + lvc.pszText=_T("Item"); + lvc.mask = LVCF_FMT|LVCF_WIDTH|LVCF_TEXT; + m_tree.SetColumn(0,&lvc); + m_tree.InsertColumn(1,_T("Value"),LVCFMT_LEFT,200,1); + + // set COXTreeCtrl styles + m_tree.ModifyExStyle(0,TVOXS_PICKANYWHERE|TVOXS_ROWSEL); + m_tree.ModifyStyle(0,TVS_SHOWSELALWAYS|TVS_HASBUTTONS| + TVS_HASLINES|TVS_LINESATROOT); + + + // spin control + m_spinExpandLevel.SetRange(0,3); + m_spinExpandLevel.SetPos(0); + + // layout manager + // + m_LayoutManager.Attach(this); + + // tree control + m_LayoutManager.TieChild(IDC_TREE_ITEMS,OX_LMS_ANY,OX_LMT_SAME); + ////////////////// + + // radio buttons and expand level edit control + m_LayoutManager.TieChild(IDC_RADIO_EXPANDALL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_RADIO_EXPANDLEVEL, + OX_LMS_LEFT|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_RADIO_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_EDIT_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_LEFT, + OX_LMT_OPPOSITE,IDC_EDIT_EXPANDLEVEL); + m_LayoutManager.TieChild(IDC_SPIN_EXPANDLEVEL,OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SHOWPRINTERS,OX_LMS_BOTTOM,OX_LMT_SAME); + ////////////////// + + ////////////////////////////////////// + + PopulateTree(); + + ShowControls(); +} + +void CSysInfoDialog::Refresh() +{ + PopulateTree(); +} + +void CSysInfoDialog::PopulateTree() +{ + if(!UpdateData()) + return; + + CWaitCursor waitCursor; + + m_tree.SetRedraw(FALSE); + m_tree.DeleteAllItems(); + + // create fonts to customize tree items appearance + LOGFONT lf; + CFont fontRoot; + CFont fontSubRoot; + CFont* pFontRoot=GetFont(); + if(pFontRoot->GetLogFont(&lf)) + { + lf.lfHeight=-14; + UTBStr::tcsncpy(lf.lfFaceName, LF_FACESIZE, _T("Arial"),LF_FACESIZE); + fontRoot.CreateFontIndirect(&lf); + + lf.lfHeight=-12; + lf.lfWeight=FW_BOLD; + UTBStr::tcsncpy(lf.lfFaceName,LF_FACESIZE,_T("Times New Roman"),LF_FACESIZE); + fontSubRoot.CreateFontIndirect(&lf); + } + pFontRoot=((HFONT)fontRoot!=NULL) ? &fontRoot : NULL; + CFont* pFontSubRoot=((HFONT)fontSubRoot!=NULL) ? &fontSubRoot : NULL; + + CString sValue; + DWORD dwValue; + BOOL bResult; + HTREEITEM htiRoot; + HTREEITEM htiSubRoot; + HTREEITEM htiItem; + + COLORREF clrTopic=RGB(0,0,255); + COLORREF clrValue=RGB(0,128,0); + + COXInteger Integer; + + COXSysInfo m_SysInfo; + BOOL bIsWindowsNT=FALSE; + + /////////////////////////////////////////////////// + // SYSTEM + // + htiRoot=InsertItem(_T("System"),NULL,0,pFontRoot,clrTopic); + HTREEITEM htiSelectItem=htiRoot; + + // operating system + DWORD dwPlatform,dwMajor,dwMinor; + if(m_SysInfo.GetWindowsVersion(&dwPlatform,&dwMajor,&dwMinor)) + { + htiItem=InsertItem(_T("Operating system"),htiRoot); + + if(dwPlatform==VER_PLATFORM_WIN32s) + { + sValue=_T("Windows 3.1"); + } + else if(dwPlatform==VER_PLATFORM_WIN32_WINDOWS) + { + if(dwMajor==4 && dwMinor==0) + { + sValue=_T("Windows 95"); + BOOL bIsOSR2; + if(m_SysInfo.IsOSR2(&bIsOSR2) && bIsOSR2) + sValue=sValue+_T(" OSR 2"); + } + else if(dwMajor==4 && dwMinor==10) + sValue=_T("Windows 98"); + else if(dwMajor==4 && dwMinor==90) + sValue=_T("Windows Me"); + else + sValue=_T("Unknown"); + } + else if(dwPlatform==VER_PLATFORM_WIN32_NT) + { + if(dwMajor==5) + { + switch (dwMinor) + { + case 2: + sValue = _T("Windows Server 2003"); + break; + case 1: + sValue = _T("Windows XP"); + break; + case 0: + { + sValue=_T("Windows 2000"); + BOOL bIsNTServer; + if(m_SysInfo.IsNTServer(&bIsNTServer)) + { + if(bIsNTServer) + sValue+=_T(" Server"); + else + sValue+=_T(" Professional"); + } + } + break; + default: + sValue = _T("Windows Vista"); + } + + VERIFY(sValue.GetBuffer(1024)!=NULL); + //sValue.Format(_T("%s v%d.%d"),sValue,dwMajor,dwMinor); + sValue.ReleaseBuffer(); + + bIsWindowsNT=TRUE; + } + else + { + sValue=_T("Windows NT"); + BOOL bIsNTServer; + if(m_SysInfo.IsNTServer(&bIsNTServer)) + { + if(bIsNTServer) + sValue+=_T(" Server"); + else + sValue+=_T(" Workstation"); + } + + VERIFY(sValue.GetBuffer(1024)!=NULL); + sValue.Format(_T("%s v%d.%d"),sValue,dwMajor,dwMinor); + sValue.ReleaseBuffer(); + + bIsWindowsNT=TRUE; + } + } + else + sValue=_T("Unknown"); + + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // build number + if(m_SysInfo.GetWindowsBuildNumber(&dwValue)) + { + htiItem=InsertItem(_T("Build Number"),htiRoot); + sValue.Format(_T("%u"),dwValue); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // platform info + if(m_SysInfo.GetWindowsPlatformInfo(sValue) && !sValue.IsEmpty() && + !sValue.SpanExcluding(_T(" ")).IsEmpty()) + { + htiItem=InsertItem(_T("Platform Info"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // computer name + if(m_SysInfo.GetComputerName(&sValue)) + { + htiItem=InsertItem(_T("Computer name"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // User & Domain name + CString sDomain; + if(bIsWindowsNT && m_SysInfo.GetUserAndDomainName(&sValue,&sDomain)) + { + htiItem=InsertItem(_T("Domain name"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sDomain,0,NULL,clrValue)); + htiItem=InsertItem(_T("User name"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + else if(m_SysInfo.GetUserName(&sValue)) + { + htiItem=InsertItem(_T("User name"),htiRoot); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + + // Network Interface Card (NIC) Address + NICADDRESS NICAddress; + if(m_SysInfo.GetNICAddress(&NICAddress)) + { + htiItem=InsertItem(_T("Network Interface Card (NIC) Address"),htiRoot); + sValue.Format(_T("%.2x.%.2x.%.2x.%.2x.%.2x.%.2x"), + NICAddress.data[0],NICAddress.data[1],NICAddress.data[2], + NICAddress.data[3],NICAddress.data[4],NICAddress.data[5]); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // IP address(es) + CStringArray arrIPAddresses; + if(m_SysInfo.GetListIPAddresses(&arrIPAddresses)) + { + ASSERT(arrIPAddresses.GetSize()>0); + + if(arrIPAddresses.GetSize()>1) + { + htiSubRoot=InsertItem(_T("IP Addresses"),htiRoot,-1,pFontSubRoot); + sValue.Format(_T("%u"),arrIPAddresses.GetSize()); + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT|(pFontSubRoot!=NULL ? OX_SUBITEM_FONT : 0), + sValue,0,pFontSubRoot)); + } + else + htiSubRoot=htiRoot; + + for(int nIndex=0; nIndex=1); + + // topic will depend on the number of processors used in the system + if(nNumProcessors>1) + { + htiRoot=InsertItem(_T("Processors"),NULL,2,pFontRoot,clrTopic); + sValue.Format(_T("%d"),nNumProcessors); + VERIFY(m_tree.SetSubItem(htiRoot,1, + OX_SUBITEM_TEXT|(pFontRoot!=NULL ? OX_SUBITEM_FONT : 0), + sValue,0,pFontRoot)); + htiSubRoot=InsertItem(_T("Primary processor"), + htiRoot,-1,pFontSubRoot); + } + else + htiSubRoot=InsertItem(_T("Processor"),NULL,2,pFontRoot,clrTopic); + /////////////////////////////////////////////////////////////////// + + // primary processor description + // + // Processor Architecture + DWORD dwProcessorType; + if(m_SysInfo.GetProcessorType(&dwProcessorType)) + { + htiItem=InsertItem(_T("Architecture"),htiSubRoot); + + switch(dwProcessorType) + { + case PROCESSOR_INTEL_386: + sValue=_T("Intel 386"); + break; + case PROCESSOR_INTEL_486: + sValue=_T("Intel 486"); + break; + case PROCESSOR_INTEL_PENTIUMCELERON: + sValue=_T("Intel Pentium Celeron"); + break; + case PROCESSOR_INTEL_PENTIUMPRO: + sValue=_T("Intel Pentium Pro"); + break; + case PROCESSOR_INTEL_PENTIUM: + sValue=_T("Intel Pentium"); + break; + case PROCESSOR_INTEL_PENTIUM2: + sValue=_T("Intel Pentium II"); + break; + case PROCESSOR_INTEL_PENTIUM3: + sValue=_T("Intel Pentium III"); + break; + case PROCESSOR_MIPSR4000: + sValue=_T("MIPS R4000"); + break; + case PROCESSOR_ALPHA21064: + sValue=_T("Alpha 21064"); + break; + case PROCESSOR_ALPHA21066: + sValue=_T("Alpha 21066"); + break; + case PROCESSOR_ALPHA21164: + sValue=_T("Alpha 21164"); + break; + case PROCESSOR_PPC601: + sValue=_T("PowerPC 601"); + break; + case PROCESSOR_PPC603: + sValue=_T("PowerPC 603"); + break; + case PROCESSOR_PPC604: + sValue=_T("PowerPC 604"); + break; + case PROCESSOR_PPC603PLUS: + sValue=_T("PowerPC 603+"); + break; + case PROCESSOR_PPC604PLUS: + sValue=_T("PowerPC 604+"); + break; + case PROCESSOR_PPC620: + sValue=_T("PowerPC 620"); + break; + default: + sValue=_T("UNKNOWN"); + break; + } + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + // Processor speed + DWORD dwSpeed; + if(m_SysInfo.GetProcessorSpeed(&dwSpeed)) + { + htiItem=InsertItem(_T("Speed"),htiSubRoot); + sValue.Format(_T("%d MHz"),dwSpeed); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + // Math CoProcessor + if(m_SysInfo.IsCoProcessorPresent(&bResult)) + { + htiItem=InsertItem(_T("Math CoProcessor"),htiSubRoot); + sValue=bResult ? _T("Present") : _T("Not present"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + // MMX technology + if(m_SysInfo.IsMMXProcessor(&bResult)) + { + htiItem=InsertItem(_T("MMX technology"),htiSubRoot); + sValue=bResult ? _T("Present") : _T("Not present"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + // Time stamp + DWORD dwHigh, dwLow; + if(m_SysInfo.GetTimeStamp(&dwHigh,&dwLow)) + { + htiItem=InsertItem(_T("Time stamp"),htiSubRoot); + sValue.Format(_T("%08lx %08lx"),dwHigh,dwLow); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + ///////////////////////////////////////////// + + + // multiple processors description + if(nNumProcessors>1) + for(int nIndex=2; nIndex<=nNumProcessors; nIndex++) + { + sValue.Format(_T("Processor %d"),nIndex); + htiSubRoot=InsertItem(sValue,htiRoot,-1,pFontSubRoot); + + // Processor speed + DWORD dwSpeed; + if(m_SysInfo.GetProcessorSpeed(&dwSpeed,nIndex-1)) + { + htiItem=InsertItem(_T("Speed"),htiSubRoot); + sValue.Format(_T("%d MHz"),dwSpeed); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + } + ///////////////////////////////////////////// + } + + // + // The end of PROCESSOR(S) topic + /////////////////////////////////////////////////// + + + /////////////////////////////////////////////////// + // DISC INFORMATION + // + htiRoot=InsertItem(_T("Disc Information"),NULL,3,pFontRoot,clrTopic); + + int nDiskType; + CString sFileSysType; + CString sVolName; + DWORDLONG dwTotalSpace, dwFreeSpace; + DWORD dwVolSer; + int nIndex=0; + for(nIndex=0; nIndex<26; nIndex++) + { + if(m_SysInfo.GetDriveTypeInfo(nIndex,&sFileSysType,&nDiskType)) + { + if(m_SysInfo.GetDriveVolumeInfo(nIndex,&sVolName, + &dwVolSer,&dwTotalSpace,&dwFreeSpace)) + { + sValue.Format(_T("Drive %c:"),nIndex+65); + htiSubRoot=InsertItem(sValue,htiRoot,-1,pFontSubRoot); + + if(nDiskType == DRIVE_FIXED || nIndex==0 || nIndex==1) + { + // type of disk + if(nIndex==0 || nIndex==1) + { + m_tree.SetItemImage(htiSubRoot,8,8); + sValue=_T("Floppy Disk"); + } + else + { + m_tree.SetItemImage(htiSubRoot,9,9); + sValue=_T("Fixed Disk"); + } + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT,sValue,0,NULL)); + + // File System + htiItem=InsertItem(_T("File System"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sFileSysType,0,NULL,clrValue)); + + // Volume name + htiItem=InsertItem(_T("Volume Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sVolName.IsEmpty() ? _T("") : sVolName,0, + NULL,clrValue)); + + // Volume Serial + htiItem=InsertItem(_T("Volume Serial"),htiSubRoot); + sValue.Format(_T("%u"),dwVolSer); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + + // Total space + htiItem=InsertItem(_T("Total space"),htiSubRoot); + Integer.SetNumber(dwTotalSpace/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + + // Free space + htiItem=InsertItem(_T("Free space"),htiSubRoot); + Integer.SetNumber(dwFreeSpace/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + else if(nDiskType==DRIVE_CDROM) + { + m_tree.SetItemImage(htiSubRoot,10,10); + + // type of disk + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT,_T("CD ROM"),0,NULL)); + + // File System + htiItem=InsertItem(_T("File System"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sFileSysType,0,NULL,clrValue)); + + // Volume name + htiItem=InsertItem(_T("Volume Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sVolName.IsEmpty() ? _T("") : sVolName,0, + NULL,clrValue)); + } + else if(nDiskType==DRIVE_REMOTE) + { + m_tree.SetItemImage(htiSubRoot,11,11); + + // type of disk + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT,_T("Network Disk"),0,NULL)); + + // File System + htiItem=InsertItem(_T("File System"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sFileSysType,0,NULL,clrValue)); + + // Volume name + htiItem=InsertItem(_T("Volume Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sVolName.IsEmpty() ? _T("") : sVolName,0, + NULL,clrValue)); + } + else + { + // type of disk + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT,_T("Unknown"),0,NULL)); + } + } + } + } + + // + // The end of DISC INFORMATION topic + /////////////////////////////////////////////////// + + + /////////////////////////////////////////////////// + // DISPLAY + // + htiRoot=InsertItem(_T("Display"),NULL,4,pFontRoot,clrTopic); + + // Font Size + if(m_SysInfo.IsSmallFont(&bResult)) + { + htiItem=InsertItem(_T("Font Size"),htiRoot); + sValue=bResult ? _T("Small fonts") : _T("Large fonts"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Display resolution + int nXRes, nYRes; + if(m_SysInfo.GetDisplayResolution(&nXRes,&nYRes)) + { + htiItem=InsertItem(_T("Current Resolution"),htiRoot); + sValue.Format(_T("%u x %u"), nXRes, nYRes); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Display colors + int nNumBits; + DWORDLONG dwNumColors; + if(m_SysInfo.GetDisplayNumColors(&dwNumColors,&nNumBits)) + { + htiItem=InsertItem(_T("Current Colors"),htiRoot); + sValue.Format(_T(" (%u bits)"),nNumBits); + Integer.SetNumber(dwNumColors); + sValue=Integer.GetStringNumber(10,TRUE)+sValue; + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Display max resolution + if(m_SysInfo.GetDisplayMaxResolution(&nXRes,&nYRes)) + { + htiItem=InsertItem(_T("Max Resolution"),htiRoot); + sValue.Format(_T("%u x %u"), nXRes, nYRes); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Display max colors + if(m_SysInfo.GetDisplayMaxNumColors(&dwNumColors,&nNumBits)) + { + htiItem=InsertItem(_T("Max Colors"),htiRoot); + sValue.Format(_T(" (%u bits)"),nNumBits); + Integer.SetNumber(dwNumColors); + sValue=Integer.GetStringNumber(10,TRUE)+sValue; + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // List of all display modes + CArrayDisplayMode arrDisplayMode; + if(m_SysInfo.GetAllDisplayModes(&arrDisplayMode) && + arrDisplayMode.GetSize()>0) + { + htiSubRoot=InsertItem(_T("List of all Display Modes"), + htiRoot,-1,pFontSubRoot); + sValue.Format(_T("%u"),arrDisplayMode.GetSize()); + VERIFY(m_tree.SetSubItem(htiSubRoot,1, + OX_SUBITEM_TEXT|(pFontSubRoot!=NULL ? OX_SUBITEM_FONT : 0), + sValue,0,pFontSubRoot)); + + for(nIndex=1; nIndex<=arrDisplayMode.GetSize(); nIndex++) + { + DISPLAYMODE displayMode=arrDisplayMode.GetAt(nIndex-1); + + sValue.Format(_T("Display Mode %u"),nIndex); + htiItem=InsertItem(sValue,htiSubRoot); + Integer.SetNumber(displayMode.dwNumColors); + sValue.Format(_T("%d x %d (%d bit, %s colors)"), + displayMode.dwHorzResolution,displayMode.dwVertResolution, + displayMode.dwBitsPerPixel,Integer.GetStringNumber(10,TRUE)); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + } + //////////////////////////////////////////////// + + // + // The end of DISPLAY topic + /////////////////////////////////////////////////// + + + /////////////////////////////////////////////////// + // MEMORY + // + htiRoot=InsertItem(_T("Memory"),NULL,5,pFontRoot,clrTopic); + + // Physical Memory + htiSubRoot=InsertItem(_T("Physical Memory"),htiRoot,-1,pFontSubRoot); + + if(m_SysInfo.GetTotalPhysicalMemory(&dwValue)) + { + htiItem=InsertItem(_T("Total amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + if(m_SysInfo.GetFreePhysicalMemory(&dwValue)) + { + htiItem=InsertItem(_T("Free amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Swap File + htiSubRoot=InsertItem(_T("Swap File"),htiRoot,-1,pFontSubRoot); + + if(m_SysInfo.GetTotalPageFile(&dwValue)) + { + htiItem=InsertItem(_T("Total amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + if(m_SysInfo.GetFreePageFile(&dwValue)) + { + htiItem=InsertItem(_T("Free amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Virtual Memory + htiSubRoot=InsertItem(_T("Virtual Memory"),htiRoot,-1,pFontSubRoot); + + if(m_SysInfo.GetTotalVirtual(&dwValue)) + { + htiItem=InsertItem(_T("Total amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + + if(m_SysInfo.GetFreeVirtual(&dwValue)) + { + htiItem=InsertItem(_T("Free amount"),htiSubRoot); + Integer.SetNumber(dwValue/1024); + sValue=Integer.GetStringNumber(10,TRUE)+_T(" KB"); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // Resources + int nValue=0; + if(m_SysInfo.GetFreeSystemResources(&nValue,RT_SYSTEM)) + { + htiSubRoot=InsertItem(_T("Resources"),htiRoot,-1,pFontSubRoot); + + htiItem=InsertItem(_T("Free System Resources"),htiSubRoot); + sValue.Format(_T("%u %%"),nValue); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + + VERIFY(m_SysInfo.GetFreeSystemResources(&nValue,RT_GDI)); + htiItem=InsertItem(_T("Free GDI Resources"),htiSubRoot); + sValue.Format(_T("%u %%"),nValue); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + + VERIFY(m_SysInfo.GetFreeSystemResources(&nValue,RT_USER)); + htiItem=InsertItem(_T("Free User Resources"),htiSubRoot); + sValue.Format(_T("%u %%"),nValue); + VERIFY(m_tree.SetSubItem(htiItem,1,OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + //////////////////////////////////////////////// + + // + // The end of MEMORY topic + /////////////////////////////////////////////////// + + + /////////////////////////////////////////////////// + // MODEM(S) + // + + // Number of Modems + int nNumModems; + if(m_SysInfo.GetNumModems(&nNumModems) && nNumModems>0) + { + // topic will depend on the number of modems installed + if(nNumModems>1) + { + htiRoot=InsertItem(_T("Modems"),NULL,6,pFontRoot,clrTopic); + sValue.Format(_T("%u"),nNumModems); + VERIFY(m_tree.SetSubItem(htiRoot,1, + OX_SUBITEM_TEXT|(pFontRoot!=NULL ? OX_SUBITEM_FONT : 0), + sValue,0,pFontRoot)); + } + else + htiRoot=InsertItem(_T("Modem"),NULL,6,pFontRoot,clrTopic); + /////////////////////////////////////////////////////////////////// + + // loop through all installed modems + CArrayModemInfo arrModemInfo; + VERIFY(m_SysInfo.GetModemInfo(&arrModemInfo)); + ASSERT(arrModemInfo.GetSize()==nNumModems); + for(int nIndex=0; nIndex1) + { + sValue.Format(_T("Modem %d"),nIndex+1); + htiSubRoot=InsertItem(sValue,htiRoot,-1,pFontSubRoot); + } + else + htiSubRoot=htiRoot; + + MODEMINFO modemInfo=arrModemInfo.GetAt(nIndex); + + // Port + htiItem=InsertItem(_T("Port"),htiSubRoot); + sValue.Format(_T("COM%d"),modemInfo.nPort); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + + // Description + htiItem=InsertItem(_T("Description"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + modemInfo.sDriverDesc,0,NULL,clrValue)); + + // Manufacturer + htiItem=InsertItem(_T("Manufacturer"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + modemInfo.sManufacturer,0,NULL,clrValue)); + + // Model + htiItem=InsertItem(_T("Model"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + modemInfo.sModel,0,NULL,clrValue)); + } + ///////////////////////////////////////////// + } + + // + // The end of MODEM(S) topic + /////////////////////////////////////////////////// + + + /////////////////////////////////////////////////// + // PRINTER(S) + // + if(m_bShowPrinters) + { + CStringArray arrPrinterName; + if(m_SysInfo.GetAllPrintersName(arrPrinterName)) + { + if(arrPrinterName.GetSize()>0) + { + CString sDefaultPrinterName; + VERIFY(m_SysInfo.GetDefaultPrinterName(sDefaultPrinterName)); + + sValue=_T("Printer"); + if(arrPrinterName.GetSize()>1) + sValue=sValue+_T("s"); + htiRoot=InsertItem(sValue,NULL,7,pFontRoot,clrTopic); + if(arrPrinterName.GetSize()>1) + { + sValue.Format(_T("%u"),arrPrinterName.GetSize()); + VERIFY(m_tree.SetSubItem(htiRoot,1, + OX_SUBITEM_TEXT|(pFontRoot!=NULL ? OX_SUBITEM_FONT : 0), + sValue,0,pFontRoot)); + } + + for(int nIndex=0; nIndexpServerName!=NULL && + lstrlen(lpPrinterInfo->pServerName)>0) + { + htiItem=InsertItem(_T("Server Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pServerName,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // share name + if((lpPrinterInfo->Attributes&PRINTER_ATTRIBUTE_SHARED)!=0 && + lpPrinterInfo->pShareName!=NULL && + lstrlen(lpPrinterInfo->pShareName)>0) + { + htiItem=InsertItem(_T("Share Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pShareName,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // port(s) + if(lpPrinterInfo->pPortName!=NULL && + lstrlen(lpPrinterInfo->pPortName)>0) + { + if(_tcschr(lpPrinterInfo->pPortName,';')!=NULL) + htiItem=InsertItem(_T("Ports"),htiSubRoot); + else + htiItem=InsertItem(_T("Port"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pPortName,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // driver name + if(lpPrinterInfo->pDriverName!=NULL && + lstrlen(lpPrinterInfo->pDriverName)>0) + { + htiItem=InsertItem(_T("Driver Name"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pDriverName,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // brief description + if(lpPrinterInfo->pComment!=NULL && + lstrlen(lpPrinterInfo->pComment)>0) + { + htiItem=InsertItem(_T("Brief Description"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pComment,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // physical location + if(lpPrinterInfo->pLocation!=NULL && + lstrlen(lpPrinterInfo->pLocation)>0) + { + htiItem=InsertItem(_T("Physical Location"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pLocation,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // print processor + if(lpPrinterInfo->pPrintProcessor!=NULL && + lstrlen(lpPrinterInfo->pPrintProcessor)>0) + { + htiItem=InsertItem(_T("Print Processor"),htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + lpPrinterInfo->pPrintProcessor,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // average number of pages per minute that have been printed + // on the printer + if(lpPrinterInfo->AveragePPM>0) + { + htiItem=InsertItem(_T("Average number of pages"), + htiSubRoot); + sValue.Format(_T("%u per minute"), + lpPrinterInfo->AveragePPM); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // printer IP address + if(lpPrinterInfo->pServerName!=NULL && + lstrlen(lpPrinterInfo->pServerName)>0) + { + CString sHostName=lpPrinterInfo->pServerName; + if(sHostName.Left(2)==_T("\\\\")) + sHostName=sHostName.Mid(2); + if(m_SysInfo.GetPrimaryIPAddress(&sValue,sHostName)) + { + htiItem=InsertItem(_T("Primary IP Address"), + htiSubRoot); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + } + /////////////////////////////////////// + + // device and environment settings + if(lpPrinterInfo->pDevMode!=NULL) + { + htiSubRoot=InsertItem(_T("Environment"), + htiSubRoot,-1,pFontSubRoot); + + // page orientation + if((lpPrinterInfo->pDevMode->dmFields&DM_ORIENTATION)!=0) + { + htiItem=InsertItem(_T("Orientation"),htiSubRoot); + if(lpPrinterInfo->pDevMode->dmOrientation== + DMORIENT_PORTRAIT) + sValue=_T("Portrait"); + else if(lpPrinterInfo->pDevMode->dmOrientation== + DMORIENT_LANDSCAPE) + sValue=_T("Landscape"); + else + ASSERT(FALSE); + + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // paper size + if((lpPrinterInfo->pDevMode->dmFields&DM_PAPERSIZE)!=0 && + lpPrinterInfo->pDevMode->dmPaperSize!=0) + { + htiItem=InsertItem(_T("Paper size"),htiSubRoot); + + switch(lpPrinterInfo->pDevMode->dmPaperSize) + { + case DMPAPER_LETTER: + sValue=_T("Letter, 8 1/2- by 11-inches"); + break; + case DMPAPER_LEGAL: + sValue=_T("Legal, 8 1/2- by 14-inches"); + break; + case DMPAPER_A4: + sValue=_T("A4 Sheet, 210- by 297-millimeters"); + break; + case DMPAPER_CSHEET: + sValue=_T("C Sheet, 17- by 22-inches"); + break; + case DMPAPER_DSHEET: + sValue=_T("D Sheet, 22- by 34-inches"); + break; + case DMPAPER_ESHEET: + sValue=_T("E Sheet, 34- by 44-inches"); + break; + case DMPAPER_LETTERSMALL: + sValue=_T("Letter Small, 8 1/2- by 11-inches"); + break; + case DMPAPER_TABLOID: + sValue=_T("Tabloid, 11- by 17-inches"); + break; + case DMPAPER_LEDGER: + sValue=_T("Ledger, 17- by 11-inches"); + break; + case DMPAPER_STATEMENT: + sValue=_T("Statement, 5 1/2- by 8 1/2-inches"); + break; + case DMPAPER_EXECUTIVE: + sValue=_T("Executive, 7 1/4- by 10 1/2-inches"); + break; + case DMPAPER_A3: + sValue=_T("A3 sheet, 297- by 420-millimeters"); + break; + case DMPAPER_A4SMALL: + sValue=_T("A4 small sheet, 210- by 297-millimeters"); + break; + case DMPAPER_A5: + sValue=_T("A5 sheet, 148- by 210-millimeters"); + break; + case DMPAPER_B4: + sValue=_T("B4 sheet, 250- by 354-millimeters"); + break; + case DMPAPER_B5: + sValue=_T("B5 sheet, 182- by 257-millimeter paper"); + break; + case DMPAPER_FOLIO: + sValue=_T("Folio, 8 1/2- by 13-inch paper"); + break; + case DMPAPER_QUARTO: + sValue=_T("Quarto, 215- by 275-millimeter paper"); + break; + case DMPAPER_10X14: + sValue=_T("10- by 14-inch sheet"); + break; + case DMPAPER_11X17: + sValue=_T("11- by 17-inch sheet"); + break; + case DMPAPER_NOTE: + sValue=_T("Note, 8 1/2- by 11-inches"); + break; + case DMPAPER_ENV_9: + sValue=_T("#9 Envelope, 3 7/8- by 8 7/8-inches"); + break; + case DMPAPER_ENV_10: + sValue=_T("#10 Envelope, 4 1/8- by 9 1/2-inches"); + break; + case DMPAPER_ENV_11: + sValue=_T("#11 Envelope, 4 1/2- by 10 3/8-inches"); + break; + case DMPAPER_ENV_12: + sValue=_T("#12 Envelope, 4 3/4- by 11-inches"); + break; + case DMPAPER_ENV_14: + sValue=_T("#14 Envelope, 5- by 11 1/2-inches"); + break; + case DMPAPER_ENV_DL: + sValue=_T("DL Envelope"); + break; + case DMPAPER_ENV_C5: + sValue=_T("C5 Envelope, 162- by 229-millimeters"); + break; + case DMPAPER_ENV_C3: + sValue=_T("C3 Envelope, 324- by 458-millimeters"); + break; + case DMPAPER_ENV_C4: + sValue=_T("C4 Envelope, 229- by 324-millimeters"); + break; + case DMPAPER_ENV_C6: + sValue=_T("C6 Envelope, 114- by 162-millimeters"); + break; + case DMPAPER_ENV_C65: + sValue=_T("C65 Envelope, 114- by 229-millimeters"); + break; + case DMPAPER_ENV_B4: + sValue=_T("B4 Envelope, 250- by 353-millimeters"); + break; + case DMPAPER_ENV_B5: + sValue=_T("B5 Envelope, 176- by 250-millimeters"); + break; + case DMPAPER_ENV_B6: + sValue=_T("B6 Envelope, 176- by 125-millimeters"); + break; + case DMPAPER_ENV_ITALY: + sValue=_T("Italy Envelope, 110- by 230-millimeters"); + break; + case DMPAPER_ENV_MONARCH: + sValue=_T("Monarch Envelope, 3 7/8- by 7 1/2-inches"); + break; + case DMPAPER_ENV_PERSONAL: + sValue=_T("6 3/4 Envelope, 3 5/8- by 6 1/2-inches"); + break; + case DMPAPER_FANFOLD_US: + sValue=_T("US Std Fanfold, 14 7/8- by 11-inches"); + break; + case DMPAPER_FANFOLD_STD_GERMAN: + sValue=_T("German Std Fanfold, 8 1/2- by 12-inches"); + break; + case DMPAPER_FANFOLD_LGL_GERMAN: + sValue=_T("German Legal Fanfold, 8 1/2- by 13-inches"); + break; + default: + sValue=_T("Unknown"); + } + + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + else if((lpPrinterInfo->pDevMode->dmFields& + DM_PAPERLENGTH)!=0 && + (lpPrinterInfo->pDevMode->dmFields& + DM_PAPERWIDTH)!=0) + { + htiItem=InsertItem(_T("Paper size"),htiSubRoot); + + sValue.Format(_T("%u- by %u-millimeters"), + lpPrinterInfo->pDevMode->dmPaperWidth, + lpPrinterInfo->pDevMode->dmPaperLength); + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // printer quality + if((lpPrinterInfo->pDevMode->dmFields& + DM_PRINTQUALITY)!=0 && + lpPrinterInfo->pDevMode->dmPrintQuality<=0) + { + htiItem=InsertItem(_T("Print Quality"),htiSubRoot); + + switch(lpPrinterInfo->pDevMode->dmPrintQuality) + { + case DMRES_HIGH: + sValue=_T("High"); + break; + case DMRES_MEDIUM: + sValue=_T("Medium"); + break; + case DMRES_LOW: + sValue=_T("Low"); + break; + case DMRES_DRAFT: + sValue=_T("Draft"); + break; + default: + sValue=_T("Unknown"); + } + + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + /////////////////////////////////////// + + // printer resolution + if(lpPrinterInfo->pDevMode->dmPrintQuality>0 && + (lpPrinterInfo->pDevMode->dmFields& + DM_YRESOLUTION)!=0) + { + htiItem=InsertItem(_T("Print Resolution"),htiSubRoot); + + sValue.Format(_T("%u x %u DPI"), + lpPrinterInfo->pDevMode->dmPrintQuality, + lpPrinterInfo->pDevMode->dmYResolution); + + VERIFY(m_tree.SetSubItem(htiItem,1, + OX_SUBITEM_TEXT|OX_SUBITEM_COLOR, + sValue,0,NULL,clrValue)); + } + /////////////////////////////////////// + + } + /////////////////////////////////////// + + // we have to free memory ourselves + ::GlobalFree(lpPrinterInfo); + } + /////////////////////////////////////// + + } + } + } + } + + // + // The end of PRINTER(S) topic + /////////////////////////////////////////////////// + + ExpandTree((m_nExpandType==0 ? m_nExpandLevel : -1)); + + m_tree.SetFocus(); + m_tree.SelectItem(htiSelectItem); + + m_tree.SetRedraw(TRUE); +} + + +void CSysInfoDialog::ExpandTree(int nExpandLevel/*=-1*/, + HTREEITEM htiParent/*=NULL*/) +{ + if(nExpandLevel==0) + return; + + if(htiParent==NULL) + { + htiParent=m_tree.GetRootItem(); + ASSERT(htiParent!=NULL); + } + + HTREEITEM hti=m_tree.GetNextItem(htiParent,TVGN_CHILD); + while(hti!=NULL) + { + m_tree.Expand(hti,TVE_EXPAND); + + COXTreeItem* xti=m_tree.GetXItem(hti); + ASSERT(xti!=NULL); + if(xti->ItemHasChildren()) + ExpandTree((nExpandLevel==-1 ? -1 : nExpandLevel-1),hti); + + hti=m_tree.GetNextItem(hti,TVGN_NEXT); + } +} + +HTREEITEM CSysInfoDialog::InsertItem(CString sItem, HTREEITEM htiParent/*=NULL*/, + int nImage/*=-1*/, CFont* pFont/*=NULL*/, + COLORREF clr/*=CLR_NONE*/) +{ + HTREEITEM hti=m_tree.InsertItem(sItem,htiParent); + ASSERT(hti!=NULL); + + // associate new font + if(pFont!=NULL) + VERIFY(m_tree.SetItemFont(hti,pFont)); + // and new color + if(clr!=CLR_NONE) + VERIFY(m_tree.SetItemColor(hti,clr)); + + m_tree.SetItemImage(hti,nImage,nImage); + + return hti; +} + + +void CSysInfoDialog::ShowControls() +{ + if(UpdateData()) + { + CWnd* pDlgItem=GetDlgItem(IDC_EDIT_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + pDlgItem=GetDlgItem(IDC_SPIN_EXPANDLEVEL); + ASSERT(pDlgItem!=NULL); + pDlgItem->EnableWindow((m_nExpandType==0)); + } +} + +void CSysInfoDialog::OnRadioExpandall() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CSysInfoDialog::OnRadioExpandlevel() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.h new file mode 100644 index 0000000..26a3b7b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SysInfoDialog.h @@ -0,0 +1,72 @@ +#if !defined(AFX_SYSINFODIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) +#define AFX_SYSINFODIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// SysInfoDialog.h : header file +// + +#include "PageDialog.h" +#include "OXTreeCtrl.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CSysInfoDialog dialog + +class CSysInfoDialog : public CPageDialog +{ +// Construction +public: + CSysInfoDialog(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSysInfoDialog) + enum { IDD = IDD_SYSINFO_DIALOG }; + CSpinButtonCtrl m_spinExpandLevel; + CEdit m_editExpandLevel; + COXTreeCtrl m_tree; + UINT m_nExpandLevel; + int m_nExpandType; + BOOL m_bShowPrinters; + //}}AFX_DATA + +protected: + void PopulateTree(); + void ExpandTree(int nExpandLevel=-1, HTREEITEM htiParent=NULL); + HTREEITEM InsertItem(CString sItem, HTREEITEM htiParent=NULL, int nImage=-1, + CFont* pFont=NULL, COLORREF clr=CLR_NONE); + +public: + virtual BOOL IsRefreshAvailable() { return TRUE; } + virtual void Refresh(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSysInfoDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CImageList m_ilTree; + COXLayoutManager m_LayoutManager; + +protected: + virtual void OnInitDialog(); + + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CSysInfoDialog) + afx_msg void OnRadioExpandall(); + afx_msg void OnRadioExpandlevel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SYSINFODIALOG_H__266F38B4_4D6E_11D2_A730_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.cpp new file mode 100644 index 0000000..c6030d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.cpp @@ -0,0 +1,121 @@ +// SystemStateInfo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SystemStateInfo.h" +#include "SSIDialog.h" +#include "OXInstanceManager.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSystemStateInfoApp + +BEGIN_MESSAGE_MAP(CSystemStateInfoApp, CWinApp) + //{{AFX_MSG_MAP(CSystemStateInfoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSystemStateInfoApp construction + +CSystemStateInfoApp::CSystemStateInfoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSystemStateInfoApp object + +CSystemStateInfoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +// Construct an instance manager +COXInstanceManager instanceManager(_T("SystemStateInfo")); + +///////////////////////////////////////////////////////////////////////////// +// CSystemStateInfoApp initialization + +BOOL CSystemStateInfoApp::InitInstance() +{ + // Check for previous instances and close this app if we exceeded the maximum + if (instanceManager.HasPreviousInstance()) + { + TRACE(_T("Only one instance of application can be loaded\n")); + // Show existing instance + CDWordArray instanceColl; + if(instanceManager.GetInstanceCollection(instanceColl)) + { + DWORD nInstanceID=instanceColl.GetAt(0); + HWND hMainWnd=COXInstanceManager::GetMainWindow(nInstanceID); + if(hMainWnd!=NULL) + ::PostMessage(hMainWnd,WM_COMMAND,IDM_RESTORE,(LPARAM)hMainWnd); + } + return FALSE; + } + + + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CSSIDialog dlg(NULL); + m_pMainWnd=&dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSystemStateInfoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsp new file mode 100644 index 0000000..548912f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsp @@ -0,0 +1,658 @@ +# Microsoft Developer Studio Project File - Name="SystemStateInfo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SystemStateInfo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SystemStateInfo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SystemStateInfo.mak" CFG="SystemStateInfo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SystemStateInfo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SystemStateInfo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SystemStateInfo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SystemStateInfo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SystemStateInfo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SystemStateInfo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SystemStateInfo.exe" + +!ELSEIF "$(CFG)" == "SystemStateInfo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBC" /out:"SystemStateInfo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SystemStateInfo - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SystemStateInfo.exe" + +!ELSEIF "$(CFG)" == "SystemStateInfo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode_Debug" +# PROP BASE Intermediate_Dir "Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /nodefaultlib:"LIBC" /out:"SystemStateInfo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SystemStateInfo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode_Release" +# PROP BASE Intermediate_Dir "Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SystemStateInfo.exe" + +!ENDIF + +# Begin Target + +# Name "SystemStateInfo - Win32 Release" +# Name "SystemStateInfo - Win32 Debug" +# Name "SystemStateInfo - Win32 Release_Shared" +# Name "SystemStateInfo - Win32 Unicode_Debug" +# Name "SystemStateInfo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXInstanceManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXInteger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIteratorService.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXNetBrowseTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXProcess.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXService.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWndDIB.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSysInfo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ApplicationsDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\NetworkResourcesDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\PageDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\ProcessesDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\ServicesDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\SSIDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\SSITaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\SysInfoDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\SystemStateInfo.cpp +# End Source File +# Begin Source File + +SOURCE=.\SystemStateInfo.rc +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "UTHeader" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCalendar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCalendarPopup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDllExt.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXInstanceManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXInteger.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXInteger.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTip.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTipWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXIteratorService.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXLayoutManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXLayoutManager.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXNetBrowseTree.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSeparator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXService.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShortcutBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSysInfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTaskbarIcon.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTaskbarIcon.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCal.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCombo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeHeader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeItem.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ApplicationsDialog.h +# End Source File +# Begin Source File + +SOURCE=.\NetworkResourcesDialog.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXProcess.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSplashWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSplashWnd.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSplashWndDIB.h +# End Source File +# Begin Source File + +SOURCE=.\PageDialog.h +# End Source File +# Begin Source File + +SOURCE=.\ProcessesDialog.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\ServicesDialog.h +# End Source File +# Begin Source File + +SOURCE=.\SSIDialog.h +# End Source File +# Begin Source File + +SOURCE=.\SSITaskbarIcon.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\SysInfoDialog.h +# End Source File +# Begin Source File + +SOURCE=.\SystemStateInfo.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap_r.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\idr_main.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Logo.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\processe.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\services.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\shb_larg.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\shb_smal.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sysinfo_.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\SystemStateInfo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SystemStateInfo.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsw new file mode 100644 index 0000000..d0bf935 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SystemStateInfo"=".\SystemStateInfo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.h new file mode 100644 index 0000000..ee462db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.h @@ -0,0 +1,54 @@ +// SystemStateInfo.h : main header file for the SYSTEMSTATEINFO application +// + +#if !defined(AFX_SYSTEMSTATEINFO_H__367620A8_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_) +#define AFX_SYSTEMSTATEINFO_H__367620A8_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSystemStateInfoApp: +// See SystemStateInfo.cpp for the implementation of this class +// + +class CSystemStateInfoApp : public CWinApp +{ +public: + CSystemStateInfoApp(); + +protected: + +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSystemStateInfoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSystemStateInfoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SYSTEMSTATEINFO_H__367620A8_4CA7_11D2_A72F_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rc new file mode 100644 index 0000000..db0e310 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rc @@ -0,0 +1,382 @@ +//Microsoft Developer Studio 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 MOVEABLE PURE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""UTSampleAbout.rc"" \r\n" + "#include ""OXNetBrowseTree.rc"" // Net browse resource\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXCalendarPopup.rc""\r\n" + "#include ""OXShortcutBar.rc""\r\n" + "#include ""OXSysinfo.rc""\r\n" + "#include ""OXProcess.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SystemStateInfo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\SystemStateInfo.ico" + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "SystemStateInfo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SystemStateInfo\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "OriginalFilename", "SystemStateInfo.EXE\0" + VALUE "ProductName", "SystemStateInfo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_TRAYICON_POPUPMENU MENU DISCARDABLE +BEGIN + POPUP "Popup" + BEGIN + MENUITEM "&Restore", IDM_RESTORE + MENUITEM "&Exit", IDM_CLOSE + MENUITEM SEPARATOR + MENUITEM "&About ...", IDM_ABOUTBOX + END +END + +IDR_APPLICATION_POPUPMENU MENU DISCARDABLE +BEGIN + POPUP "Popup" + BEGIN + MENUITEM "Switch to...", IDM_APP_SWITCHTO + MENUITEM "Bring to front", IDM_APP_BRINGTOFRONT + MENUITEM SEPARATOR + MENUITEM "Minimize", IDM_APP_MINIMIZE + MENUITEM "Restore", IDM_APP_RESTORE + MENUITEM "Maximize", IDM_APP_MAXIMIZE + MENUITEM SEPARATOR + MENUITEM "Close", IDM_APP_CLOSE + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SSI_DIALOG DIALOGEX 0, 0, 410, 230 +STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPCHILDREN | + WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_CLIENTEDGE +CAPTION "System State Info (Dundas Software)" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Static",IDC_TOPIC,97,7,286,13,SS_NOTIFY | SS_SUNKEN, + WS_EX_TRANSPARENT + LTEXT "",IDC_BOTTOMSEPARATOR,96,218,307,8,SS_NOTIFY | + SS_SUNKEN,WS_EX_TRANSPARENT + LTEXT "",IDC_SHB_TOPICS,7,7,84,216,WS_BORDER + CONTROL "\nRefresh",IDC_BUTTON_REFRESH,"Button",BS_OWNERDRAW | + WS_TABSTOP,388,6,15,14 +END + +IDD_SYSINFO_DIALOG DIALOGEX 0, 0, 231, 215 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_TREE_ITEMS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_NOSORTHEADER | + WS_BORDER | WS_TABSTOP,0,0,231,197,WS_EX_CLIENTEDGE + CONTROL "Expand &Level",IDC_RADIO_EXPANDLEVEL,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,1,203,59,10 + CONTROL "Expand &All",IDC_RADIO_EXPANDALL,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,107,203,49,10 + EDITTEXT IDC_EDIT_EXPANDLEVEL,61,202,26,12,ES_RIGHT | + ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RTLREADING + CONTROL "Spin1",IDC_SPIN_EXPANDLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,87,201,11,12 + CONTROL "&Show printers",IDC_SHOWPRINTERS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,171,203,59,10 +END + +IDD_NETWORKRESOURCES_DIALOG DIALOGEX 0, 0, 256, 221 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Tree1",IDC_RESOURCES_TREE,"SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + TVS_SHOWSELALWAYS | WS_TABSTOP,0,0,255,107, + WS_EX_CLIENTEDGE + CONTROL "List1",IDC_LIST_DETAILS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_EDITLABELS | LVS_NOSORTHEADER | + WS_BORDER | WS_TABSTOP,0,113,138,107 + COMBOBOX IDC_COMBO_SCOPE,144,113,111,68,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "Show &comment names",IDC_CHECK_COMMENTS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,144,135,87,10 + CONTROL "Show &disks",IDC_CHECK_DISKS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,144,147,52,10 + CONTROL "Show &printers",IDC_CHECK_PRINTERS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,144,159,59,10 + CONTROL "Report &errors",IDC_CHECK_REPORT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,144,171,59,10 + EDITTEXT IDC_EDIT_INITIALLEVEL,216,191,29,12 + CONTROL "Spin1",IDC_SPIN_INITIALLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,245,191,11,13 + EDITTEXT IDC_EDIT_MAXLEVEL,216,208,29,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_MAXLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,245,208,11,13 + LTEXT "",IDC_SEPARATOR1,144,127,111,8,SS_SUNKEN + LTEXT "&Initial expland level",IDC_STATIC_INITIALLEVEL,144,193, + 60,8 + LTEXT "",IDC_SEPARATOR2,144,182,111,8,SS_SUNKEN + LTEXT "&Max number of levels",IDC_STATIC_MAXLEVEL,144,209,68,8 +END + +IDD_SERVICES_DIALOG DIALOGEX 0, 0, 231, 214 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_TREE_SERVICES,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_OWNERDRAWFIXED | WS_BORDER | + WS_TABSTOP,0,0,231,197,WS_EX_CLIENTEDGE + CONTROL "Expand &Level",IDC_RADIO_EXPANDLEVEL,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,1,203,59,10 + CONTROL "Expand &All",IDC_RADIO_EXPANDALL,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,107,203,49,10 + EDITTEXT IDC_EDIT_EXPANDLEVEL,61,202,26,12,ES_RIGHT | + ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RTLREADING + CONTROL "Spin1",IDC_SPIN_EXPANDLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,87,201,11,12 +END + +IDD_APPLICATIONS_DIALOG DIALOGEX 0, 0, 231, 214 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_TREE_APPLICATIONS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_OWNERDRAWFIXED | WS_BORDER | + WS_TABSTOP,0,0,231,197,WS_EX_CLIENTEDGE + CONTROL "Expand &Level",IDC_RADIO_EXPANDLEVEL,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,1,203,59,10 + CONTROL "Expand &All",IDC_RADIO_EXPANDALL,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,107,203,49,10 + EDITTEXT IDC_EDIT_EXPANDLEVEL,61,202,26,12,ES_RIGHT | + ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RTLREADING + CONTROL "Spin1",IDC_SPIN_EXPANDLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,87,201,11,12 +END + +IDD_PROCESSES_DIALOG DIALOGEX 0, 0, 231, 214 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_TREE_PROCESSES,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_OWNERDRAWFIXED | WS_BORDER | + WS_TABSTOP,0,0,231,197,WS_EX_CLIENTEDGE + CONTROL "Expand &Level",IDC_RADIO_EXPANDLEVEL,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,1,203,59,10 + CONTROL "Expand &All",IDC_RADIO_EXPANDALL,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,107,203,49,10 + EDITTEXT IDC_EDIT_EXPANDLEVEL,61,202,26,12,ES_RIGHT | + ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RTLREADING + CONTROL "Spin1",IDC_SPIN_EXPANDLEVEL,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,87,201,11,12 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO MOVEABLE PURE +BEGIN + IDD_SSI_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 403 + TOPMARGIN, 7 + BOTTOMMARGIN, 223 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_SHB_LARGE BITMAP MOVEABLE PURE "res\\shb_larg.bmp" +IDB_SHB_SMALL BITMAP MOVEABLE PURE "res\\shb_smal.bmp" +IDB_SYSINFO_TREE_IMAGE BITMAP MOVEABLE PURE "res\\sysinfo_.bmp" +IDB_SERVICES_TREE_IMAGE BITMAP MOVEABLE PURE "res\\services.bmp" +IDB_PROCESSES_TREE_IMAGE BITMAP MOVEABLE PURE "res\\processe.bmp" +IDB_LOGO BITMAP MOVEABLE PURE "res\\Logo.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About SystemStateInfo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "System State Info" + ID_DESCRIPTION_FILE "SystemStateInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP_REFRESH BITMAP MOVEABLE PURE "res\\bitmap_r.bmp" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "OXNetBrowseTree.rc" // Net browse resource +#include "OXBitmapButton.rc" +#include "OXCalendarPopup.rc" +#include "OXShortcutBar.rc" +#include "OXSysinfo.rc" +#include "OXProcess.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SystemStateInfo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rtf new file mode 100644 index 0000000..b8bd27f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.vcproj new file mode 100644 index 0000000..784e1c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/SystemStateInfo.vcproj @@ -0,0 +1,3712 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/Logo.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/Logo.bmp new file mode 100644 index 0000000..82e31d5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/Logo.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.ico new file mode 100644 index 0000000..457485e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.rc2 new file mode 100644 index 0000000..5be5215 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/SystemStateInfo.rc2 @@ -0,0 +1,13 @@ +// +// SYSTEMSTATEINFO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/bitmap_r.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/bitmap_r.bmp new file mode 100644 index 0000000..4592997 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/bitmap_r.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/idr_main.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/idr_main.ico new file mode 100644 index 0000000..0e528b8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/idr_main.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/processe.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/processe.bmp new file mode 100644 index 0000000..fb9ee74 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/processe.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/services.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/services.bmp new file mode 100644 index 0000000..6368cf0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/services.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_larg.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_larg.bmp new file mode 100644 index 0000000..ce237da Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_larg.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_smal.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_smal.bmp new file mode 100644 index 0000000..af0321f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/shb_smal.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/sysinfo_.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/sysinfo_.bmp new file mode 100644 index 0000000..529cff9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/res/sysinfo_.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/resource.h new file mode 100644 index 0000000..e2d3e70 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/SystemStateInfo/resource.h @@ -0,0 +1,71 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SystemStateInfo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDR_TRAYICON_POPUPMENU 129 +#define IDD_SSI_DIALOG 130 +#define IDR_APPLICATION_POPUPMENU 130 +#define IDB_SHB_LARGE 131 +#define IDB_SHB_SMALL 132 +#define IDB_SYSINFO_TREE_IMAGE 133 +#define IDD_SYSINFO_DIALOG 134 +#define IDB_BITMAP_REFRESH 135 +#define IDD_NETWORKRESOURCES_DIALOG 135 +#define IDD_SERVICES_DIALOG 136 +#define IDD_APPLICATIONS_DIALOG 137 +#define IDB_SPLASH 138 +#define IDD_PROCESSES_DIALOG 138 +#define IDB_SERVICES_TREE_IMAGE 139 +#define IDB_PROCESSES_TREE_IMAGE 140 +#define IDB_LOGO 141 +#define IDC_SHB_TOPICS 1000 +#define IDC_TOPIC 1003 +#define IDC_TREE_ITEMS 1004 +#define IDC_BOTTOMSEPARATOR 1005 +#define IDC_BUTTON_REFRESH 1006 +#define IDC_RADIO_EXPANDLEVEL 1007 +#define IDC_RADIO_EXPANDALL 1008 +#define IDC_EDIT_EXPANDLEVEL 1009 +#define IDC_SPIN_EXPANDLEVEL 1010 +#define IDC_EDIT_MAXLEVEL 1010 +#define IDC_RESOURCES_TREE 1011 +#define IDC_SEPARATOR1 1012 +#define IDC_CHECK_COMMENTS 1013 +#define IDC_CHECK_DISKS 1014 +#define IDC_CHECK_PRINTERS 1015 +#define IDC_CHECK_REPORT 1016 +#define IDC_COMBO_SCOPE 1017 +#define IDC_SEPARATOR2 1018 +#define IDC_LIST_DETAILS 1020 +#define IDC_SPIN_INITIALLEVEL 1021 +#define IDC_SPIN_MAXLEVEL 1022 +#define IDC_EDIT_INITIALLEVEL 1023 +#define IDC_STATIC_INITIALLEVEL 1024 +#define IDC_STATIC_MAXLEVEL 1025 +#define IDC_TREE_SERVICES 1026 +#define IDC_TREE_APPLICATIONS 1027 +#define IDC_SHOWPRINTERS 1028 +#define IDC_TREE_PROCESSES 1029 +#define IDM_APP_SWITCHTO 0x0f00 +#define IDM_APP_BRINGTOFRONT 0x0f10 +#define IDM_APP_MINIMIZE 0x0f20 +#define IDM_APP_RESTORE 0x0f30 +#define IDM_APP_MAXIMIZE 0x0f40 +#define IDM_APP_CLOSE 0x0f50 +#define IDM_RESTORE 32771 +#define IDM_CLOSE 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 142 +#define _APS_NEXT_COMMAND_VALUE 32780 +#define _APS_NEXT_CONTROL_VALUE 1030 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.cpp new file mode 100644 index 0000000..041f62b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.cpp @@ -0,0 +1,242 @@ +// 3DTabViewBar.cpp : implementation file +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" +#include "3DTabViewBar.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// C3DTabViewBar +// + +IMPLEMENT_DYNAMIC(C3DTabViewBar, COXSizeControlBar); + +C3DTabViewBar::C3DTabViewBar() + : COXSizeControlBar( + SZBARF_STDMOUSECLICKS|SZBARF_ALLOW_MDI_FLOAT|SZBARF_SOLIDGRIPPER) +{ +} + +C3DTabViewBar::~C3DTabViewBar() +{ +} + + + +BEGIN_MESSAGE_MAP(C3DTabViewBar, COXSizeControlBar) + //{{AFX_MSG_MAP(C3DTabViewBar) + ON_WM_CREATE() + ON_WM_ERASEBKGND() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// C3DTabViewBar message handlers + +BOOL C3DTabViewBar::OnEraseBkgnd(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + return TRUE; +} + + +//------------------------------------------------------------------- +void C3DTabViewBar::OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags) +// respond to this event as we need to override it +//------------------------------------------------------------------- +{ + UNREFERENCED_PARAMETER(bFloating); + UNREFERENCED_PARAMETER(flags); + UNREFERENCED_PARAMETER(cx); + UNREFERENCED_PARAMETER(cy); + + CRect rect; + GetClientRect(rect); + + m_TabViewContainer.MoveWindow(&rect); + +} + + +//------------------------------------------------------------------- +int C3DTabViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +//------------------------------------------------------------------- +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + CRect rect; + GetClientRect(&rect); + + if(!m_TabViewContainer.Create(this,rect)) + return -1; + + VERIFY(m_ilTabView.Create(IDB_IL_3DTABVIEW,16,0,RGB(192,192,192))); + m_TabViewContainer.SetImageList(&m_ilTabView); + + // Class View + if(!m_treeClass.Create(WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, + CRect(0,0,0,0),&m_TabViewContainer,1)) + return -1; + VERIFY(m_ilClass.Create(IDB_IL_CLASSVIEW,16,0,RGB(192,192,192))); + m_treeClass.SetImageList(&m_ilClass,TVSIL_NORMAL); + HTREEITEM htiRoot= + m_treeClass.InsertItem(_T("VisualStudioLikeDemo classes"),0,0); + ASSERT(htiRoot!=NULL); + m_treeClass.SetItemState(htiRoot,TVIS_BOLD,TVIS_BOLD); + HTREEITEM htiSubroot=m_treeClass.InsertItem(_T("CAboutDlg"),1,1,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeClass.InsertItem(_T("CAboutDlg()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("DoDataExchange(CDataExchange* pDX)"),3,3, + htiSubroot)!=NULL); + htiSubroot=m_treeClass.InsertItem(_T("CMainFrame"),1,1,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeClass.InsertItem(_T("AssertValid()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("CMainFrame()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("~CMainFrame()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("Dump(CDumpContext& dc)"),2,2, + htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("OnCreate(LPCREATESTRUCT lpCreateStruct)"), + 3,3,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("PreCreateWindow(CREATESTRUCT& cs)"),2,2, + htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("m_3DTabViewBar"),5,5,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("m_tabViewBar"),5,5,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("m_wndStatusBar"),5,5,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("m_wndToolBar"),5,5,htiSubroot)!=NULL); + htiSubroot=m_treeClass.InsertItem(_T("CVisualStudioLikeDemoApp"),1,1,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeClass.InsertItem(_T("CVisualStudioLikeDemoApp()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("InitInstance()"),2,2,htiSubroot)!=NULL); + VERIFY(m_treeClass.InsertItem(_T("OnAppAbout()"),2,2,htiSubroot)!=NULL); + m_TabViewContainer.AddPage(&m_treeClass,_T("ClassView"),0); + + // Resource View + if(!m_treeResource. + Create(WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, + CRect(0,0,0,0),&m_TabViewContainer,2)) + return -1; + VERIFY(m_ilResource.Create(IDB_IL_RESOURCEVIEW,16,0,RGB(192,192,192))); + m_treeResource.SetImageList(&m_ilResource,TVSIL_NORMAL); + htiRoot=m_treeResource.InsertItem(_T("VisualStudioLikeDemo resources"),0,0); + ASSERT(htiRoot!=NULL); + m_treeResource.SetItemState(htiRoot,TVIS_BOLD,TVIS_BOLD); + htiSubroot=m_treeResource.InsertItem(_T("Bitmap"),0,0,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDB_IL_3DTABVIEW"),2,2, + htiSubroot)!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDB_IL_CLASSVIEW"),2,2, + htiSubroot)!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDB_IL_RESOURCEVIEW"),2,2, + htiSubroot)!=NULL); + htiSubroot=m_treeResource.InsertItem(_T("Dialog"),0,0,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDD_ABOUTBOX"),3,3, + htiSubroot)!=NULL); + htiSubroot=m_treeResource.InsertItem(_T("Icon"),0,0,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDR_MAINFRAME"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeResource.InsertItem(_T("IDR_VISUALTYPE"),4,4, + htiSubroot)!=NULL); + htiSubroot=m_treeResource.InsertItem(_T("String Table"),0,0,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeResource.InsertItem(_T("String Table"),5,5, + htiSubroot)!=NULL); + m_TabViewContainer.AddPage(&m_treeResource,_T("ResourceView"),1); + + // File View + if(!m_treeFile.Create(WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, + CRect(0,0,0,0),&m_TabViewContainer,3)) + return -1; + VERIFY(m_ilFile.Create(IDB_IL_FILEVIEW,16,0,RGB(192,192,192))); + m_treeFile.SetImageList(&m_ilFile,TVSIL_NORMAL); + htiRoot=m_treeFile. + InsertItem(_T("Workspace 'VisualStudioLikeDemo': 1 project(s)"),0,0); + ASSERT(htiRoot!=NULL); + htiRoot=m_treeFile.InsertItem(_T("VisualStudioLikeDemo files"),1,1); + ASSERT(htiRoot!=NULL); + m_treeFile.SetItemState(htiRoot,TVIS_BOLD,TVIS_BOLD); + htiSubroot=m_treeFile.InsertItem(_T("Source Files"),2,2,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeFile.InsertItem(_T("3DTabViewBar.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("ChildFrm.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("MainFrm.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("StdAfx.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("TabViewBar.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemo.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemo.rc"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemoDoc.cpp"),4,4, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemoView.cpp"),4,4, + htiSubroot)!=NULL); + htiSubroot=m_treeFile.InsertItem(_T("Header Files"),2,2,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeFile.InsertItem(_T("3DTabViewBar.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("ChildFrm.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("MainFrm.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("Resource.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("StdAfx.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("TabViewBar.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemo.rc"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemoDoc.h"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemoView.h"),5,5, + htiSubroot)!=NULL); + htiSubroot=m_treeFile.InsertItem(_T("Resource Files"),2,2,htiRoot); + ASSERT(htiSubroot!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemo.ico"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemo.rc2"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("VisualStudioLikeDemoDoc.ico"),5,5, + htiSubroot)!=NULL); + VERIFY(m_treeFile.InsertItem(_T("ReadMe.txt"),5,5,htiRoot)!=NULL); + m_TabViewContainer.AddPage(&m_treeFile,_T("FileView"),2); + + + m_TabViewContainer.SetActivePageIndex(0); + + return 0; +} + + +BOOL C3DTabViewBar::Create(CWnd * pParentWnd, + const CString& sTitle/*=_T("3DTabViewBar")*/, + const UINT nID/*=ID_3DTABVIEWBAR*/) +{ + // register a window class for the control bar + static CString strWndClass; + if (strWndClass.IsEmpty()) + { + strWndClass = AfxRegisterWndClass(CS_DBLCLKS); + } + + return COXSizeControlBar::Create(strWndClass, sTitle, + WS_VISIBLE | WS_CHILD | CBRS_BOTTOM | WS_CLIPSIBLINGS, + CFrameWnd::rectDefault, pParentWnd, nID); +} + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.h new file mode 100644 index 0000000..6453603 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/3DTabViewBar.h @@ -0,0 +1,49 @@ +#include "OXSizeCtrlBar.h" +#include "OX3DTabView.h" + + +class C3DTabViewBar : public COXSizeControlBar +{ + DECLARE_DYNAMIC(C3DTabViewBar); +// Construction +public: + C3DTabViewBar(); + + BOOL Create(CWnd * pParentWnd, const CString& sTitle=_T("3DTabViews"), + const UINT nID=ID_3DTABVIEWBAR); + +// Attributes +public: + COX3DTabViewContainer m_TabViewContainer; + CImageList m_ilTabView; + + CTreeCtrl m_treeClass; + CTreeCtrl m_treeResource; + CTreeCtrl m_treeFile; + + CImageList m_ilClass; + CImageList m_ilResource; + CImageList m_ilFile; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(C3DTabViewBar) + //}}AFX_VIRTUAL +protected: + virtual void OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags); + +// Implementation +public: + virtual ~C3DTabViewBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(C3DTabViewBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.cpp new file mode 100644 index 0000000..555a4c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.h new file mode 100644 index 0000000..5c6bf44 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__73A06A3F_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_CHILDFRM_H__73A06A3F_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__73A06A3F_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.cpp new file mode 100644 index 0000000..adeeef7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.cpp @@ -0,0 +1,471 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" + +#include "MainFrm.h" + +#include "OXCoolComboBox.h" + + +#ifndef OX_CUSTOMIZE_WORKSPACE_STATE +#include "OXWorkspaceState.h" +#endif // OX_CUSTOMIZE_WORKSPACE_STATE + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +COXCustomTBButtonTemplate* CCustomTBExtendedEdit::CBCreateNewInstance() const +{ + return dynamic_cast(new CCustomTBExtendedEdit); +} + +void CCustomTBExtendedEdit:: +CBCopyContents(COXCustomTBButtonTemplate* pCBTemplate) const +{ + ASSERT(::IsWindow(GetSafeHwnd())); + + COXCustomTBButtonWnd::CBCopyContents(pCBTemplate); + + COXEdit* pNewEdit=(COXEdit*)pCBTemplate->CBGetWindow(); + pNewEdit->SetBkColor(GetBkColor(),FALSE); + pNewEdit->SetHighlightOnSetFocus(GetHighlightOnSetFocus()); + pNewEdit->SetInsertMode(GetInsertMode()); + pNewEdit->SetMask(GetMask()); + pNewEdit->SetTextColor(GetTextColor(),FALSE); + pNewEdit->SetToolTipText(GetToolTipText()); + pNewEdit->SetInputData(GetInputData()); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CMainFrameWindow) + +BEGIN_MESSAGE_MAP(CMainFrame, CMainFrameWindow) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + ON_WM_CONTEXTMENU() + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI(ID_VIEW_WORKSPACE, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_VIEW_WORKSPACE, OnBarCheck) + ON_UPDATE_COMMAND_UI(ID_VIEW_OUTPUT, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_VIEW_OUTPUT, OnBarCheck) + ON_COMMAND_RANGE(AFX_IDW_TOOLBAR,AFX_IDW_TOOLBAR+100,OnShowControlBars) + ON_UPDATE_COMMAND_UI_RANGE(ID_CB_EDIT, ID_CB_HOTKEY, OnUpdateCustomButton) +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() : + COXMenuBarFrame(CBRS_ALIGN_ANY, + RUNTIME_CLASS(COXSizableMiniDockFrameWnd)) +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +class CMyEdit : public CEdit +{ + DECLARE_DYNAMIC(CMyEdit) +public: + CMyEdit() {}; + +protected: + BOOL b; + +protected: + virtual void Control() {}; + DECLARE_MESSAGE_MAP() +}; + +IMPLEMENT_DYNAMIC(CMyEdit, CEdit) + +BEGIN_MESSAGE_MAP(CMyEdit, CEdit) +END_MESSAGE_MAP() + + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ +#ifdef OX_CUSTOMIZE_INSTANCE_MANAGER + if(m_customizeManager.CheckMaxAllowedInstances()) + { + TRACE(_T("CMainFrame::OnCreate: the maximum allowed number of instances has been reached. The application won't be loaded\n")); + return -1; + } +#endif // OX_CUSTOMIZE_INSTANCE_MANAGER + +#ifdef OX_CUSTOMIZE_SPLASHWINDOW + VERIFY(m_customizeManager.InitializeSplashWindow(IDB_SPLASHWINDOW)); +#endif // OX_CUSTOMIZE_INSTANCE_MANAGER + + if (CMainFrameWindow::OnCreate(lpCreateStruct) == -1) + return -1; + m_bAutoMenuEnable=FALSE; + + if (!m_wndToolBar.Create(this, + WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC, + AFX_IDW_TOOLBAR) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + m_wndToolBar.IniSizes(CSize(ID_OXCUSTOMIZE_TBIMAGE_WIDTH, + ID_OXCUSTOMIZE_TBIMAGE_HEIGHT)); + m_wndToolBar.UpdateSizes(); + m_wndToolBar.SetWindowText(_T("Toolbar")); + + + static CFont font; + if((HFONT)font!=NULL) + font.DeleteObject(); + font.CreatePointFont(-80,_T("MS Sans Serif")); + + // create custom buttons objects + // + static COXCustomTBSubclassedComboBox m_combo; + int nCBIndexCombo= + COXCoolToolBar::AddCustomButton(&m_combo,ID_CB_COMBO,100,200,OXCBD_SHOWANY,0); + ASSERT(nCBIndexCombo!=-1); + + static CCustomTBExtendedEdit m_edit; + int nCBIndexEdit= + COXCoolToolBar::AddCustomButton(&m_edit,ID_CB_EDIT,100,18,OXCBD_SHOWANY,0); + ASSERT(nCBIndexEdit!=-1); + + static COXCustomTBButtonWnd m_slider; + int nCBIndexSlider= + m_wndToolBarWindow.AddCustomButton(&m_slider,ID_CB_SLIDER,90,21,OXCBD_SHOWANY,0); + ASSERT(nCBIndexSlider!=-1); + +#if _MFC_VER>0x0421 + /////////////////////////////////////////////////////////////////////////// + static COXCustomTBButtonWnd m_datetime; + int nCBIndexDTP= + m_wndToolBarWindow.AddCustomButton(&m_datetime,ID_CB_DTP,80,21,OXCBD_SHOWANY,0); + ASSERT(nCBIndexDTP!=-1); + + + /////////////////////////////////////////////////////////////////////////// +#endif + static COXCustomTBComboBox m_comboEx; + int nCBIndexComboEx= + m_wndToolBarWindow.AddCustomButton(&m_comboEx,ID_CB_COMBOEX,120,200,OXCBD_SHOWANY,0); + ASSERT(nCBIndexComboEx!=-1); + + VERIFY(m_wndToolBar.InsertComboBox(10,nCBIndexCombo)); + m_combo.SetFont(&font); + m_combo.AddString(_T("32.34")); + m_combo.AddString(_T("Only digits!")); + m_combo.AddString(_T("10,200.356")); + m_combo.AddString(_T("1.0")); + + VERIFY(m_wndToolBar.InsertEditBox(12,nCBIndexEdit,_T("EditBox"))); + m_edit.SetFont(&font); + m_edit.SetTextColor(RGB(0,0,255)); + + + if (!m_wndToolBarWindow.Create(this, + WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC, + AFX_IDW_TOOLBAR+10) || !m_wndToolBarWindow.LoadToolBar(IDR_TB_WINDOW)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + m_wndToolBarWindow.IniSizes(CSize(ID_OXCUSTOMIZE_TBIMAGE_WIDTH, + ID_OXCUSTOMIZE_TBIMAGE_HEIGHT)); + m_wndToolBarWindow.UpdateSizes(); + m_wndToolBarWindow.SetWindowText(_T("Window")); + + VERIFY(m_wndToolBarWindow.InsertSlider(1,nCBIndexSlider)); + +#if _MFC_VER>0x0421 + /////////////////////////////////////////////////////////////////////////// + VERIFY(m_wndToolBarWindow.InsertDateTimePicker(2,nCBIndexDTP, + COleDateTime(1999,9,19,0,0,0))); + /////////////////////////////////////////////////////////////////////////// +#endif + VERIFY(m_wndToolBarWindow.InsertComboBox(2,nCBIndexComboEx, WS_CHILD|WS_VISIBLE|CBS_DROPDOWNLIST)); + static CFont fontEx; + if((HFONT)fontEx!=NULL) + font.DeleteObject(); + fontEx.CreatePointFont(100,_T("Courier")); + + m_comboEx.SetFont(&fontEx); + m_comboEx.AddString(_T("Release")); + m_comboEx.AddString(_T("Debug")); + m_comboEx.SetCurSel(0); + 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 + EnableDocking(CBRS_ALIGN_ANY); + + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + m_wndToolBarWindow.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBarWindow); + + // This is a TabView Bar that is added dynamically. You can have almost any + // number of these... + if(!m_tabViewBar.Create(this)) + { + TRACE(_T("CMainFrame::OnCreate: failed to create TabView Bar\n")); + return -1; + } + m_tabViewBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_tabViewBar,AFX_IDW_DOCKBAR_BOTTOM); + + // This is a 3DTabView Bar that is added dynamically. You can have almost any + // number of these... + if(!m_3DTabViewBar.Create(this)) + { + TRACE(_T("CMainFrame::OnCreate: failed to create 3DTabView Bar\n")); + return -1; + } + m_3DTabViewBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_3DTabViewBar,AFX_IDW_DOCKBAR_LEFT); + +#ifdef OX_CUSTOMIZE_COMMANDS + COXBitmapMenuOrganizer* pBMOrganizer=m_customizeManager.GetBMOrganizer(); + ASSERT(pBMOrganizer!=NULL); + pBMOrganizer->ExcludeFromRecentlyUsed(ID_FILE_PRINT_SETUP); + pBMOrganizer->ExcludeFromRecentlyUsed(ID_FILE_OPEN); + pBMOrganizer->ExcludeFromRecentlyUsed(AFX_ID_PREVIEW_ZOOMOUT); + pBMOrganizer->ExcludeFromRecentlyUsed(AFX_ID_PREVIEW_NEXT); +#endif // OX_CUSTOMIZE_COMMANDS + +#ifdef OX_CUSTOMIZE_INSTANCE_MANAGER + VERIFY(m_customizeManager.InitializeInstanceManager()); +#endif // OX_CUSTOMIZE_INSTANCE_MANAGER +#ifdef OX_CUSTOMIZE_TOOLBARS + VERIFY(m_customizeManager.InitializeToolbars()); +#endif // OX_CUSTOMIZE_TOOLBARS +#ifdef OX_CUSTOMIZE_COMMANDS + VERIFY(m_customizeManager.InitializeCommands()); +#endif // OX_CUSTOMIZE_COMMANDS +#ifdef OX_CUSTOMIZE_COOLCONTROLS + VERIFY(m_customizeManager.InitializeCoolControls()); +#endif // OX_CUSTOMIZE_COOLCONTROLS +#ifdef OX_CUSTOMIZE_TRAYICON + VERIFY(m_customizeManager.InitializeTrayIcon(IDR_MAINFRAME, + IDR_MAINFRAME,_T("Tooltip"))); +#endif // OX_CUSTOMIZE_TRAYICON + +#ifdef OX_CUSTOMIZE_INTELLIMOUSE + VERIFY(m_customizeManager.InitializeIntelliMouse()); +#endif // OX_CUSTOMIZE_INTELLIMOUSE + +#ifdef OX_CUSTOMIZE_COOLCONTROLS + m_customizeManager.InitializeCoolControls(); +#endif // OX_CUSTOMIZE_COOLCONTROLS + +#ifndef _MDI_INTERFACE + LoadWorkspace(); +#endif + + m_tabViewBar.RedrawWindow(); + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CMainFrameWindow::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 +{ + CMainFrameWindow::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMainFrameWindow::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::SaveWorkspace() +{ + m_tabViewBar.m_TabViewContainer.SaveState(_T("OutputWindow")); + m_customizeManager.SaveWorkspaceState(); +#ifndef OX_CUSTOMIZE_WORKSPACE_STATE + SaveSizeBarState(_T("SizeBarState")); + // common procedure to save workspace + COXWorkspaceState workspaceState; + workspaceState.IncludeBarProperty(FALSE); + if(!workspaceState.StoreToRegistry()) + { + TRACE(_T("CMainFrame::OnClose : Failed to save workspace to registry, continuing\n)")); + } +#endif // OX_CUSTOMIZE_WORKSPACE_STATE +} + +void CMainFrame::LoadWorkspace() +{ +#ifdef OX_CUSTOMIZE_SHORTKEYS + VERIFY(m_customizeManager.InitializeShortkeys(this)); +#endif // OX_CUSTOMIZE_SHORTKEYS +#ifdef OX_CUSTOMIZE_TABBEDMDI + VERIFY(m_customizeManager.InitializeTabbedMDI()); +#endif // OX_CUSTOMIZE_TABBEDMDI +#ifdef OX_CUSTOMIZE_INTELLIMOUSE + VERIFY(m_customizeManager. + InitializeIntelliMouse(TRUE,WM_LBUTTONDOWN,KEYPRESSED_SHIFT)); +#endif // OX_CUSTOMIZE_INTELLIMOUSE +#ifdef OX_CUSTOMIZE_CAPTION + VERIFY(m_customizeManager.InitializeCaptionPainter()); +#endif // OX_CUSTOMIZE_CAPTION +#ifdef OX_CUSTOMIZE_BACKGROUND + VERIFY(m_customizeManager.InitializeBackgroundPainter(TRUE,TRUE,IDB_BACKGROUND)); +#endif // OX_CUSTOMIZE_BACKGROUND + +#ifdef OX_CUSTOMIZE_WORKSPACE_STATE + m_customizeManager.LoadWorkspaceState(); +#else + LoadSizeBarState(_T("SizeBarState")); + // common procedure to load workspace + COXWorkspaceState workspaceState; + workspaceState.IncludeBarProperty(FALSE); + if(!workspaceState.LoadFromRegistry()) + { + TRACE(_T("CMainFrame::OnClose : Failed to save workspace to registry, continuing\n)")); + } +#endif // OX_CUSTOMIZE_WORKSPACE_STATE + + m_tabViewBar.m_TabViewContainer.LoadState(_T("OutputWindow")); + + m_wndToolBar.UpdateCustomButtons(); + m_wndToolBarWindow.UpdateCustomButtons(); + +#ifdef OX_CUSTOMIZE_SPLASHWINDOW + m_customizeManager.GetSplashWindow()->Hide(); +#endif // OX_CUSTOMIZE_SPLASHWINDOW +} + + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + SaveWorkspace(); + + CMainFrameWindow::OnClose(); +} + +void CMainFrame::OnViewCustomize() +{ + // TODO: Add your command handler code here + +// m_customizeManager.DoModal(); + if(!::IsWindow(m_customizeManager.GetSafeHwnd())) + { + VERIFY(m_customizeManager.Create(COXCustomizeManager::IDD,this)); + } + m_customizeManager.ActivatePage(CAPTION_PAINTER); + m_customizeManager.SetActiveWindow(); + m_customizeManager.ShowWindow(SW_SHOW); +} + + + +void CMainFrame::OnContextMenu(CWnd* pWnd, CPoint point) +{ + // TODO: Add your message handler code here + UNREFERENCED_PARAMETER(pWnd); + + CArray arrToolbars; + POSITION pos=m_listControlBars.GetHeadPosition(); + while(pos!=NULL) + { + CToolBar* pToolbar=DYNAMIC_DOWNCAST(CToolBar, + (CControlBar*)m_listControlBars.GetNext(pos)); + //If it is a CToolBar + if(pToolbar!=NULL && !pToolbar->IsKindOf(RUNTIME_CLASS(COXMenuBar))) + { + arrToolbars.Add(pToolbar); + } + } + + int nToolbarCount=PtrToInt(arrToolbars.GetSize()); + CMenu menu; + VERIFY(menu.CreatePopupMenu()); + + for(int nIndex=0; nIndexGetWindowText(sText); + menu.AppendMenu(MF_STRING|(pToolbar->IsWindowVisible() ? + MF_CHECKED : MF_UNCHECKED),pToolbar->GetDlgCtrlID(),sText); + } + if(nToolbarCount>0) + menu.AppendMenu(MF_SEPARATOR); + menu.AppendMenu(MF_STRING,ID_VIEW_CUSTOMIZE,_T("Customize...")); + + menu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON, + point.x,point.y,this); +} + + +void CMainFrame::OnShowControlBars(UINT nID) +{ + POSITION pos=m_listControlBars.GetHeadPosition(); + while(pos!=NULL) + { + CControlBar* pControlBar=(CControlBar*)m_listControlBars.GetNext(pos); + //If it is a pControlBar + if(pControlBar!=NULL && pControlBar->GetDlgCtrlID()==(int)nID && + !pControlBar->IsKindOf(RUNTIME_CLASS(COXMenuBar))) + { + ShowControlBar(pControlBar,!pControlBar->IsWindowVisible(),FALSE); + break; + } + } +} + +void CMainFrame::OnUpdateCustomButton(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->Enable(TRUE); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.h new file mode 100644 index 0000000..223800f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/MainFrm.h @@ -0,0 +1,112 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__73A06A3D_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__73A06A3D_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXMenuBar.h" +#include "OXFrameWndDock.h" +#include "OXSizeDockBar.h" +#include "OXCustomizeManager.h" + +#include "TabViewBar.h" +#include "3DTabViewBar.h" + +#ifdef _MDI_INTERFACE +#define CMainFrameWindow COXMDIFrameWndSizeDock +#else +#define CMainFrameWindow COXFrameWndSizeDock +#endif + +#include "OXEdit.h" +#include "..\..\..\INCLUDE\OXRegistryItem.h" // Added by ClassView + + +#define ID_CB_EDIT 1000 +#define ID_CB_COMBO 1001 +#define ID_CB_STATIC 1002 +#define ID_CB_BUTTON 1003 +#define ID_CB_CHECKBOX 1004 +#define ID_CB_COMBOEX 1005 +#define ID_CB_IPADDRESS 1006 +#define ID_CB_PROGRESS 1007 +#define ID_CB_SLIDER 1008 +#define ID_CB_DTP 1009 +#define ID_CB_RICHEDIT 1010 +#define ID_CB_HOTKEY 1011 + +class CCustomTBExtendedEdit : public COXCustomTBButtonWnd +{ +public: + virtual COXCustomTBButtonTemplate* CBCreateNewInstance() const; + virtual void CBCopyContents(COXCustomTBButtonTemplate* pCBTemplate) const; +}; + + +////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNCREATE(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + + void LoadWorkspace(); + void SaveWorkspace(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; +// CStandardToolBar m_wndToolBar; + COXCoolToolBar m_wndToolBar; + COXCoolToolBar m_wndToolBarWindow; + + CTabViewBar m_tabViewBar; + C3DTabViewBar m_3DTabViewBar; + + // customize manager + COXCustomizeManager m_customizeManager; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg void OnViewCustomize(); + afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); + //}}AFX_MSG + afx_msg void OnShowControlBars(UINT nID); + afx_msg void OnUpdateCustomButton(CCmdUI* pCmdUI); + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__73A06A3D_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.cpp new file mode 100644 index 0000000..6f67f4d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.cpp @@ -0,0 +1,138 @@ +// StandardToolBar.cpp : implementation file +// + +#include "stdafx.h" +#include "StandardToolBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define IDC_COMBO 1022 +const int nDropHeight=200; + +///////////////////////////////////////////////////////////////////////////// +// CStandardToolBar + +CStandardToolBar::CStandardToolBar() +{ + m_nComboItemIndex=-1; + m_nSavedCurSel=-1; +} + +CStandardToolBar::~CStandardToolBar() +{ +} + + +BEGIN_MESSAGE_MAP(CStandardToolBar, COXCoolToolBar) + //{{AFX_MSG_MAP(CStandardToolBar) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStandardToolBar message handlers + +BOOL CStandardToolBar::CreateCombo(int nItemIndex) +{ + // retrieve button info + GetButtonInfo(nItemIndex,m_nID,m_nStyle,m_nImage); + + // retrieve tooltip + CString sTooltip=GetButtonTooltip(nItemIndex); + + // Create the combo box + SetButtonInfo(nItemIndex,IDC_COMBO,TBBS_SEPARATOR,180); + + // Design guide advises 12 pixel gap between combos and buttons + CRect rect; + GetItemRect(nItemIndex, &rect); + rect.top = 1; + rect.bottom = rect.top + nDropHeight; + if (!m_combo.Create(CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL, + rect, this, IDC_COMBO)) + { + TRACE(_T("Failed to create combo-box\n")); + return FALSE; + } + + static CFont font; + if((HFONT)font!=NULL) + font.DeleteObject(); + font.CreatePointFont(-80,_T("MS Sans Serif")); + m_combo.SetFont(&font); + m_combo.SetTooltipText(sTooltip); + + m_combo.AddString(_T("OnToolTipText")); + m_combo.AddString(_T("::LoadTool")); + m_combo.AddString(_T("ID_VIEW_TOOLBAR")); + m_combo.AddString(_T("class CWnd")); + m_combo.AddString(_T("SetFont")); + m_combo.AddString(_T("class CTabCtrl")); + + m_nComboItemIndex=nItemIndex; + + return TRUE; +} + +static BOOL bChangeDockSideCalledFirstTime=TRUE; +void CStandardToolBar::OnChangeDockSide(DWORD dwDockSide) +{ + COXCoolToolBar::OnChangeDockSide(dwDockSide); + + if(bChangeDockSideCalledFirstTime) + { + bChangeDockSideCalledFirstTime=FALSE; + return; + } + + + if((m_pDockBar == NULL || (GetBarStyle() & CBRS_FLOATING)) || + dwDockSide==CBRS_ALIGN_RIGHT || dwDockSide==CBRS_ALIGN_LEFT) + { + if(::IsWindow(m_combo.GetSafeHwnd())) + { + m_nSavedCurSel=m_combo.GetCurSel(); + m_combo.DestroyWindow(); + SetButtonInfo(m_nComboItemIndex, m_nID, m_nStyle, m_nImage); + } + } + else + { + if(!::IsWindow(m_combo.GetSafeHwnd()) && m_nComboItemIndex!=-1) + { + // CreateCombo function might change the visibility + // of the bar. We have to restore it. + BOOL bIsVisible=IsWindowVisible(); + CreateCombo(m_nComboItemIndex); + m_combo.SetCurSel(m_nSavedCurSel); + if(bIsVisible) + SetWindowPos(NULL, 0, 0, 0, 0, + SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER| + SWP_NOACTIVATE|SWP_SHOWWINDOW); + else + SetWindowPos(NULL, 0, 0, 0, 0, + SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER| + SWP_NOACTIVATE|SWP_HIDEWINDOW); + } + } +} + +static BOOL bFloatingDockingCalledFirstTime=TRUE; +void CStandardToolBar::OnFloatingDocking(BOOL bFloating) +{ + COXCoolToolBar::OnFloatingDocking(bFloating); + if(bFloatingDockingCalledFirstTime) + { + bFloatingDockingCalledFirstTime=FALSE; + return; + } + OnChangeDockSide(GetBarStyle()&CBRS_ALIGN_ANY); + + GetParentFrame()->DelayRecalcLayout(); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.h new file mode 100644 index 0000000..50e8fbe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StandardToolBar.h @@ -0,0 +1,67 @@ +#if !defined(_STANDARDTOOLBAR_H__) +#define _STANDARDTOOLBAR_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// StandardToolBar.h : header file +// + +#include "OXCoolToolBar.h" +#include "OXCoolComboBox.h" +///////////////////////////////////////////////////////////////////////////// +// CStandardToolBar window + +class CStandardToolBar : public COXCoolToolBar +{ +// Construction +public: + CStandardToolBar(); + +// Attributes +public: + +protected: + COXCoolComboBox m_combo; + int m_nSavedCurSel; + int m_nComboItemIndex; + UINT m_nID; + UINT m_nStyle; + int m_nImage; + +// Operations +public: + BOOL CreateCombo(int nItemIndex); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStandardToolBar) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CStandardToolBar(); + +protected: + // function called everytime when toolbar changes its docking side + virtual void OnChangeDockSide(DWORD dwDockSide); + // function called everytime when toolbar changes its state from + // docking to floating and vise versa + virtual void OnFloatingDocking(BOOL bFloating); + + + // Generated message map functions +protected: + //{{AFX_MSG(CStandardToolBar) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_STANDARDTOOLBAR_H__) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.cpp new file mode 100644 index 0000000..5ec7649 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// VisualStudioLikeDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.h new file mode 100644 index 0000000..9f4bbac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/StdAfx.h @@ -0,0 +1,57 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__73A06A3B_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__73A06A3B_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#if _MFC_VER>0x0421 +#include // MFC support for Internet Explorer 4 Common Controls +#endif // _MFC_VER>0x0421 +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +////////////////////////////////////////////////////////////////////////////////////// +// comment out this define if you would like to build SDI application. +// Make sure to delete the following key in the registry before running +// the application with changed architecture (from MDI to SDI, or from SDI to MDI): +// +// HKEY_CURRENT_USER\Software\Ultimate Toolbox Samples\VisualStudioLikeDemo +// +// You have to do that as long as applications settings saved by customize pages +// are not compatible for this interfaces +#define _MDI_INTERFACE +// +////////////////////////////////////////////////////////////////////////////////////// + +#define OX_CUSTOMIZE_TOOLBARS +#define OX_CUSTOMIZE_COMMANDS +#define OX_CUSTOMIZE_SHORTKEYS +#define OX_CUSTOMIZE_WORKSPACE_STATE +#define OX_CUSTOMIZE_INSTANCE_MANAGER +#define OX_CUSTOMIZE_TRAYICON +#define OX_CUSTOMIZE_SPLASHWINDOW +#ifdef _MDI_INTERFACE +#define OX_CUSTOMIZE_TABBEDMDI +#endif +#define OX_CUSTOMIZE_BACKGROUND +#define OX_CUSTOMIZE_COOLCONTROLS + +#include "OXAdvancedAssert.h" + +#include +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__73A06A3B_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.cpp new file mode 100644 index 0000000..a285d5d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.cpp @@ -0,0 +1,154 @@ +// TabViewBar.cpp : implementation file +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" +#include "TabViewBar.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewBar +// + +IMPLEMENT_DYNAMIC(CTabViewBar, COXSizeControlBar); + +CTabViewBar::CTabViewBar() + : COXSizeControlBar( + SZBARF_STDMOUSECLICKS|SZBARF_ALLOW_MDI_FLOAT|SZBARF_SOLIDGRIPPER) +{ +} + +CTabViewBar::~CTabViewBar() +{ +} + + + +BEGIN_MESSAGE_MAP(CTabViewBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CTabViewBar) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CTabViewBar message handlers + + +//------------------------------------------------------------------- +void CTabViewBar::OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags) +// respond to this event as we need to override it +//------------------------------------------------------------------- +{ + UNREFERENCED_PARAMETER(bFloating); + UNREFERENCED_PARAMETER(flags); + UNREFERENCED_PARAMETER(cx); + UNREFERENCED_PARAMETER(cy); + + CRect rect; + GetClientRect(rect); + + m_TabViewContainer.MoveWindow(&rect); +} + + +//------------------------------------------------------------------- +int CTabViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +//------------------------------------------------------------------- +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + CRect rect; + GetClientRect(&rect); + + if(!m_TabViewContainer.Create(this,rect)) + return -1; + + // build page + if(!m_build.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,1)) + return -1; + m_TabViewContainer.AddPage(&m_build,_T("Build")); + + m_build.AddLine(_T("Generating Code...")); + m_build.AddLine(_T("Linking...")); + m_build.AddLine(_T("")); + m_build.SetTextColor(RGB(255,0,0)); + m_build.AddLine(_T("VisualStudioLikeDemo.exe - 0 error(s), 0 warning(s)")); + + // debug page + if(!m_debug.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,2)) + return -1; + m_TabViewContainer.AddPage(&m_debug,_T("Debug")); + m_debug.AddLine(_T("Loaded symbols for 'D:\\Ultimate ToolBox\\Samples\\gui\\VisualStudioLikeDemo\\Debug\\VisualStudioLikeDemo.exe'")); + m_debug.AddLine(_T("Loaded 'F:\\WINNT\\system32\\NTDLL.DLL', no matching symbolic information found.")); + m_debug.AddLine(_T("Loaded symbols for 'F:\\WINNT\\system32\\MFC42D.DLL'")); + m_debug.AddLine(_T("Loaded symbols for 'F:\\WINNT\\system32\\MSVCRTD.DLL'")); + m_debug.AddLine(_T("Loaded 'F:\\WINNT\\system32\\KERNEL32.DLL', no matching symbolic information found.")); + m_debug.AddLine(_T("Loaded 'F:\\WINNT\\system32\\riched32.dll', no matching symbolic information found.")); + m_debug.AddLine(_T("Loaded symbols for 'F:\\WINNT\\system32\\MFCO42D.DLL'")); + m_debug.AddLine(_T("Loaded 'F:\\WINNT\\system32\\USER32.DLL', no matching symbolic information found.")); + m_debug.AddLine(_T("The thread 0xB1 has exited with code 0 (0x0).")); + m_debug.AddLine(_T("The program 'D:\\Ultimate ToolBox\\Samples\\gui\\VisualStudioLikeDemo\\Debug\\VisualStudioLikeDemo.exe' has exited with code 0 (0x0).")); + + // Find In Files 1 page + if(!m_find1.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,3)) + return -1; + m_TabViewContainer.AddPage(&m_find1,_T("Find In Files 1")); + m_find1.AddLine(_T("Searching for 'class CWnd'...")); + m_find1.AddLine(_T("F:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFXCMN.H(680): friend class CWnd;")); + m_find1.AddLine(_T("F:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFXSTAT_.H(169):class CWnd;")); + m_find1.AddLine(_T("F:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFXWIN.H(86): class CWnd; // a window / HWND wrapper")); + m_find1.AddLine(_T("F:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFXWIN.H(1899):class CWnd : public CCmdTarget")); + m_find1.AddLine(_T("F:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFXWIN.H(3273): friend class CWnd; // for access to m_bModalDisable")); + m_find1.AddLine(_T("5 occurrence(s) have been found.")); + + // Find In Files 2 page + if(!m_find2.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,4)) + return -1; + m_TabViewContainer.AddPage(&m_find2,_T("Find In Files 2")); + + // results page + if(!m_results.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,5)) + return -1; + m_TabViewContainer.AddPage(&m_results,_T("Results")); + + // SQL Debugging page + if(!m_SQLdebug.Create(NULL,NULL,WS_CHILD,CRect(0,0,0,0), + &m_TabViewContainer,6)) + return -1; + m_TabViewContainer.AddPage(&m_SQLdebug,_T("SQL Debugging")); + + m_TabViewContainer.SetActivePageIndex(0); + + return 0; +} + + +BOOL CTabViewBar::Create(CWnd * pParentWnd, + const CString& sTitle/*=_T("TabViewBar")*/, + const UINT nID/*=ID_TABVIEWBAR*/) +{ + // register a window class for the control bar + static CString strWndClass; + if (strWndClass.IsEmpty()) + { + strWndClass = AfxRegisterWndClass(CS_DBLCLKS); + } + + return COXSizeControlBar::Create(strWndClass, sTitle, + WS_VISIBLE|WS_CHILD|CBRS_BOTTOM|WS_CLIPCHILDREN, + CFrameWnd::rectDefault, pParentWnd, nID); +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.h new file mode 100644 index 0000000..f372728 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/TabViewBar.h @@ -0,0 +1,48 @@ +#include "OXSizeCtrlBar.h" +#include "OXTabView.h" +#include "OXHistoryCtrl.h" + + +class CTabViewBar : public COXSizeControlBar +{ + DECLARE_DYNAMIC(CTabViewBar); +// Construction +public: + CTabViewBar(); + + BOOL Create(CWnd * pParentWnd, const CString& sTitle=_T("TabView"), + const UINT nID=ID_TABVIEWBAR); + +// Attributes +public: + COXTabViewContainer m_TabViewContainer; + +protected: + COXTabViewPage m_build; + COXTabViewPage m_debug; + COXTabViewPage m_find1; + COXTabViewPage m_find2; + COXTabViewPage m_results; + COXTabViewPage m_SQLdebug; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewBar) + //}}AFX_VIRTUAL +protected: + virtual void OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags); + +// Implementation +public: + virtual ~CTabViewBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CTabViewBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.cpp new file mode 100644 index 0000000..467fdb8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.cpp @@ -0,0 +1,257 @@ +// VisualStudioLikeDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "VisualStudioLikeDemoDoc.h" +#include "VisualStudioLikeDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoApp + +BEGIN_MESSAGE_MAP(CVisualStudioLikeDemoApp, CWinApp) + //{{AFX_MSG_MAP(CVisualStudioLikeDemoApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoApp construction + +CVisualStudioLikeDemoApp::CVisualStudioLikeDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CVisualStudioLikeDemoApp object + +CVisualStudioLikeDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; +COXRegistryItem g_Registry; + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoApp initialization + +BOOL CVisualStudioLikeDemoApp::InitInstance() +{ + + g_Registry.SetFullRegistryItem( + _T("\\CurrentUser\\Software\\Ultimate Toolbox Samples\\VisualStudioLikeDemo\\")); + CString sVersion=g_Registry.GetStringValue(_T("Version")); + if (sVersion!=_T("1.1")) + { + while (TRUE) + { + CString sSubKey=g_Registry.EnumerateSubkey(0); + if (!sSubKey.IsEmpty()) + { + sSubKey=_T("\\CurrentUser\\Software\\Ultimate Toolbox Samples\\VisualStudioLikeDemo\\") + sSubKey +_T("\\"); + COXRegistryItem reg; + reg.SetFullRegistryItem((LPCTSTR) sSubKey); + reg.Delete(); + } + else + break; + } + g_Registry.Delete(); + } + + g_Registry.Close(); + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Initialize OLE libraries + if(!AfxOleInit()) + { + TRACE(_T("CVisualStudioLikeDemoApp::InitInstance: failed to initialize OLE libraries\n")); + return FALSE; + } + + + AfxEnableControlContainer(); + + // 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("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); // 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. + +#ifdef _MDI_INTERFACE + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate( + IDR_VISUALTYPE, + RUNTIME_CLASS(CVisualStudioLikeDemoDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CVisualStudioLikeDemoView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; +#else + AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME, + RUNTIME_CLASS(CVisualStudioLikeDemoDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CVisualStudioLikeDemoView))); +#endif + + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); +#ifdef _MDI_INTERFACE + if(cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew) + cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing; +#endif + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + +#ifdef _MDI_INTERFACE + // The main window has been initialized, so show and update it. + ((CMainFrame*)m_pMainWnd)->LoadWorkspace(); + ((CMainFrame*)m_pMainWnd)->ShowWindow(m_nCmdShow); + ((CMainFrame*)m_pMainWnd)->UpdateWindow(); +#endif + + return TRUE; +} + + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +#include "OXFontComboBox.h" + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CVisualStudioLikeDemoApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoApp message handlers + + + +BOOL CAboutDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CAboutDlg::OnOK() +{ + // TODO: Add extra validation here + + CDialog::OnOK(); +} + + +int CVisualStudioLikeDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + g_Registry.SetFullRegistryItem( + _T("CurrentUser\\Software\\Ultimate Toolbox Samples\\VisualStudioLikeDemo\\")); + g_Registry.SetStringValue(_T("1.1"),_T("Version")); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsp new file mode 100644 index 0000000..978ad16 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsp @@ -0,0 +1,868 @@ +# Microsoft Developer Studio Project File - Name="VisualStudioLikeDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=VisualStudioLikeDemo - Win32 Debug_Unicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "VisualStudioLikeDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "VisualStudioLikeDemo.mak" CFG="VisualStudioLikeDemo - Win32 Debug_Unicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "VisualStudioLikeDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "VisualStudioLikeDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "VisualStudioLikeDemo - Win32 Debug_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "VisualStudioLikeDemo - Win32 Release_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "VisualStudioLikeDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "VisualStudioLikeDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"VisualStudioLikeDemo.exe" + +!ELSEIF "$(CFG)" == "VisualStudioLikeDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"VisualStudioLikeDemo.exe" +# SUBTRACT LINK32 /profile /map + +!ELSEIF "$(CFG)" == "VisualStudioLikeDemo - Win32 Debug_Unicode" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "VisualStudioLikeDemo___Win32_Debug_Unicode" +# PROP BASE Intermediate_Dir "VisualStudioLikeDemo___Win32_Debug_Unicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Unicode" +# PROP Intermediate_Dir "Debug_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "UNICODE" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"VisualStudioLikeDemo.exe" +# SUBTRACT BASE LINK32 /profile /map +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"VisualStudioLikeDemo.exe" +# SUBTRACT LINK32 /profile /map + +!ELSEIF "$(CFG)" == "VisualStudioLikeDemo - Win32 Release_Unicode" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "VisualStudioLikeDemo___Win32_Release_Unicode" +# PROP BASE Intermediate_Dir "VisualStudioLikeDemo___Win32_Release_Unicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Unicode" +# PROP Intermediate_Dir "Release_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /Zd /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "UNICODE" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"VisualStudioLikeDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"VisualStudioLikeDemo.exe" + +!ELSEIF "$(CFG)" == "VisualStudioLikeDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "VisualStudioLikeDemo___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "VisualStudioLikeDemo___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"VisualStudioLikeDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"VisualStudioLikeDemo.exe" + +!ENDIF + +# Begin Target + +# Name "VisualStudioLikeDemo - Win32 Release" +# Name "VisualStudioLikeDemo - Win32 Debug" +# Name "VisualStudioLikeDemo - Win32 Debug_Unicode" +# Name "VisualStudioLikeDemo - Win32 Release_Unicode" +# Name "VisualStudioLikeDemo - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Source\COPYTREE.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\DIR.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\DSTRLIST.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\FILE.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBackgroundPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBMPFilePickerCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolControlOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeBackgroundPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeCaptionPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeCoolControlsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCustomizeIntelliMousePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeSplashWindowPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeTrayIconPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXIntelliMouse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIteratorRegistryItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMultiComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPreviewDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScrollWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeDlgBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWndDIB.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Path.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\XSTRING.CPP +# End Source File +# End Group +# Begin Group "CustomizeManagerFramework" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXButtonAppearanceDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXChildFrameState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeCommandsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeInstanceManagerPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeShortkeysPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeTabbedMDIPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeToolbarsPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCustomizeWorkspaceStatePage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDocTemplateSpy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDragDropCommands.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXImageListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXInstanceManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXListBoxEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXOptionTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShortkeysOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterColRowState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWorkspaceState.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\3DTabViewBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TabViewBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemoDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemoView.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\3DTabViewBar.h +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OX3DTabView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBackgroundPainter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBaseSubclassedComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenuOrganizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXButtonAppearanceDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCaptionPainter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeBackgroundPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeCaptionPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeCommandsPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeInstanceManagerPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizePage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeShortkeysPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeSplashWindowPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeToolbarsPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeTrayIconPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCustomizeWorkspaceStatePage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDragDropCommands.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFontPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFrameWndDock.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHistoryCombo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHistoryCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXImageListBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXIteratorRegistryItem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMenuBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryItem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryItem.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXScrollWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShortcutBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShortkeysOrganizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSizeCtrlBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSizeDockBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXSkins.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSplashWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSplitterRect.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXSzMiniDockFrmWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTabClientWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTabView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTaskbarIcon.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTaskbarIcon.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXWorkspaceState.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewBar.h +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemo.h +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemoDoc.h +# End Source File +# Begin Source File + +SOURCE=.\VisualStudioLikeDemoView.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\coolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\il_3dtab.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\il_class.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\il_filev.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Logo.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\tb_window.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\VisualStudioLikeDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\VisualStudioLikeDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\VisualStudioLikeDemoDoc.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsw new file mode 100644 index 0000000..62a9322 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "VisualStudioLikeDemo"=".\VisualStudioLikeDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.exe.manifest new file mode 100644 index 0000000..1e18977 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.h new file mode 100644 index 0000000..7659ba3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.h @@ -0,0 +1,51 @@ +// VisualStudioLikeDemo.h : main header file for the VISUALSTUDIOLIKEDEMO application +// + +#if !defined(AFX_VISUALSTUDIOLIKEDEMO_H__73A06A39_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_VISUALSTUDIOLIKEDEMO_H__73A06A39_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols +#include "OXSkins.h" + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoApp: +// See VisualStudioLikeDemo.cpp for the implementation of this class +// + +class CVisualStudioLikeDemoApp : public CWinApp +{ +public: + CVisualStudioLikeDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CVisualStudioLikeDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CVisualStudioLikeDemoApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_VISUALSTUDIOLIKEDEMO_H__73A06A39_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.rc new file mode 100644 index 0000000..030b676 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.rc @@ -0,0 +1,510 @@ +//Microsoft Developer Studio 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 MOVEABLE PURE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE MOVEABLE PURE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\VisualStudioLikeDemo.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" + "#include ""OXMain.rc""\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 DISCARDABLE "res\\VisualStudioLikeDemo.ico" +IDR_VISUALTYPE ICON DISCARDABLE "res\\VisualStudioLikeDemoDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDB_IL_3DTABVIEW BITMAP MOVEABLE PURE "res\\il_3dtab.bmp" +IDB_IL_CLASSVIEW BITMAP MOVEABLE PURE "res\\il_class.bmp" +IDB_IL_RESOURCEVIEW BITMAP MOVEABLE PURE "res\\bmp00001.bmp" +IDB_IL_FILEVIEW BITMAP MOVEABLE PURE "res\\il_filev.bmp" +IDB_BACKGROUND BITMAP MOVEABLE PURE "res\\coolbar.bmp" +IDR_TB_WINDOW BITMAP MOVEABLE PURE "res\\tb_window.bmp" +IDB_SPLASHWINDOW BITMAP MOVEABLE PURE "res\\Logo.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR MOVEABLE PURE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_SAVE + SEPARATOR + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + SEPARATOR + BUTTON ID_EDIT_UNDO + BUTTON ID_EDIT_REDO + SEPARATOR + BUTTON ID_VIEW_WORKSPACE + BUTTON ID_VIEW_OUTPUT + SEPARATOR + BUTTON ID_EDIT_FIND_IN_FILES + BUTTON ID_EDIT_FIND + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TB_WINDOW TOOLBAR MOVEABLE PURE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU DISCARDABLE +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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Output", ID_VIEW_OUTPUT + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END + POPUP "&Help" + BEGIN + MENUITEM "&About VisualStudioLikeDemo...", ID_APP_ABOUT + END +END + +IDR_VISUALTYPE MENU DISCARDABLE +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 + POPUP "Popup submenu1" + BEGIN + MENUITEM "item1", AFX_ID_PREVIEW_NEXT + POPUP "Popup submenu3" + BEGIN + MENUITEM "item2", AFX_ID_PREVIEW_ZOOMOUT + + END + END + POPUP "Popup submenu2" + BEGIN + MENUITEM "item3", AFX_ID_PREVIEW_NUMPAGE + END + 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 "V&iew" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Output", ID_VIEW_OUTPUT + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + 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 VisualStudioLikeDemo...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F11, ID_VIEW_FULL_SCREEN, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + +IDR_VISUALTYPE ACCELERATORS MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F11, ID_VIEW_FULL_SCREEN, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 257, 41 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About VisualStudioLikeDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,7,7,21,20 + LTEXT "VisualStudioLikeDemo Version 1.0",IDC_STATIC,41,7,109,8, + SS_NOPREFIX + LTEXT "Copyright (C) 1999",IDC_STATIC,41,18,59,8 + DEFPUSHBUTTON "OK",IDOK,200,7,50,14,WS_GROUP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "VisualStudioLikeDemo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "VisualStudioLikeDemo\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "OriginalFilename", "VisualStudioLikeDemo.EXE\0" + VALUE "ProductName", "VisualStudioLikeDemo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO MOVEABLE PURE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 250 + TOPMARGIN, 7 + BOTTOMMARGIN, 34 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "VisualStudioLikeDemo" + IDR_VISUALTYPE "\nVisual\nVisual\n\n\nVisualStudioLikeDemo.Document\nVisual Document" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "VisualStudioLikeDemo" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_FILE_SAVE_ALL "Save all open documents\nSave All" + ID_EDIT_FIND_IN_FILES "Find the specified text in files\nFind in Files" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_OUTPUT "Shows or hides the Output window\nOutput" + ID_VIEW_WORKSPACE "Shows or hides Workspace window\nWorkspace" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\VisualStudioLikeDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXMain.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.sln new file mode 100644 index 0000000..49fd296 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VisualStudioLikeDemo", "VisualStudioLikeDemo.vcproj", "{6BB8AD0A-8A15-4401-B3B6-0832786A25CB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Unicode|Win32 = Debug_Unicode|Win32 + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release_Unicode|Win32 = Release_Unicode|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Debug|Win32.Build.0 = Debug|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release|Win32.ActiveCfg = Release|Win32 + {6BB8AD0A-8A15-4401-B3B6-0832786A25CB}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.vcproj new file mode 100644 index 0000000..97896a7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemo.vcproj @@ -0,0 +1,5539 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.cpp new file mode 100644 index 0000000..8a0ee2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.cpp @@ -0,0 +1,78 @@ +// VisualStudioLikeDemoDoc.cpp : implementation of the CVisualStudioLikeDemoDoc class +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" + +#include "VisualStudioLikeDemoDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoDoc + +IMPLEMENT_DYNCREATE(CVisualStudioLikeDemoDoc, CDocument) + +BEGIN_MESSAGE_MAP(CVisualStudioLikeDemoDoc, CDocument) + //{{AFX_MSG_MAP(CVisualStudioLikeDemoDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoDoc construction/destruction + +CVisualStudioLikeDemoDoc::CVisualStudioLikeDemoDoc() +{ + // TODO: add one-time construction code here + +} + +CVisualStudioLikeDemoDoc::~CVisualStudioLikeDemoDoc() +{ +} + +BOOL CVisualStudioLikeDemoDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoDoc serialization + +void CVisualStudioLikeDemoDoc::Serialize(CArchive& ar) +{ + // CEditView contains an edit control which handles all serialization + ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoDoc diagnostics + +#ifdef _DEBUG +void CVisualStudioLikeDemoDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CVisualStudioLikeDemoDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.h new file mode 100644 index 0000000..0301b4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoDoc.h @@ -0,0 +1,57 @@ +// VisualStudioLikeDemoDoc.h : interface of the CVisualStudioLikeDemoDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_VISUALSTUDIOLIKEDEMODOC_H__73A06A41_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_VISUALSTUDIOLIKEDEMODOC_H__73A06A41_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CVisualStudioLikeDemoDoc : public CDocument +{ +protected: // create from serialization only + CVisualStudioLikeDemoDoc(); + DECLARE_DYNCREATE(CVisualStudioLikeDemoDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CVisualStudioLikeDemoDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CVisualStudioLikeDemoDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CVisualStudioLikeDemoDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_VISUALSTUDIOLIKEDEMODOC_H__73A06A41_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.cpp new file mode 100644 index 0000000..244ebfb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.cpp @@ -0,0 +1,122 @@ +// VisualStudioLikeDemoView.cpp : implementation of the CVisualStudioLikeDemoView class +// + +#include "stdafx.h" +#include "VisualStudioLikeDemo.h" + +#include "VisualStudioLikeDemoDoc.h" +#include "VisualStudioLikeDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView + +IMPLEMENT_DYNCREATE(CVisualStudioLikeDemoView, CEditView) + +BEGIN_MESSAGE_MAP(CVisualStudioLikeDemoView, CEditView) + //{{AFX_MSG_MAP(CVisualStudioLikeDemoView) + ON_UPDATE_COMMAND_UI(ID_EDIT_FIND, OnUpdateEditFind) + ON_UPDATE_COMMAND_UI(ID_EDIT_FIND_IN_FILES, OnUpdateEditFindInFiles) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView construction/destruction + +CVisualStudioLikeDemoView::CVisualStudioLikeDemoView() +{ + // TODO: add construction code here + +} + +CVisualStudioLikeDemoView::~CVisualStudioLikeDemoView() +{ +} + +BOOL CVisualStudioLikeDemoView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping + + return bPreCreated; +} + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView drawing + +void CVisualStudioLikeDemoView::OnDraw(CDC* pDC) +{ + CVisualStudioLikeDemoDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView printing + +BOOL CVisualStudioLikeDemoView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default CEditView preparation + return CEditView::OnPreparePrinting(pInfo); +} + +void CVisualStudioLikeDemoView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView begin printing. + CEditView::OnBeginPrinting(pDC, pInfo); +} + +void CVisualStudioLikeDemoView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView end printing + CEditView::OnEndPrinting(pDC, pInfo); +} + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView diagnostics + +#ifdef _DEBUG +void CVisualStudioLikeDemoView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CVisualStudioLikeDemoView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CVisualStudioLikeDemoDoc* CVisualStudioLikeDemoView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVisualStudioLikeDemoDoc))); + return (CVisualStudioLikeDemoDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CVisualStudioLikeDemoView message handlers + +void CVisualStudioLikeDemoView::OnUpdateEditFind(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->Enable(TRUE); +} + +void CVisualStudioLikeDemoView::OnUpdateEditFindInFiles(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->Enable(TRUE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.h new file mode 100644 index 0000000..8e14433 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/VisualStudioLikeDemoView.h @@ -0,0 +1,67 @@ +// VisualStudioLikeDemoView.h : interface of the CVisualStudioLikeDemoView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_VISUALSTUDIOLIKEDEMOVIEW_H__73A06A43_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) +#define AFX_VISUALSTUDIOLIKEDEMOVIEW_H__73A06A43_E209_11D2_A7ED_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CVisualStudioLikeDemoView : public CEditView +{ +protected: // create from serialization only + CVisualStudioLikeDemoView(); + DECLARE_DYNCREATE(CVisualStudioLikeDemoView) + +// Attributes +public: + CVisualStudioLikeDemoDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CVisualStudioLikeDemoView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CVisualStudioLikeDemoView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CVisualStudioLikeDemoView) + afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI); + afx_msg void OnUpdateEditFindInFiles(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in VisualStudioLikeDemoView.cpp +inline CVisualStudioLikeDemoDoc* CVisualStudioLikeDemoView::GetDocument() + { return (CVisualStudioLikeDemoDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_VISUALSTUDIOLIKEDEMOVIEW_H__73A06A43_E209_11D2_A7ED_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Logo.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Logo.bmp new file mode 100644 index 0000000..ae61087 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Logo.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Toolbar.bmp new file mode 100644 index 0000000..b034401 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc new file mode 100644 index 0000000..b179372 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc @@ -0,0 +1,559 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\VisualStudioLikeDemo.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" + "#include ""OxDockCtrlBars.rc""\r\n" + "#include ""OXOptionTreeCtrl.rc""\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXIntelliMouse.rc"" \r\n" + "#include ""OXListBoxEx.rc""\r\n" + "#include ""OXCustomizeManager.rc""\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 DISCARDABLE "res\\VisualStudioLikeDemo.ico" +IDR_VISUALTYPE ICON DISCARDABLE "res\\VisualStudioLikeDemoDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDB_IL_3DTABVIEW BITMAP DISCARDABLE "res\\il_3dtab.bmp" +IDB_IL_CLASSVIEW BITMAP DISCARDABLE "res\\il_class.bmp" +IDB_IL_RESOURCEVIEW BITMAP DISCARDABLE "res\\bmp00001.bmp" +IDB_IL_FILEVIEW BITMAP DISCARDABLE "res\\il_filev.bmp" +IDB_BACKGROUND BITMAP DISCARDABLE "res\\coolbar.bmp" +IDR_TB_WINDOW BITMAP MOVEABLE PURE "res\\tb_window.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_SAVE + SEPARATOR + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + SEPARATOR + BUTTON ID_EDIT_UNDO + BUTTON ID_EDIT_REDO + SEPARATOR + BUTTON ID_VIEW_WORKSPACE + BUTTON ID_VIEW_OUTPUT + SEPARATOR + BUTTON ID_EDIT_FIND_IN_FILES + BUTTON ID_EDIT_FIND + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_FILE_PRINT_PREVIEW + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TB_WINDOW TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Output", ID_VIEW_OUTPUT + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Full screen\tF11", ID_VIEW_FULL_SCREEN + END + POPUP "&Help" + BEGIN + MENUITEM "&About VisualStudioLikeDemo...", ID_APP_ABOUT + END +END + +IDR_VISUALTYPE MENU PRELOAD DISCARDABLE +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 + POPUP "Popup submenu1" + BEGIN + MENUITEM "item1", AFX_ID_PREVIEW_NEXT + POPUP "Popup submenu3" + BEGIN + MENUITEM "item2", AFX_ID_PREVIEW_ZOOMOUT + + END + END + POPUP "Popup submenu2" + BEGIN + MENUITEM "item3", AFX_ID_PREVIEW_NUMPAGE + END + 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 "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Workspace", ID_VIEW_WORKSPACE + MENUITEM "&Output", ID_VIEW_OUTPUT + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "F&ull screen\tF11", ID_VIEW_FULL_SCREEN + 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 VisualStudioLikeDemo...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F11, ID_VIEW_FULL_SCREEN, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + +IDR_VISUALTYPE ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F11, ID_VIEW_FULL_SCREEN, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 257, 90 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About VisualStudioLikeDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,7,7,21,20 + LTEXT "VisualStudioLikeDemo Version 1.0",IDC_STATIC,41,7,109,8, + SS_NOPREFIX + LTEXT "Copyright (C) 1999",IDC_STATIC,41,18,59,8 + DEFPUSHBUTTON "OK",IDOK,200,7,50,14,WS_GROUP + CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER, + 7,36,80,14 + CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,102,35,100,15 + CONTROL "HotKey2",IDC_HOTKEY2,"msctls_hotkey32",WS_BORDER | + WS_TABSTOP,7,54,80,14 + CONTROL "DateTimePicker1",IDC_DATETIMEPICKER1,"SysDateTimePick32", + DTS_RIGHTALIGN | WS_TABSTOP,99,53,100,15 + CONTROL "",IDC_COMBOBOXEX2,"ComboBoxEx32",CBS_DROPDOWN | + CBS_SORT | WS_VSCROLL | WS_TABSTOP,202,43,48,30 + CONTROL "IPAddress2",IDC_IPADDRESS2,"SysIPAddress32",WS_TABSTOP, + 87,68,100,15 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "VisualStudioLikeDemo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "VisualStudioLikeDemo\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "VisualStudioLikeDemo.EXE\0" + VALUE "ProductName", "VisualStudioLikeDemo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 250 + TOPMARGIN, 7 + BOTTOMMARGIN, 83 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "VisualStudioLikeDemo" + IDR_VISUALTYPE "\nVisual\nVisual\n\n\nVisualStudioLikeDemo.Document\nVisual Document" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "VisualStudioLikeDemo" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_FILE_SAVE_ALL "Save all open documents\nSave All" + ID_EDIT_FIND_IN_FILES "Find the specified text in files\nFind in Files" + ID_VIEW_FULL_SCREEN "Toggle Full Screen View" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_OUTPUT "Shows or hides the Output window\nOutput" + ID_VIEW_WORKSPACE "Shows or hides Workspace window\nWorkspace" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_SPLASHWINDOW BITMAP DISCARDABLE "res\\Logo.bmp" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\VisualStudioLikeDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OxDockCtrlBars.rc" +#include "OXOptionTreeCtrl.rc" +#include "OXHistoryCombo.rc" +#include "OXBitmapButton.rc" +#include "OXIntelliMouse.rc" +#include "OXListBoxEx.rc" +#include "OXCustomizeManager.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc2 new file mode 100644 index 0000000..da593a3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemo.rc2 @@ -0,0 +1,13 @@ +// +// VISUALSTUDIOLIKEDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemoDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemoDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/VisualStudioLikeDemoDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/bmp00001.bmp new file mode 100644 index 0000000..090bf49 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/coolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/coolbar.bmp new file mode 100644 index 0000000..5645461 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/coolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico1.ico new file mode 100644 index 0000000..d48806b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico2.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico2.ico new file mode 100644 index 0000000..20e66a3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico2.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico3.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico3.ico new file mode 100644 index 0000000..97031b0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico3.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico4.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico4.ico new file mode 100644 index 0000000..a7dc202 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico4.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico5.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico5.ico new file mode 100644 index 0000000..93124f2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico5.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico6.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico6.ico new file mode 100644 index 0000000..06c58de Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/ico6.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_3dtab.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_3dtab.bmp new file mode 100644 index 0000000..2bab0a1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_3dtab.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_class.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_class.bmp new file mode 100644 index 0000000..2f0bce1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_class.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_filev.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_filev.bmp new file mode 100644 index 0000000..77b51df Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/il_filev.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/tb_window.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/tb_window.bmp new file mode 100644 index 0000000..5103bf1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/tb_window.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/toolbar1.bmp new file mode 100644 index 0000000..d16af5d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/resource.h new file mode 100644 index 0000000..c94dcff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/advanced/VisualStudioLikeDemo/resource.h @@ -0,0 +1,40 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by VisualStudioLikeDemo.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_VISUALTYPE 129 +#define IDR_TB_WINDOW 129 +#define IDB_IL_3DTABVIEW 130 +#define IDB_IL_CLASSVIEW 131 +#define IDB_IL_RESOURCEVIEW 132 +#define IDB_IL_FILEVIEW 133 +#define IDB_BACKGROUND 148 +#define IDB_SPLASHWINDOW 155 +#define IDC_PROGRESS1 1170 +#define IDC_SLIDER1 1171 +#define IDC_HOTKEY2 1172 +#define IDC_DATETIMEPICKER1 1173 +#define IDC_COMBOBOXEX2 1174 +#define IDC_IPADDRESS2 1175 +#define ID_FILE_SAVE_ALL 32771 +#define ID_EDIT_FIND_IN_FILES 32780 +#define ID_VIEW_CUSTOMIZE 32781 +#define ID_VIEW_FULL_SCREEN 32782 +#define ID_VIEW_OUTPUT 0xe882 +#define ID_TABVIEWBAR 0xe882 +#define ID_VIEW_WORKSPACE 0xe883 +#define ID_3DTABVIEWBAR 0xe883 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 161 +#define _APS_NEXT_COMMAND_VALUE 32784 +#define _APS_NEXT_CONTROL_VALUE 1176 +#define _APS_NEXT_SYMED_VALUE 103 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgidemo.htm b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgidemo.htm new file mode 100644 index 0000000..cf53cc3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgidemo.htm @@ -0,0 +1,64 @@ + + + + + +Check this out ... + + + + +

Test our CGI script class

+ +
+

+Subject : New CStatusBar Class: +

+Description : Incredible but true: +

+FileName : c:\statbar.zip: +

+

+


+

+ +

+

+Pushing this button will return you the information a CGI script can access +through some public functions that use environment variables.

+
+ +
+ + + + + +
+ + + + + + + + +Give us your Name : +

+When you entered your Name, hit this button: + + + + + + + + + + +

+ +

+ + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsp new file mode 100644 index 0000000..c2b7941 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsp @@ -0,0 +1,215 @@ +# Microsoft Developer Studio Project File - Name="cgiscrpt" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cgiscrpt - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cgiscrpt.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cgiscrpt.mak" CFG="cgiscrpt - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cgiscrpt - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cgiscrpt - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "cgiscrpt - Win32 Release_Shared" (based on "Win32 (x86) Console Application") +!MESSAGE "cgiscrpt - Win32 Unicode_Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "cgiscrpt - Win32 Unicode_Release" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cgiscrpt - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"cgiscrpt.exe" + +!ELSEIF "$(CFG)" == "cgiscrpt - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"cgiscrpt.exe" + +!ELSEIF "$(CFG)" == "cgiscrpt - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "cgiscrpt" +# PROP BASE Intermediate_Dir "cgiscrpt" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /out:"cgiscrpt.exe" +# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"cgiscrpt.exe" + +!ELSEIF "$(CFG)" == "cgiscrpt - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "cgiscrp0" +# PROP BASE Intermediate_Dir "cgiscrp0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"cgiscrpt.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:console /debug /machine:I386 /out:"cgiscrpt.exe" + +!ELSEIF "$(CFG)" == "cgiscrpt - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "cgiscrp1" +# PROP BASE Intermediate_Dir "cgiscrp1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "NOAUTOLIB" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /out:"cgiscrpt.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:console /machine:I386 /out:"cgiscrpt.exe" + +!ENDIF + +# Begin Target + +# Name "cgiscrpt - Win32 Release" +# Name "cgiscrpt - Win32 Debug" +# Name "cgiscrpt - Win32 Release_Shared" +# Name "cgiscrpt - Win32 Unicode_Debug" +# Name "cgiscrpt - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScript.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\helloscp.CPP +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\helloscp.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\..\Include\OXScript.h +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsw new file mode 100644 index 0000000..0c9284e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cgiscrpt"=".\cgiscrpt.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.vcproj new file mode 100644 index 0000000..6d045df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/cgiscrpt.vcproj @@ -0,0 +1,684 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.CPP new file mode 100644 index 0000000..6bd6e90 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.CPP @@ -0,0 +1,183 @@ +// ========================================================================== +// Class Implementation : CHelloScript +// ========================================================================== + +// Source file : helloscp.cpp + +// Source : Dundas Software +// +// This sample implements a simple write back script. This type of script +// requires that the onGet and onPost functions be defined. These are the +// only functions that needed to be defined for this script. +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "helloscp.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +CWinApp theApp; // dummy app + + + +CHelloScript::CHelloScript() + { + } + + +CHelloScript::~CHelloScript() + { + } + +// This function is only so that you will see something when you debug +// this demo from within DevStudio or on a command line. +void CHelloScript::OnRunCommandLine(int argc, char** argv) + { + + _tprintf(_T("This program is designed to be run from the HTTP Service\n")); + _tprintf(_T("Running it from the command line does nothing interesting\n")); + + int index = 1; + while(index < argc) + { + _tprintf(_T("Command line Parameter %d : %s\n"), index, argv[index]); + index++; + } + + } +// This member function is used whenever the client makes a request +// for information from the server. + +// This is virtual function which must be defined in any derived class +// One must override these functions because each implementation +// will be different. +void CHelloScript::OnGet(LPCTSTR pszParam) + { + UNREFERENCED_PARAMETER(pszParam); + + // Tell the client that it will be receiving HTML formatted text + _tprintf(_T("Content-type: text/HTML\n")); + _tprintf(_T("\n")); + + LPCTSTR pszAction = GetPathInfo(); + if (_tcsicmp(pszAction, _T("/report")) == 0) + { + // When called by a get this script will return information + // about the server, client and connection. + // These functions can be used internally for processing of + + _tprintf(_T("

GetPathInfo() = %s

\n"), GetPathInfo()); + _tprintf(_T("

GetScriptName() = %s

\n"), GetScriptName()); + _tprintf(_T("

GetRemoteAddress() = %s

\n"), GetRemoteAddress()); + _tprintf(_T("

GetServerName() = %s

\n"), GetServerName()); + _tprintf(_T("

GetServerProtocol() = %s

\n"), GetServerProtocol()); + _tprintf(_T("

GetServerSoftware() = %s

\n"), GetServerSoftware()); + _tprintf(_T("

GetServerPort() = %i

\n"), GetServerPort()); + _tprintf(_T("

GetClientInfo(ACCEPT) = %s

\n"), GetClientInfo(_T("ACCEPT"))); + _tprintf(_T("

GetClientInfo(USER_AGENT) = %s

\n"), GetClientInfo(_T("USER_AGENT"))); + _tprintf(_T("

GetClientInfo(REFERER) = %s

\n"), GetClientInfo(_T("REFERER"))); + _tprintf(_T("
")); + } + else + { + _tprintf(_T("This is not a valid parameter :\n")); + _tprintf(_T("

%s\n"), pszAction); + } + + _tprintf(_T("\n\n")); + } + +void CHelloScript::OnPost(LPCTSTR pszType, LPCTSTR pszData) + { + // The client needs to know what type of file it is receiving + // This statement tells it that. + // _tprintf is used to simply print the text to the stdout port. + _tprintf(_T("Content-type: text/HTML\n\n")); + _tprintf(_T("")); + + if (_tcscmp(pszType, _T("application/x-www-form-urlencoded")) != 0) + { + _tprintf(_T("This is not a valid Post parameter\n")); + _tprintf(_T("\n\n")); + return; + } + + LPTSTR pszResult = NULL; + + // CGI converts certain characters like spaces, slashes into other + // characters. They need to be returned to their initial characters. + // The UUDecode function takes care of this. + UUDecode(pszData, pszResult); + + + // Check for the required fields. If they do not exist then + // write back an error message to the client + CString sSubject, sDescription, sFileName, sEMail; + if (!Extract(sSubject, pszResult, 0, _T("Subject")) || + !Extract(sDescription, pszResult, 1, _T("Descr")) || + !Extract(sFileName, pszResult, 2, _T("Filename")) || + !Extract(sEMail, pszResult, 3, _T("MailAddr"))) + { + _tprintf(_T("Data is corrupt, please try again\n")); + _tprintf(_T("\n\n")); + return; + } + // The following if statements test the required fields for + // information. If they are empty then an error message is + // written back to the client. + if (sFileName.IsEmpty()) + { + _tprintf(_T("The Filename is empty, please try again\n")); + _tprintf(_T("

Try again\n")); + _tprintf(_T("\n\n")); + + if (pszResult != NULL) + delete[] pszResult; + + return; + } + + if (sEMail.IsEmpty()) + { + _tprintf(_T("Your Mail address is empty, please try again\n")); + _tprintf(_T("

Try again\n")); + _tprintf(_T("\n\n")); + + if (pszResult != NULL) + delete[] pszResult; + + return; + } + + + if (pszResult != NULL) + delete[] pszResult; + + // The following _tprintf calls send a message back to the client. + // If the source of the document is viewed in the cients browser + // it does not appear to be layed out nicely. However it is readable. + // The printing of new line (\n) on its own causes the document to be + // restarted. + _tprintf(_T("

Your message has been received\n")); + _tprintf(_T("

Hello %s\n"), sEMail); + _tprintf(_T("

The subject you entered is '%s'\n"), sSubject); + _tprintf(_T("

The description you entered is '%s'\n"), sDescription); + _tprintf(_T("

And here is the filename you entered '%s'\n"), sFileName); + _tprintf(_T("

Back to Home Page\n")); + _tprintf(_T("

This is just a demonstration of a write back script.
")); + _tprintf(_T("

")); + _tprintf(_T("

\n\n")); + } + +int main(int argc, char *argv[]) + { + + CHelloScript script; + + return script.DoMain(argc, argv); + } + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.h new file mode 100644 index 0000000..a7679cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/helloscp.h @@ -0,0 +1,67 @@ +// ========================================================================== +// Class Specification : CHelloScript +// ========================================================================== + +// Header file : helloscp.h + + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXScript + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// +// + +// Remark: +// *** +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __HELLO_H__ +#define __HELLO_H__ + +#include "oxscript.h" + +class CHelloScript : public COXScript +{ +public: + CHelloScript(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + ~CHelloScript(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +// Overridable implementations +protected: + + virtual void OnGet(LPCTSTR pszParam); + virtual void OnPost(LPCTSTR pszType, LPCTSTR pszData); + virtual void OnRunCommandLine(int argc, char** argv); + +}; + +#endif // __HELLO_H__ +// ========================================================================== + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.cpp new file mode 100644 index 0000000..46cd188 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.cpp @@ -0,0 +1,2 @@ + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.h new file mode 100644 index 0000000..7da3634 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/communication/CGIscrpt/stdafx.h @@ -0,0 +1,9 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include // MFC core and standard components +#include // MFC extensions + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/DaoDemoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/DaoDemoInfo.rtf new file mode 100644 index 0000000..a337e5d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/DaoDemoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/ReadMe.txt new file mode 100644 index 0000000..1e58a39 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : demo +======================================================================== + + +AppWizard has created this demo 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 demo application. + +demo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CDemoApp application class. + +demo.cpp + This is the main application source file that contains the application + class CDemoApp. + +demo.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 + Developer Studio. + +res\demo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file demo.rc. + +res\demo.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +demo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +demoDlg.h, demoDlg.cpp - the dialog + These files contain your CDemoDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in demo.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named demo.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.cpp new file mode 100644 index 0000000..c0fbf67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// demo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.h new file mode 100644 index 0000000..a827e74 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/StdAfx.h @@ -0,0 +1,32 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__922E95E9_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) +#define AFX_STDAFX_H__922E95E9_B158_11D1_A9C2_7AAF7E000000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions + +#include + +#include + +#define UG_DAO_REPORTERROR + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__922E95E9_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/customer.mdb b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/customer.mdb new file mode 100644 index 0000000..70e779c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/customer.mdb differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.clw new file mode 100644 index 0000000..ccb2784 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.clw @@ -0,0 +1,105 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "demo.h" + +ClassCount=3 +Class1=CDemoApp +Class2=CDemoDlg +Class3=CAboutDlg + +ResourceCount=3 +Resource1=IDD_DEMO_DIALOG (English (U.S.)) +Resource2=IDR_MAINFRAME +Resource3=IDD_DEMO_DIALOG + +[CLS:CDemoApp] +Type=0 +HeaderFile=demo.h +ImplementationFile=demo.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CDemoApp + +[CLS:CDemoDlg] +Type=0 +HeaderFile=demoDlg.h +ImplementationFile=demoDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=IDC_CHECK_OLDCUSTOMER + +[CLS:CAboutDlg] +Type=0 +HeaderFile=demoDlg.h +ImplementationFile=demoDlg.cpp +Filter=D + +[DLG:IDD_DEMO_DIALOG] +Type=1 +Class=CDemoDlg +ControlCount=26 +Control1=IDC_CUSTNUM,edit,1350568064 +Control2=IDC_DATE,edit,1350568064 +Control3=IDC_LASTNAME,edit,1350631552 +Control4=IDC_FIRSTNAME,edit,1350631552 +Control5=IDC_COMPANY,edit,1350631552 +Control6=IDC_PHONE,edit,1350631552 +Control7=IDC_EMAIL,edit,1350631552 +Control8=IDC_BALANCE,edit,1350631552 +Control9=IDC_FIRST,button,1342242816 +Control10=IDC_PREV,button,1342242816 +Control11=IDC_NEXT,button,1342242816 +Control12=IDC_LAST,button,1342242816 +Control13=IDC_ADD,button,1342242816 +Control14=IDC_DELETE,button,1342242816 +Control15=IDC_SAVE,button,1342242816 +Control16=IDOK,button,1342242816 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,button,1342177287 +Control26=IDC_CHECK_OLDCUSTOMER,button,1342242819 + +[DLG:IDD_DEMO_DIALOG (English (U.S.))] +Type=1 +Class=CDemoDlg +ControlCount=26 +Control1=IDC_CUSTNUM,edit,1350568064 +Control2=IDC_DATE,edit,1350568064 +Control3=IDC_LASTNAME,edit,1350631552 +Control4=IDC_FIRSTNAME,edit,1350631552 +Control5=IDC_COMPANY,edit,1350631552 +Control6=IDC_PHONE,edit,1350631552 +Control7=IDC_EMAIL,edit,1350631552 +Control8=IDC_BALANCE,edit,1350631552 +Control9=IDC_FIRST,button,1342242816 +Control10=IDC_PREV,button,1342242816 +Control11=IDC_NEXT,button,1342242816 +Control12=IDC_LAST,button,1342242816 +Control13=IDC_ADD,button,1342242816 +Control14=IDC_DELETE,button,1342242816 +Control15=IDC_SAVE,button,1342242816 +Control16=IDOK,button,1342242816 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,button,1342177287 +Control26=IDC_CHECK_OLDCUSTOMER,button,1342242819 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.cpp new file mode 100644 index 0000000..73041a5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.cpp @@ -0,0 +1,101 @@ +// demo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "demo.h" +#include "demoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDemoApp + +BEGIN_MESSAGE_MAP(CDemoApp, CWinApp) + //{{AFX_MSG_MAP(CDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDemoApp construction + +CDemoApp::CDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CDemoApp object + +CDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CDemoApp initialization + +BOOL CDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CDemoDlg dlg; + m_pMainWnd = &dlg; + + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsp new file mode 100644 index 0000000..c92ba1c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsp @@ -0,0 +1,257 @@ +# Microsoft Developer Studio Project File - Name="demo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=demo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "demo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "demo.mak" CFG="demo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "demo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "demo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "demo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "demo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "demo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "demo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"demo.exe" + +!ELSEIF "$(CFG)" == "demo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"demo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "demo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "demo___W" +# PROP BASE Intermediate_Dir "demo___W" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"demo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"demo.exe" + +!ELSEIF "$(CFG)" == "demo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "demo___0" +# PROP BASE Intermediate_Dir "demo___0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"demo.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"demo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "demo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "demo___1" +# PROP BASE Intermediate_Dir "demo___1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"demo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"demo.exe" + +!ENDIF + +# Begin Target + +# Name "demo - Win32 Release" +# Name "demo - Win32 Debug" +# Name "demo - Win32 Release_Shared" +# Name "demo - Win32 Unicode_Debug" +# Name "demo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDao.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\demo.cpp +# End Source File +# Begin Source File + +SOURCE=.\demo.rc +# End Source File +# Begin Source File + +SOURCE=.\demoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\demo.h +# End Source File +# Begin Source File + +SOURCE=.\demoDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDao.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\demo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\demo.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsw new file mode 100644 index 0000000..cfd87de --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "demo"=".\demo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.h new file mode 100644 index 0000000..412645a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.h @@ -0,0 +1,50 @@ +// demo.h : main header file for the DEMO application +// + +#if !defined(AFX_DEMO_H__922E95E5_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) +#define AFX_DEMO_H__922E95E5_B158_11D1_A9C2_7AAF7E000000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CDemoApp: +// See demo.cpp for the implementation of this class +// + +class CDemoApp : public CWinApp +{ +public: + CDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DEMO_H__922E95E5_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.rc new file mode 100644 index 0000000..db85b8f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.rc @@ -0,0 +1,220 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\demo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXDao.rc""\r\n" + "#endif\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 DISCARDABLE "res\\demo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DEMO_DIALOG DIALOGEX 0, 0, 339, 113 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "DAO Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_CUSTNUM,67,2,40,14,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_TABSTOP + EDITTEXT IDC_DATE,177,2,69,14,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_TABSTOP + EDITTEXT IDC_LASTNAME,3,33,80,14,ES_AUTOHSCROLL + EDITTEXT IDC_FIRSTNAME,89,33,80,14,ES_AUTOHSCROLL + EDITTEXT IDC_COMPANY,175,33,80,14,ES_AUTOHSCROLL + EDITTEXT IDC_PHONE,262,33,70,14,ES_AUTOHSCROLL + EDITTEXT IDC_EMAIL,3,62,80,14,ES_AUTOHSCROLL + EDITTEXT IDC_BALANCE,137,62,60,14,ES_AUTOHSCROLL + PUSHBUTTON "<<",IDC_FIRST,7,92,20,14 + PUSHBUTTON "<",IDC_PREV,29,92,20,14 + PUSHBUTTON ">",IDC_NEXT,52,92,20,14 + PUSHBUTTON ">>",IDC_LAST,74,92,20,14 + PUSHBUTTON "&Add",IDC_ADD,131,92,35,14 + PUSHBUTTON "&Delete",IDC_DELETE,169,92,35,14 + PUSHBUTTON "&Save",IDC_SAVE,207,92,35,14 + PUSHBUTTON "&Finished",IDOK,289,92,40,14 + LTEXT "First Name",IDC_STATIC,89,24,34,8 + LTEXT "EMail",IDC_STATIC,3,53,18,8 + LTEXT "Phone",IDC_STATIC,262,24,22,8 + LTEXT "Last Name",IDC_STATIC,3,24,35,8 + LTEXT "Customer Number",IDC_STATIC,4,4,57,8 + LTEXT "Company",IDC_STATIC,175,24,30,8 + LTEXT "Date Entered",IDC_STATIC,130,4,43,8 + LTEXT "Balance",IDC_STATIC,137,53,27,8 + GROUPBOX "",IDC_STATIC,2,84,335,25 + CONTROL "Old Customer",IDC_CHECK_OLDCUSTOMER,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,267,66,58,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "demo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "demo\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "demo.EXE\0" + VALUE "ProductName", "demo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 332 + TOPMARGIN, 7 + BOTTOMMARGIN, 106 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About demo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "COXDao Demo" + ID_DESCRIPTION_FILE "DaoDemoInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\demo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXDao.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.vcproj new file mode 100644 index 0000000..cabfe41 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demo.vcproj @@ -0,0 +1,876 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.cpp new file mode 100644 index 0000000..df51cf6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.cpp @@ -0,0 +1,405 @@ +// demoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "demo.h" +#include "demoDlg.h" + +#include "UTSampleAbout.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDemoDlg dialog + +CDemoDlg::CDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CDemoDlg) + m_sBalance = _T(""); + m_sCompany = _T(""); + m_sCustnum = _T(""); + m_sDate = _T(""); + m_sEmail = _T(""); + m_sFirstName = _T(""); + m_sLastName = _T(""); + m_sPhone = _T(""); + m_bOldCustomer = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + m_add = FALSE; + m_isDirty = FALSE; + +} + +void CDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDemoDlg) + DDX_Control(pDX, IDC_PHONE, m_ctlEditPhone); + DDX_Control(pDX, IDC_LASTNAME, m_ctlEditLastName); + DDX_Control(pDX, IDC_FIRSTNAME, m_ctlEditFirstName); + DDX_Control(pDX, IDC_EMAIL, m_ctlEditEmail); + DDX_Control(pDX, IDC_DATE, m_ctlEditDate); + DDX_Control(pDX, IDC_CUSTNUM, m_ctlEditCustnum); + DDX_Control(pDX, IDC_COMPANY, m_ctlEditCompany); + DDX_Control(pDX, IDC_BALANCE, m_ctlEditBalance); + DDX_Text(pDX, IDC_BALANCE, m_sBalance); + DDX_Text(pDX, IDC_COMPANY, m_sCompany); + DDX_Text(pDX, IDC_CUSTNUM, m_sCustnum); + DDX_Text(pDX, IDC_DATE, m_sDate); + DDX_Text(pDX, IDC_EMAIL, m_sEmail); + DDX_Text(pDX, IDC_FIRSTNAME, m_sFirstName); + DDX_Text(pDX, IDC_LASTNAME, m_sLastName); + DDX_Text(pDX, IDC_PHONE, m_sPhone); + DDX_Check(pDX, IDC_CHECK_OLDCUSTOMER, m_bOldCustomer); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CDemoDlg, CDialog) + //{{AFX_MSG_MAP(CDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_ADD, OnAdd) + ON_BN_CLICKED(IDC_DELETE, OnDelete) + ON_BN_CLICKED(IDC_FIRST, OnFirst) + ON_BN_CLICKED(IDC_NEXT, OnNext) + ON_BN_CLICKED(IDC_PREV, OnPrev) + ON_BN_CLICKED(IDC_LAST, OnLast) + ON_BN_CLICKED(IDC_SAVE, OnSave) + ON_CONTROL_RANGE(EN_CHANGE,IDC_LASTNAME,IDC_BALANCE, OnChange) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDemoDlg message handlers + +BOOL CDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + CString string = GetAppDir(); + string += "\\customer.mdb"; + + if(m_dao.Open(string,_T("info")) != TRUE){ + MessageBox(_T("Database Failed To Open, make sure that the database is in the program directory"), + _T("Error"),MB_OK); + EndDialog(0); + } + else{ + LoadRecord(); + } + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CDemoDlg::OnAdd() +{ + // TODO: Add your control notification handler code here + ClearDialog(); + + m_dao.Add(); + m_add = TRUE; +} + +void CDemoDlg::OnDelete() +{ + // TODO: Add your control notification handler code here + m_dao.Delete(); + LoadRecord(); +} + +void CDemoDlg::OnFirst() +{ + // TODO: Add your control notification handler code here + m_dao.MoveFirst(); + LoadRecord(); +} + +void CDemoDlg::OnPrev() +{ + // TODO: Add your control notification handler code here + if(m_dao.IsBOF() == TRUE) + return; + + m_dao.MovePrev(); + LoadRecord(); +} + +void CDemoDlg::OnNext() +{ + // TODO: Add your control notification handler code here + if(m_dao.IsEOF() == TRUE) + return; + + m_dao.MoveNext(); + LoadRecord(); +} + +void CDemoDlg::OnLast() +{ + // TODO: Add your control notification handler code here + m_dao.MoveLast(); + LoadRecord(); +} + +void CDemoDlg::ClearDialog() +{ + m_sCustnum.Empty(); + m_sDate.Empty(); + m_sLastName.Empty(); + m_sFirstName.Empty(); + m_sCompany.Empty(); + m_sPhone.Empty(); + m_sEmail.Empty(); + m_sBalance.Empty(); + + UpdateData(FALSE); +} + +void CDemoDlg::SaveRecord() +{ + + CString string; + COleDateTime dt; + COleCurrency cy; + + VERIFY(UpdateData()); + + if(m_add) + m_dao.Add(); + else + m_dao.Edit(); + + GetDlgItemText(IDC_LASTNAME,string); + m_dao.SetField(m_dao.GFN(_T("LastName")),(LPCTSTR)string); + + GetDlgItemText(IDC_FIRSTNAME,string); + m_dao.SetField(m_dao.GFN(_T("FirstName")),(LPCTSTR)string); + + GetDlgItemText(IDC_COMPANY,string); + m_dao.SetField(m_dao.GFN(_T("Company")),(LPCTSTR)string); + + GetDlgItemText(IDC_PHONE,string); + m_dao.SetField(m_dao.GFN(_T("Phone")),(LPCTSTR)string); + + GetDlgItemText(IDC_EMAIL,string); + m_dao.SetField(m_dao.GFN(_T("EMail")),(LPCTSTR)string); + + GetDlgItemText(IDC_BALANCE,string); + cy.ParseCurrency(string); + m_dao.SetField(m_dao.GFN(_T("Balance")),cy); + + m_dao.SetField(m_dao.GFN(_T("Old customer")),m_bOldCustomer); + + //get the current date + if(m_add){ + dt = COleDateTime::GetCurrentTime(); + m_dao.SetField(m_dao.GFN(_T("Date")),dt); + } + + m_dao.Update(); + + m_add = FALSE; + m_isDirty = FALSE; +} + +void CDemoDlg::LoadRecord() +{ + //check to see if editing or adding was in progress + if(m_isDirty){ + if(MessageBox(_T("Do you want to save your changes?"), + _T("Save Changes"),MB_YESNO) == IDYES) + SaveRecord(); + } + + CString string; + COleDateTime dt; + COleCurrency cy; + + if(m_dao.IsEOF() || m_dao.IsBOF()){ + ClearDialog(); + return; + } + + + m_dao.GetField(m_dao.GFN(_T("CustNum")),m_sCustnum); + +// m_dao.GetField(m_dao.GFN(_T("Date")),dt); +// m_sDate=dt.Format(); + if(!m_dao.GetField(m_dao.GFN(_T("Date")),dt)/* && dt.m_status==COleDateTime::null*/) + { + m_sDate=_T(""); + } + else + m_sDate=dt.Format(); + + m_dao.GetField(m_dao.GFN(_T("LastName")),m_sLastName); + + m_dao.GetField(m_dao.GFN(_T("FirstName")),m_sFirstName); + + m_dao.GetField(m_dao.GFN(_T("Company")),m_sCompany); + + m_dao.GetField(m_dao.GFN(_T("Phone")),m_sPhone); + + m_dao.GetField(m_dao.GFN(_T("EMail")),m_sEmail); + + m_dao.GetField(m_dao.GFN(_T("Balance")),cy); + m_sBalance=cy.Format(); + + m_dao.GetField(m_dao.GFN(_T("Old customer")),m_bOldCustomer); + + UpdateData(FALSE); + + m_isDirty = FALSE; +} + +CString CDemoDlg::GetAppDir(){ + + + LPTSTR clStr = GetCommandLine(); + LPTSTR buf; + CString string; + int loop; + + //create the temp buffer + buf = new TCHAR[ lstrlen(clStr) + 1 ]; + + //copy the command line and check to see if the first character is a quote + if(clStr[0] == '\"') + lstrcpy(buf,&clStr[1]); + else + lstrcpy(buf,clStr); + + + //check to see if the command line is empty + loop = 0; + if(lstrlen(buf) > 0){ + + loop = lstrlen(buf); + while(loop > 0){ + if(buf[loop]== _T('.')){ + break; + } + loop --; + } + while(loop > 0){ + if(buf[loop]== _T('\\')){ + buf[loop] = 0; + break; + } + loop --; + } + } + + if(loop == 0){ + + delete[] buf; + + //create the temp buffer + buf = new TCHAR[MAX_PATH + 1]; + + _tgetcwd(buf,255); + } + + string = buf; + + delete[] buf; + + return string; +} + + +void CDemoDlg::OnSave() +{ + // TODO: Add your control notification handler code here + SaveRecord(); +} + +void CDemoDlg::OnChange(UINT nParam) +{ + UNREFERENCED_PARAMETER(nParam); + // TODO: Add your control notification handler code here + m_isDirty = TRUE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.h new file mode 100644 index 0000000..f6e7236 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/demoDlg.h @@ -0,0 +1,88 @@ +// demoDlg.h : header file +// + +#if !defined(AFX_DEMODLG_H__922E95E7_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) +#define AFX_DEMODLG_H__922E95E7_B158_11D1_A9C2_7AAF7E000000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDao.h" + + +///////////////////////////////////////////////////////////////////////////// +// CDemoDlg dialog + +class CDemoDlg : public CDialog +{ +// Construction +public: + CDemoDlg(CWnd* pParent = NULL); // standard constructor + + // Dialog Data + + COXDao m_dao; + BOOL m_add; + BOOL m_isDirty; + + //{{AFX_DATA(CDemoDlg) + enum { IDD = IDD_DEMO_DIALOG }; + CEdit m_ctlEditPhone; + CEdit m_ctlEditLastName; + CEdit m_ctlEditFirstName; + CEdit m_ctlEditEmail; + CEdit m_ctlEditDate; + CEdit m_ctlEditCustnum; + CEdit m_ctlEditCompany; + CEdit m_ctlEditBalance; + CString m_sBalance; + CString m_sCompany; + CString m_sCustnum; + CString m_sDate; + CString m_sEmail; + CString m_sFirstName; + CString m_sLastName; + CString m_sPhone; + BOOL m_bOldCustomer; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation + + void LoadRecord(); + void SaveRecord(); + void ClearDialog(); + + CString GetAppDir(); + +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAdd(); + afx_msg void OnDelete(); + afx_msg void OnFirst(); + afx_msg void OnNext(); + afx_msg void OnPrev(); + afx_msg void OnLast(); + afx_msg void OnSave(); + afx_msg void OnChange(UINT nParam); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DEMODLG_H__922E95E7_B158_11D1_A9C2_7AAF7E000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.rc2 new file mode 100644 index 0000000..aaefa40 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/res/demo.rc2 @@ -0,0 +1,13 @@ +// +// DEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/resource.h new file mode 100644 index 0000000..edbaf2c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/DAOclass/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by demo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_DEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_LAST 1000 +#define IDC_NEXT 1001 +#define IDC_EDIT 1002 +#define IDC_PREV 1003 +#define IDC_FIRST 1004 +#define IDC_ADD 1005 +#define IDC_CUSTNUM 1006 +#define IDC_DATE 1007 +#define IDC_LASTNAME 1008 +#define IDC_FIRSTNAME 1009 +#define IDC_EMAIL 1010 +#define IDC_COMPANY 1011 +#define IDC_PHONE 1012 +#define IDC_BALANCE 1013 +#define IDC_DELETE 1014 +#define IDC_SAVE 1015 +#define IDC_CHECK_OLDCUSTOMER 1016 + +// 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 1017 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvFileInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvFileInfo.rtf new file mode 100644 index 0000000..4c54b55 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvFileInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.clw new file mode 100644 index 0000000..bb87e77 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.clw @@ -0,0 +1,50 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CCsvTestDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "CsvTest.h" + +ClassCount=2 +Class1=CCsvTestApp +Class2=CCsvTestDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_CSVTEST_DIALOG + +[CLS:CCsvTestApp] +Type=0 +HeaderFile=CsvTest.h +ImplementationFile=CsvTest.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CCsvTestApp + +[CLS:CCsvTestDlg] +Type=0 +HeaderFile=CsvTestDlg.h +ImplementationFile=CsvTestDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=IDC_ABOUT + +[DLG:IDD_CSVTEST_DIALOG] +Type=1 +Class=CCsvTestDlg +ControlCount=10 +Control1=IDOK,button,1342242817 +Control2=IDC_SAVE,button,1342242816 +Control3=IDC_USE_HEADERS,button,1342373891 +Control4=IDC_ABOUT,button,1342242816 +Control5=IDCANCEL,button,1342242816 +Control6=IDC_DATA,edit,1353779204 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_STATIC,button,1342177287 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.cpp new file mode 100644 index 0000000..fe6af4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.cpp @@ -0,0 +1,100 @@ +// CsvTest.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CsvTest.h" +#include "CsvTestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestApp + +BEGIN_MESSAGE_MAP(CCsvTestApp, CWinApp) + //{{AFX_MSG_MAP(CCsvTestApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestApp construction + +CCsvTestApp::CCsvTestApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCsvTestApp object + +CCsvTestApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestApp initialization + +BOOL CCsvTestApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CCsvTestDlg dlg; + m_pMainWnd = &dlg; + + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CCsvTestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsp new file mode 100644 index 0000000..2ab72ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsp @@ -0,0 +1,258 @@ +# Microsoft Developer Studio Project File - Name="CsvTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CsvTest - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CsvTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CsvTest.mak" CFG="CsvTest - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CsvTest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CsvTest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CsvTest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "CsvTest - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "CsvTest - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CsvTest - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CsvTest.exe" + +!ELSEIF "$(CFG)" == "CsvTest - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CsvTest.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "CsvTest - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CsvTest___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "CsvTest___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CsvTest.exe" + +!ELSEIF "$(CFG)" == "CsvTest - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "CsvTest___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "CsvTest___Win32_Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CsvTest.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "CsvTest - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CsvTest___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "CsvTest___Win32_Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CsvTest.exe" + +!ENDIF + +# Begin Target + +# Name "CsvTest - Win32 Release" +# Name "CsvTest - Win32 Debug" +# Name "CsvTest - Win32 Release_Shared" +# Name "CsvTest - Win32 Unicode_Debug" +# Name "CsvTest - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCsvFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTrace.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CsvTest.cpp +# End Source File +# Begin Source File + +SOURCE=.\CsvTest.rc +# End Source File +# Begin Source File + +SOURCE=.\CsvTestDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CsvTest.h +# End Source File +# Begin Source File + +SOURCE=.\CsvTestDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCsvFile.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\CsvTest.ico +# End Source File +# Begin Source File + +SOURCE=.\res\CsvTest.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsw new file mode 100644 index 0000000..3422f86 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CsvTest"=".\CsvTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.h new file mode 100644 index 0000000..dc321fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.h @@ -0,0 +1,50 @@ +// CsvTest.h : main header file for the CSVTEST application +// + +#if !defined(AFX_CSVTEST_H__ED9EE2A5_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) +#define AFX_CSVTEST_H__ED9EE2A5_98D3_11D2_B0EC_0090271D78EB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestApp: +// See CsvTest.cpp for the implementation of this class +// + +class CCsvTestApp : public CWinApp +{ +public: + CCsvTestApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCsvTestApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CCsvTestApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CSVTEST_H__ED9EE2A5_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.rc new file mode 100644 index 0000000..3108b07 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.rc @@ -0,0 +1,205 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\CsvTest.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\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 DISCARDABLE "res\\CsvTest.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CSVTEST_DIALOG DIALOGEX 0, 0, 252, 250 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "CSV File Test" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Open file",IDOK,7,73,50,14 + PUSHBUTTON "Save file",IDC_SAVE,63,73,50,14 + CONTROL "Use Headers",IDC_USE_HEADERS,"Button",BS_AUTOCHECKBOX | + WS_GROUP | WS_TABSTOP,9,94,57,10 + PUSHBUTTON "About...",IDC_ABOUT,195,74,50,14 + PUSHBUTTON "Exit",IDCANCEL,195,92,50,14 + EDITTEXT IDC_DATA,13,118,230,120,ES_MULTILINE | ES_READONLY | + WS_VSCROLL | WS_HSCROLL + GROUPBOX "Data read in",IDC_STATIC,9,108,240,135 + GROUPBOX "",IDC_STATIC,7,3,238,64 + LTEXT "Press on ""Open File"" button in order to open and read predefined CSV file (if ""Use Headers"" check box is marked then predefined ""headers.csv"" file will be opened, otherwise ""noheader.csv"" will be opened)", + IDC_STATIC,10,11,231,24 + LTEXT "By pressing on ""Save file"" button you will save the contents of the opened CSV file to ""out.csv"" file. Note that all files are saved in the same directory as an executable of this sample", + IDC_STATIC,10,39,230,24 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "CsvTest MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "CsvTest\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "CsvTest.EXE\0" + VALUE "ProductName", "CsvTest Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CSVTEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 245 + TOPMARGIN, 7 + BOTTOMMARGIN, 243 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About CsvTest..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "CSV File Demo" + ID_DESCRIPTION_FILE "CsvFileInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\CsvTest.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.vcproj new file mode 100644 index 0000000..6cbd13b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTest.vcproj @@ -0,0 +1,934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.cpp new file mode 100644 index 0000000..be1ce72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.cpp @@ -0,0 +1,528 @@ +// CsvTestDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "CsvTest.h" +#include "CsvTestDlg.h" +#include "OXCsvFile.h" +#include "OXTrace.h" +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestDlg dialog + +CCsvTestDlg::CCsvTestDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCsvTestDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCsvTestDlg) + m_bUseHeaders = FALSE; + m_strData = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CCsvTestDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCsvTestDlg) + DDX_Control(pDX, IDC_SAVE, m_ctrlSave); + DDX_Check(pDX, IDC_USE_HEADERS, m_bUseHeaders); + DDX_Text(pDX, IDC_DATA, m_strData); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CCsvTestDlg, CDialog) + //{{AFX_MSG_MAP(CCsvTestDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_SAVE, OnSave) + ON_BN_CLICKED(IDC_ABOUT, OnAbout) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestDlg message handlers + +BOOL CCsvTestDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + m_ctrlSave.EnableWindow(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + OXTRACE_SETDUMPFILE(_T("trace.txt")); + OXTRACE_SETPREFIX(TRUE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CCsvTestDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnAbout(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CCsvTestDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CCsvTestDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +static LPCTSTR headers[]={ _T("ID"), _T("Name"), _T("Byte"), _T("Integer"), + _T("Float"), _T("Double"), _T("String"), + _T("Valid"), NULL }; + +static LPCTSTR aliases[]={ _T("Int"), _T("I"), NULL }; + +static const int nColumns=sizeof(headers) / sizeof(headers[0]) - 1; + +static LPCTSTR headers2[]={ _T("ID"), _T("Last Name"), _T("Address"), NULL }; + +static LPCTSTR lpstrYesNo[]={ _T("Yes"), _T("No"), NULL }; + +// +// Read in one of two predefined comma delimted files, and display their contents in the +// multiline edit control in this dialog. +// Note that the input files for this example use the technique of putting two +// separate tables into a single CSV file, which is not supported by all programs. But, +// it can still be a very useful technique for your own use. +// +void CCsvTestDlg::OnOK() +{ + // + // Retrieve the settings from the dialog + // + UpdateData(); + + COXCsvFile inFile; + CFileException fe; + LPCTSTR lpstrInFilename=(m_bUseHeaders ? _T("headers.csv") : + _T("noheader.csv")); + SData data; + + // + // clear out the old data array + // + m_aData.RemoveAll(); + + // + // disable the save button + // + m_ctrlSave.EnableWindow(FALSE); + + // + // Open the input file + // + if (!inFile.Open(lpstrInFilename, CFile::modeRead, &fe)) + { + return ; + } + + TRY + { + CWaitCursor cursor; + short nId; + int nYesNo; + int index; + + OXTRACE(_T("CCsvTestDlg::OnOK()")); + + // + // check if we shuold check for headers in the input file + // + if (m_bUseHeaders) + { + // + // Read in the headers from the input file. After reading the + // headers in from the first line of the file, set the aliases + // for the "Integer" column. + // Note: by using the column headers, and using those headers + // in the calls to ReadColumn(), the exact order of the columns + // in the CSV file becomes irrelevant to your program. This is + // shown by the fact that the columns in "headers.csv" are in + // a different order from "noheader.csv", but the results displayed + // in the edit control are the same. + // + inFile.GetColumns(8); + inFile.SetAliases(headers[3], aliases); + } + else + { + // + // Since there are no headers in the input file, set the names + // of the columns that we will use in later calls, and let + // the COXCsvFile object know how many columns to expect. + // Note, if you want to only refer to the columns by their column + // indicies, this call does not need to be made, as the first call + // to ReadLine() will set the number of columns in the table. + // + inFile.SetColumns(headers); + } + + // + // Read the individual records from one file to the other. + // + // NOTE : I said records, not lines, since quoted strings can + // contain new lines in them. This is a feature supported by programs + // like MS Access, but not by MS Excel. + // + while (inFile.ReadLine()) + { + data.Clear(); + + if (inFile.IsLineEmpty()) + { + // + // Blank lines can either be ignored, or they can be used like + // here to mark the end of one table, and the start of another + // one. + // + OXTRACE(_T("Reached the end of the first table")); + break; + } + + OXTRACE(_T("Reading next line")); + + // + // Read the data from the various columns into the members of the + // SData structure. + // + inFile.ReadColumn(_T("ID"), data.nId); + OXTRACE_WRITEVAL(_T("ID"), data.nId); + + inFile.ReadColumn(_T("Name"), data.strName); + OXTRACE_WRITEVAL(_T("Name"), data.strName); + + inFile.ReadColumn(_T("Byte"), data.ucByte); + OXTRACE_WRITEVAL(_T("Byte"), data.ucByte); + + inFile.ReadColumn(_T("Integer"), data.nInt); + OXTRACE_WRITEVAL(_T("Integer"), data.nInt); + + inFile.ReadColumn(_T("Float"), data.fFloat); + OXTRACE_WRITEVAL(_T("Float"), data.fFloat); + + inFile.ReadColumn(_T("Double"), data.fDouble); + OXTRACE_WRITEVAL(_T("Double"), data.fDouble); + + inFile.ReadColumn(_T("String"), data.strString); + OXTRACE_WRITEVAL(_T("String"), data.strString); + + inFile.ReadColumn(_T("Valid"), nYesNo, lpstrYesNo); + OXTRACE_WRITEVAL(_T("Valid"), nYesNo); + data.bValid = (nYesNo == 0); + + m_aData.Add(data); + } + + // + // Read in the second table, merging its data with the first + // + if (m_bUseHeaders) + { + // + // Read in the headers for the second table in this file. + // + inFile.GetColumns(3); + } + else + { + // + // Set the names, and number of columns to expect, for the + // second table in this file + // + inFile.SetColumns(headers2); + } + + // + // Read the records in one at a time from the second table. + // + while (inFile.ReadLine()) + { + if (inFile.IsLineEmpty()) + { + // + // Blank lines can either be ignored, like here, or they can be + // used to mark the end of one table, and the start of another + // one. + // + continue; + } + + OXTRACE(_T("Reading next line")); + + // + // Read the ID field for this record, and search for it in the + // SData array, to match the records from the two tables up to + // each other. + // + inFile.ReadColumn(_T("ID"), nId); + OXTRACE_WRITEVAL(_T("ID"), nId); + + + for (index = 0 ; index < m_aData.GetSize() ; ++index) + { + if (m_aData[index].nId == nId) + { + // + // found the matching record from the previous table + // + break; + } + } + + if (index >= m_aData.GetSize()) + { + // + // skip this record, as this ID did not exist in the other table + // + OXTRACE_WRITEVAL(_T("ID not found from earlier table"), nId); + continue; + } + + // + // Read the remaining columns into the SData structure from the previous + // table + // + inFile.ReadColumn(_T("Last Name"), m_aData[index].strLastName); + OXTRACE_WRITEVAL(_T("Last Name"), m_aData[index].strLastName); + + inFile.ReadColumn(_T("Address"), m_aData[index].strAddress); + OXTRACE_WRITEVAL(_T("Address"), m_aData[index].strAddress); + } + + // + // format the data for the multiline edit control + // + m_strData.Empty(); + for (index = 0 ; index < m_aData.GetSize() ; ++index) + { + CString strTemp; + data = m_aData[index]; + + strTemp.Format(_T("%u. %s %s, %s\r\n") + _T(" %u, %d, %f, %f, %s\r\n") + _T(" \"%s\"\r\n"), + data.nId, data.strName, data.strLastName, data.strAddress, + data.ucByte, data.nInt, data.fFloat, data.fDouble, + (data.bValid ? _T("Valid") : _T("Invalid")), + data.strString); + m_strData += strTemp; + } + UpdateData(FALSE); + + // + // enable the Save button + // + m_ctrlSave.EnableWindow(m_aData.GetSize() > 0); + } + CATCH_ALL(e) + { + inFile.Abort(); + } + END_CATCH_ALL +} + +// +// Write the data from the data array out to a CSV file. The data +// will be written out using the same two tables to a single CSV file +// format that it was read in with. +// +void CCsvTestDlg::OnSave() +{ + // + // Update the members of the class from the dialog + // + UpdateData(); + + COXCsvFile inFile, outFile; + CFileException fe; + LPCTSTR lpstrOutFilename = _T("out.csv"); + SData data; + + // + // Open the output file + // + if (!outFile.Open(lpstrOutFilename, CFile::modeCreate | CFile::modeReadWrite, &fe)) + { + return ; + } + + TRY + { + CWaitCursor cursor; + + OXTRACE(_T("CCsvTestDlg::OnOK()")); + + // + // Check for header usage + // + if (m_bUseHeaders) + { + // + // Write out the headers for the first table + // + outFile.SetColumns(headers); + outFile.WriteHeaders(); + } + else + { + // + // Set up how many columns there will be in the first table + // + outFile.Initialize(nColumns); + } + + // + // loop through the SData elements that were filled in during the read. + // + int index = 0 ; + for (index = 0 ; index < m_aData.GetSize() ; ++index) + { + data = m_aData[index]; + + // + // Write the column data out to the current record buffer in outFile. + // + outFile.WriteColumn(0, data.nId); + outFile.WriteColumn(1, data.strName); + outFile.WriteColumn(2, data.ucByte); + outFile.WriteColumn(3, data.nInt); + outFile.WriteColumn(4, data.fFloat); + outFile.WriteColumn(5, data.fDouble); + outFile.WriteColumn(6, data.strString); + outFile.WriteColumn(7, lpstrYesNo[data.bValid ? 0 : 1]); + + // + // Write this record out to the output file. + // + outFile.WriteLine(); + } + + // + // This call to WriteLine, with no columns, will write out a blank line, + // providing a separator between the tables. + // Initialize is called to clear the old header information. + // + outFile.Initialize(); + outFile.WriteLine(); + + if (m_bUseHeaders) + { + // + // Write out the headers for the second table in the file. + // + outFile.SetColumns(headers2); + outFile.WriteHeaders(); + } + else + { + // + // Set up how many columns there will be in the second + // table in the file. + // + outFile.Initialize(3); + } + + // + // Loop through the records one more time. + // + for (index = 0 ; index < m_aData.GetSize() ; ++index) + { + data = m_aData[index]; + + // + // Write the data for this record to the current record + // buffer in outFile. + // + outFile.WriteColumn(0, data.nId); + outFile.WriteColumn(1, data.strLastName); + outFile.WriteColumn(2, data.strAddress); + + // + // Write the current record to the output file. + // + outFile.WriteLine(); + } + } + CATCH_ALL(e) + { + outFile.Abort(); + } + END_CATCH_ALL +} + +void CCsvTestDlg::OnAbout() +{ + // TODO: Add your control notification handler code here + + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.h new file mode 100644 index 0000000..8c57eae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/CsvTestDlg.h @@ -0,0 +1,100 @@ +// CsvTestDlg.h : header file +// + +#if !defined(AFX_CSVTESTDLG_H__ED9EE2A7_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) +#define AFX_CSVTESTDLG_H__ED9EE2A7_98D3_11D2_B0EC_0090271D78EB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CCsvTestDlg dialog + +class CCsvTestDlg : public CDialog +{ +// Construction +public: + CCsvTestDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCsvTestDlg) + enum { IDD = IDD_CSVTEST_DIALOG }; + CButton m_ctrlSave; + BOOL m_bUseHeaders; + CString m_strData; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCsvTestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CCsvTestDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnOK(); + afx_msg void OnSave(); + afx_msg void OnAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + // + // Strcuture defining the data being read in + // + struct SData + { + short nId; + CString strName; + unsigned char ucByte; + short nInt; + float fFloat; + double fDouble; + CString strString; + BOOL bValid; + CString strLastName; + CString strAddress; + + SData() + { + Clear(); + } + + SData(const SData& x) + : nId(x.nId), strName(x.strName), ucByte(x.ucByte), nInt(x.nInt), + fFloat(x.fFloat), fDouble(x.fDouble), strString(x.strString), + bValid(x.bValid), strLastName(x.strLastName), strAddress(x.strAddress) + { + } + + void Clear() + { + nId = 0; + strName.Empty(); + ucByte = 0; + nInt = 0; + fFloat = 0.0; + fDouble = 0.0; + strString.Empty(); + bValid = false; + strLastName.Empty(); + strAddress.Empty(); + } + }; + + CArray m_aData; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CSVTESTDLG_H__ED9EE2A7_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/ReadMe.txt new file mode 100644 index 0000000..0d3c039 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : CsvTest +======================================================================== + + +AppWizard has created this CsvTest 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 CsvTest application. + +CsvTest.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +CsvTest.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CCsvTestApp application class. + +CsvTest.cpp + This is the main application source file that contains the application + class CCsvTestApp. + +CsvTest.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++. + +CsvTest.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\CsvTest.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file CsvTest.rc. + +res\CsvTest.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +CsvTestDlg.h, CsvTestDlg.cpp - the dialog + These files contain your CCsvTestDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in CsvTest.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named CsvTest.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.cpp new file mode 100644 index 0000000..4b6e437 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// CsvTest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.h new file mode 100644 index 0000000..141f8c3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__ED9EE2A9_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) +#define AFX_STDAFX_H__ED9EE2A9_98D3_11D2_B0EC_0090271D78EB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include +#include // MFC core and standard components +#include // MFC extensions +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__ED9EE2A9_98D3_11D2_B0EC_0090271D78EB__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/headers.csv b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/headers.csv new file mode 100644 index 0000000..97c5be3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/headers.csv @@ -0,0 +1,11 @@ +"ID","Valid","Byte","Int","Float","Double","String","Name" +1,Yes,25,-30,234.3453,3245235234.235,"This is a test, this is only a test",George +2,No,255,32767,3.141592654,3.141592654,"And now, +for something +completely different",Peter +3,Yes,-29,2342,2.718281828,23.14069263,Some more numbers,Paul + +"ID","Address","Last Name" +1,1231 Sunnyside Circle,McGill +2,21w238 Honeysuckle Rose Lane,Piper +3,19 First Street,Howard \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/noheader.csv b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/noheader.csv new file mode 100644 index 0000000..28907a8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/noheader.csv @@ -0,0 +1,9 @@ +1,George,25,-30,234.3453,3245235234.235,"This is a test, this is only a test",Yes +2,Peter,255,32767,3.141592654,3.141592654,"And now, +for something +completely different",No +3,Paul,-29,2342,2.718281828,23.14069263,Some more numbers,Yes + +1,McGill,1231 Sunnyside Circle +2,Piper,21w238 Honeysuckle Rose Lane +3,Howard,19 First Street \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/out.csv b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/out.csv new file mode 100644 index 0000000..a2ae991 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/out.csv @@ -0,0 +1,11 @@ +"ID","Name","Byte","Integer","Float","Double","String","Valid" +1,George,25,-30,234.345306,3245235234.235000,"This is a test, this is only a test",Yes +2,Peter,255,32767,3.141593,3.141593,"And now, +for something +completely different",No +3,Paul,0,2342,2.718282,23.140693,Some more numbers,Yes + +"ID","Last Name","Address" +1,McGill,1231 Sunnyside Circle +2,Piper,21w238 Honeysuckle Rose Lane +3,Howard,19 First Street diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.rc2 new file mode 100644 index 0000000..fcdc000 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/res/CsvTest.rc2 @@ -0,0 +1,13 @@ +// +// CSVTEST.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/resource.h new file mode 100644 index 0000000..ccab85e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/resource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CsvTest.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_CSVTEST_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_RESULT 1000 +#define IDC_USE_HEADERS 1001 +#define IDC_SAVE 1002 +#define IDC_DATA 1003 +#define IDC_ABOUT 1004 + +// 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 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/trace.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/database/csvtest/trace.txt new file mode 100644 index 0000000..e69de29 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.cpp new file mode 100644 index 0000000..90bb6eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.cpp @@ -0,0 +1,61 @@ +// EnterNewDir.cpp : implementation file +// + +#include "stdafx.h" +#include "FileWatcher.h" +#include "EnterNewDir.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEnterNewDir dialog + + +CEnterNewDir::CEnterNewDir(CWnd* pParent /*=NULL*/) + : CDialog(CEnterNewDir::IDD, pParent) +{ + //{{AFX_DATA_INIT(CEnterNewDir) + m_bChangeAttributes = FALSE; + m_bChangeCreation = FALSE; + m_bChangeDirName = FALSE; + m_bChangeFileName = FALSE; + m_bChangeLastAccess = FALSE; + m_bChangeLastWrite = FALSE; + m_bChangeSecurity = FALSE; + m_bChangeSize = FALSE; + m_sDir = _T(""); + m_bSubTree = FALSE; + //}}AFX_DATA_INIT +} + + +void CEnterNewDir::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CEnterNewDir) + DDX_Check(pDX, IDC_CHANGE_ATTRIBUTES, m_bChangeAttributes); + DDX_Check(pDX, IDC_CHANGE_CREATION, m_bChangeCreation); + DDX_Check(pDX, IDC_CHANGE_DIR_NAME, m_bChangeDirName); + DDX_Check(pDX, IDC_CHANGE_FILE_NAME, m_bChangeFileName); + DDX_Check(pDX, IDC_CHANGE_LAST_ACCESS, m_bChangeLastAccess); + DDX_Check(pDX, IDC_CHANGE_LAST_WRITE, m_bChangeLastWrite); + DDX_Check(pDX, IDC_CHANGE_SECURITY, m_bChangeSecurity); + DDX_Check(pDX, IDC_CHANGE_SIZE, m_bChangeSize); + DDX_Text(pDX, IDC_DIR, m_sDir); + DDX_Check(pDX, IDC_WATCH_SUB_TREE, m_bSubTree); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CEnterNewDir, CDialog) + //{{AFX_MSG_MAP(CEnterNewDir) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEnterNewDir message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.h new file mode 100644 index 0000000..87ea6ce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/EnterNewDir.h @@ -0,0 +1,44 @@ +// EnterNewDir.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CEnterNewDir dialog + +class CEnterNewDir : public CDialog +{ +// Construction +public: + CEnterNewDir(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CEnterNewDir) + enum { IDD = IDD_ENTER_DIR }; + BOOL m_bChangeAttributes; + BOOL m_bChangeCreation; + BOOL m_bChangeDirName; + BOOL m_bChangeFileName; + BOOL m_bChangeLastAccess; + BOOL m_bChangeLastWrite; + BOOL m_bChangeSecurity; + BOOL m_bChangeSize; + CString m_sDir; + BOOL m_bSubTree; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEnterNewDir) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CEnterNewDir) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.clw new file mode 100644 index 0000000..a3b639c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.clw @@ -0,0 +1,72 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CFileWatcherApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "filewatcher.h" +LastPage=0 + +ClassCount=3 +Class1=CEnterNewDir +Class2=CFileWatcherApp +Class3=CFileWatcherDlg + +ResourceCount=2 +Resource1=IDD_ENTER_DIR +Resource2=IDD_FILEWATCHER_DIALOG + +[CLS:CEnterNewDir] +Type=0 +BaseClass=CDialog +HeaderFile=EnterNewDir.h +ImplementationFile=EnterNewDir.cpp +LastObject=CEnterNewDir + +[CLS:CFileWatcherApp] +Type=0 +BaseClass=CWinApp +HeaderFile=FileWatcher.h +ImplementationFile=FileWatcher.cpp +Filter=N +VirtualFilter=AC +LastObject=CFileWatcherApp + +[CLS:CFileWatcherDlg] +Type=0 +BaseClass=CDialog +HeaderFile=FileWatcherDlg.h +ImplementationFile=FileWatcherDlg.cpp + +[DLG:IDD_ENTER_DIR] +Type=1 +Class=CEnterNewDir +ControlCount=14 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_DIR,edit,1350631552 +Control3=IDC_WATCH_SUB_TREE,button,1342242819 +Control4=IDC_STATIC,button,1342177287 +Control5=IDC_CHANGE_FILE_NAME,button,1342242819 +Control6=IDC_CHANGE_DIR_NAME,button,1342242819 +Control7=IDC_CHANGE_ATTRIBUTES,button,1342242819 +Control8=IDC_CHANGE_SIZE,button,1342242819 +Control9=IDC_CHANGE_LAST_WRITE,button,1342242819 +Control10=IDC_CHANGE_LAST_ACCESS,button,1342242819 +Control11=IDC_CHANGE_CREATION,button,1342242819 +Control12=IDC_CHANGE_SECURITY,button,1342242819 +Control13=IDOK,button,1342242817 +Control14=IDCANCEL,button,1342242816 + +[DLG:IDD_FILEWATCHER_DIALOG] +Type=1 +Class=CFileWatcherDlg +ControlCount=7 +Control1=IDC_ADD_DIR,button,1342242817 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_REMOVE_DIR,button,1342242816 +Control4=IDOK,button,1342242816 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_WATCHED_DIRS,SysListView32,1350631429 +Control7=IDC_NOTIFICATIONS,SysListView32,1350631425 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.cpp new file mode 100644 index 0000000..1d96547 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.cpp @@ -0,0 +1,104 @@ +// FileWatcher.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "FileWatcher.h" +#include "FileWatcherDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherApp + +BEGIN_MESSAGE_MAP(CFileWatcherApp, CWinApp) + //{{AFX_MSG_MAP(CFileWatcherApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherApp construction + +CFileWatcherApp::CFileWatcherApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CFileWatcherApp object + +CFileWatcherApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherApp initialization + +BOOL CFileWatcherApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CFileWatcherDlg dlg; + + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CFileWatcherApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsp new file mode 100644 index 0000000..e0c59c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsp @@ -0,0 +1,265 @@ +# Microsoft Developer Studio Project File - Name="FileWatcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FileWatcher - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FileWatcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FileWatcher.mak" CFG="FileWatcher - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FileWatcher - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FileWatcher - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileWatcher - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "FileWatcher - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileWatcher - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FileWatcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileWatcher.exe" + +!ELSEIF "$(CFG)" == "FileWatcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileWatcher.exe" + +!ELSEIF "$(CFG)" == "FileWatcher - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileWatc" +# PROP BASE Intermediate_Dir "FileWatc" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileWatcher.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileWatcher.exe" + +!ELSEIF "$(CFG)" == "FileWatcher - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FileWat0" +# PROP BASE Intermediate_Dir "FileWat0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileWatcher.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FileWatcher.exe" + +!ELSEIF "$(CFG)" == "FileWatcher - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileWat1" +# PROP BASE Intermediate_Dir "FileWat1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileWatcher.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"FileWatcher.exe" + +!ENDIF + +# Begin Target + +# Name "FileWatcher - Win32 Release" +# Name "FileWatcher - Win32 Debug" +# Name "FileWatcher - Win32 Release_Shared" +# Name "FileWatcher - Win32 Unicode_Debug" +# Name "FileWatcher - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFileWatcher.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFileWatchNotifier.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWatchedDir.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\EnterNewDir.cpp +# End Source File +# Begin Source File + +SOURCE=.\FileWatcher.cpp +# End Source File +# Begin Source File + +SOURCE=.\FileWatcher.rc +# End Source File +# Begin Source File + +SOURCE=.\FileWatcherDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\EnterNewDir.h +# End Source File +# Begin Source File + +SOURCE=.\FileWatcher.h +# End Source File +# Begin Source File + +SOURCE=.\FileWatcherDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\FileWatcher.ico +# End Source File +# Begin Source File + +SOURCE=.\res\FileWatcher.rc2 +# End Source File +# Begin Source File + +SOURCE=.\FileWatcherINfo.rtf +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsw new file mode 100644 index 0000000..3b1bd7d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FileWatcher"=".\FileWatcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.h new file mode 100644 index 0000000..f279212 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.h @@ -0,0 +1,38 @@ +// FileWatcher.h : main header file for the FILEWATCHER application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherApp: +// See FileWatcher.cpp for the implementation of this class +// + +class CFileWatcherApp : public CWinApp +{ +public: + CFileWatcherApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileWatcherApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CFileWatcherApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.rc new file mode 100644 index 0000000..ec86d14 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.rc @@ -0,0 +1,261 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\FileWatcher.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXFileWatcher.rc""\r\n" + "#endif\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 DISCARDABLE "res\\FileWatcher.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ENTER_DIR DIALOG DISCARDABLE 0, 0, 227, 172 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter directory" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "&Directory:",IDC_STATIC,7,7,213,8 + EDITTEXT IDC_DIR,7,17,213,13,ES_AUTOHSCROLL + CONTROL "Watch sub &tree",IDC_WATCH_SUB_TREE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,88,37,81,11 + GROUPBOX "Watch filter",IDC_STATIC,7,57,213,80 + CONTROL "&Change file name",IDC_CHANGE_FILE_NAME,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,28,72,75,10 + CONTROL "C&hange dir name",IDC_CHANGE_DIR_NAME,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,28,88,75,10 + CONTROL "Change &attributes",IDC_CHANGE_ATTRIBUTES,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,28,104,75,10 + CONTROL "Change &size",IDC_CHANGE_SIZE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,28,120,75,10 + CONTROL "Change last &write",IDC_CHANGE_LAST_WRITE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,134,72,75,10 + CONTROL "Change &last access",IDC_CHANGE_LAST_ACCESS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,134,88,75,10 + CONTROL "Change c&reation",IDC_CHANGE_CREATION,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,134,104,75,10 + CONTROL "Change s&ecurity",IDC_CHANGE_SECURITY,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,134,120,75,10 + DEFPUSHBUTTON "OK",IDOK,52,151,50,14 + PUSHBUTTON "Cancel",IDCANCEL,130,151,50,14 +END + +IDD_FILEWATCHER_DIALOG DIALOGEX 0, 0, 356, 260 +STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "FileWatcher" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "&Add dir ...",IDC_ADD_DIR,299,17,50,14 + LTEXT "Watched dirs:",IDC_STATIC,7,7,282,10 + PUSHBUTTON "&Remove dir",IDC_REMOVE_DIR,299,34,50,14 + PUSHBUTTON "&Close",IDOK,299,239,50,14 + LTEXT "Notifications:",IDC_STATIC,7,110,282,8 + CONTROL "List2",IDC_WATCHED_DIRS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,17,282,87 + CONTROL "List1",IDC_NOTIFICATIONS,"SysListView32",LVS_REPORT | + WS_BORDER | WS_TABSTOP,7,121,282,132 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ENTER_DIR, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 220 + TOPMARGIN, 7 + BOTTOMMARGIN, 165 + END +END +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "FILEWATCHER MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "FILEWATCHER\0" + VALUE "LegalCopyright", "Copyright © 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "FILEWATCHER.EXE\0" + VALUE "ProductName", "FILEWATCHER Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About FileWatcher..." + IDS_DIRECTORY "Directory" + IDS_WATCH_SUBDIRS "Watch subdirectories" + IDS_FILTER "Filter" + IDS_TIME "Time" + IDS_EXTENDED_INFO "Extended info" + IDS_ACTION "Action" + IDS_FILE_NAME "File Name" + IDS_NEW_FILE_NAME "New File Name" + IDS_CH_FILE_NAME "ChFileName" + IDS_CH_DIR_NAME "ChDirName" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_CH_ATTR "ChAttr" + IDS_CH_SIZE "ChSize" + IDS_CH_LAST_WRITE "ChLastWr" + IDS_CH_LAST_ACCESS "ChLastAccess" + IDS_CH_CREATION "ChCreation" + IDS_CH_SECURITY "ChSecurity" + IDS_YES "Yes" + IDS_NO "No" + IDS_ADDED "Added" + IDS_REMOVED "Removed" + IDS_MODIFIED "Modified" + IDS_RENAME "Rename" + IDS_SEPARATOR "," + IDS_SOMETHING_WRONG "Something wrong ..." + IDS_NO_PATH "No path is specified ..." + IDS_NO_DIR_IS_SELECTED "No directory is selected ..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "File watcher " + ID_DESCRIPTION_FILE "FileWatcherINfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\FileWatcher.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXFileWatcher.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.vcproj new file mode 100644 index 0000000..ce50640 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcher.vcproj @@ -0,0 +1,1018 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.cpp new file mode 100644 index 0000000..d836fd0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.cpp @@ -0,0 +1,509 @@ +// FileWatcherDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "FileWatcher.h" +#include "FileWatcherDlg.h" +#include "EnterNewDir.h" +#include "OXMainRes.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define MAX_NOTIFICATION 100 + +///////////////////////////////////////////////////////////////////////////// + + +struct _PathInfo +{ + _PathInfo( CString sPath, BOOL bSubTree, DWORD dwFilter); + + CString m_sPath; + BOOL m_bSubTree; + DWORD m_dwFilter; +}; + +_PathInfo::_PathInfo( CString sPath, BOOL bSubTree, DWORD dwFilter) +:m_sPath( sPath), +m_bSubTree( bSubTree), +m_dwFilter( dwFilter) +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherDlg dialog + +CFileWatcherDlg::CFileWatcherDlg(CWnd* pParent /*=NULL*/) +: CDialog(CFileWatcherDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CFileWatcherDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CFileWatcherDlg::~CFileWatcherDlg() +{ + for( int i=0; iAppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + CRect rc; + CString str; + + // Watched dirs + m_lbWatchedDirs.GetClientRect( &rc); + + str.LoadString( IDS_DIRECTORY); + m_lbWatchedDirs.InsertColumn( 0, str, LVCFMT_LEFT, int(0.2*rc.Width())); + + str.LoadString( IDS_WATCH_SUBDIRS); + m_lbWatchedDirs.InsertColumn( 1, str, LVCFMT_LEFT, int(0.1*rc.Width()), 1); + + str.LoadString( IDS_FILTER); + m_lbWatchedDirs.InsertColumn( 2, str, LVCFMT_LEFT, int(0.7*rc.Width()), 2); + + // Notifications + m_lbNotifications.GetClientRect( &rc); + + str.LoadString( IDS_DIRECTORY); + m_lbNotifications.InsertColumn( 0, str, LVCFMT_LEFT, int(0.2*rc.Width())); + + str.LoadString( IDS_TIME); + m_lbNotifications.InsertColumn( 1, str, LVCFMT_LEFT, int(0.12*rc.Width()), 1); + + str.LoadString( IDS_EXTENDED_INFO); + m_lbNotifications.InsertColumn( 2, str, LVCFMT_LEFT, int(0.07*rc.Width()), 2); + + str.LoadString( IDS_ACTION); + m_lbNotifications.InsertColumn( 3, str, LVCFMT_LEFT, int(0.13*rc.Width()), 3); + + str.LoadString( IDS_FILE_NAME); + m_lbNotifications.InsertColumn( 4, str, LVCFMT_LEFT, int(0.24*rc.Width()), 4); + + str.LoadString( IDS_NEW_FILE_NAME); + m_lbNotifications.InsertColumn( 5, str, LVCFMT_LEFT, int(0.24*rc.Width()), 5); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CFileWatcherDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CFileWatcherDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CFileWatcherDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + + +void CFileWatcherDlg::OnAddDir() +// --- In : +// --- Out : +// --- Returns : +// --- Effect : Responds to the 'Add dir...' button +{ + CEnterNewDir dlg; + CString str; + + // Gets the watched directory and filter + if(dlg.DoModal() == IDOK) + { + if(!dlg.m_sDir.IsEmpty()) + { + DWORD filter=0; + + // Determines the watch filter + if( dlg.m_bChangeAttributes) + { + filter |= COXFileWatcher::OXFileWatchChangeAttributes; + } + if( dlg.m_bChangeCreation) + { + filter |= COXFileWatcher::OXFileWatchChangeCreation; + } + if( dlg.m_bChangeDirName) + { + filter |= COXFileWatcher::OXFileWatchChangeDirName; + } + if( dlg.m_bChangeFileName) + { + filter |= COXFileWatcher::OXFileWatchChangeFileName; + } + if( dlg.m_bChangeLastAccess) + { + filter |= COXFileWatcher::OXFileWatchChangeLastAccess; + } + if( dlg.m_bChangeLastWrite) + { + filter |= COXFileWatcher::OXFileWatchChangeLastWrite; + } + if( dlg.m_bChangeSecurity) + { + filter |= COXFileWatcher::OXFileWatchChangeSecurity; + } + if( dlg.m_bChangeSize) + { + filter |= COXFileWatcher::OXFileWatchChangeSize; + } + + if( fwWatcher.AddWatch( dlg.m_sDir, dlg.m_bSubTree, filter)) + { + // If the directory is added set the window for notifications + fwWatcher.EnableWindowNotification( dlg.m_sDir, this, TRUE); + + // Fills the listbox in the dialog + + // First check if the path isn't in the list + _PathInfo* pi = NULL; + int i=0; + for(i=0; im_sPath == dlg.m_sDir) break; + } + if( i > m_arPaths.GetUpperBound()) + { + // Add new path + LV_ITEM lvi; + + // Initialize LV_ITEM members that are common to all items. + lvi.mask = LVIF_TEXT; + lvi.iItem = m_lbWatchedDirs.GetItemCount(); + lvi.iSubItem = 0; + lvi.pszText = (LPTSTR)(LPCTSTR)dlg.m_sDir; + if(m_lbWatchedDirs.InsertItem( &lvi) != -1) + { + lvi.iSubItem = 1; + + str.LoadString((dlg.m_bSubTree)?IDS_YES:IDS_NO); + lvi.pszText = (LPTSTR)(LPCTSTR)str; + + if(m_lbWatchedDirs.SetItem( &lvi)) + { + lvi.iSubItem = 2; + lvi.pszText = (LPTSTR)(LPCTSTR)GetStringFromFilter( filter, str); + + if(m_lbWatchedDirs.SetItem( &lvi)) + { + _PathInfo* piNewPath= new _PathInfo( dlg.m_sDir, dlg.m_bSubTree, filter); + if( piNewPath!=NULL) + { + m_arPaths.Add( piNewPath); + } + } + } + } + } + else + { + pi->m_bSubTree |= dlg.m_bSubTree; + pi->m_dwFilter |= filter; + + LV_ITEM lvi; + lvi.mask = LVIF_TEXT; + lvi.iItem = i; + + str.LoadString((pi->m_bSubTree)?IDS_YES:IDS_NO); + lvi.iSubItem = 1; + lvi.pszText = (LPTSTR)(LPCTSTR)str; + m_lbWatchedDirs.SetItem( &lvi); + + lvi.iSubItem = 2; + lvi.pszText = (LPTSTR)(LPCTSTR)GetStringFromFilter( pi->m_dwFilter, str); + m_lbWatchedDirs.SetItem( &lvi); + } + } + else + { +#ifdef _DEBUG + str=COXFileWatcher::GetResultMessage( fwWatcher.GetLastError()); +#else + + // Ghazi Code Change + str = " Please confirm that you have checked at least one selection";//IDS_SOMETHING_WRONG); +#endif + MessageBox( str); + } + } + else + { + str.LoadString( IDS_NO_PATH); + MessageBox( str, NULL, MB_ICONEXCLAMATION); + } + } +} + +void CFileWatcherDlg::OnRemoveDir() +// --- In : +// --- Out : +// --- Returns : +// --- Effect : Responds to the 'Remove dir' button +{ + // Is any thing selected? + if( m_lbWatchedDirs.GetSelectedCount( )==0) + { + CString str; + str.LoadString( IDS_NO_DIR_IS_SELECTED); + MessageBox( str); + return; + } + + int inx=m_lbWatchedDirs.GetNextItem( -1, LVNI_ALL|LVNI_SELECTED); + if( inx != -1) + { + _PathInfo* pi=(_PathInfo*)m_arPaths[inx]; + fwWatcher.RemoveWatch( pi->m_sPath); + m_lbWatchedDirs.DeleteItem( inx); + m_arPaths.RemoveAt(inx); + delete pi; + } + m_lbWatchedDirs.SetFocus(); +} + +LRESULT CFileWatcherDlg::OnFileNotify(WPARAM wP, LPARAM) +// --- In : wP: the ID of the Notifier object +// --- Out : +// --- Returns : ... +// --- Effect : Responds to the notification message from FileWatcher +{ + CString str; + + COXFileWatchNotifier fwnNotifier; + fwnNotifier = fwWatcher.GetFileWatchNotifier( wP); + + // If the wP is an invalid ID then the notifier is empty + if( !fwnNotifier.IsEmpty()) + { + LV_ITEM lvi; + + // Initialize LV_ITEM members that are common to all items. + lvi.mask = LVIF_TEXT; + lvi.iItem = m_lbNotifications.GetItemCount(); + lvi.iSubItem = 0; + lvi.pszText = (LPTSTR)(LPCTSTR)fwnNotifier.GetPath(); + m_lbNotifications.InsertItem( &lvi); + + CString time=fwnNotifier.GetNotificationTime().Format(_T("%H:%M:%S")); + lvi.iSubItem = 1; + lvi.pszText = (LPTSTR)(LPCTSTR)time; + m_lbNotifications.SetItem( &lvi); + + lvi.iSubItem = 2; + str.LoadString((fwnNotifier.IsExtendedInfoAvailable())?IDS_YES:IDS_NO); + lvi.pszText = (LPTSTR)(LPCTSTR)str; + m_lbNotifications.SetItem( &lvi); + + if( fwnNotifier.IsExtendedInfoAvailable()) + { + lvi.iSubItem = 3; + lvi.pszText = (LPTSTR)(LPCTSTR)GetStringFromAction(fwnNotifier.GetAction(), str); + m_lbNotifications.SetItem( &lvi); + + lvi.iSubItem = 4; + lvi.pszText = (LPTSTR)(LPCTSTR)fwnNotifier.GetFileName(); + m_lbNotifications.SetItem( &lvi); + + lvi.iSubItem = 5; + lvi.pszText = (LPTSTR)(LPCTSTR)fwnNotifier.GetNewFileName(); + m_lbNotifications.SetItem( &lvi); + } + + if( m_lbNotifications.GetItemCount()>MAX_NOTIFICATION) + { + m_lbNotifications.DeleteItem( 0); + } + m_lbNotifications.EnsureVisible( m_lbNotifications.GetItemCount()-1, FALSE); + } + return 0; +} + + +CString& CFileWatcherDlg::GetStringFromFilter( DWORD dwFilter, CString& str) +// --- In : dwFilter: value of the filter +// --- Out : str: text description of the value in the dwFilter +// --- Returns : A reference to the str +// --- Effect : Converts the given filter value to the textual representation +{ + CString tmp; + CString sep; + + sep.LoadString( IDS_SEPARATOR); + + str.Empty(); + if( dwFilter & COXFileWatcher::OXFileWatchChangeFileName) + { + tmp.LoadString( IDS_CH_FILE_NAME); + str = tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeDirName) + { + tmp.LoadString( IDS_CH_DIR_NAME); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeAttributes) + { + tmp.LoadString( IDS_CH_ATTR); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeSize) + { + tmp.LoadString( IDS_CH_SIZE); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeLastWrite) + { + tmp.LoadString( IDS_CH_LAST_WRITE); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeLastAccess) + { + tmp.LoadString( IDS_CH_LAST_ACCESS); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeCreation) + { + tmp.LoadString( IDS_CH_CREATION); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + if( dwFilter & COXFileWatcher::OXFileWatchChangeSecurity) + { + tmp.LoadString( IDS_CH_SECURITY); + if( str.GetLength()>0) str+=sep; + str += tmp; + } + return str; +} + +CString& CFileWatcherDlg::GetStringFromAction( DWORD dwAction, CString& str) +// --- In : dwAction: value of the action +// --- Out : str: text description of the value in the dwAction +// --- Returns : A reference to the str +// --- Effect : Converts the given action value to the textual representation +{ + str.Empty(); + + if( dwAction == COXFileWatchNotifier::OXFileWatchActionAdded) + { + str.LoadString( IDS_ADDED); + return str; + } + if( dwAction == COXFileWatchNotifier::OXFileWatchActionRemoved) + { + str.LoadString( IDS_REMOVED); + return str; + } + if( dwAction == COXFileWatchNotifier::OXFileWatchActionModified) + { + str.LoadString( IDS_MODIFIED); + return str; + } + if( dwAction == COXFileWatchNotifier::OXFileWatchActionRename) + { + str.LoadString( IDS_RENAME); + return str; + } + return str; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.h new file mode 100644 index 0000000..175a357 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherDlg.h @@ -0,0 +1,51 @@ +// FileWatcherDlg.h : header file +// + +#include "OXFileWatcher.h" + +///////////////////////////////////////////////////////////////////////////// +// CFileWatcherDlg dialog + +class CFileWatcherDlg : public CDialog +{ + COXFileWatcher fwWatcher; + +// Construction +public: + ~CFileWatcherDlg(); + CFileWatcherDlg(CWnd* pParent = NULL); // standard constructor + + CString& GetStringFromFilter( DWORD Filter, CString& str); + CString& GetStringFromAction( DWORD Action, CString& str); + +// Dialog Data + //{{AFX_DATA(CFileWatcherDlg) + enum { IDD = IDD_FILEWATCHER_DIALOG }; + CListCtrl m_lbWatchedDirs; + CListCtrl m_lbNotifications; + //}}AFX_DATA + + CPtrArray m_arPaths; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileWatcherDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CFileWatcherDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAddDir(); + afx_msg void OnRemoveDir(); + afx_msg LRESULT OnFileNotify(WPARAM, LPARAM); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherInfo.rtf new file mode 100644 index 0000000..f2db24d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/FileWatcherInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.cpp new file mode 100644 index 0000000..dc84615 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// FileWatcher.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.h new file mode 100644 index 0000000..520a697 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/StdAfx.h @@ -0,0 +1,18 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.ico new file mode 100644 index 0000000..c2691f4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.rc2 new file mode 100644 index 0000000..6b2e2eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/res/FileWatcher.rc2 @@ -0,0 +1,13 @@ +// +// FILEWATCHER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/resource.h new file mode 100644 index 0000000..09b1107 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/FileWatcher/resource.h @@ -0,0 +1,62 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by FileWatcher.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_FILEWATCHER_DIALOG 130 +#define IDS_DIRECTORY 102 +#define IDS_WATCH_SUBDIRS 103 +#define IDS_FILTER 104 +#define IDS_TIME 105 +#define IDS_EXTENDED_INFO 106 +#define IDS_ACTION 107 +#define IDS_FILE_NAME 108 +#define IDS_NEW_FILE_NAME 109 +#define IDS_CH_FILE_NAME 110 +#define IDS_CH_DIR_NAME 111 +#define IDS_CH_ATTR 112 +#define IDS_CH_SIZE 113 +#define IDS_CH_LAST_WRITE 114 +#define IDS_CH_LAST_ACCESS 115 +#define IDS_CH_CREATION 116 +#define IDS_CH_SECURITY 117 +#define IDS_YES 118 +#define IDS_NO 119 +#define IDS_ADDED 120 +#define IDS_REMOVED 121 +#define IDS_MODIFIED 122 +#define IDS_RENAME 123 +#define IDS_SEPARATOR 124 +#define IDS_SOMETHING_WRONG 125 +#define IDS_NO_PATH 126 +#define IDS_NO_DIR_IS_SELECTED 127 +#define IDR_MAINFRAME 128 +#define IDD_ENTER_DIR 129 +#define ID_DESCRIPTION_FILE 129 +#define IDC_ADD_DIR 1005 +#define IDC_REMOVE_DIR 1006 +#define IDC_DIR 1007 +#define IDC_WATCH_SUB_TREE 1008 +#define IDC_CHANGE_FILE_NAME 1009 +#define IDC_CHANGE_DIR_NAME 1010 +#define IDC_CHANGE_ATTRIBUTES 1011 +#define IDC_CHANGE_SIZE 1012 +#define IDC_CHANGE_LAST_WRITE 1013 +#define IDC_CHANGE_LAST_ACCESS 1014 +#define IDC_CHANGE_CREATION 1015 +#define IDC_CHANGE_SECURITY 1016 +#define IDC_WATCHED_DIRS 1020 +#define IDC_NOTIFICATIONS 1021 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1022 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/OXCheck.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/OXCheck.h new file mode 100644 index 0000000..480bc2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/OXCheck.h @@ -0,0 +1,39 @@ +// ========================================================================== +// Check specification +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +// Header file : OXCheck.h +// ////////////////////////////////////////////////////////////////////////// + +#define INIT_CHECK() \ + int _v = 0; \ + int _cv = 0; \ + CString _s,_cs; \ + CString _sMsg; \ + int errors = 0; \ + int total = 0; \ + int number = 1; + +#define CHECK(value, correctValue) \ + _v = (int)(value); _cv = (int)(correctValue); total++; \ + _sMsg.Format(_T(" %2.2i (line %4.4i). %14.14s %i == %i"), number++, __LINE__, \ + ((_v == _cv) ? _T("Correct") : _T("* INCORRECT *")), _v, _cv); \ + TRACE1("%s\n", _sMsg); \ + if (_v != _cv) { errors++; AfxMessageBox(_sMsg, MB_ICONEXCLAMATION); } + +#define CHECKS(value, correctValue) \ + _s = (value); _cs = (correctValue); total++; \ + _sMsg.Format(_T(" %2.2i (line %4.4i). %14.14s %s == %s"), number++, __LINE__, \ + ((_s == _cs) ? _T("Correct") : _T("* INCORRECT *")), _s, _cs); \ + TRACE1("%s\n", _sMsg); \ + if (_s != _cs) { errors++; AfxMessageBox(_sMsg, MB_ICONEXCLAMATION); } + +#define RESET_NUMBER(Tx) \ + number = 1; \ + TRACE1("\n%s\n", _T(Tx)); + +#define SHOW_RESULT() \ + TRACE2("\n*** Errors --- %i / %i\n", errors, total); + +// ////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.cpp new file mode 100644 index 0000000..67dd54c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// URLDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.h new file mode 100644 index 0000000..8f23074 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/StdAfx.h @@ -0,0 +1,20 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE extensions + +#include + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.cpp new file mode 100644 index 0000000..e872bbd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.cpp @@ -0,0 +1,94 @@ +// UNCListDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "URLDemo.h" +#include "UNCListDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CUNCListDlg dialog + + +CUNCListDlg::CUNCListDlg(CWnd* pParent /*=NULL*/) + : CDialog(CUNCListDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CUNCListDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CUNCListDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CUNCListDlg) + DDX_Control(pDX, IDCANCEL, m_wndClose); + DDX_Control(pDX, IDC_LIST, m_wndList); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CUNCListDlg, CDialog) + //{{AFX_MSG_MAP(CUNCListDlg) + ON_WM_TIMER() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CUNCListDlg message handlers + +void CUNCListDlg::SetSearchUnc(COXIteratorUNC iterUNC, BOOL bFiles, BOOL bDirs, + BOOL bRecursive, BOOL bDepthFirst) + { + m_iterUNC = iterUNC; + m_bFiles = bFiles; + m_bDirs = bDirs; + m_bRecursive = bRecursive; + m_bDepthFirst = bDepthFirst; + } + +BOOL CUNCListDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // ... Set a timer so that the list will be filled whan this window is + // fully initialized and visisble + SetTimer(0, 10, NULL); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } + +void CUNCListDlg::OnTimer(UINT nIDEvent) + { + if (!IsWindowVisible()) + // ... Only start the list when we are visible, + // otherwise wait for the next timer event. + return; + + // ... Kill the running timer + KillTimer(0); + + m_wndClose.EnableWindow(FALSE); + + int nTopIndex = 0; + m_iterUNC.Start(m_bFiles, m_bDirs, m_bRecursive, m_bDepthFirst); + while(!m_iterUNC.IsEmpty()) + { + m_wndList.AddString(m_iterUNC); + m_wndList.SetTopIndex(nTopIndex++); + m_wndList.RedrawWindow(NULL, NULL, RDW_UPDATENOW); + m_iterUNC++; + } + m_iterUNC.End(); + + m_wndClose.EnableWindow(TRUE); + + CDialog::OnTimer(nIDEvent); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.h new file mode 100644 index 0000000..9562fa8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/UNCListDlg.h @@ -0,0 +1,46 @@ +// UNCListDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CUNCListDlg dialog + +#include "OXIteratorUNC.h" + +class CUNCListDlg : public CDialog +{ +// Construction +public: + void SetSearchUnc (COXIteratorUNC iterUNC, BOOL bFiles, BOOL bDirs, + BOOL bRecursive, BOOL bDepthFirst); + CUNCListDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CUNCListDlg) + enum { IDD = IDD_UNC_LIST }; + CButton m_wndClose; + CListBox m_wndList; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CUNCListDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + BOOL m_bRecursive; + BOOL m_bDirs; + BOOL m_bFiles; + BOOL m_bDepthFirst; + COXIteratorUNC m_iterUNC; + + // Generated message map functions + //{{AFX_MSG(CUNCListDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnTimer(UINT nIDEvent); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.clw new file mode 100644 index 0000000..3e760ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.clw @@ -0,0 +1,95 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CURLDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "urldemo.h" +LastPage=0 + +ClassCount=3 +Class1=CUNCListDlg +Class2=CURLDemoApp +Class3=CURLDemoDlg + +ResourceCount=2 +Resource1=IDD_UNC_LIST (Dutch (Belgium)) +Resource2=IDD_URLDEMO_DIALOG (Dutch (Belgium)) + +[CLS:CUNCListDlg] +Type=0 +BaseClass=CDialog +HeaderFile=UNCListDlg.h +ImplementationFile=UNCListDlg.cpp +LastObject=CUNCListDlg + +[CLS:CURLDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=URLDemo.h +ImplementationFile=URLDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CURLDemoApp + +[CLS:CURLDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=URLDemoDlg.h +ImplementationFile=URLDemoDlg.cpp +LastObject=IDC_TEST + +[DLG:IDD_UNC_LIST] +Type=1 +Class=CUNCListDlg + +[DLG:IDD_URLDEMO_DIALOG] +Type=1 +Class=CURLDemoDlg + +[DLG:IDD_URLDEMO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=33 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_URL_UNC,edit,1350631552 +Control3=IDC_SPLIT_URL,button,1342242816 +Control4=IDC_COMBINE_URL,button,1342242816 +Control5=IDC_SPLIT_UNC,button,1342242816 +Control6=IDC_COMBINE_UNC,button,1342242816 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_PROTOCOL,edit,1350631552 +Control10=IDC_URL_PART,button,1342242819 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_PORT,edit,1350631552 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_SERVER,edit,1350631552 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_SHARE,edit,1350631552 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_DIRECTORY,edit,1350631552 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_FILE,edit,1350631552 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_BASE_NAME,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_EXTENSION,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_INCLUDE_FILES,button,1342242819 +Control28=IDC_INCLUDE_DIRS,button,1342242819 +Control29=IDC_RECURSIVE,button,1342242819 +Control30=IDC_LIST,button,1342242817 +Control31=IDC_TEST,button,1073807360 +Control32=IDCANCEL,button,1342242816 +Control33=IDC_DEPTH_FIRST,button,1342242819 + +[DLG:IDD_UNC_LIST (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=2 +Control1=IDCANCEL,button,1342242817 +Control2=IDC_LIST,listbox,1352728833 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.cpp new file mode 100644 index 0000000..3f9e2df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.cpp @@ -0,0 +1,92 @@ +// URLDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "URLDemo.h" +#include "URLDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoApp + +BEGIN_MESSAGE_MAP(CURLDemoApp, CWinApp) + //{{AFX_MSG_MAP(CURLDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoApp construction + +CURLDemoApp::CURLDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CURLDemoApp object + +CURLDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoApp initialization + +BOOL CURLDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CURLDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CURLDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsp new file mode 100644 index 0000000..9da331d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsp @@ -0,0 +1,285 @@ +# Microsoft Developer Studio Project File - Name="URLDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=URLDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "URLDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "URLDemo.mak" CFG="URLDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "URLDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "URLDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "URLDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "URLDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "URLDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "URLDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"URLDemo.exe" + +!ELSEIF "$(CFG)" == "URLDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"URLDemo.exe" + +!ELSEIF "$(CFG)" == "URLDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URLDemo_" +# PROP BASE Intermediate_Dir "URLDemo_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"URLDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"URLDemo.exe" + +!ELSEIF "$(CFG)" == "URLDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "URLDemo0" +# PROP BASE Intermediate_Dir "URLDemo0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"URLDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"URLDemo.exe" + +!ELSEIF "$(CFG)" == "URLDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URLDemo1" +# PROP BASE Intermediate_Dir "URLDemo1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"URLDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"URLDemo.exe" + +!ENDIF + +# Begin Target + +# Name "URLDemo - Win32 Release" +# Name "URLDemo - Win32 Debug" +# Name "URLDemo - Win32 Release_Shared" +# Name "URLDemo - Win32 Unicode_Debug" +# Name "URLDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIteratorUNC.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXIteratorUNC.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXUNC.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXUNC.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXUNCStandardActor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXURL.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\UNCListDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\URLDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\URLDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\URLDemoDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\OXCheck.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXURL.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\UNCListDlg.h +# End Source File +# Begin Source File + +SOURCE=.\URLDemo.h +# End Source File +# Begin Source File + +SOURCE=.\URLDemoDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\URLDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\URLDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\urldemoinfo.rtf +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsw new file mode 100644 index 0000000..a61a6fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "URLDemo"=".\URLDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.h new file mode 100644 index 0000000..acf9778 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.h @@ -0,0 +1,38 @@ +// URLDemo.h : main header file for the URLDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoApp: +// See URLDemo.cpp for the implementation of this class +// + +class CURLDemoApp : public CWinApp +{ +public: + CURLDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CURLDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CURLDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.rc new file mode 100644 index 0000000..2092590 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.rc @@ -0,0 +1,248 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\URLDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXUNCStandartActor.rc""\r\n" + "#endif\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 DISCARDABLE "res\\URLDemo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_URLDEMO_DIALOG DIALOGEX 0, 0, 226, 267 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "URL Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "URL/UNC",IDC_STATIC,7,10,38,8 + EDITTEXT IDC_URL_UNC,52,7,167,14,ES_AUTOHSCROLL + PUSHBUTTON "&Split URL",IDC_SPLIT_URL,61,25,50,14 + PUSHBUTTON "&Combine URL",IDC_COMBINE_URL,126,25,50,14 + PUSHBUTTON "&Split UNC",IDC_SPLIT_UNC,61,44,50,14 + PUSHBUTTON "&Combine UNC",IDC_COMBINE_UNC,126,44,50,14 + GROUPBOX "Parts",IDC_STATIC,7,59,212,127 + LTEXT "Protocol",IDC_STATIC,11,71,36,8 + EDITTEXT IDC_PROTOCOL,52,68,40,14,ES_AUTOHSCROLL + CONTROL "Part of URL",IDC_URL_PART,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,126,70,50,10 + LTEXT "Port",IDC_STATIC,11,88,28,8 + EDITTEXT IDC_PORT,52,85,40,14,ES_AUTOHSCROLL + LTEXT "Server",IDC_STATIC,11,105,35,8 + EDITTEXT IDC_SERVER,52,102,117,14,ES_AUTOHSCROLL + LTEXT "Share",IDC_STATIC,11,122,25,8 + EDITTEXT IDC_SHARE,52,119,117,14,ES_AUTOHSCROLL + LTEXT "Directory",IDC_STATIC,11,139,40,8 + EDITTEXT IDC_DIRECTORY,52,136,117,14,ES_AUTOHSCROLL + LTEXT "File",IDC_STATIC,11,156,23,8 + EDITTEXT IDC_FILE,52,153,60,14,ES_AUTOHSCROLL + LTEXT "Basename",IDC_STATIC,118,156,43,8 + LTEXT "",IDC_BASE_NAME,164,156,47,8 + LTEXT "Extension",IDC_STATIC,118,172,36,8 + LTEXT "",IDC_EXTENSION,163,172,50,8 + LTEXT "File managment functions are fully supported but not shown in this demo : Copy, Delete, Rename, File attributes, File times and much more ...", + IDC_STATIC,7,188,212,24 + LTEXT "Fill out a UNC at the top, select which list you want and click List", + IDC_STATIC,7,216,212,8 + CONTROL "&Files",IDC_INCLUDE_FILES,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,227,31,10 + CONTROL "&Directories",IDC_INCLUDE_DIRS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,40,227,49,10 + CONTROL "&Recurse",IDC_RECURSIVE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,89,227,39,10 + DEFPUSHBUTTON "&List",IDC_LIST,176,227,43,14 + PUSHBUTTON "&Test",IDC_TEST,45,247,32,13,NOT WS_VISIBLE + PUSHBUTTON "Close",IDCANCEL,94,246,50,14 + CONTROL "&Depth first",IDC_DEPTH_FIRST,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,130,227,46,10 +END + +IDD_UNC_LIST DIALOG DISCARDABLE 0, 0, 244, 99 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "UNC List" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Close",IDCANCEL,97,78,50,14 + LISTBOX IDC_LIST,7,7,230,65,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_TABSTOP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,3 + PRODUCTVERSION 1,0,0,3 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "URLDEMO MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 3\0" + VALUE "InternalName", "URLDEMO\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd.\0" + VALUE "OriginalFilename", "URLDEMO.EXE\0" + VALUE "ProductName", "URLDEMO Application\0" + VALUE "ProductVersion", "1, 0, 0, 3\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_URLDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 260 + END + + IDD_UNC_LIST, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 237 + TOPMARGIN, 7 + BOTTOMMARGIN, 92 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About URLDemo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Ultimate tool box demo" + ID_DESCRIPTION_FILE "urldemoinfo.rtf" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\URLDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXUNCStandartActor.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.vcproj new file mode 100644 index 0000000..76d28d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemo.vcproj @@ -0,0 +1,1083 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.cpp new file mode 100644 index 0000000..1ecc4cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.cpp @@ -0,0 +1,320 @@ +// URLDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "URLDemo.h" +#include "URLDemoDlg.h" +#include "OXURL.h" +#include "OXIteratorUNC.h" +#include "OXCheck.h" +#include "UNCListDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// CURLDemoDlg dialog + +CURLDemoDlg::CURLDemoDlg(CWnd* pParent /*=NULL*/) +: CDialog(CURLDemoDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CURLDemoDlg) + m_sBaseName = _T(""); + m_sDirectory = _T(""); + m_sExtension = _T(""); + m_sFile = _T(""); + m_nPort = 0; + m_sProtocol = _T(""); + m_sServer = _T(""); + m_sShare = _T(""); + m_sURL_UNC = _T(""); + m_bURLPart = FALSE; + m_bIncludeDirs = FALSE; + m_bIncludeFiles = TRUE; + m_bRecursive = FALSE; + m_bDepthFirst = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CURLDemoDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CURLDemoDlg) + DDX_Text(pDX, IDC_BASE_NAME, m_sBaseName); + DDX_Text(pDX, IDC_DIRECTORY, m_sDirectory); + DDX_Text(pDX, IDC_EXTENSION, m_sExtension); + DDX_Text(pDX, IDC_FILE, m_sFile); + DDX_Text(pDX, IDC_PORT, m_nPort); + DDX_Text(pDX, IDC_PROTOCOL, m_sProtocol); + DDX_Text(pDX, IDC_SERVER, m_sServer); + DDX_Text(pDX, IDC_SHARE, m_sShare); + DDX_Text(pDX, IDC_URL_UNC, m_sURL_UNC); + DDX_Check(pDX, IDC_URL_PART, m_bURLPart); + DDX_Check(pDX, IDC_INCLUDE_DIRS, m_bIncludeDirs); + DDX_Check(pDX, IDC_INCLUDE_FILES, m_bIncludeFiles); + DDX_Check(pDX, IDC_RECURSIVE, m_bRecursive); + DDX_Check(pDX, IDC_DEPTH_FIRST, m_bDepthFirst); + //}}AFX_DATA_MAP + } + +BEGIN_MESSAGE_MAP(CURLDemoDlg, CDialog) +//{{AFX_MSG_MAP(CURLDemoDlg) +ON_WM_SYSCOMMAND() +ON_WM_PAINT() +ON_WM_QUERYDRAGICON() +ON_BN_CLICKED(IDC_COMBINE_URL, OnCombineURL) +ON_BN_CLICKED(IDC_SPLIT_URL, OnSplitURL) + ON_BN_CLICKED(IDC_TEST, OnTest) + ON_BN_CLICKED(IDC_COMBINE_UNC, OnCombineUNC) + ON_BN_CLICKED(IDC_SPLIT_UNC, OnSplitUNC) + ON_BN_CLICKED(IDC_LIST, OnList) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoDlg message handlers + +BOOL CURLDemoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control + } + +void CURLDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CURLDemoDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CURLDemoDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CURLDemoDlg::OnSplitURL() + { + if (!UpdateData(TRUE)) + return; + + COXURL URL; + URL = m_sURL_UNC; + + // Get the result + m_sProtocol = URL.Protocol(); + m_nPort = URL.Port(); + m_sServer = URL.UNC().Server(); + m_sShare = URL.UNC().Share(); + m_sDirectory = URL.UNC().Directory(); + m_sFile = URL.UNC().File(); + m_sBaseName = URL.UNC().Base(); + m_sExtension = URL.UNC().Extension(); + m_bURLPart = URL.UNC().URLPart(); + + // Get the input parameters again + m_sURL_UNC = URL; + + m_sShare.Empty(); + + UpdateData(FALSE); + } + +void CURLDemoDlg::OnCombineURL() + { + if (!UpdateData(TRUE)) + return; + + COXURL URL; + URL.Protocol() = m_sProtocol; + URL.Port() = m_nPort; + URL.UNC().Server() = m_sServer; + URL.UNC().Share() = m_sShare; + URL.UNC().Directory() = m_sDirectory; + URL.UNC().File() = m_sFile; + + // Get the result + m_sURL_UNC = URL; + + // Get the input parameters again + m_sProtocol = URL.Protocol(); + m_nPort = URL.Port(); + m_sServer = URL.UNC().Server(); + m_sShare = URL.UNC().Share(); + m_sDirectory = URL.UNC().Directory(); + m_sFile = URL.UNC().File(); + m_sBaseName = URL.UNC().Base(); + m_sExtension = URL.UNC().Extension(); + m_bURLPart = URL.UNC().URLPart(); + + UpdateData(FALSE); + } + +void CURLDemoDlg::OnCombineUNC() + { + if (!UpdateData(TRUE)) + return; + + COXUNC UNC; + UNC.Server() = m_sServer; + UNC.Share() = m_sShare; + UNC.Directory() = m_sDirectory; + UNC.File() = m_sFile; + UNC.URLPart() = m_bURLPart; + + // Get the result + + // Visual C++ 5.0 reports error C2593: 'operator =' is ambiguous + // m_sURL_UNC = UNC; + // There are indeeds two ways to intepret the assignment + // One is to convert COXUNC to const COXUNC + // The other is to convert COXUNC to LPCTSTR + // Appearently both are of equal importance in VC 5.0 + m_sURL_UNC =UNC; + + // Get the input parameters again + m_sServer = UNC.Server(); + m_sShare = UNC.Share(); + m_sDirectory = UNC.Directory(); + m_sFile = UNC.File(); + m_sBaseName = UNC.Base(); + m_sExtension = UNC.Extension(); + m_bURLPart = UNC.URLPart(); + + m_sProtocol.Empty(); + m_nPort = 0; + + UpdateData(FALSE); + } + +void CURLDemoDlg::OnSplitUNC() + { + if (!UpdateData(TRUE)) + return; + + COXUNC UNC; + UNC = m_sURL_UNC; + UNC.URLPart() = m_bURLPart; + + m_sServer = UNC.Server(); + m_sShare = UNC.Share(); + m_sDirectory = UNC.Directory(); + m_sFile = UNC.File(); + m_sBaseName = UNC.Base(); + m_sExtension = UNC.Extension(); + m_bURLPart = UNC.URLPart(); + + // Get the input parameters again + // Visual C++ 5.0 reports error C2593: 'operator =' is ambiguous + // m_sURL_UNC = UNC; + // There are indeeds two ways to intepret the assignment + // One is to convert COXUNC to const COXUNC& + // The other is to convert COXUNC to LPCTSTR + // Appearently both are of equal importance in VC 5.0 + m_sURL_UNC = UNC; + + m_sProtocol.Empty(); + m_nPort = 0; + + UpdateData(FALSE); + } + +void CURLDemoDlg::OnTest() + { + + INIT_CHECK(); + UNREFERENCED_PARAMETER(_v); + UNREFERENCED_PARAMETER(_cv); + + RESET_NUMBER("CURLDemoDlg::OnTest : Iteration"); + { + COXIteratorUNC iter; + iter = _T("C:\\Temp\\*.*"); + iter.Start(); + while(!iter.IsEmpty()) + { + TRACE1("- %s\n", (LPCTSTR)iter); + iter++; + } + } + + SHOW_RESULT(); + } + + +void CURLDemoDlg::OnList() + { + if (!UpdateData(TRUE)) + return; + + CUNCListDlg UNCListDlg; + UNCListDlg.SetSearchUnc((LPCTSTR)m_sURL_UNC, m_bIncludeFiles, m_bIncludeDirs, + m_bRecursive, m_bDepthFirst); + UNCListDlg.DoModal(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.h new file mode 100644 index 0000000..89482d5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/URLDemoDlg.h @@ -0,0 +1,56 @@ +// URLDemoDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CURLDemoDlg dialog + +class CURLDemoDlg : public CDialog +{ +// Construction +public: + CURLDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CURLDemoDlg) + enum { IDD = IDD_URLDEMO_DIALOG }; + CString m_sBaseName; + CString m_sDirectory; + CString m_sExtension; + CString m_sFile; + int m_nPort; + CString m_sProtocol; + CString m_sServer; + CString m_sShare; + CString m_sURL_UNC; + BOOL m_bURLPart; + BOOL m_bIncludeDirs; + BOOL m_bIncludeFiles; + BOOL m_bRecursive; + BOOL m_bDepthFirst; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CURLDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CURLDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCombineURL(); + afx_msg void OnSplitURL(); + afx_msg void OnTest(); + afx_msg void OnCombineUNC(); + afx_msg void OnSplitUNC(); + afx_msg void OnList(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.rc2 new file mode 100644 index 0000000..7172a43 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/res/URLDemo.rc2 @@ -0,0 +1,13 @@ +// +// URLDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/resource.h new file mode 100644 index 0000000..414c11c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/resource.h @@ -0,0 +1,42 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by URLDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_URLDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDD_UNC_LIST 130 +#define IDC_URL_UNC 1000 +#define IDC_PROTOCOL 1001 +#define IDC_PORT 1002 +#define IDC_SERVER 1003 +#define IDC_DIRECTORY 1004 +#define IDC_FILE 1005 +#define IDC_SPLIT_URL 1006 +#define IDC_COMBINE_URL 1007 +#define IDC_SPLIT_UNC 1008 +#define IDC_COMBINE_UNC 1009 +#define IDC_EXTENSION 1010 +#define IDC_BASE_NAME 1011 +#define IDC_TEST 1012 +#define IDC_SHARE 1013 +#define IDC_URL_PART 1015 +#define IDC_INCLUDE_FILES 1016 +#define IDC_INCLUDE_DIRS 1017 +#define IDC_RECURSIVE 1018 +#define IDC_LIST 1019 +#define IDC_DEPTH_FIRST 1021 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1022 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/urldemoinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/urldemoinfo.rtf new file mode 100644 index 0000000..02ce44a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/file/URLDemo/urldemoinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.cpp new file mode 100644 index 0000000..5c07838 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "ImageViewer.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.h new file mode 100644 index 0000000..2ac5b32 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__AEC8616B_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_CHILDFRM_H__AEC8616B_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__AEC8616B_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.bmp new file mode 100644 index 0000000..5159a3a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.jpg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.jpg new file mode 100644 index 0000000..9747aa7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Firework.jpg differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.clw new file mode 100644 index 0000000..e1aed13 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.clw @@ -0,0 +1,209 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMainFrame +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ImageViewer.h" +LastPage=0 + +ClassCount=6 +Class1=CImageViewerApp +Class2=CImageViewerDoc +Class3=CImageViewerView +Class4=CMainFrame + +ResourceCount=10 +Resource1=IDD_ABOUTBOX (English (U.S.)) +Resource2=IDR_MAINFRAME (English (U.S.)) +Resource3=IDR_IMAGEVTYPE +Resource8=IDR_IMAGEVTYPE (English (U.S.)) +Resource9=IDR_MAINFRAME +Class5=CChildFrame +Class6=CAboutDlg +Resource10=IDD_ABOUTBOX + +[CLS:CImageViewerApp] +Type=0 +HeaderFile=ImageViewer.h +ImplementationFile=ImageViewer.cpp +Filter=N +LastObject=CImageViewerApp + +[CLS:CImageViewerDoc] +Type=0 +HeaderFile=ImageViewerDoc.h +ImplementationFile=ImageViewerDoc.cpp +Filter=N +LastObject=CImageViewerDoc +BaseClass=CDocument +VirtualFilter=DC + +[CLS:CImageViewerView] +Type=0 +HeaderFile=ImageViewerView.h +ImplementationFile=ImageViewerView.cpp +Filter=C +LastObject=ID_FILE_OPEN +BaseClass=CView +VirtualFilter=VWC + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CMDIFrameWnd +VirtualFilter=fWC +LastObject=CMainFrame + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M +LastObject=CChildFrame + + +[CLS:CAboutDlg] +Type=0 +HeaderFile=ImageViewer.cpp +ImplementationFile=ImageViewer.cpp +Filter=D +LastObject=CAboutDlg +BaseClass=CDialog +VirtualFilter=dWC + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342308480 +Control2=IDC_STATIC,static,1342308352 +Control3=IDOK,button,1342373889 +Control4=IDC_IMAGE,static,1342312448 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_OPEN +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_APP_ABOUT +CommandCount=6 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_OPEN +Command2=ID_FILE_SAVE +Command3=ID_APP_ABOUT +CommandCount=3 + +[MNU:IDR_IMAGEVTYPE] +Type=1 +Class=CImageViewerView +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_MRU_FILE1 +Command6=ID_APP_EXIT +Command7=ID_VIEW_TOOLBAR +Command8=ID_VIEW_STATUS_BAR +Command9=ID_WINDOW_NEW +Command10=ID_WINDOW_CASCADE +Command11=ID_WINDOW_TILE_HORZ +Command12=ID_WINDOW_ARRANGE +Command13=ID_APP_ABOUT +CommandCount=13 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[MNU:IDR_IMAGEVTYPE (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_MRU_FILE1 +Command6=ID_APP_EXIT +Command7=ID_VIEW_TOOLBAR +Command8=ID_VIEW_STATUS_BAR +Command9=ID_WINDOW_NEW +Command10=ID_WINDOW_CASCADE +Command11=ID_WINDOW_TILE_HORZ +Command12=ID_WINDOW_ARRANGE +Command13=ID_APP_ABOUT +CommandCount=13 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_APP_ABOUT +CommandCount=6 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_SAVE +Command3=ID_APP_ABOUT +CommandCount=3 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.cpp new file mode 100644 index 0000000..8498171 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.cpp @@ -0,0 +1,192 @@ +// ImageViewer.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ImageViewer.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "ImageViewerDoc.h" +#include "ImageViewerView.h" + +#include "OXImageViewer.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerApp + +BEGIN_MESSAGE_MAP(CImageViewerApp, CWinApp) + //{{AFX_MSG_MAP(CImageViewerApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerApp construction + +CImageViewerApp::CImageViewerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CImageViewerApp object + +CImageViewerApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerApp initialization + +BOOL CImageViewerApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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_IMAGEVTYPE, + RUNTIME_CLASS(CImageViewerDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CImageViewerView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + COXImageViewer m_imageViewer; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + DDX_Control(pDX, IDC_IMAGE, m_imageViewer); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CImageViewerApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerApp message handlers + + +BOOL CAboutDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // reset ruler bar +#ifdef OXSCRLWND_USE_RULER + m_imageViewer.SetShowHorzRulerBar(FALSE); + m_imageViewer.SetShowVertRulerBar(FALSE); +#endif // OXSCRLWND_USE_RULER +#ifdef OXDIB_SUPPORTJPEG + // load jpeg file + m_imageViewer.LoadJPEGFile(_T("Firework.jpg")); +#else + m_imageViewer.LoadFile(_T("Firework.bmp")); +#endif // OXDIB_SUPPORTJPEG + // scale image to fit the size of the window + m_imageViewer.ZoomToWindow(); + // resize the control in order to fit the size of scaled image + m_imageViewer.SizeToContent(); + + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsp new file mode 100644 index 0000000..7a81780 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsp @@ -0,0 +1,308 @@ +# Microsoft Developer Studio Project File - Name="ImageViewer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ImageViewer - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ImageViewer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ImageViewer.mak" CFG="ImageViewer - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ImageViewer - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ImageViewer - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ImageViewer - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ImageViewer - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSCRLWND_USE_RULER" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ImageViewer.exe" + +!ELSEIF "$(CFG)" == "ImageViewer - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXSCRLWND_USE_RULER" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\..\Lib\libs\jpgd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"ImageViewer.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ImageViewer - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ImageViewer___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "ImageViewer___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSCRLWND_USE_RULER" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXSCRLWND_USE_RULER" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /i "..\..\..\Lib\Jpeg" /i "..\..\..\Lib\Jpeg\Jpegsrc6" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 ..\..\..\Lib\libs\jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ImageViewer.exe" +# ADD LINK32 ..\..\..\Lib\libs\jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"ImageViewer.exe" + +!ENDIF + +# Begin Target + +# Name "ImageViewer - Win32 Release" +# Name "ImageViewer - Win32 Debug" +# Name "ImageViewer - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBMPFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGphFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXImageViewer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCod.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCom.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGDom.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGExp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRulerOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScrollWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImageViewer.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImageViewer.rc +# End Source File +# Begin Source File + +SOURCE=.\ImageViewerDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImageViewerView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\ImageViewer.h +# End Source File +# Begin Source File + +SOURCE=.\ImageViewerDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ImageViewerView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\Oxdib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXImageViewer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXJPGCod.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXJPGCom.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXJPGDom.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXJPGExp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXJPGFle.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRulerOrganizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXScrollWnd.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ImageViewer.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ImageViewer.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ImageViewerDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsw new file mode 100644 index 0000000..ea0a63c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ImageViewer"=".\ImageViewer.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Ultimate ToolBox/Working/samples/graphics/ImageViewer", CGGCAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.h new file mode 100644 index 0000000..32153a3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.h @@ -0,0 +1,49 @@ +// ImageViewer.h : main header file for the IMAGEVIEWER application +// + +#if !defined(AFX_IMAGEVIEWER_H__AEC86165_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_IMAGEVIEWER_H__AEC86165_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerApp: +// See ImageViewer.cpp for the implementation of this class +// + +class CImageViewerApp : public CWinApp +{ +public: + CImageViewerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageViewerApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CImageViewerApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGEVIEWER_H__AEC86165_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.rc new file mode 100644 index 0000000..7f7fef5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.rc @@ -0,0 +1,425 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\ImageViewer.ico" +IDR_IMAGEVTYPE ICON DISCARDABLE "res\\ImageViewerDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_SAVE + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + 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 ImageViewer...", ID_APP_ABOUT + END +END + +IDR_IMAGEVTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + 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 "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + 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 ImageViewer...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 DIALOG DISCARDABLE 0, 0, 259, 167 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About ImageViewer" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "ImageViewer Version 1.0",IDC_STATIC,153,17,79,8, + SS_NOPREFIX + LTEXT "Copyright (C) The Code Project",IDC_STATIC,153,31,100,8 + DEFPUSHBUTTON "OK",IDOK,202,146,50,14,WS_GROUP + LTEXT "Image",IDC_IMAGE,7,7,134,153,SS_SUNKEN +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ImageViewer MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ImageViewer\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ImageViewer.EXE\0" + VALUE "ProductName", "ImageViewer Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 252 + TOPMARGIN, 7 + BOTTOMMARGIN, 160 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "ImageViewer" + IDR_IMAGEVTYPE "\nImageV\nImageV\nImage Files (*.bmp;*.jpg)\n.bmp;.jpg\nImageViewer.Document\nImageV.Document" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "ImageViewer" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ImageViewer.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" + "#include ""OXScrollWnd.rc""\r\n" + "#include ""OXImageViewer.rc""\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ImageViewer.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXScrollWnd.rc" +#include "OXImageViewer.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.vcproj new file mode 100644 index 0000000..145594a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewer.vcproj @@ -0,0 +1,1029 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.cpp new file mode 100644 index 0000000..df01746 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.cpp @@ -0,0 +1,111 @@ +// ImageViewerDoc.cpp : implementation of the CImageViewerDoc class +// + +#include "stdafx.h" +#include "ImageViewer.h" + +#include "ImageViewerDoc.h" +#include "ImageViewerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerDoc + +IMPLEMENT_DYNCREATE(CImageViewerDoc, CDocument) + +BEGIN_MESSAGE_MAP(CImageViewerDoc, CDocument) + //{{AFX_MSG_MAP(CImageViewerDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerDoc construction/destruction + +CImageViewerDoc::CImageViewerDoc() +{ + // TODO: add one-time construction code here + +} + +CImageViewerDoc::~CImageViewerDoc() +{ +} + +BOOL CImageViewerDoc::OnNewDocument() +{ + return FALSE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerDoc serialization + +void CImageViewerDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerDoc diagnostics + +#ifdef _DEBUG +void CImageViewerDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CImageViewerDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerDoc commands + +BOOL CImageViewerDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + if (!CDocument::OnOpenDocument(lpszPathName)) + return FALSE; + + // TODO: Add your specialized creation code here + POSITION pos=GetFirstViewPosition(); + ASSERT(pos!=NULL); + CImageViewerView* pView=(CImageViewerView*)GetNextView(pos); + ASSERT(pView!=NULL); +#ifdef OXDIB_SUPPORTJPEG + if(!pView->GetImageViewer()->LoadJPEGFile(lpszPathName)) +#endif // OXDIB_SUPPORTJPEG + pView->GetImageViewer()->LoadFile(lpszPathName); + + return TRUE; +} + +BOOL CImageViewerDoc::OnSaveDocument(LPCTSTR lpszPathName) +{ + // TODO: Add your specialized code here and/or call the base class + POSITION pos=GetFirstViewPosition(); + ASSERT(pos!=NULL); + CImageViewerView* pView=(CImageViewerView*)GetNextView(pos); + ASSERT(pView!=NULL); +#ifdef OXDIB_SUPPORTJPEG + return pView->GetImageViewer()->GetImage()->WriteJPEG(lpszPathName); +#else + return pView->GetImageViewer()->GetImage()->Write(lpszPathName); +#endif // OXDIB_SUPPORTJPEG +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.h new file mode 100644 index 0000000..c41386f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerDoc.h @@ -0,0 +1,59 @@ +// ImageViewerDoc.h : interface of the CImageViewerDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_IMAGEVIEWERDOC_H__AEC8616D_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_IMAGEVIEWERDOC_H__AEC8616D_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CImageViewerDoc : public CDocument +{ +protected: // create from serialization only + CImageViewerDoc(); + DECLARE_DYNCREATE(CImageViewerDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageViewerDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CImageViewerDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CImageViewerDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGEVIEWERDOC_H__AEC8616D_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.cpp new file mode 100644 index 0000000..241c874 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.cpp @@ -0,0 +1,127 @@ +// ImageViewerView.cpp : implementation of the CImageViewerView class +// + +#include "stdafx.h" +#include "ImageViewer.h" + +#include "ImageViewerDoc.h" +#include "ImageViewerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerView + +IMPLEMENT_DYNCREATE(CImageViewerView, CView) + +BEGIN_MESSAGE_MAP(CImageViewerView, CView) + //{{AFX_MSG_MAP(CImageViewerView) + ON_WM_CREATE() + ON_WM_SIZE() + ON_WM_ERASEBKGND() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerView construction/destruction + +CImageViewerView::CImageViewerView() +{ + // TODO: add construction code here + +} + +CImageViewerView::~CImageViewerView() +{ +} + +BOOL CImageViewerView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerView drawing + +void CImageViewerView::OnDraw(CDC* pDC) +{ + CImageViewerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerView diagnostics + +#ifdef _DEBUG +void CImageViewerView::AssertValid() const +{ + CView::AssertValid(); +} + +void CImageViewerView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CImageViewerDoc* CImageViewerView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CImageViewerDoc))); + return (CImageViewerDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CImageViewerView message handlers + +int CImageViewerView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + if(!m_imageViewer.Create(NULL,NULL,WS_CHILD|WS_VISIBLE, + CRect(0,0,0,0),this,1000)) + { + TRACE(_T("CImageViewerView::OnCreate: Failed to create image viewer control\n")); + return -1; + } + + return 0; +} + +void CImageViewerView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + if(::IsWindow(m_imageViewer.GetSafeHwnd())) + m_imageViewer.MoveWindow(CRect(0,0,cx,cy)); + +} + +BOOL CImageViewerView::OnEraseBkgnd(CDC* pDC) +{ + // TODO: Add your message handler code here and/or call default + UNREFERENCED_PARAMETER(pDC); + return TRUE; +} + +void CImageViewerView::OnActivateView(BOOL bActivate, CView* pActivateView, + CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + CView::OnActivateView(bActivate, pActivateView, pDeactiveView); + + if(::IsWindow(m_imageViewer.GetSafeHwnd())) + m_imageViewer.DoRealizePalette(TRUE,TRUE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.h new file mode 100644 index 0000000..9836800 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ImageViewerView.h @@ -0,0 +1,71 @@ +// ImageViewerView.h : interface of the CImageViewerView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_IMAGEVIEWERVIEW_H__AEC8616F_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_IMAGEVIEWERVIEW_H__AEC8616F_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXImageViewer.h" + +class CImageViewerView : public CView +{ +protected: // create from serialization only + CImageViewerView(); + DECLARE_DYNCREATE(CImageViewerView) + +// Attributes +public: + CImageViewerDoc* GetDocument(); + inline COXImageViewer* GetImageViewer() { return &m_imageViewer; } + +protected: + COXImageViewer m_imageViewer; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageViewerView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CImageViewerView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CImageViewerView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ImageViewerView.cpp +inline CImageViewerDoc* CImageViewerView::GetDocument() + { return (CImageViewerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGEVIEWERVIEW_H__AEC8616F_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.cpp new file mode 100644 index 0000000..b3c886d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.cpp @@ -0,0 +1,125 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "ImageViewer.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_PALETTECHANGED() + ON_WM_QUERYNEWPALETTE() + //}}AFX_MSG_MAP +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 + + +void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd) +{ + CMDIFrameWnd::OnPaletteChanged(pFocusWnd); + + // TODO: Add your message handler code here + SendMessageToDescendants(WM_PALETTECHANGED, + (pFocusWnd!=NULL ? (WPARAM)pFocusWnd->GetSafeHwnd() : NULL)); +} + +BOOL CMainFrame::OnQueryNewPalette() +{ + // TODO: Add your message handler code here and/or call default + + SendMessageToDescendants(WM_QUERYNEWPALETTE); + return CMDIFrameWnd::OnQueryNewPalette(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.h new file mode 100644 index 0000000..f88cf00 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/MainFrm.h @@ -0,0 +1,57 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__AEC86169_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_MAINFRM_H__AEC86169_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg BOOL OnQueryNewPalette(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__AEC86169_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ReadMe.txt new file mode 100644 index 0000000..69ce669 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/ReadMe.txt @@ -0,0 +1,117 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ImageViewer +======================================================================== + + +AppWizard has created this ImageViewer 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 ImageViewer application. + +ImageViewer.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ImageViewer.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CImageViewerApp application class. + +ImageViewer.cpp + This is the main application source file that contains the application + class CImageViewerApp. + +ImageViewer.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++. + +ImageViewer.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ImageViewer.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ImageViewer.rc. + +res\ImageViewer.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 ImageViewer.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +ImageViewerDoc.h, ImageViewerDoc.cpp - the document + These files contain your CImageViewerDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CImageViewerDoc::Serialize). + +ImageViewerView.h, ImageViewerView.cpp - the view of the document + These files contain your CImageViewerView class. + CImageViewerView objects are used to view CImageViewerDoc objects. + +res\ImageViewerDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CImageViewerDoc class. This icon is included by the main + resource file ImageViewer.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ImageViewer.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Resource.h new file mode 100644 index 0000000..105dd48 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/Resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ImageViewer.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_IMAGEVTYPE 129 +#define IDC_IMAGE 1000 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.cpp new file mode 100644 index 0000000..cdb4b33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ImageViewer.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.h new file mode 100644 index 0000000..eb973bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__AEC86167_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_STDAFX_H__AEC86167_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#define OXDIB_SUPPORTJPEG + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__AEC86167_D4E6_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.bmp new file mode 100644 index 0000000..2623f46 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.jpg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.jpg new file mode 100644 index 0000000..7ac047e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/dog.jpg differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.rc2 new file mode 100644 index 0000000..d0ed25a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewer.rc2 @@ -0,0 +1,13 @@ +// +// IMAGEVIEWER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewerDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewerDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/ImageViewerDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/Toolbar.bmp new file mode 100644 index 0000000..c969205 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/ImageViewer/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.clw new file mode 100644 index 0000000..f685592 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.clw @@ -0,0 +1,84 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CJPGtestApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "JPGtest.h" + +ClassCount=2 +Class1=CJPGtestApp +Class2=CJPGtestDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_JPGTEST_DIALOG + +[CLS:CJPGtestApp] +Type=0 +HeaderFile=JPGtest.h +ImplementationFile=JPGtest.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CJPGtestApp + +[CLS:CJPGtestDlg] +Type=0 +HeaderFile=JPGtestDlg.h +ImplementationFile=JPGtestDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CJPGtestDlg + +[DLG:IDD_JPGTEST_DIALOG] +Type=1 +Class=CJPGtestDlg +ControlCount=44 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_EDIT1,edit,1350631552 +Control4=IDC_EDIT2,edit,1350631552 +Control5=IDC_EDIT3,edit,1350639744 +Control6=IDC_EDIT4,edit,1350639744 +Control7=IDC_EDIT5,edit,1350639744 +Control8=IDC_RADIO1,button,1342308361 +Control9=IDC_RADIO2,button,1342308361 +Control10=IDC_RADIO3,button,1342308361 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_CHECK1,button,1342242819 +Control15=IDC_CHECK2,button,1342242819 +Control16=IDC_CHECK3,button,1342242819 +Control17=IDC_CHECK4,button,1342242819 +Control18=IDC_Compress,button,1342242816 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_COLORS_EDIT,edit,1350631552 +Control21=IDC_MAXMEM_EDIT,edit,1350631552 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_ONEONE_RADIO,button,1342308361 +Control25=IDC_HALF_RADIO,button,1342308361 +Control26=IDC_FOURTH_RADIO,button,1342308361 +Control27=IDC_EIGHT_RADIO,button,1342308361 +Control28=IDC_CHECK5,button,1342242819 +Control29=IDC_UnCompress,button,1342242816 +Control30=IDC_STATIC,button,1342177287 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_DINT_RADIO,button,1342308361 +Control33=IDC_DFAST_RADIO,button,1342308361 +Control34=IDC_DFLOAT_RADIO,button,1342308361 +Control35=IDC_FS_RADIO,button,1342308361 +Control36=IDC_ORDER_RADIO,button,1342308361 +Control37=IDC_NONE_RADIO,button,1342308361 +Control38=IDC_CHECK6,button,1342242819 +Control39=IDC_FAST_CHECK,button,1342242819 +Control40=IDC_NOSMOOTH_CHECK,button,1342242819 +Control41=IDC_ONEPASS_CHECK,button,1342242819 +Control42=IDC_GRAPH_BUTTON,button,1342242816 +Control43=IDC_JPG_BUTTON,button,1342242816 +Control44=IDC_TIME,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.cpp new file mode 100644 index 0000000..dc52ae4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.cpp @@ -0,0 +1,110 @@ +// JPGtest.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" + #include "oxbmpfle.h" + #include "oxjpgfle.h" + #include "oxjpgcom.h" + #include "oxjpgdom.h" + #include "oxjpgexp.h" +#include "utsampleabout.h" +#include "JPGtest.h" +#include "JPGtestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestApp + +BEGIN_MESSAGE_MAP(CJPGtestApp, CWinApp) + //{{AFX_MSG_MAP(CJPGtestApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestApp construction + +CJPGtestApp::CJPGtestApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CJPGtestApp object + +CJPGtestApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestApp initialization + +BOOL CJPGtestApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CJPGtestDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CJPGtestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsp new file mode 100644 index 0000000..996e7f6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsp @@ -0,0 +1,219 @@ +# Microsoft Developer Studio Project File - Name="JPGtest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=JPGtest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "JPGtest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "JPGtest.mak" CFG="JPGtest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "JPGtest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "JPGtest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "JPGtest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "JPGtest - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\lib\jpeg" /I "..\..\..\lib\jpeg\jpegsrc6" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\..\lib\jpeg" /i "..\..\..\lib\jpeg\jpegsrc6" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"JPGtest.exe" /libpath:"..\..\..\lib\libs" + +!ELSEIF "$(CFG)" == "JPGtest - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\lib\jpeg" /I "..\..\..\lib\jpeg\jpegsrc6" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\..\lib\jpeg" /i "..\..\..\lib\jpeg\jpegsrc6" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 jpgd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"JPGtest.exe" /pdbtype:sept /libpath:"..\..\..\lib\libs" + +!ELSEIF "$(CFG)" == "JPGtest - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "JPGtest_" +# PROP BASE Intermediate_Dir "JPGtest_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\lib\jpeg" /I "..\..\..\lib\jpeg\jpegsrc6" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /i "..\..\..\lib\jpeg" /i "..\..\..\lib\jpeg\jpegsrc6" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"JPGtest.exe" +# ADD LINK32 jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"JPGtest.exe" /libpath:"..\..\..\lib\libs" + +!ENDIF + +# Begin Target + +# Name "JPGtest - Win32 Release" +# Name "JPGtest - Win32 Debug" +# Name "JPGtest - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBMPFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGphFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCod.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCom.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGDom.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGExp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGFle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\JPGtest.cpp +# End Source File +# Begin Source File + +SOURCE=.\JPGtest.rc +# End Source File +# Begin Source File + +SOURCE=.\JPGtestDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\JPGtest.h +# End Source File +# Begin Source File + +SOURCE=.\JPGtestDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\JPGtest.ico +# End Source File +# Begin Source File + +SOURCE=.\res\JPGtest.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsw new file mode 100644 index 0000000..bb0f9ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "JPGtest"=".\JPGtest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.h new file mode 100644 index 0000000..4e4736c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.h @@ -0,0 +1,50 @@ +// JPGtest.h : main header file for the JPGTEST application +// + +#if !defined(AFX_JPGTEST_H__F8562DF7_85B7_11D1_A4E1_0020359647BF__INCLUDED_) +#define AFX_JPGTEST_H__F8562DF7_85B7_11D1_A4E1_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestApp: +// See JPGtest.cpp for the implementation of this class +// + +class CJPGtestApp : public CWinApp +{ +public: + CJPGtestApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CJPGtestApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CJPGtestApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_JPGTEST_H__F8562DF7_85B7_11D1_A4E1_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.rc new file mode 100644 index 0000000..a2444d5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.rc @@ -0,0 +1,255 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\JPGtest.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\JPGtest.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_JPGTEST_DIALOG DIALOGEX 0, 0, 396, 226 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "JPGtest" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "BMP",IDC_STATIC,17,10,16,8 + LTEXT "JPG",IDC_STATIC,19,26,14,8 + EDITTEXT IDC_EDIT1,38,8,289,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT2,38,25,289,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT3,65,61,31,13,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT4,65,79,31,13,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT5,65,96,31,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "DCT int",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,128,61,46,12 + CONTROL "DCT Fast",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,128,71,46,12 + CONTROL "DCT Float",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,128,82,46,12 + LTEXT "Quality",IDC_STATIC,23,61,32,13 + LTEXT "Smooth",IDC_STATIC,24,79,31,10 + LTEXT "MaxMem",IDC_STATIC,19,96,36,13 + CONTROL "Grayscale",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,96,122,50,9 + CONTROL "Baseline",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,96,132,63,9 + CONTROL "Progressive",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,96,143,51,9 + CONTROL "Optimize",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,96,155,59,10 + PUSHBUTTON "Compress",IDC_Compress,54,180,81,17 + GROUPBOX "Compress",IDC_STATIC,14,49,168,158 + EDITTEXT IDC_COLORS_EDIT,236,62,49,14,ES_AUTOHSCROLL + EDITTEXT IDC_MAXMEM_EDIT,236,84,49,14,ES_AUTOHSCROLL + LTEXT "Colors",IDC_STATIC,192,65,36,15 + LTEXT "MaxMem",IDC_STATIC,194,85,34,12 + CONTROL "1/1",IDC_ONEONE_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,211,107,66,9 + CONTROL "1/2",IDC_HALF_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,211,118,66,11 + CONTROL "1/4",IDC_FOURTH_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,211,131,66,9 + CONTROL "1/8",IDC_EIGHT_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,211,142,66,11 + CONTROL "OS2 Format",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,193,164,77,12 + PUSHBUTTON "Uncompress",IDC_UnCompress,238,180,81,17 + GROUPBOX "Uncompress",IDC_STATIC,186,49,187,158 + LTEXT "Operation Time : ",IDC_STATIC,126,210,55,11 + CONTROL "DCT int",IDC_DINT_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,63,42,9 + CONTROL "DCT Fast",IDC_DFAST_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,72,48,8 + CONTROL "DCT Float",IDC_DFLOAT_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,80,48,8 + CONTROL "Floyd-Steinl",IDC_FS_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,108,52,8 + CONTROL "Ordered",IDC_ORDER_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,118,53,8 + CONTROL "None",IDC_NONE_RADIO,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,316,126,48,8 + CONTROL "Grayscale",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,290,139,74,8 + CONTROL "Fast",IDC_FAST_CHECK,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,290,148,74,8 + CONTROL "No Smooth",IDC_NOSMOOTH_CHECK,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,290,157,74,8 + CONTROL "One Pass",IDC_ONEPASS_CHECK,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,290,166,74,8 + PUSHBUTTON "...",IDC_GRAPH_BUTTON,346,6,27,14 + PUSHBUTTON "...",IDC_JPG_BUTTON,346,24,27,14 + LTEXT "0",IDC_TIME,185,210,60,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "JPGtest MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "JPGtest\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "JPGtest.EXE\0" + VALUE "ProductName", "JPGtest Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_JPGTEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 382 + TOPMARGIN, 7 + BOTTOMMARGIN, 221 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About JPGtest..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME " JPEGtest (Dundas Software)" + ID_DESCRIPTION_FILE "jpegtestinfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\JPGtest.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.vcproj new file mode 100644 index 0000000..b4ab5a0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtest.vcproj @@ -0,0 +1,761 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.cpp new file mode 100644 index 0000000..c7b2853 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.cpp @@ -0,0 +1,313 @@ +// JPGtestDlg.cpp : implementation file +// + +#include "stdafx.h" + #include "oxbmpfle.h" + #include "oxjpgfle.h" + #include "oxjpgcom.h" + #include "oxjpgdom.h" + #include "oxjpgexp.h" +#include "utsampleabout.h" +#include "JPGtest.h" +#include "JPGtestDlg.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define SIZE_ERROR_BUF 255 +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestDlg dialog + +CJPGtestDlg::CJPGtestDlg(CWnd* pParent /*=NULL*/) + : CDialog(CJPGtestDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CJPGtestDlg) + m_sGraphicsFile = _T("??????.bmp"); + m_sJPEGFile = _T("??????.jpg"); + m_bGray = FALSE; + m_bBase = FALSE; + m_bProgr = FALSE; + m_bOpt = FALSE; + m_nQuality = 75; + m_nSmooth = 0; + m_nMaxMem = 0; + m_nDCT = -1; + m_nColors = 0; + m_nMaxMem2 = 0; + m_bOnePass = FALSE; + m_bGrayScale2 = FALSE; + m_bFast = FALSE; + m_bNoSmooth = FALSE; + m_bOS2 = FALSE; + m_nDither = -1; + m_nScale = -1; + m_nDCT2 = -1; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CJPGtestDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CJPGtestDlg) + DDX_Control(pDX, IDC_TIME, m_Time_Static); + DDX_Text(pDX, IDC_EDIT1, m_sGraphicsFile); + DDX_Text(pDX, IDC_EDIT2, m_sJPEGFile); + DDX_Check(pDX, IDC_CHECK1, m_bGray); + DDX_Check(pDX, IDC_CHECK2, m_bBase); + DDX_Check(pDX, IDC_CHECK3, m_bProgr); + DDX_Check(pDX, IDC_CHECK4, m_bOpt); + DDX_Text(pDX, IDC_EDIT3, m_nQuality); + DDX_Text(pDX, IDC_EDIT4, m_nSmooth); + DDX_Text(pDX, IDC_EDIT5, m_nMaxMem); + DDX_Radio(pDX, IDC_RADIO1, m_nDCT); + DDX_Text(pDX, IDC_COLORS_EDIT, m_nColors); + DDX_Text(pDX, IDC_MAXMEM_EDIT, m_nMaxMem2); + DDX_Check(pDX, IDC_ONEPASS_CHECK, m_bOnePass); + DDX_Check(pDX, IDC_CHECK6, m_bGrayScale2); + DDX_Check(pDX, IDC_FAST_CHECK, m_bFast); + DDX_Check(pDX, IDC_NOSMOOTH_CHECK, m_bNoSmooth); + DDX_Check(pDX, IDC_CHECK5, m_bOS2); + DDX_Radio(pDX, IDC_FS_RADIO, m_nDither); + DDX_Radio(pDX, IDC_ONEONE_RADIO, m_nScale); + DDX_Radio(pDX, IDC_DINT_RADIO, m_nDCT2); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CJPGtestDlg, CDialog) + //{{AFX_MSG_MAP(CJPGtestDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_GRAPH_BUTTON, OnGraphButton) + ON_BN_CLICKED(IDC_JPG_BUTTON, OnJpgButton) + ON_BN_CLICKED(IDC_Compress, OnCompress) + ON_BN_CLICKED(IDC_UnCompress, OnUnCompress) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestDlg message handlers + +BOOL CJPGtestDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CJPGtestDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CJPGtestDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CJPGtestDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CJPGtestDlg::OnGraphButton() +{ + char szFilter[] = "Bitmap Files (*.bmp) | *.bmp ||"; + + CFileDialog FileDialog(TRUE, "bmp", "*.bmp", OFN_HIDEREADONLY, szFilter, this); + if (FileDialog.DoModal() == IDOK) + { + m_sGraphicsFile = FileDialog.GetPathName(); + UpdateData(FALSE); + } +} + +void CJPGtestDlg::OnJpgButton() +{ + char szFilter[] = "JPEG Files (*.jpg) | *.jpg ||"; + + CFileDialog FileDialog(TRUE, "jpg", "*.jpg", OFN_HIDEREADONLY, szFilter, this); + if (FileDialog.DoModal() == IDOK) + { + m_sJPEGFile = FileDialog.GetPathName(); + UpdateData(FALSE); + } +} + +void CJPGtestDlg::OnCompress() +{ + if (!UpdateData(TRUE)) + return; + + BeginWaitCursor(); + + COXBMPFile BMPFile(m_sGraphicsFile); + COXJPEGFile JPGFile(m_sJPEGFile); + + COXJPEGCompressor JCompr; + + JCompr.SetGrayScale(m_bGray); + JCompr.SetBaseLine(m_bBase); + JCompr.SetProgressive(m_bProgr); + JCompr.SetOptimize(m_bOpt); + JCompr.SetQuality(m_nQuality); + if (m_nSmooth != 0) + JCompr.SetSmooth(m_nSmooth); + JCompr.SetMaxMemory(m_nMaxMem); + if (m_nDCT != -1) + JCompr.SetDisCosTranf((EDiscreteCosTransf)(m_nDCT + 1)); + + DWORD nBeginTicks, nEndTicks; + nBeginTicks = GetTickCount(); + short nReturn(0); + TCHAR ErrorBuffer[SIZE_ERROR_BUF]; + + TRY + { + nReturn = JCompr.DoCompress(&BMPFile, &JPGFile); + if (nReturn == 2) + AfxMessageBox(JCompr.GetWarningMessages()); + } + CATCH(COXJPEGException, e) + { + e->GetErrorMessage(ErrorBuffer, SIZE_ERROR_BUF); + AfxMessageBox(CString("Exception : ") + ErrorBuffer); + + TRACE((LPCTSTR)ErrorBuffer); + } + END_CATCH + + nEndTicks = GetTickCount(); + + char buffer[20]; + UTBStr::sprintf(buffer, 20, "%f", (nEndTicks - nBeginTicks)/1000.0); + m_Time_Static.SetWindowText(buffer); + + EndWaitCursor(); +} + +void CJPGtestDlg::OnUnCompress() +{ + if (!UpdateData(TRUE)) + return; + + BeginWaitCursor(); + + COXBMPFile BMPFile(m_sGraphicsFile); + BMPFile.SetOS2Format(m_bOS2); + + COXJPEGFile JPGFile(m_sJPEGFile); + + COXJPEGDecompressor JDecompr; + + JDecompr.SetGrayScale(m_bGrayScale2); + JDecompr.SetFast(m_bFast); + JDecompr.SetNoSmooth(m_bNoSmooth); + JDecompr.SetOnePass(m_bOnePass); + JDecompr.SetMaxMemory(m_nMaxMem2); + + if (m_nDCT2 != -1) + JDecompr.SetDisCosTranf((EDiscreteCosTransf)(m_nDCT2 + 1)); + if (m_nDither != -1) + JDecompr.SetDitherMethod((EDitherMethod)(m_nDither + 1)); + if (m_nScale != -1) + JDecompr.SetScale((EDecompScale)(m_nScale + 1)); + + if (m_nColors != 0) + JDecompr.SetColors(m_nColors); + + DWORD nBeginTicks, nEndTicks; + nBeginTicks = GetTickCount(); + short nReturn(0); + TCHAR ErrorBuffer[SIZE_ERROR_BUF]; + + TRY + { + nReturn = JDecompr.DoDecompress(&JPGFile, &BMPFile); + if (nReturn == 2) + AfxMessageBox(JDecompr.GetWarningMessages()); + } + CATCH(COXJPEGException, e) + { + e->GetErrorMessage(ErrorBuffer, SIZE_ERROR_BUF); + AfxMessageBox(CString("Exception : ") + ErrorBuffer); + TRACE((LPCTSTR)ErrorBuffer); + } + END_CATCH + + nEndTicks = GetTickCount(); + + char buffer[20]; + UTBStr::sprintf(buffer, 20, "%f", (nEndTicks - nBeginTicks)/1000.0); + m_Time_Static.SetWindowText(buffer); + + EndWaitCursor(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.h new file mode 100644 index 0000000..1782ec8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/JPGtestDlg.h @@ -0,0 +1,73 @@ +// JPGtestDlg.h : header file +// + +#if !defined(AFX_JPGTESTDLG_H__F8562DF9_85B7_11D1_A4E1_0020359647BF__INCLUDED_) +#define AFX_JPGTESTDLG_H__F8562DF9_85B7_11D1_A4E1_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CJPGtestDlg dialog + +class CJPGtestDlg : public CDialog +{ +// Construction +public: + CJPGtestDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CJPGtestDlg) + enum { IDD = IDD_JPGTEST_DIALOG }; + CStatic m_Time_Static; + CString m_sGraphicsFile; + CString m_sJPEGFile; + BOOL m_bGray; + BOOL m_bBase; + BOOL m_bProgr; + BOOL m_bOpt; + UINT m_nQuality; + UINT m_nSmooth; + UINT m_nMaxMem; + int m_nDCT; + UINT m_nColors; + UINT m_nMaxMem2; + BOOL m_bOnePass; + BOOL m_bGrayScale2; + BOOL m_bFast; + BOOL m_bNoSmooth; + BOOL m_bOS2; + int m_nDither; + int m_nScale; + int m_nDCT2; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CJPGtestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CJPGtestDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnGraphButton(); + afx_msg void OnJpgButton(); + afx_msg void OnCompress(); + afx_msg void OnUnCompress(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_JPGTESTDLG_H__F8562DF9_85B7_11D1_A4E1_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/ReadMe.txt new file mode 100644 index 0000000..15b0062 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : JPGtest +======================================================================== + + +AppWizard has created this JPGtest 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 JPGtest application. + +JPGtest.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CJPGtestApp application class. + +JPGtest.cpp + This is the main application source file that contains the application + class CJPGtestApp. + +JPGtest.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 + Developer Studio. + +res\JPGtest.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file JPGtest.rc. + +res\JPGtest.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +JPGtest.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +JPGtestDlg.h, JPGtestDlg.cpp - the dialog + These files contain your CJPGtestDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in JPGtest.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named JPGtest.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.cpp new file mode 100644 index 0000000..df0254d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// JPGtest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.h new file mode 100644 index 0000000..c9af921 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__F8562DFB_85B7_11D1_A4E1_0020359647BF__INCLUDED_) +#define AFX_STDAFX_H__F8562DFB_85B7_11D1_A4E1_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__F8562DFB_85B7_11D1_A4E1_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.bmp new file mode 100644 index 0000000..fe39a07 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.jpg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.jpg new file mode 100644 index 0000000..e010539 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/bitmap1.jpg differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/jpegtestinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/jpegtestinfo.rtf new file mode 100644 index 0000000..60fb000 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/jpegtestinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.rc2 new file mode 100644 index 0000000..371a3e2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/res/JPGtest.rc2 @@ -0,0 +1,13 @@ +// +// JPGTEST.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/resource.h new file mode 100644 index 0000000..337e235 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/JPGtest/resource.h @@ -0,0 +1,57 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by JPGtest.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_JPGTEST_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_EDIT1 1000 +#define IDC_EDIT2 1001 +#define IDC_EDIT3 1002 +#define IDC_EDIT4 1003 +#define IDC_EDIT5 1004 +#define IDC_RADIO1 1005 +#define IDC_RADIO2 1006 +#define IDC_RADIO3 1007 +#define IDC_CHECK1 1008 +#define IDC_CHECK2 1009 +#define IDC_CHECK3 1010 +#define IDC_CHECK4 1011 +#define IDC_Compress 1012 +#define IDC_COLORS_EDIT 1013 +#define IDC_MAXMEM_EDIT 1014 +#define IDC_ONEONE_RADIO 1015 +#define IDC_HALF_RADIO 1016 +#define IDC_FOURTH_RADIO 1017 +#define IDC_EIGHT_RADIO 1018 +#define IDC_CHECK5 1019 +#define IDC_UnCompress 1020 +#define IDC_DINT_RADIO 1022 +#define IDC_DFAST_RADIO 1023 +#define IDC_DFLOAT_RADIO 1024 +#define IDC_FS_RADIO 1025 +#define IDC_ORDER_RADIO 1026 +#define IDC_NONE_RADIO 1027 +#define IDC_CHECK6 1028 +#define IDC_FAST_CHECK 1029 +#define IDC_NOSMOOTH_CHECK 1030 +#define IDC_ONEPASS_CHECK 1031 +#define IDC_GRAPH_BUTTON 1032 +#define IDC_JPG_BUTTON 1033 +#define IDC_PUT_Button 1034 +#define IDC_WriteButton 1035 +#define IDC_TIME 1036 + +// 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 1037 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.cpp new file mode 100644 index 0000000..e53e275 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.cpp @@ -0,0 +1,74 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "MetaFile.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +void CChildFrame::ActivateFrame(int nCmdShow) +{ + if (nCmdShow == -1) + nCmdShow = SW_SHOWMAXIMIZED; + + CMDIChildWnd::ActivateFrame(nCmdShow); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.h new file mode 100644 index 0000000..5b87940 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__D6580AEE_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_CHILDFRM_H__D6580AEE_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + virtual void ActivateFrame( int nCmdShow = 1 ); + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__D6580AEE_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.cpp new file mode 100644 index 0000000..eb79ef0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.cpp @@ -0,0 +1,107 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "MetaFile.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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.Create(this) || + !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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.h new file mode 100644 index 0000000..01af316 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MainFrm.h @@ -0,0 +1,57 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__D6580AEC_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_MAINFRM_H__D6580AEC_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__D6580AEC_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.clw new file mode 100644 index 0000000..65d6c2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.clw @@ -0,0 +1,159 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMetaFileApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "MetaFile.h" +LastPage=0 + +ClassCount=5 +Class1=CMetaFileApp +Class2=CMetaFileDoc +Class3=CMetaFileView +Class4=CMainFrame + +ResourceCount=4 +Resource1=IDR_EMFTYPE +Class5=CChildFrame +Resource2=IDR_MAINFRAME (English (U.S.)) +Resource3=IDR_EMFTYPE (English (U.S.)) +Resource4=IDR_MAINFRAME + +[CLS:CMetaFileApp] +Type=0 +HeaderFile=MetaFile.h +ImplementationFile=MetaFile.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CMetaFileApp + +[CLS:CMetaFileDoc] +Type=0 +HeaderFile=MetaFileDoc.h +ImplementationFile=MetaFileDoc.cpp +Filter=N +BaseClass=CDocument +VirtualFilter=DC +LastObject=CMetaFileDoc + +[CLS:CMetaFileView] +Type=0 +HeaderFile=MetaFileView.h +ImplementationFile=MetaFileView.cpp +Filter=C +BaseClass=CView +VirtualFilter=VWC +LastObject=ID_VIEW_RATIO + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_EMFTYPE] +Type=1 +Class=CMetaFileView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CREATE_METAFILE +Command4=ID_FILE_CLOSE +Command5=ID_FILE_PRINT +Command6=ID_FILE_PRINT_PREVIEW +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_VIEW_TOOLBAR +Command11=ID_VIEW_STATUS_BAR +Command12=ID_VIEW_RATIO +Command13=ID_WINDOW_NEW +Command14=ID_WINDOW_CASCADE +Command15=ID_WINDOW_TILE_HORZ +Command16=ID_WINDOW_ARRANGE +Command17=ID_APP_ABOUT +CommandCount=17 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[MNU:IDR_EMFTYPE (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CREATE_METAFILE +Command4=ID_FILE_CLOSE +Command5=ID_FILE_PRINT +Command6=ID_FILE_PRINT_PREVIEW +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_VIEW_TOOLBAR +Command11=ID_VIEW_STATUS_BAR +Command12=ID_VIEW_RATIO +Command13=ID_WINDOW_NEW +Command14=ID_WINDOW_CASCADE +Command15=ID_WINDOW_TILE_HORZ +Command16=ID_WINDOW_ARRANGE +Command17=ID_APP_ABOUT +CommandCount=17 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.cpp new file mode 100644 index 0000000..10e9c66 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.cpp @@ -0,0 +1,145 @@ +// MetaFile.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "MetaFile.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "MetaFileDoc.h" +#include "MetaFileView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileApp + +BEGIN_MESSAGE_MAP(CMetaFileApp, CWinApp) + //{{AFX_MSG_MAP(CMetaFileApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileApp construction + +CMetaFileApp::CMetaFileApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMetaFileApp object + +CMetaFileApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileApp initialization + +BOOL CMetaFileApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Change the registry key under which our settings are stored. + // 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(8); // 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_EMFTYPE, + RUNTIME_CLASS(CMetaFileDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CMetaFileView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CMetaFileApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileApp commands + +int CMetaFileApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsp new file mode 100644 index 0000000..a06df9f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsp @@ -0,0 +1,296 @@ +# Microsoft Developer Studio Project File - Name="MetaFile" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MetaFile - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MetaFile.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MetaFile.mak" CFG="MetaFile - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MetaFile - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MetaFile - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MetaFile - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "MetaFile - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "MetaFile - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MetaFile - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MetaFile.exe" + +!ELSEIF "$(CFG)" == "MetaFile - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MetaFile.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "MetaFile - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MetaFile" +# PROP BASE Intermediate_Dir "MetaFile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MetaFile.exe" + +!ELSEIF "$(CFG)" == "MetaFile - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MetaFil0" +# PROP BASE Intermediate_Dir "MetaFil0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MetaFile.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"MetaFile.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "MetaFile - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MetaFil1" +# PROP BASE Intermediate_Dir "MetaFil1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MetaFile.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"MetaFile.exe" + +!ENDIF + +# Begin Target + +# Name "MetaFile - Win32 Release" +# Name "MetaFile - Win32 Debug" +# Name "MetaFile - Win32 Release_Shared" +# Name "MetaFile - Win32 Unicode_Debug" +# Name "MetaFile - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMetaFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MetaFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\MetaFile.rc +# End Source File +# Begin Source File + +SOURCE=.\MetaFileDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\MetaFileView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MetaFile.h +# End Source File +# Begin Source File + +SOURCE=.\MetaFileDoc.h +# End Source File +# Begin Source File + +SOURCE=.\MetaFileView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMetaFile.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\MetaFile.ico +# End Source File +# Begin Source File + +SOURCE=.\res\MetaFile.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\MetaFileDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MetaFiles\Hatecomp.wmf +# End Source File +# Begin Source File + +SOURCE=.\MetaFile.reg +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsw new file mode 100644 index 0000000..da35cc9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MetaFile"=".\MetaFile.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.h new file mode 100644 index 0000000..aea6961 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.h @@ -0,0 +1,51 @@ +// MetaFile.h : main header file for the METAFILE application +// + +#if !defined(AFX_METAFILE_H__D6580AE8_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_METAFILE_H__D6580AE8_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileApp: +// See MetaFile.cpp for the implementation of this class +// + +class CMetaFileApp : public CWinApp +{ +public: + CMetaFileApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMetaFileApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CMetaFileApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_METAFILE_H__D6580AE8_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.rc new file mode 100644 index 0000000..203727f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.rc @@ -0,0 +1,394 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\MetaFile.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" + "#include ""OXMetaFile.rc""\r\n" + "#endif\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 DISCARDABLE "res\\MetaFile.ico" +IDR_EMFTYPE ICON DISCARDABLE "res\\MetaFileDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_FILE_NEW + BUTTON ID_FILE_OPEN + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "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 MetaFile...", ID_APP_ABOUT + END +END + +IDR_EMFTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "New \tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "C&reate Metafile", ID_FILE_CREATE_METAFILE + MENUITEM "&Close", ID_FILE_CLOSE + 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 "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Maintain Ratio", ID_VIEW_RATIO + 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 MetaFile...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "MetaFile MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "MetaFile\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "MetaFile.EXE\0" + VALUE "ProductName", "MetaFile Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// METAFILE +// + +IDR_HATECOMP_EMF METAFILE DISCARDABLE "MetaFiles\\Hatecomp.wmf" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "MetaFile Demo" + IDR_EMFTYPE "\nEMF\nMetaFile\nMetaFiles (*.emf)\n.emf\nMetaFile.Document\nMetaFile Document" + ID_DESCRIPTION_FILE "MetaFileInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "MetaFile" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +BEGIN + ID_FILE_NEW "Create a new metafile document\nNew metafile" + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\MetaFile.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXMetaFile.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.reg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.reg new file mode 100644 index 0000000..5cb2eaf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.reg @@ -0,0 +1,14 @@ +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\.emf = MetaFile.Document +HKEY_CLASSES_ROOT\MetaFile.Document\shell\open\command = METAFILE.EXE %1 +HKEY_CLASSES_ROOT\MetaFile.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\MetaFile.Document\shell\open\ddeexec\application = METAFILE + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\MetaFile.Document = MetaFile Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.vcproj new file mode 100644 index 0000000..c5189ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFile.vcproj @@ -0,0 +1,1047 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.cpp new file mode 100644 index 0000000..1830c75 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.cpp @@ -0,0 +1,179 @@ +// MetaFileDoc.cpp : implementation of the CMetaFileDoc class +// + +#include "stdafx.h" +#include "MetaFile.h" + +#include "MetaFileDoc.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileDoc + +IMPLEMENT_DYNCREATE(CMetaFileDoc, CDocument) + +BEGIN_MESSAGE_MAP(CMetaFileDoc, CDocument) + //{{AFX_MSG_MAP(CMetaFileDoc) + ON_COMMAND(ID_FILE_CREATE_METAFILE, OnFileCreateMetafile) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileDoc construction/destruction + +CMetaFileDoc::CMetaFileDoc() +{ + // TODO: add one-time construction code here + + // at startup the logo is loaded as EMF from resource + m_MetaFile.LoadFile(IDR_HATECOMP_EMF); +} + +CMetaFileDoc::~CMetaFileDoc() +{ +} + +BOOL CMetaFileDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileDoc serialization + +void CMetaFileDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileDoc diagnostics + +#ifdef _DEBUG +void CMetaFileDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CMetaFileDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileDoc commands + +BOOL CMetaFileDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + if (!CDocument::OnOpenDocument(lpszPathName)) + return FALSE; + + // TODO: Add your specialized creation code here + + CString sFileName=lpszPathName; + // Load file, update caption and all Views + if ( ! m_MetaFile.LoadFile(sFileName) ) + { + AfxMessageBox (_T("Error opening the MetaFile")); + return FALSE; + } + AfxGetApp()->m_pMainWnd->SetWindowText("MetaFileDemo: " + m_MetaFile.GetDescription()); + UpdateAllViews(NULL); + + return TRUE; +} + +void CMetaFileDoc::OnFileCreateMetafile() +{ + // TODO: Add your command handler code here + + HDC hdcEMF; + COXMetaFile* pMetaFile=new COXMetaFile; + + // create a demo EMF - File + hdcEMF = pMetaFile->CreateFile ("", "Created by Ultimate Toolbox OXMetaFile class") ; + if(hdcEMF!=NULL) + { + CRect rect; + rect.left=0; + rect.right=300; + rect.top=0; + rect.bottom=200; + CRect rectOrig=rect; + + CDC* pDC=CDC::FromHandle(hdcEMF); + int nSaveDC=pDC->SaveDC(); + pDC->Rectangle(&rect); + + CBrush brush; + for (int i=0; iFillRect(&rect,&brush) ; + rect.top=rect.bottom; + brush.DeleteObject(); + } + } + + CString sText=_T("You've created this metafile!"); + pDC->SetTextColor(RGB(255,0,0)); + pDC->SetBkMode(TRANSPARENT); + LOGFONT lf; + ::ZeroMemory(&lf, sizeof(lf)); + lf.lfHeight=-22; + lf.lfWeight=800; + UTBStr::tcscpy(lf.lfFaceName, LF_FACESIZE, _T("Times New Roman")); + CFont font; + if(font.CreateFontIndirect(&lf)) + { + pDC->SelectObject(&font); + } + pDC->DrawText(sText, &rectOrig, DT_CENTER|DT_VCENTER|DT_SINGLELINE); + if((HFONT)font) + { + font.DeleteObject(); + } + + pMetaFile->CloseFile () ; + + pDC->RestoreDC(nSaveDC); + + CString sFileName=pMetaFile->GetFileName(); + + delete pMetaFile; + + OnOpenDocument(sFileName); + SetPathName(sFileName,TRUE); + } + else + { + pMetaFile->CloseFile () ; + delete pMetaFile; + } + UpdateAllViews(NULL); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.h new file mode 100644 index 0000000..ff43478 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileDoc.h @@ -0,0 +1,61 @@ +// MetaFileDoc.h : interface of the CMetaFileDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_METAFILEDOC_H__D6580AF0_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_METAFILEDOC_H__D6580AF0_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +#include "OXMetaFile.h" + + +class CMetaFileDoc : public CDocument +{ +protected: // create from serialization only + CMetaFileDoc(); + DECLARE_DYNCREATE(CMetaFileDoc) + +// Attributes +public: + COXMetaFile m_MetaFile; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMetaFileDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMetaFileDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CMetaFileDoc) + afx_msg void OnFileCreateMetafile(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_METAFILEDOC_H__D6580AF0_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileInfo.rtf new file mode 100644 index 0000000..69f8aa5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.cpp new file mode 100644 index 0000000..3c12f89 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.cpp @@ -0,0 +1,135 @@ +// MetaFileView.cpp : implementation of the CMetaFileView class +// + +#include "stdafx.h" +#include "MetaFile.h" + +#include "MetaFileDoc.h" +#include "MetaFileView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView + +IMPLEMENT_DYNCREATE(CMetaFileView, CView) + +BEGIN_MESSAGE_MAP(CMetaFileView, CView) + //{{AFX_MSG_MAP(CMetaFileView) + ON_COMMAND(ID_VIEW_RATIO, OnViewRatio) + ON_UPDATE_COMMAND_UI(ID_VIEW_RATIO, OnUpdateViewRatio) + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView construction/destruction + +CMetaFileView::CMetaFileView() +{ + // TODO: add construction code here + + m_bMaintainRatio = TRUE; +} + +CMetaFileView::~CMetaFileView() +{ +} + +BOOL CMetaFileView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView drawing + +void CMetaFileView::OnDraw(CDC* pDC) +{ + CMetaFileDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + CRect rectClient; + GetClientRect( &rectClient); + if (m_bMaintainRatio) + { + if (! pDoc->m_MetaFile.PlayFile (pDC, &rectClient) ) + AfxMessageBox (_T("Error in OXMetaFile::PlayFile")); + } + else + { + if (! pDoc->m_MetaFile.PlayFile (pDC ) ) + AfxMessageBox (_T("Error in OXMetaFile::PlayFile")); + } + return ; +} + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView printing + +BOOL CMetaFileView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CMetaFileView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CMetaFileView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView diagnostics + +#ifdef _DEBUG +void CMetaFileView::AssertValid() const +{ + CView::AssertValid(); +} + +void CMetaFileView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CMetaFileDoc* CMetaFileView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMetaFileDoc))); + return (CMetaFileDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMetaFileView message handlers + + +void CMetaFileView::OnViewRatio() +{ + // TODO: Add your command handler code here + + m_bMaintainRatio = !m_bMaintainRatio; + InvalidateRect ( NULL ); +} + +void CMetaFileView::OnUpdateViewRatio(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetCheck ( m_bMaintainRatio ); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.h new file mode 100644 index 0000000..abdc4d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/MetaFileView.h @@ -0,0 +1,69 @@ +// MetaFileView.h : interface of the CMetaFileView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_METAFILEVIEW_H__D6580AF2_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_METAFILEVIEW_H__D6580AF2_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CMetaFileView : public CView +{ +protected: // create from serialization only + CMetaFileView(); + DECLARE_DYNCREATE(CMetaFileView) + +// Attributes +public: + CMetaFileDoc* GetDocument(); + +protected: + BOOL m_bMaintainRatio; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMetaFileView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMetaFileView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CMetaFileView) + afx_msg void OnViewRatio(); + afx_msg void OnUpdateViewRatio(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in MetaFileView.cpp +inline CMetaFileDoc* CMetaFileView::GetDocument() + { return (CMetaFileDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_METAFILEVIEW_H__D6580AF2_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AGREE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AGREE.WMF new file mode 100644 index 0000000..3083d08 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AGREE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMCONFUS.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMCONFUS.WMF new file mode 100644 index 0000000..a001045 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMCONFUS.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMDISAST.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMDISAST.WMF new file mode 100644 index 0000000..302e84f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMDISAST.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMHAPPY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMHAPPY.WMF new file mode 100644 index 0000000..c2ad19d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMHAPPY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMIDEA.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMIDEA.WMF new file mode 100644 index 0000000..6929d0f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMIDEA.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMORGANI.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMORGANI.WMF new file mode 100644 index 0000000..4db6dae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMORGANI.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMPROBLE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMPROBLE.WMF new file mode 100644 index 0000000..b241a11 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMPROBLE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMVICTOR.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMVICTOR.WMF new file mode 100644 index 0000000..aa50d84 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMVICTOR.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMWIN.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMWIN.WMF new file mode 100644 index 0000000..36daabb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/AMWIN.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS1.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS1.WMF new file mode 100644 index 0000000..fffdd65 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS1.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS2.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS2.WMF new file mode 100644 index 0000000..b824e42 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS2.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS3.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS3.WMF new file mode 100644 index 0000000..1cb187a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS3.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS4.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS4.WMF new file mode 100644 index 0000000..d4c48ea Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS4.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS5.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS5.WMF new file mode 100644 index 0000000..cd08481 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS5.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS6.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS6.WMF new file mode 100644 index 0000000..004ffe8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS6.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS7.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS7.WMF new file mode 100644 index 0000000..ad58025 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS7.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS8.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS8.WMF new file mode 100644 index 0000000..b6cc338 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWS8.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWSGN.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWSGN.WMF new file mode 100644 index 0000000..d91e746 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/ARROWSGN.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BANDAID.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BANDAID.WMF new file mode 100644 index 0000000..aaac875 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BANDAID.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BEARTRAP.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BEARTRAP.WMF new file mode 100644 index 0000000..e5573e0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BEARTRAP.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BOMB.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BOMB.WMF new file mode 100644 index 0000000..40541be Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BOMB.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BRICK.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BRICK.WMF new file mode 100644 index 0000000..32c0ba5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BRICK.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BUILDING.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BUILDING.WMF new file mode 100644 index 0000000..d594007 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/BUILDING.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CAR.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CAR.WMF new file mode 100644 index 0000000..00bb220 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CAR.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHAMPGNE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHAMPGNE.WMF new file mode 100644 index 0000000..3ce63df Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHAMPGNE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHECKMRK.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHECKMRK.WMF new file mode 100644 index 0000000..739e644 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CHECKMRK.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLAP.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLAP.WMF new file mode 100644 index 0000000..7496e29 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLAP.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLOCK.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLOCK.WMF new file mode 100644 index 0000000..ad3b0fd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/CLOCK.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/COINS.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/COINS.WMF new file mode 100644 index 0000000..06871ab Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/COINS.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DARTS.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DARTS.WMF new file mode 100644 index 0000000..e89a849 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DARTS.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DESTRYER.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DESTRYER.WMF new file mode 100644 index 0000000..525551b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DESTRYER.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DICE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DICE.WMF new file mode 100644 index 0000000..712f002 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DICE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DIPLOMA.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DIPLOMA.WMF new file mode 100644 index 0000000..b059f8a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DIPLOMA.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOMINOES.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOMINOES.WMF new file mode 100644 index 0000000..103a2e7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOMINOES.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DONKEY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DONKEY.WMF new file mode 100644 index 0000000..1396a38 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DONKEY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOOR.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOOR.WMF new file mode 100644 index 0000000..8a98a8b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOOR.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOVE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOVE.WMF new file mode 100644 index 0000000..8229fb1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DOVE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DYNAMITE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DYNAMITE.WMF new file mode 100644 index 0000000..6b0f31f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/DYNAMITE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/EXAMINE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/EXAMINE.WMF new file mode 100644 index 0000000..9fd035c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/EXAMINE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FISTSLAM.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FISTSLAM.WMF new file mode 100644 index 0000000..0cde9a6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FISTSLAM.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FLOWER.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FLOWER.WMF new file mode 100644 index 0000000..3f75c9b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/FLOWER.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HAMMER.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HAMMER.WMF new file mode 100644 index 0000000..a96bdd0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HAMMER.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HATECOMP.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HATECOMP.WMF new file mode 100644 index 0000000..ff5b037 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HATECOMP.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK1.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK1.WMF new file mode 100644 index 0000000..528081f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK1.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK2.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK2.WMF new file mode 100644 index 0000000..3f81c90 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK2.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK3.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK3.WMF new file mode 100644 index 0000000..6525293 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/HNDSHAK3.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JETPLANE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JETPLANE.WMF new file mode 100644 index 0000000..3b9d932 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JETPLANE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JIGSAW.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JIGSAW.WMF new file mode 100644 index 0000000..d15bd71 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/JIGSAW.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/KEY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/KEY.WMF new file mode 100644 index 0000000..d50d79c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/KEY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LIGHT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LIGHT.WMF new file mode 100644 index 0000000..baf2150 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LIGHT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LION.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LION.WMF new file mode 100644 index 0000000..458cfa6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LION.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LOCK.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LOCK.WMF new file mode 100644 index 0000000..86b5726 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/LOCK.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGICHAT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGICHAT.WMF new file mode 100644 index 0000000..ea84f5f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGICHAT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGNIFY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGNIFY.WMF new file mode 100644 index 0000000..8699600 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MAGNIFY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING.WMF new file mode 100644 index 0000000..1d4eb2d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING2.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING2.WMF new file mode 100644 index 0000000..89438dc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MEETING2.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEY.WMF new file mode 100644 index 0000000..5108d50 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEYBAG.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEYBAG.WMF new file mode 100644 index 0000000..390384c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/MONEYBAG.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OILDRILL.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OILDRILL.WMF new file mode 100644 index 0000000..4fd595d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OILDRILL.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OPENHAND.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OPENHAND.WMF new file mode 100644 index 0000000..43242ed Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/OPENHAND.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/PTRUP.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/PTRUP.WMF new file mode 100644 index 0000000..49bdbb7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/PTRUP.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RABBIT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RABBIT.WMF new file mode 100644 index 0000000..d2095e5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RABBIT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RIBBON.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RIBBON.WMF new file mode 100644 index 0000000..f4d8089 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RIBBON.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RUNNER.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RUNNER.WMF new file mode 100644 index 0000000..c9ab4b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/RUNNER.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SAILBOAT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SAILBOAT.WMF new file mode 100644 index 0000000..eca34a3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SAILBOAT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SCALES.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SCALES.WMF new file mode 100644 index 0000000..6cb26bb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SCALES.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SHARK.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SHARK.WMF new file mode 100644 index 0000000..363f9e3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SHARK.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SOCCER.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SOCCER.WMF new file mode 100644 index 0000000..f73d744 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/SOCCER.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STAR.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STAR.WMF new file mode 100644 index 0000000..895659e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STAR.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOP.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOP.WMF new file mode 100644 index 0000000..3608c7c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOP.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOPLGHT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOPLGHT.WMF new file mode 100644 index 0000000..817c8b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/STOPLGHT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TENNIS.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TENNIS.WMF new file mode 100644 index 0000000..7325487 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TENNIS.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/THUMBDN.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/THUMBDN.WMF new file mode 100644 index 0000000..ecb9462 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/THUMBDN.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TRIUMPH.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TRIUMPH.WMF new file mode 100644 index 0000000..994dfc5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TRIUMPH.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TROPHY.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TROPHY.WMF new file mode 100644 index 0000000..6e6ed41 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TROPHY.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TURTLE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TURTLE.WMF new file mode 100644 index 0000000..f64ea23 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/TURTLE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WEARHAT.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WEARHAT.WMF new file mode 100644 index 0000000..f136dcb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WEARHAT.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WHATNOW.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WHATNOW.WMF new file mode 100644 index 0000000..74c376a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/WHATNOW.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/YINYANG.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/YINYANG.WMF new file mode 100644 index 0000000..7772f46 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Metafiles/YINYANG.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ReadMe.txt new file mode 100644 index 0000000..b72bce7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/ReadMe.txt @@ -0,0 +1,108 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : MetaFile +======================================================================== + + +AppWizard has created this MetaFile 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 MetaFile application. + +MetaFile.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CMetaFileApp application class. + +MetaFile.cpp + This is the main application source file that contains the application + class CMetaFileApp. + +MetaFile.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 + Developer Studio. + +res\MetaFile.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file MetaFile.rc. + +res\MetaFile.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +MetaFile.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. + +MetaFile.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +MetaFileDoc.h, MetaFileDoc.cpp - the document + These files contain your CMetaFileDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CMetaFileDoc::Serialize). + +MetaFileView.h, MetaFileView.cpp - the view of the document + These files contain your CMetaFileView class. + CMetaFileView objects are used to view CMetaFileDoc objects. + +res\MetaFileDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CMetaFileDoc class. This icon is included by the main + resource file MetaFile.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named MetaFile.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Resource.h new file mode 100644 index 0000000..6136967 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/Resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MetaFile.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_EMFTYPE 129 +#define IDR_HATECOMP_EMF 130 +#define ID_DESCRIPTION_FILE 130 +#define ID_VIEW_RATIO 32771 +#define ID_FILE_CREATE_METAFILE 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.cpp new file mode 100644 index 0000000..1d16eb2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MetaFile.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.h new file mode 100644 index 0000000..76d6639 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__D6580AEA_EA6C_11D1_8856_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__D6580AEA_EA6C_11D1_8856_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__D6580AEA_EA6C_11D1_8856_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/new.emf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/new.emf new file mode 100644 index 0000000..d5950e3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/new.emf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.rc2 new file mode 100644 index 0000000..07ac36e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFile.rc2 @@ -0,0 +1,13 @@ +// +// METAFILE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFileDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFileDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/MetaFileDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/Toolbar.bmp new file mode 100644 index 0000000..9e9a09c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Metafile/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/ReadMe.txt new file mode 100644 index 0000000..4df8e10 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : Splash +======================================================================== + + +AppWizard has created this Splash 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 Splash application. + +Splash.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSplashApp application class. + +Splash.cpp + This is the main application source file that contains the application + class CSplashApp. + +Splash.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 + Developer Studio. + +res\Splash.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file Splash.rc. + +res\Splash.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +Splash.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +SplashDlg.h, SplashDlg.cpp - the dialog + These files contain your CSplashDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in Splash.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Splash.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.clw new file mode 100644 index 0000000..2e7cd16 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.clw @@ -0,0 +1,48 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSplashApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "Splash.h" + +ClassCount=2 +Class1=CSplashApp +Class2=CSplashDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_SPLASH_DIALOG + +[CLS:CSplashApp] +Type=0 +HeaderFile=Splash.h +ImplementationFile=Splash.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CSplashApp + +[CLS:CSplashDlg] +Type=0 +HeaderFile=SplashDlg.h +ImplementationFile=SplashDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CSplashDlg + +[DLG:IDD_SPLASH_DIALOG] +Type=1 +Class=CSplashDlg +ControlCount=8 +Control1=ID_SHOW_SPLASH,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_RADIO_1BIT,button,1342373897 +Control5=IDC_RADIO_4BIT,button,1342242825 +Control6=IDC_RADIO_8BIT,button,1342242825 +Control7=IDC_RADIO_24BIT,button,1342242825 +Control8=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.cpp new file mode 100644 index 0000000..0c160cb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.cpp @@ -0,0 +1,116 @@ +// Splash.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Splash.h" +#include "SplashDlg.h" + +#include "OXSplashWnd.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSplashApp + +BEGIN_MESSAGE_MAP(CSplashApp, CWinApp) + //{{AFX_MSG_MAP(CSplashApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSplashApp construction + +CSplashApp::CSplashApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSplashApp object + +CSplashApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSplashApp initialization + +BOOL CSplashApp::InitInstance() +{ + // 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. + + // CG: The following block was added by the Splash Screen component. + { + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + COXSplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash); + COXSplashWnd::LoadGlobalBitmap(IDB_SAMPLE_4BIT); + + // Look at the end of INitInstance for the HideGlobal call. + // Very handy if the user has an InitInstance that can take + // a long or short time to execute depending on the input. + COXSplashWnd::ShowGlobal(SPLASH_NOTIMER); + } + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CSplashDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSplashApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsp new file mode 100644 index 0000000..324ed20 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsp @@ -0,0 +1,277 @@ +# Microsoft Developer Studio Project File - Name="Splash" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Splash - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Splash.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Splash.mak" CFG="Splash - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Splash - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Splash - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Splash - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Splash - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Splash - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Splash - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Splash.exe" + +!ELSEIF "$(CFG)" == "Splash - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Splash.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Splash - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Splash__" +# PROP BASE Intermediate_Dir "Splash__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Splash.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Splash.exe" + +!ELSEIF "$(CFG)" == "Splash - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Splash_0" +# PROP BASE Intermediate_Dir "Splash_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Splash.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Splash.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Splash - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Splash_1" +# PROP BASE Intermediate_Dir "Splash_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Splash.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Splash.exe" + +!ENDIF + +# Begin Target + +# Name "Splash - Win32 Release" +# Name "Splash - Win32 Debug" +# Name "Splash - Win32 Release_Shared" +# Name "Splash - Win32 Unicode_Debug" +# Name "Splash - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWndDIB.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Splash.cpp +# End Source File +# Begin Source File + +SOURCE=.\Splash.rc +# End Source File +# Begin Source File + +SOURCE=.\SplashDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\Splash.h +# End Source File +# Begin Source File + +SOURCE=.\SplashDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\sample.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sample1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sample16.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sample256.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Splash.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Splash.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\Splsh16.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsw new file mode 100644 index 0000000..0cac80b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Splash"=".\Splash.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.h new file mode 100644 index 0000000..8561d30 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.h @@ -0,0 +1,50 @@ +// Splash.h : main header file for the SPLASH application +// + +#if !defined(AFX_SPLASH_H__4B41DC48_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_SPLASH_H__4B41DC48_8A71_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSplashApp: +// See Splash.cpp for the implementation of this class +// + +class CSplashApp : public CWinApp +{ +public: + CSplashApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSplashApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSplashApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SPLASH_H__4B41DC48_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.rc new file mode 100644 index 0000000..47b6a9b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.rc @@ -0,0 +1,215 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Splash.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\Splash.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SPLASH_DIALOG DIALOGEX 0, 0, 132, 111 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Splash" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "&Show",ID_SHOW_SPLASH,7,90,50,14 + PUSHBUTTON "&Close",IDCANCEL,75,90,50,14 + GROUPBOX "Pallete",IDC_STATIC,7,7,118,70 + CONTROL "&1-bit",IDC_RADIO_1BIT,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,16,21,29,10 + CONTROL "&4-bit",IDC_RADIO_4BIT,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,16,33,29,10 + CONTROL "&8-bit",IDC_RADIO_8BIT,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,16,46,29,10 + CONTROL "24-bit",IDC_RADIO_24BIT,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,16,60,33,10 + LTEXT "Choose the number of colors used in splash window", + IDC_STATIC,77,22,42,48 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Splash MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Splash\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "Splash.EXE\0" + VALUE "ProductName", "Splash Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SPLASH_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 125 + TOPMARGIN, 7 + BOTTOMMARGIN, 104 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_SAMPLE_24BIT BITMAP DISCARDABLE "res\\sample.bmp" +IDB_SAMPLE_1BIT BITMAP DISCARDABLE "res\\sample1.bmp" +IDB_SAMPLE_4BIT BITMAP DISCARDABLE "res\\sample16.bmp" +IDB_MFCSPLASH BITMAP DISCARDABLE "res\\Splsh16.bmp" +IDB_SAMPLE_8BIT BITMAP DISCARDABLE "res\\sample256.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About Splash..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "SplashDemo" + ID_DESCRIPTION_FILE "SplashInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Splash.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.vcproj new file mode 100644 index 0000000..c360cb3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/Splash.vcproj @@ -0,0 +1,937 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.cpp new file mode 100644 index 0000000..7224701 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.cpp @@ -0,0 +1,162 @@ +// SplashDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Splash.h" +#include "SplashDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define SAMPLE_TEXT_INTERVAL 3000 + +///////////////////////////////////////////////////////////////////////////// +// CSplashDlg dialog + +CSplashDlg::CSplashDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSplashDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSplashDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSplashDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSplashDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSplashDlg, CDialog) + //{{AFX_MSG_MAP(CSplashDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(ID_SHOW_SPLASH, OnShowSplash) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSplashDlg message handlers + +BOOL CSplashDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + CheckRadioButton(IDC_RADIO_1BIT,IDC_RADIO_24BIT,IDC_RADIO_4BIT); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSplashDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSplashDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSplashDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSplashDlg::OnShowSplash() +{ + // TODO: Add your control notification handler code here + UINT nPallete=GetCheckedRadioButton(IDC_RADIO_1BIT,IDC_RADIO_24BIT); + + switch(nPallete) + { + case IDC_RADIO_1BIT: + { + m_wndSplash.LoadBitmap(IDB_SAMPLE_1BIT); + break; + } + case IDC_RADIO_4BIT: + { + m_wndSplash.LoadBitmap(IDB_SAMPLE_4BIT); + break; + } + case IDC_RADIO_8BIT: + { + m_wndSplash.LoadBitmap(IDB_SAMPLE_8BIT); + break; + } + case IDC_RADIO_24BIT: + { + m_wndSplash.LoadBitmap(IDB_SAMPLE_24BIT); + break; + } + } + m_wndSplash.Show(SAMPLE_TEXT_INTERVAL, this); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.h new file mode 100644 index 0000000..8e750a3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashDlg.h @@ -0,0 +1,53 @@ +// SplashDlg.h : header file +// + +#if !defined(AFX_SPLASHDLG_H__4B41DC4A_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_SPLASHDLG_H__4B41DC4A_8A71_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXSplashWnd.h" + +///////////////////////////////////////////////////////////////////////////// +// CSplashDlg dialog + +class CSplashDlg : public CDialog +{ +// Construction +public: + CSplashDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSplashDlg) + enum { IDD = IDD_SPLASH_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSplashDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXSplashWnd m_wndSplash; + + // Generated message map functions + //{{AFX_MSG(CSplashDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnShowSplash(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SPLASHDLG_H__4B41DC4A_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashInfo.rtf new file mode 100644 index 0000000..13f1d5f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/SplashInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.cpp new file mode 100644 index 0000000..86d8768 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Splash.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.h new file mode 100644 index 0000000..89f5cb2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__4B41DC4C_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__4B41DC4C_8A71_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__4B41DC4C_8A71_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.rc2 new file mode 100644 index 0000000..75beae3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splash.rc2 @@ -0,0 +1,13 @@ +// +// SPLASH.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splsh16.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splsh16.bmp new file mode 100644 index 0000000..a144d24 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/Splsh16.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample.bmp new file mode 100644 index 0000000..ffd9dd8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample1.bmp new file mode 100644 index 0000000..25ffcd1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample16.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample16.bmp new file mode 100644 index 0000000..a144d24 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample16.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample256.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample256.bmp new file mode 100644 index 0000000..ebafc61 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/res/sample256.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/resource.h new file mode 100644 index 0000000..646fd5b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/graphics/Splash/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Splash.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SPLASH_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_SAMPLE_24BIT 129 +#define IDB_SAMPLE_1BIT 130 +#define IDB_SAMPLE_4BIT 131 +#define IDB_MFCSPLASH 132 +#define IDB_SAMPLE_8BIT 133 +#define ID_SHOW_SPLASH 1000 +#define IDC_RADIO_1BIT 1001 +#define IDC_RADIO_4BIT 1002 +#define IDC_RADIO_8BIT 1003 +#define IDC_RADIO_24BIT 1004 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViews.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViews.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViews.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViewsInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViewsInfo.rtf new file mode 100644 index 0000000..ffce8bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/3DTabViewsInfo.rtf @@ -0,0 +1,69 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fprq2 Times New Roman;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\froman Times New Roman;}} +{\colortbl ;\red0\green0\blue255;} +{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\cf1\b\f0\fs48 COX3DTabViewContainer\cf0\par +\f1\fs16 Copyright \'a9 The Code Project 1997 - 1999, All Rights Reserved\f0\par +\b0\fs24\par +For most applications it's not enough to use only one window to provide its all output. There are different solutions for this problem like splitters or docking windows. But they usually have common inconvenience: all windows are shown at the same time. They take a precious screen space while could be rarely used. \par +\par +\cf1\ul COXShortcutBar\cf0\ulnone control can be used in order to show a number of child windows while keeping active (fully displayed) only one at a time. But COXShortcutBar was primarily designed to show icons and have a set of notifications that make sense only while using such controls as treeview or listview. \par +\par +Very good example of how the problem could be resolved can be found in \b Microsoft Visual Studio IDE\b0 . For instance "Output" window (with "Build", "Debug", "Find in Files..." panes) or "Result List" window (with "Search", "Lookup", "See Also" and "History" panes). We call them \b TabViews\b0 . \par +\par +\b TabViews\b0 can be a good alternative for splitter window when you need to have more than one view per document. Also TabViews can be used within a docking window and used as a container for associated windows (pages) that usually implemented as dialog bars. \par +\par +We already have in the library \cf1\ul COXTabViewContainer\cf0\ulnone class that implements the \b TabViews\b0 paradigm. In terms of graphical representation this class duplicates the functionality that can be found in such products as \b Microsoft Visual Studio IDE\b0 (Output window) or \b Microsoft Excel\b0 (multiple sheets in the same book). Tab buttons are positioned at the bottom of the window on the same line as the horizontal scroll bar. \par +\par +Here we introduce new implementation of the \b TabViews\b0 . The paradigm remains the same but we've changed the way associated windows (pages) represented in the container. We used standard \b Tab control\b0 and displayed a tab button for each page. When a user clicks a button the corresponding page is activated and displayed. Tab buttons can be positioned at any side of the container window by means of applying corresponding Tab control styles (refer to \cf1\ul Create()\cf0\ulnone function for details). \par +\par +The new class is called \b COX3DTabViewContainer\b0 . It is derived from the standard \b CTabCtrl\b0 and implements all functionality needed to support tab views. \par +\b COX3DTabViewContainer\b0 is easy to use. If you previously worked with \cf1\ul COXTabViewContainer\cf0\ulnone class then you are already know ho to use this class because we decide to implement it as close as possible to the existing COXTabViewContainer\~ class. If you haven't used this class yet then the closest comparison would be \b splitter windows\b0 . \par +\par +\par +Here is the list of steps that should be taken in order to deploy \b TabViews\b0 in your application: \par +\par +\ul\b First Case\ulnone\b0 : COX3DTabViewContainer will be used as a container for \b document view(s)\b0 . \par +\par +1) Embed a COX3DTabViewContainer member variable in the parent frame (main frame window for SDI application, MDIChild window for MDI application). \par +\par +2) Override the parent frame's \b CFrameWnd::OnCreateClient()\b0 member function. \par +\par +3) From within the overridden OnCreateClient, call the \cf1\ul Create()\cf0\ulnone member function of COX3DTabViewContainer. In this function you have to specify the parent window and optionally you can specify the initial rectangle, window styles and window ID. This function is the place where you can specify \b Tab control styles\b0 that defines the way tab buttons are positioned and displayed. \par +\par +4) If you plan to assign \b images\b0 to TabView pages then you have to create and load image list with images and associate it with COX3DTabViewContainer object using \b CTabCtrl::SetImageList()\b0 function.\par +\par +5) After COX3DTabViewContainer window was successfully created you can populate it with window objects using \cf1\ul AddPage\cf0\ulnone () or \cf1\ul InsertPage\cf0\ulnone () functions. If you are inserting view object you have to specify runtime class and context information in order to keep the document/view architecture in place. If you are adding a window object that is not a document view then \b you have to create it before adding it to COX3DTabViewContainer window\b0 . In AddPage() or InsertPage() functions you can specify text that will be used as page title in the corresponding tab button. Also you can specify the index of image in the tab control image list that should be displayed in the tab button. \par +\par +\ul\b\par +Second Case\ulnone\b0 : COX3DTabViewContainer will be used as a container for \b windows within a control bar\b0 . \par +\par +1) Create your own CControlBar-derived class (you can use our \b COXSizeControlBar\b0 as parent class if you need sizable docking windows). Let's call it CMyControlBar. \par +\par +2) Embed a COX3DTabViewContainer member variable in this class. \par +\par +3) Override \b CMyControlBar::OnCreate\b0 () member function. \par +\par +4) From within the overridden OnCreate(), call the \cf1\ul Create\cf0\ulnone () member function of COX3DTabViewContainer. In this function you have to specify the parent window and optionally you can specify the initial rectangle, window styles and window ID. This function is the place where you can specify \b Tab control styles\b0 that defines the way tab buttons are positioned and displayed. \par +\par +5) If you plan to assign images to TabView pages then you have to create and load image list with images and associate it with COX3DTabViewContainer object using \b CTabCtrl::SetImageLis\b0 t() function.\par +\par +6) After COX3DTabViewContainer window was successfully created you can populate it with window objects using \cf1\ul AddPage\cf0\ulnone () or \cf1\ul InsertPage\cf0\ulnone () function. You have to create window object before adding it to COX3DTabViewContainer. In AddPage or InsertPage functions you can specify text that will be used as page title in tab button. Also you can specify the index of image in the tab control image list that should be displayed in the tab button. \par +\par +7) Override \b CMyControlBar::OnSize\b0 () member function and resize in it COX3DTabViewContainer object as appropriate\par +\par +\par +Note, that \b any child window\b0 can be used as COX3DTabViewContainer page.\par +\par +The steps that should be taken in order to implement COX3DTabViewContainer in CControlBar derived window can be applied in general case too. We just decided to show it using CControlBar derived window because we think it's going to be used as parent window for COX3DTabViewContainer in most cases. \par +Above we described the process of creating and populating of COX3DTabViewContainer object. In most cases that would be all the code you need. For those who need to change dynamically the contents of COX3DTabViewContainer object we provide a set of the following functions. \par +\par +In order to remove any page at run time you have to use \cf1\ul DeletePage\cf0\ulnone () function. \par +\par +To set/retrieve page title that is displayed in corresponding tab button use \cf1\ul GetPageTitle\cf0\ulnone () and \cf1\ul SetPageTitle\cf0\ulnone () functions. \par +\par +To set/retrive active page index call \cf1\ul GetActivePageIndex\cf0\ulnone () and \cf1\ul SetActivepageIndex\cf0\ulnone () functions. \par +\par +Refer to the \cf1\ul class reference\cf0\ulnone for the list and description of all public functions.\par +\par +\f2\fs20\par +} + \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.cpp new file mode 100644 index 0000000..44c6565 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.cpp @@ -0,0 +1,150 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" +#include "StatisticsView.h" +#include "Customize.h" +#include "ChildFrm.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + ON_COMMAND(ID_VIEW_SHOW_CUSTOMIZE_DLG, OnViewShowCustomizeDlg) + ON_UPDATE_COMMAND_UI(ID_VIEW_SHOW_CUSTOMIZE_DLG, OnUpdateViewShowCustomizeDlg) + ON_WM_DESTROY() + //}}AFX_MSG_MAP +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 + + cs.lpszClass=AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_TABVIETYPE)); + ASSERT(cs.lpszClass); + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + // TODO: Add your specialized code here and/or call the base class + + UNREFERENCED_PARAMETER(lpcs); + + CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); + + if(pFrame->m_bOpenCustomizeDlg) + { + CCustomizeDlg dlgCustomize(this); + dlgCustomize.m_dwOffsetExt=pFrame->m_dwOffsetExt; + dlgCustomize.m_dwOffsetInt=pFrame->m_dwOffsetInt; + dlgCustomize.m_dwStyle=pFrame->m_dwStyle; + dlgCustomize.m_bOpenCustomizeDlg=pFrame->m_bOpenCustomizeDlg; + + if(dlgCustomize.DoModal()==IDOK) + { + pFrame->m_dwOffsetExt=dlgCustomize.m_dwOffsetExt; + pFrame->m_dwOffsetInt=dlgCustomize.m_dwOffsetInt; + pFrame->m_dwStyle=dlgCustomize.m_dwStyle; + pFrame->m_bOpenCustomizeDlg=dlgCustomize.m_bOpenCustomizeDlg; + } + } + + DWORD style = pFrame->m_dwStyle | TCS_FOCUSNEVER | WS_VISIBLE | WS_CHILD; + if(!m_TabViewContainer.Create(this,CRect(0,0,0,0), style, AFX_IDW_PANE_FIRST)) + return FALSE; + + m_TabViewContainer.SetOffsetExternal(pFrame->m_dwOffsetExt); + m_TabViewContainer.SetOffsetInternal(pFrame->m_dwOffsetInt); + + VERIFY(m_ilContainer.Create(IDB_IL_TABVIEWS,16,0,RGB(255,0,255))); + m_TabViewContainer.SetImageList(&m_ilContainer); + + if(!m_TabViewContainer.AddPage(pContext->m_pNewViewClass, + pContext,_T("Editor"),0)) + return FALSE; + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CHexView), + pContext,_T("HexView"),1)) + return FALSE; + + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CStatisticsView), + pContext,_T("Statistics"),2)) + return FALSE; + + m_TabViewContainer.SetActivePageIndex(0); + + return TRUE; +} + + +void CChildFrame::OnViewShowCustomizeDlg() +{ + // TODO: Add your command handler code here + CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); + pFrame->m_bOpenCustomizeDlg=!pFrame->m_bOpenCustomizeDlg; +} + +void CChildFrame::OnUpdateViewShowCustomizeDlg(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); + pCmdUI->SetCheck(pFrame->m_bOpenCustomizeDlg); +} + +void CChildFrame::OnDestroy() +{ + CMDIChildWnd::OnDestroy(); + + // TODO: Add your message handler code here + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.h new file mode 100644 index 0000000..c421e9a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ChildFrm.h @@ -0,0 +1,63 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OX3DTabView.h" + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COX3DTabViewContainer m_TabViewContainer; + CImageList m_ilContainer; + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + afx_msg void OnViewShowCustomizeDlg(); + afx_msg void OnUpdateViewShowCustomizeDlg(CCmdUI* pCmdUI); + afx_msg void OnDestroy(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.cpp new file mode 100644 index 0000000..d2345cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.cpp @@ -0,0 +1,135 @@ +// Customize.cpp : implementation file +// + +#include "stdafx.h" +#include "TabViews.h" +#include "Customize.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + + +CCustomizeDlg::CCustomizeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeDlg) + m_dwOffsetExt = 0; + m_dwOffsetInt = 0; + m_bBottom = FALSE; + m_bFixedWidth = FALSE; + m_bMultiline = FALSE; + m_bScrollOpposite = FALSE; + m_bOpenCustomizeDlg = FALSE; + m_bVertical = FALSE; + //}}AFX_DATA_INIT + m_dwStyle=0; +} + + +void CCustomizeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeDlg) + DDX_Control(pDX, IDC_STATIC_TITLE, m_ctlTiltle); + DDX_Control(pDX, IDC_STATIC_SEPARATOR3, m_separator3); + DDX_Control(pDX, IDC_STATIC_SEPARATOR2, m_separator2); + DDX_Control(pDX, IDC_STATIC_SEPARATOR1, m_separator1); + DDX_Control(pDX, IDC_SPIN_OFFSET_EXTERNAL, m_spinOffsetExt); + DDX_Text(pDX, IDC_EDIT_OFFSET_EXTERNAL, m_dwOffsetExt); + DDV_MinMaxDWord(pDX, m_dwOffsetExt, 0, 50); + DDX_Control(pDX, IDC_SPIN_OFFSET_INTERNAL, m_spinOffsetInt); + DDX_Text(pDX, IDC_EDIT_OFFSET_INTERNAL, m_dwOffsetInt); + DDV_MinMaxDWord(pDX, m_dwOffsetInt, 0, 50); + DDX_Check(pDX, IDC_CHECK_BOTTOM, m_bBottom); + DDX_Check(pDX, IDC_CHECK_FIXED_WIDTH, m_bFixedWidth); + DDX_Check(pDX, IDC_CHECK_MULTILINE, m_bMultiline); + DDX_Check(pDX, IDC_CHECK_SCROLL_OPPOSITE, m_bScrollOpposite); + DDX_Check(pDX, IDC_CHECK_SHOW_CUSTOMIZE_DLG, m_bOpenCustomizeDlg); + DDX_Check(pDX, IDC_CHECK_VERTICAL, m_bVertical); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeDlg) + ON_BN_CLICKED(IDC_CHECK_VERTICAL, OnCheckVertical) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg message handlers + +BOOL CCustomizeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + CFont font; + font.CreatePointFont(-140,_T("Times New Roman")); + m_ctlTiltle.SetTextFont(&font); + + m_spinOffsetExt.SetRange(0,50); + m_spinOffsetInt.SetRange(0,50); + + m_bBottom=((m_dwStyle&TCS_BOTTOM)==TCS_BOTTOM); + m_bFixedWidth=((m_dwStyle&TCS_FIXEDWIDTH)==TCS_FIXEDWIDTH); + m_bMultiline=((m_dwStyle&TCS_MULTILINE)==TCS_MULTILINE); + m_bScrollOpposite=((m_dwStyle&TCS_SCROLLOPPOSITE)==TCS_SCROLLOPPOSITE); + m_bVertical=((m_dwStyle&TCS_VERTICAL)==TCS_VERTICAL); + + UpdateData(FALSE); + + OnCheckVertical(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeDlg::OnOK() +{ + if(!UpdateData(TRUE)) + return; + + // TODO: Add extra validation here + if(m_bBottom) + m_dwStyle|=0x0002; + else + m_dwStyle&=~0x0002; + if(m_bFixedWidth) + m_dwStyle|=0x0400; + else + m_dwStyle&=~0x0400; + if(m_bMultiline) + m_dwStyle|=0x0200; + else + m_dwStyle&=~0x0200; + if(m_bScrollOpposite) + m_dwStyle|=0x0001; + else + m_dwStyle&=~0x0001; + if(m_bVertical) + m_dwStyle|=0x0080; + else + m_dwStyle&=~0x0080; + + CDialog::OnOK(); + +} + +void CCustomizeDlg::OnCheckVertical() +{ + // TODO: Add your control notification handler code here + if(!UpdateData(TRUE)) + return; + if(m_bVertical) + GetDlgItem(IDC_CHECK_BOTTOM)->SetWindowText(_T("Right aligned")); + else + GetDlgItem(IDC_CHECK_BOTTOM)->SetWindowText(_T("Bottom aligned")); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.h new file mode 100644 index 0000000..be1653a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/Customize.h @@ -0,0 +1,65 @@ +#if !defined(AFX_CUSTOMIZE_H__229EBDA3_561B_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_CUSTOMIZE_H__229EBDA3_561B_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// Customize.h : header file +// + +#include "OXSeparator.h" +#include "OXStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + +class CCustomizeDlg : public CDialog +{ +// Construction +public: + CCustomizeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeDlg) + enum { IDD = IDD_CUSTOMIZE }; + COXStatic m_ctlTiltle; + COXSeparator m_separator3; + COXSeparator m_separator2; + COXSeparator m_separator1; + CSpinButtonCtrl m_spinOffsetExt; + DWORD m_dwOffsetExt; + CSpinButtonCtrl m_spinOffsetInt; + DWORD m_dwOffsetInt; + BOOL m_bBottom; + BOOL m_bFixedWidth; + BOOL m_bMultiline; + BOOL m_bScrollOpposite; + BOOL m_bOpenCustomizeDlg; + BOOL m_bVertical; + //}}AFX_DATA + DWORD m_dwStyle; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnCheckVertical(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZE_H__229EBDA3_561B_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.cpp new file mode 100644 index 0000000..2a43b3e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.cpp @@ -0,0 +1,187 @@ +// HexView.cpp : implementation file +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHexView + +IMPLEMENT_DYNCREATE(CHexView, CEditView) + +CHexView::CHexView() +{ +} + +CHexView::~CHexView() +{ +} + + +BEGIN_MESSAGE_MAP(CHexView, CEditView) + //{{AFX_MSG_MAP(CHexView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHexView diagnostics + +#ifdef _DEBUG +void CHexView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CHexView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CTabViewsDoc* CHexView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CHexView message handlers + +void CHexView::AddText(LPCTSTR pszText) +{ + LONG nWindowTextLength; + nWindowTextLength = GetEditCtrl().GetWindowTextLength(); + GetEditCtrl().SetSel(nWindowTextLength, nWindowTextLength); + GetEditCtrl().ReplaceSel(pszText); +} + + +BOOL CHexView::PreCreateWindow(CREATESTRUCT& cs) +{ + BOOL bRet = CEditView::PreCreateWindow(cs); + cs.style |= ES_READONLY; + return bRet; +} + +void CHexView::OnInitialUpdate() +{ + CEditView::OnInitialUpdate(); + + // Create a fixed size font + if((HFONT)m_font==NULL) + { + m_font.CreateFont( 0, // nHeight + 0, // nWidth + 0, // nEscapement + 0, // nOrientation + FW_DONTCARE, // nWeight + FALSE, // bItalic + FALSE, // bUnderline + 0, // cStrikeOut + DEFAULT_CHARSET, // nCharSet + OUT_DEFAULT_PRECIS, // nOutPrecision + CLIP_DEFAULT_PRECIS, // nClipPrecision + DEFAULT_QUALITY, // nQuality + FIXED_PITCH, // nPitchAndFamily + NULL); // lpszFacename + } + + GetEditCtrl().SetFont(&m_font, FALSE); + + TextToHex(TRUE); +} + +void CHexView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + if(bActivate && pActivateView==this) + { + SetRedraw(FALSE); + TextToHex(TRUE); + SetRedraw(TRUE); + } + + CEditView::OnActivateView(bActivate, pActivateView, pDeactiveView); + +} + +void CHexView::TextToHex(BOOL bForFirstTime/*=FALSE*/) +{ + CTabViewsDoc* pDoc=(CTabViewsDoc*)GetDocument(); + ASSERT_VALID(pDoc); + + CTabViewsView* pPrimaryView=(CTabViewsView*)pDoc->GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + + if(!bForFirstTime && !pPrimaryView->GetEditCtrl().GetModify()) + return; + + CString sText; + + UINT nMaxIndex=pPrimaryView->GetBufferLength(); + if(nMaxIndex>0) + { + if(GetBufferLength()>0) + { + GetEditCtrl().SetReadOnly(FALSE); + GetEditCtrl().SetSel(0,GetBufferLength(),TRUE); + GetEditCtrl().Clear(); + GetEditCtrl().SetReadOnly(TRUE); + } + + + LPCTSTR pData=pPrimaryView->LockBuffer(); + ASSERT(pData!=NULL); + + UINT nIndex=0; + CString sRaw; + CString sHex; + CString sHexTemp; + + while(nIndexUnlockBuffer(); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.h new file mode 100644 index 0000000..ec3758e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/HexView.h @@ -0,0 +1,65 @@ +// HexView.h : header file +// + +#ifndef _HEXVIEW_H_ +#define _HEXVIEW_H_ + +//#include "OXTabView.h" + +///////////////////////////////////////////////////////////////////////////// +// CHexView view + +//class CHexView : public COXTabViewPage +class CHexView : public CEditView +{ +protected: + CHexView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CHexView) + +// Attributes +public: + CTabViewsDoc* GetDocument(); + +// Operations +public: + virtual ~CHexView(); + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHexView) + public: + virtual void OnInitialUpdate(); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +protected: + CFont m_font; + + void TextToHex(BOOL bForFirstTime=FALSE); + void AddText(LPCTSTR pszText); + + // Generated message map functions +protected: + //{{AFX_MSG(CHexView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in HexView.cpp +inline CTabViewsDoc* CHexView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +#endif // _HEXVIEW_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.cpp new file mode 100644 index 0000000..62fbcb9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.cpp @@ -0,0 +1,187 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" +#include "StatisticsView.h" +#include "Customize.h" +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CMainFrameWindow) + +BEGIN_MESSAGE_MAP(CMainFrame, CMainFrameWindow) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_SHOW_CUSTOMIZE_DLG, OnViewShowCustomizeDlg) + ON_UPDATE_COMMAND_UI(ID_VIEW_SHOW_CUSTOMIZE_DLG, OnUpdateViewShowCustomizeDlg) + //}}AFX_MSG_MAP +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 + m_dwOffsetExt=5; + m_dwOffsetInt=0; + m_dwStyle=DEFAULT_3DTABCTRLSTYLE; + m_bOpenCustomizeDlg=TRUE; +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMainFrameWindow::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this) || + !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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMainFrameWindow::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMainFrameWindow::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMainFrameWindow::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + + +BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + // TODO: Add your specialized code here and/or call the base class + +#ifndef _MDI_INTERFACE + UNREFERENCED_PARAMETER(lpcs); + + if(m_bOpenCustomizeDlg) + { + CCustomizeDlg dlgCustomize(this); + dlgCustomize.m_dwOffsetExt=m_dwOffsetExt; + dlgCustomize.m_dwOffsetInt=m_dwOffsetInt; + dlgCustomize.m_dwStyle=m_dwStyle; + dlgCustomize.m_bOpenCustomizeDlg=m_bOpenCustomizeDlg; + + if(dlgCustomize.DoModal()==IDOK) + { + m_dwOffsetExt=dlgCustomize.m_dwOffsetExt; + m_dwOffsetInt=dlgCustomize.m_dwOffsetInt; + m_dwStyle=dlgCustomize.m_dwStyle; + m_bOpenCustomizeDlg=dlgCustomize.m_bOpenCustomizeDlg; + } + } + + if(!m_TabViewContainer.Create(this,CRect(0,0,0,0),m_dwStyle)) + return FALSE; + + m_TabViewContainer.SetOffsetExternal(m_dwOffsetExt); + m_TabViewContainer.SetOffsetInternal(m_dwOffsetInt); + + VERIFY(m_ilContainer.Create(IDB_IL_TABVIEWS,16,0,RGB(255,0,255))); + m_TabViewContainer.SetImageList(&m_ilContainer); + + if(!m_TabViewContainer.AddPage(pContext->m_pNewViewClass, + pContext,_T("Editor"),0)) + return FALSE; + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CHexView), + pContext,_T("HexView"),1)) + return FALSE; + + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CStatisticsView), + pContext,_T("Statistics"),2)) + return FALSE; + + m_TabViewContainer.SetActivePageIndex(0); + + return TRUE; +#else + return COXMenuBarFrame:: + OnCreateClient(lpcs, pContext); +#endif +} + + +void CMainFrame::OnViewShowCustomizeDlg() +{ + // TODO: Add your command handler code here + m_bOpenCustomizeDlg=!m_bOpenCustomizeDlg; +} + +void CMainFrame::OnUpdateViewShowCustomizeDlg(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->SetCheck(m_bOpenCustomizeDlg); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.h new file mode 100644 index 0000000..1302725 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/MainFrm.h @@ -0,0 +1,79 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXMenuBar.h" +#include "OX3DTabView.h" + + +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNCREATE(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + DWORD m_dwOffsetExt; + DWORD m_dwOffsetInt; + DWORD m_dwStyle; + BOOL m_bOpenCustomizeDlg; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + +#ifndef _MDI_INTERFACE + COX3DTabViewContainer m_TabViewContainer; + CImageList m_ilContainer; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnViewShowCustomizeDlg(); + afx_msg void OnUpdateViewShowCustomizeDlg(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ReadMe.txt new file mode 100644 index 0000000..279e16a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/ReadMe.txt @@ -0,0 +1,102 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : TabViews +======================================================================== + + +AppWizard has created this TabViews 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 TabViews application. + +TabViews.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CTabViewsApp application class. + +TabViews.cpp + This is the main application source file that contains the application + class CTabViewsApp. + +TabViews.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 + Developer Studio. + +res\TabViews.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file TabViews.rc. + +res\TabViews.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +TabViews.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +TabViewsDoc.h, TabViewsDoc.cpp - the document + These files contain your CTabViewsDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CTabViewsDoc::Serialize). + +TabViewsView.h, TabViewsView.cpp - the view of the document + These files contain your CTabViewsView class. + CTabViewsView objects are used to view CTabViewsDoc objects. + +res\TabViewsDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CTabViewsDoc class. This icon is included by the main + resource file TabViews.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named TabViews.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.cpp new file mode 100644 index 0000000..c099598 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.cpp @@ -0,0 +1,180 @@ +// StatisticsView.cpp : implementation file +// + +#include "stdafx.h" +#include "tabviews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "StatisticsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView + +IMPLEMENT_DYNCREATE(CStatisticsView, CListView) + +CStatisticsView::CStatisticsView() +{ +} + +CStatisticsView::~CStatisticsView() +{ +} + + +BEGIN_MESSAGE_MAP(CStatisticsView, CListView) + //{{AFX_MSG_MAP(CStatisticsView) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView drawing + +void CStatisticsView::OnDraw(CDC* pDC) +{ + // TODO: add draw code here + + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView diagnostics + +#ifdef _DEBUG +void CStatisticsView::AssertValid() const +{ + CListView::AssertValid(); +} + +void CStatisticsView::Dump(CDumpContext& dc) const +{ + CListView::Dump(dc); +} + +CTabViewsDoc* CStatisticsView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView message handlers + +BOOL CStatisticsView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.style |= LVS_REPORT; + return CListView::PreCreateWindow(cs); +} + +void CStatisticsView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + if(bActivate && pActivateView==this) + { + SetRedraw(FALSE); + Populate(TRUE); + SetRedraw(TRUE); + RedrawWindow(); + } + + CListView::OnActivateView(bActivate, pActivateView, pDeactiveView); +} + +void CStatisticsView::OnInitialUpdate() +{ + CListView::OnInitialUpdate(); + + // TODO: Add your specialized code here and/or call the base class + Populate(TRUE); +} + +void CStatisticsView::Populate(BOOL bForFirstTime/*=FALSE*/) +{ + CTabViewsDoc* pDoc=(CTabViewsDoc*)GetDocument(); + ASSERT_VALID(pDoc); + + CTabViewsView* pPrimaryView=(CTabViewsView*)pDoc->GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + + if(!bForFirstTime && !pPrimaryView->GetEditCtrl().GetModify()) + return; + + GetListCtrl().DeleteAllItems(); + + CMap arrCharacters; + UINT nMaxIndex=pPrimaryView->GetBufferLength(); + LPCTSTR pData=pPrimaryView->LockBuffer(); + ASSERT(pData!=NULL); + int nIndex=0; + for(nIndex=0; nIndex<(int)nMaxIndex; nIndex++) + { + if(_istprint(pData[nIndex])) + { + int nCount; + if(!arrCharacters.Lookup((TCHAR)pData[nIndex],nCount)) + nCount=0; + nCount++; + arrCharacters.SetAt((TCHAR)pData[nIndex],nCount); + } + } + + nIndex=0; + POSITION pos=arrCharacters.GetStartPosition(); + while(pos!=NULL) + { + int nCount; + TCHAR chr; + arrCharacters.GetNextAssoc(pos,chr,nCount); + CString sChar=chr; + if(chr==32) + { + sChar=_T("Space"); + } + + VERIFY(GetListCtrl().InsertItem(nIndex,sChar)!=-1); + + CString sCount; + sCount.Format(_T("%u"),nCount); + VERIFY(GetListCtrl().SetItemText(nIndex,1,sCount)); + + nIndex++; + } + + pPrimaryView->UnlockBuffer(); +} + +int CStatisticsView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CListView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + LV_COLUMN lvc; + lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; + lvc.fmt=LVCFMT_LEFT; + lvc.iSubItem=0; + lvc.cx=75; + lvc.pszText=_T("Character"); + GetListCtrl().InsertColumn(0,&lvc); + + lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; + lvc.fmt=LVCFMT_CENTER; + lvc.iSubItem=1; + lvc.cx=50; + lvc.pszText=_T("Count"); + GetListCtrl().InsertColumn(1,&lvc); + + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.h new file mode 100644 index 0000000..a15db30 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StatisticsView.h @@ -0,0 +1,71 @@ +#if !defined(AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_) +#define AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// StatisticsView.h : header file +// + +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView view + +//class CStatisticsView : public COXTabViewPage +class CStatisticsView : public CListView +{ +protected: + CStatisticsView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CStatisticsView) + +// Attributes +public: + +// Operations +public: + CTabViewsDoc* GetDocument(); + +protected: + void Populate(BOOL bForFirstTime=FALSE); + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatisticsView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CStatisticsView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions +protected: + //{{AFX_MSG(CStatisticsView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in StatisticsView.cpp +inline CTabViewsDoc* CStatisticsView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.cpp new file mode 100644 index 0000000..5f41789 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// TabViews.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.h new file mode 100644 index 0000000..1591fa3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.cpp new file mode 100644 index 0000000..adee199 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.cpp @@ -0,0 +1,145 @@ +// TabViews.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#include "UTSampleAbout.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp + +BEGIN_MESSAGE_MAP(CTabViewsApp, CWinApp) + //{{AFX_MSG_MAP(CTabViewsApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp construction + +CTabViewsApp::CTabViewsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CTabViewsApp object + +CTabViewsApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp initialization + +BOOL CTabViewsApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + AfxOleInit(); + + // Change the registry key under which our settings are stored. + // 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(8); // 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. + +#ifdef _MDI_INTERFACE + AddDocTemplate(new CMultiDocTemplate(IDR_TABVIETYPE, + RUNTIME_CLASS(CTabViewsDoc), RUNTIME_CLASS(CChildFrame), + RUNTIME_CLASS(CTabViewsView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + m_pMainWnd->ShowWindow(m_nCmdShow); +#else + AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME, + RUNTIME_CLASS(CTabViewsDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CTabViewsView))); +#endif + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + +// if(cmdInfo.m_strFileName.IsEmpty()) +// cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing; + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + return TRUE; +} + +// App command to run the dialog +void CTabViewsApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp commands + +int CTabViewsApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsp new file mode 100644 index 0000000..b1ca887 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsp @@ -0,0 +1,437 @@ +# Microsoft Developer Studio Project File - Name="TabViews" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TabViews - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TabViews.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TabViews.mak" CFG="TabViews - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TabViews - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TabViews - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"3DTabViews.exe" + +!ELSEIF "$(CFG)" == "TabViews - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"3DTabViews.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "TabViews - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "TabViews" +# PROP BASE Intermediate_Dir "TabViews" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x64 /subsystem:windows /machine:I386 /out:"TabViews.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"3DTabViews.exe" + +!ELSEIF "$(CFG)" == "TabViews - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "TabView0" +# PROP BASE Intermediate_Dir "TabView0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"TabViews.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"3DTabViews.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "TabViews - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "TabView1" +# PROP BASE Intermediate_Dir "TabView1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x64 /subsystem:windows /machine:I386 /out:"TabViews.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"3DTabViews.exe" + +!ENDIF + +# Begin Target + +# Name "TabViews - Win32 Release" +# Name "TabViews - Win32 Debug" +# Name "TabViews - Win32 Release_Shared" +# Name "TabViews - Win32 Unicode_Debug" +# Name "TabViews - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\Customize.cpp +# End Source File +# Begin Source File + +SOURCE=.\HexView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StatisticsView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TabViews.cpp +# End Source File +# Begin Source File + +SOURCE=.\TabViews.rc +# End Source File +# Begin Source File + +SOURCE=.\TabViewsDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\TabViewsView.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Customize.h +# End Source File +# Begin Source File + +SOURCE=.\HexView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OX3DTabView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMenuBar.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StatisticsView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TabViews.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewsDoc.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewsView.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\il_tabvi.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\TabViews.ico +# End Source File +# Begin Source File + +SOURCE=.\res\TabViews.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\TabViewsDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\3DTabViews.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsw new file mode 100644 index 0000000..e7466c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TabViews"=".\TabViews.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/3DTabViews", WNGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.h new file mode 100644 index 0000000..b4a3ca4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.h @@ -0,0 +1,59 @@ +// TabViews.h : main header file for the TABVIEWS application +// + +#if !defined(AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +#define _MDI_INTERFACE + +#ifdef _MDI_INTERFACE +#define CMainFrameWindow CMDIFrameWnd +#else +#define CMainFrameWindow CFrameWnd +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp: +// See TabViews.cpp for the implementation of this class +// + +class CTabViewsApp : public CWinApp +{ +public: + CTabViewsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CTabViewsApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.rc new file mode 100644 index 0000000..9c06302 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.rc @@ -0,0 +1,454 @@ +// 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 + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\TabViews.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" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "#endif\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\\TabViews.ico" +IDR_TABVIETYPE ICON "res\\TabViewsDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDB_IL_TABVIEWS BITMAP "res\\il_tabvi.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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Show Customize dialog", ID_VIEW_SHOW_CUSTOMIZE_DLG, CHECKED + END + POPUP "&Help" + BEGIN + MENUITEM "&About TabViews...", ID_APP_ABOUT + END +END + +IDR_TABVIETYPE 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 "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 + MENUITEM SEPARATOR + MENUITEM "Show Customize dialog", ID_VIEW_SHOW_CUSTOMIZE_DLG, CHECKED + 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 TabViews...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "FileDescription", "Ultimate Toolbox Demo - 3d TabViews" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "TabViews" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "TabViews.EXE" + VALUE "ProductName", "TabViews Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG 0, 0, 186, 209 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize 3DTabViewContainer framework" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Tab control styles:",IDC_STATIC,7,46,58,8 + CONTROL "Vertically oriented",IDC_CHECK_VERTICAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,57,71,10 + CONTROL "Bottom aligned",IDC_CHECK_BOTTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,71,10 + CONTROL "Multiline",IDC_CHECK_MULTILINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,57,71,10 + CONTROL "Fixed width",IDC_CHECK_FIXED_WIDTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,72,71,10 + CONTROL "Scroll buttons to the opposite side",IDC_CHECK_SCROLL_OPPOSITE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,87,122,10 + EDITTEXT IDC_EDIT_OFFSET_EXTERNAL,118,112,30,13,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_OFFSET_EXTERNAL,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,147,112,9,14 + EDITTEXT IDC_EDIT_OFFSET_INTERNAL,118,147,30,13,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_OFFSET_INTERNAL,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,147,147,9,14 + DEFPUSHBUTTON "OK",IDOK,129,185,50,14 + LTEXT "External offset (the distance between 3DTabViewContainer and parent frame borders)",IDC_STATIC,7,112,99,24 + LTEXT "Internal offset (the distance between 3DTabViewContainer and view pages)",IDC_STATIC,7,147,99,24 + CONTROL "Show this dialog before opening a new file",IDC_CHECK_SHOW_CUSTOMIZE_DLG, + "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_TOP | BS_MULTILINE | WS_TABSTOP,7,185,91,17 + LTEXT "",IDC_STATIC_SEPARATOR1,22,100,140,8,SS_SUNKEN + LTEXT "",IDC_STATIC_SEPARATOR2,22,173,140,8,SS_SUNKEN + LTEXT "",IDC_STATIC_SEPARATOR3,22,35,140,8,SS_SUNKEN + CTEXT "Specify the appearance of the 3DTabViewContainer",IDC_STATIC_TITLE,7,7,172,22 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 202 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "HexText Editor with 3DTabViews" + IDR_TABVIETYPE "\nHText\nHText\n\n\nTabViews.Document\nHText Document" + ID_DESCRIPTION_FILE "3DTabViewsInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "TabViews" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\TabViews.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXMenuBar.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.sln new file mode 100644 index 0000000..06249f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabViews", "TabViews.vcproj", "{29CA054F-3945-488A-AB47-D29A58C694A5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug|Win32.ActiveCfg = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Debug|Win32.Build.0 = Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release|Win32.ActiveCfg = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Release|Win32.Build.0 = Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {29CA054F-3945-488A-AB47-D29A58C694A5}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.vcproj new file mode 100644 index 0000000..019b104 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViews.vcproj @@ -0,0 +1,2447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.cpp new file mode 100644 index 0000000..80b8b73 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.cpp @@ -0,0 +1,94 @@ +// TabViewsDoc.cpp : implementation of the CTabViewsDoc class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc + +IMPLEMENT_DYNCREATE(CTabViewsDoc, CDocument) + +BEGIN_MESSAGE_MAP(CTabViewsDoc, CDocument) + //{{AFX_MSG_MAP(CTabViewsDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc construction/destruction + +CTabViewsDoc::CTabViewsDoc() +{ + // TODO: add one-time construction code here + +} + +CTabViewsDoc::~CTabViewsDoc() +{ +} + +BOOL CTabViewsDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc serialization + +void CTabViewsDoc::Serialize(CArchive& ar) +{ + CTabViewsView* pPrimaryView=(CTabViewsView*)GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + pPrimaryView->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc diagnostics + +#ifdef _DEBUG +void CTabViewsDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CTabViewsDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc commands + +CEditView* CTabViewsDoc::GetPrimaryView() +{ + POSITION pos=m_viewList.GetHeadPosition(); + while(pos!=NULL) + { + CView* pView=(CView*)m_viewList.GetNext(pos); + if(pView->IsKindOf(RUNTIME_CLASS(CTabViewsView))) + return (CEditView*)pView; + } + + return NULL; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.h new file mode 100644 index 0000000..80969df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsDoc.h @@ -0,0 +1,59 @@ +// TabViewsDoc.h : interface of the CTabViewsDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +class CTabViewsDoc : public CDocument +{ +protected: // create from serialization only + CTabViewsDoc(); + DECLARE_DYNCREATE(CTabViewsDoc) + +// Attributes +public: + +// Operations +public: + + CEditView* GetPrimaryView(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CTabViewsDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CTabViewsDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.cpp new file mode 100644 index 0000000..1b58a31 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.cpp @@ -0,0 +1,106 @@ +// TabViewsView.cpp : implementation of the CTabViewsView class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView + +IMPLEMENT_DYNCREATE(CTabViewsView, CEditView) + +BEGIN_MESSAGE_MAP(CTabViewsView, CEditView) + //{{AFX_MSG_MAP(CTabViewsView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView construction/destruction + +CTabViewsView::CTabViewsView() +{ + // TODO: add construction code here + +} + +CTabViewsView::~CTabViewsView() +{ +} + +BOOL CTabViewsView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CEditView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView drawing + +void CTabViewsView::OnDraw(CDC* pDC) +{ + CTabViewsDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView printing + +BOOL CTabViewsView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CTabViewsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CTabViewsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView diagnostics + +#ifdef _DEBUG +void CTabViewsView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CTabViewsView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CTabViewsDoc* CTabViewsView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.h new file mode 100644 index 0000000..7ee2864 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/TabViewsView.h @@ -0,0 +1,68 @@ +// TabViewsView.h : interface of the CTabViewsView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +//class CTabViewsView : public COXTabViewPage +class CTabViewsView : public CEditView +{ +protected: // create from serialization only + CTabViewsView(); + DECLARE_DYNCREATE(CTabViewsView) + +// Attributes +public: + CTabViewsDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CTabViewsView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CTabViewsView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in TabViewsView.cpp +inline CTabViewsDoc* CTabViewsView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.rc2 new file mode 100644 index 0000000..aa71142 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViews.rc2 @@ -0,0 +1,13 @@ +// +// TABVIEWS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViewsDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViewsDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/TabViewsDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/il_tabvi.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/il_tabvi.bmp new file mode 100644 index 0000000..3c955ef Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/res/il_tabvi.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/resource.h new file mode 100644 index 0000000..c47deba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/3DTabViews/resource.h @@ -0,0 +1,40 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by TabViews.rc +// +#define IDR_MAINFRAME 128 +#define IDR_TABVIETYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDB_IL_TABVIEWS 131 +#define IDD_CUSTOMIZE 132 +#define IDC_LIST_STYLES 1001 +#define IDC_CHECK_VERTICAL 1001 +#define IDC_EDIT_OFFSET 1002 +#define IDC_EDIT_OFFSET_EXTERNAL 1002 +#define IDC_SPIN_OFFSET 1003 +#define IDC_SPIN_OFFSET_EXTERNAL 1003 +#define IDC_EDIT_OFFSET_INTERNAL 1004 +#define IDC_SPIN_OFFSET_INTERNAL 1005 +#define IDC_CHECK_BOTTOM 1006 +#define IDC_CHECK_MULTILINE 1007 +#define IDC_CHECK_FIXED_WIDTH 1008 +#define IDC_CHECK_SCROLL_OPPOSITE 1009 +#define IDC_CHECK_SHOW_CUSTOMIZE_DLG 1010 +#define IDC_STATIC_SEPARATOR1 1011 +#define IDC_STATIC_SEPARATOR2 1012 +#define IDC_STATIC_SEPARATOR3 1013 +#define IDC_STATIC_TITLE 1014 +#define ID_VIEW_CUSTOMIZE 32771 +#define ID_VIEW_SHOW_CUSTOMIZE_DLG 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1015 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/AppBar.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/AppBar.rtf new file mode 100644 index 0000000..a432dcc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/AppBar.rtf @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f49\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;} +{\f53\froman\fcharset238\fprq2 Times New Roman CE;}{\f54\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f56\froman\fcharset161\fprq2 Times New Roman Greek;}{\f57\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f60\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f445\fswiss\fcharset238\fprq2 Verdana CE;}{\f446\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f448\fswiss\fcharset161\fprq2 Verdana Greek;}{\f449\fswiss\fcharset162\fprq2 Verdana Tur;} +{\f452\fswiss\fcharset186\fprq2 Verdana Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; +\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{ +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\info +{\title Class COXAppBar provides functionality of Windows shell application bar}{\author DmitriyF}{\operator DmitriyF}{\creatim\yr2000\mo1\dy20\hr12\min44}{\revtim\yr2000\mo1\dy20\hr12\min50}{\version1}{\edmins6}{\nofpages1}{\nofwords0}{\nofchars0} +{\*\company Dundas}{\nofcharsws0}{\vern8247}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1 +\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f49 Class }{ +\b\f49 COXAppBar}{\f49 provides functionality of Windows shell application bar}{\f49 . }{\f49 It is a template class and use}{\f49 s}{\f49 CWnd derived class as a parent. +\par }{\b\f49 COXAppBar}{\f49 has two constructors - one for generic CWnd derived class and another one for CDialog derived class. It is easy to use. +\par To start use it call }{\f49\cf2 Register(TRUE)}{\f49 . To Load prevous state call }{\f49\cf2 LoadState()}{\f49 , that returns TRUE on success, otherwise you can suply your own parameters. If you want to dock window on certain edge you can use function }{ +\f49\cf2 SetE}{\f49\cf2 d}{\f49\cf2 ge()}{\f49 . The two important state are Autohidden and AlwaysOnTop. To set or remove these features call }{\f49\cf2 SetAutoHide()}{\f49 or }{\f49\cf2 SetAlwaysOnTop()}{\f49 with appropriate value - TRUE or FALSE + +\par Any edge can be excluded from docking state by function }{\f49\cf2 SetBarStyle()}{\f49 To see appbar styles use }{\f49\cf2 GetBarStyle()}{\f49 . You can also exclude ABE_FLOAT state, + so your appbar always will be docked to some edge. Additional functionality is provided by OX_APPBARS_DIFFERENT_DIMS. This flag (set on by default) indicate +\par the appbar will provide different width and height for every state. +\par Addidtional customization: set the width of the appbar in hidden state, time the autohidden appbar will wait while inactive until begin slide to hidden state, dim}{\f49 ensions in any state and others}{\f49 .}{ +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.clw new file mode 100644 index 0000000..81c84d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.clw @@ -0,0 +1,109 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CApplicationBarApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ApplicationBar.h" + +ClassCount=4 +Class1=CApplicationBarApp +Class2=CApplicationBarDlg + +ResourceCount=6 +Resource1=IDR_MAINFRAME +Resource2=IDR_MENU_POPUP +Class3=COXAppBar +Class4=COptionsDialog +Resource3=IDD_APPLICATIONBAR_DIALOG +Resource4=IDD_DIALOG_OPTIONS (English (U.S.)) +Resource5=IDD_APPLICATIONBAR_DIALOG (English (U.S.)) +Resource6=IDR_MENU_POPUP (English (Canada)) + +[CLS:CApplicationBarApp] +Type=0 +HeaderFile=ApplicationBar.h +ImplementationFile=ApplicationBar.cpp +Filter=N +LastObject=CApplicationBarApp +BaseClass=CWinApp +VirtualFilter=AC + +[CLS:CApplicationBarDlg] +Type=0 +HeaderFile=ApplicationBarDlg.h +ImplementationFile=ApplicationBarDlg.cpp +Filter=D +LastObject=ID_APP_ABOUT +BaseClass=COXAppBar +VirtualFilter=dWC + + + +[DLG:IDD_APPLICATIONBAR_DIALOG] +Type=1 +Class=CApplicationBarDlg +ControlCount=2 +Control1=IDOK,button,1342242817 +Control2=IDC_STATIC,static,1342177294 + +[CLS:COptionsDialog] +Type=0 +HeaderFile=OptionsDialog.h +ImplementationFile=OptionsDialog.cpp +BaseClass=CDialog +Filter=D +LastObject=COptionsDialog +VirtualFilter=dWC + +[DLG:IDD_APPLICATIONBAR_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=1 +Control1=IDOK,button,1342242817 + +[DLG:IDD_DIALOG_OPTIONS (English (U.S.))] +Type=1 +Class=? +ControlCount=9 +Control1=ID_APPLY,button,1476460545 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_CHECK_ONTOP,button,1342242819 +Control5=IDC_CHECK_AUTOHIDE,button,1342242819 +Control6=IDC_RADIO_RIGHT,button,1342181385 +Control7=IDC_RADIO_LEFT,button,1342181385 +Control8=IDC_RADIO_TOP,button,1342181385 +Control9=IDC_RADIO_BOTTOM,button,1342181385 + +[MNU:IDR_MENU_POPUP] +Type=1 +Class=? +Command1=ID_AUTOHIDE +Command2=ID_ALWAYSONTOP +Command3=ID_FLOATDOCK +Command4=ID_LEFTDOCK +Command5=ID_TOPDOCK +Command6=ID_RIGHTDOCK +Command7=ID_BOTTOMDOCK +Command8=ID_HASCAPTION +Command9=IDOK +CommandCount=9 + +[MNU:IDR_MENU_POPUP (English (Canada))] +Type=1 +Class=? +Command1=ID_AUTOHIDE +Command2=ID_ALWAYSONTOP +Command3=ID_FLOATDOCK +Command4=ID_LEFTDOCK +Command5=ID_TOPDOCK +Command6=ID_RIGHTDOCK +Command7=ID_BOTTOMDOCK +Command8=ID_REGISTER +Command9=ID_UNREGISTER +Command10=IDOK +Command11=ID_APP_ABOUT +CommandCount=11 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.cpp new file mode 100644 index 0000000..320f7f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.cpp @@ -0,0 +1,110 @@ +// ApplicationBar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ApplicationBar.h" +#include "ApplicationBarDlg.h" +#include "OptionsDialog.h" +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarApp + +BEGIN_MESSAGE_MAP(CApplicationBarApp, CWinApp) + //{{AFX_MSG_MAP(CApplicationBarApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarApp construction + +CApplicationBarApp::CApplicationBarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CApplicationBarApp object + +static HINSTANCE g_hRichEdDLL=NULL; +CApplicationBarApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarApp initialization + +BOOL CApplicationBarApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CApplicationBarDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +void CApplicationBarApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +int CApplicationBarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsp new file mode 100644 index 0000000..b2a5f1c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsp @@ -0,0 +1,274 @@ +# Microsoft Developer Studio Project File - Name="ApplicationBar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ApplicationBar - Win32 UnicodeDebug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ApplicationBar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ApplicationBar.mak" CFG="ApplicationBar - Win32 UnicodeDebug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ApplicationBar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ApplicationBar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ApplicationBar - Win32 UnicodeDebug" (based on "Win32 (x86) Application") +!MESSAGE "ApplicationBar - Win32 UnicodeRelease" (based on "Win32 (x86) Application") +!MESSAGE "ApplicationBar - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ApplicationBar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\Include\\" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ApplicationBar.exe" + +!ELSEIF "$(CFG)" == "ApplicationBar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include\\" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ApplicationBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ApplicationBar - Win32 UnicodeDebug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ApplicationBar___Win32_UnicodeDebug" +# PROP BASE Intermediate_Dir "ApplicationBar___Win32_UnicodeDebug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UnicodeDebug" +# PROP Intermediate_Dir "UnicodeDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "f:\Ultimate Toolbox\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include\\" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ApplicationBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ApplicationBar - Win32 UnicodeRelease" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ApplicationBar___Win32_UnicodeRelease" +# PROP BASE Intermediate_Dir "ApplicationBar___Win32_UnicodeRelease" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "UnicodeRelease" +# PROP Intermediate_Dir "UnicodeRelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "d:\Ultimate Toolbox\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\Include\\" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ApplicationBar.exe" + +!ELSEIF "$(CFG)" == "ApplicationBar - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ApplicationBar___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "ApplicationBar___Win32_ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "d:\Ultimate Toolbox\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include\\" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ApplicationBar.exe" + +!ENDIF + +# Begin Target + +# Name "ApplicationBar - Win32 Release" +# Name "ApplicationBar - Win32 Debug" +# Name "ApplicationBar - Win32 UnicodeDebug" +# Name "ApplicationBar - Win32 UnicodeRelease" +# Name "ApplicationBar - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ApplicationBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\ApplicationBar.rc +# End Source File +# Begin Source File + +SOURCE=.\ApplicationBarDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAppBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ApplicationBar.h +# End Source File +# Begin Source File + +SOURCE=.\ApplicationBarDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAppBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDllExt.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryValFile.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ApplicationBar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ApplicationBar.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\image.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ApplicationBar.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsw new file mode 100644 index 0000000..2aa40b3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ApplicationBar"=".\ApplicationBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ApplicationBar", GPGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.h new file mode 100644 index 0000000..f1705b9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.h @@ -0,0 +1,51 @@ +// ApplicationBar.h : main header file for the APPLICATIONBAR application +// + +#if !defined(AFX_APPLICATIONBAR_H__3F58E76C_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) +#define AFX_APPLICATIONBAR_H__3F58E76C_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarApp: +// See ApplicationBar.cpp for the implementation of this class +// + +class CApplicationBarApp : public CWinApp +{ +public: + CApplicationBarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CApplicationBarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CApplicationBarApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_APPLICATIONBAR_H__3F58E76C_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.rc new file mode 100644 index 0000000..59a3d38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.rc @@ -0,0 +1,228 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ApplicationBar.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\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\\ApplicationBar.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_APPLICATIONBAR_DIALOG DIALOGEX 0, 0, 259, 101 +STYLE DS_ABSALIGN | DS_SETFONT | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_TOOLWINDOW +CAPTION "Ultimate Toolbox Demo - Application Bar" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Close",IDOK,7,80,50,14 + CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,7,7,245,70 +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 "040904b0" + BEGIN + VALUE "FileDescription", "Ultimate Toolbox Demo - Application Bar" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ApplicationBar" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "ApplicationBar.EXE" + VALUE "ProductName", "ApplicationBar Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_APPLICATIONBAR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 252 + TOPMARGIN, 7 + BOTTOMMARGIN, 94 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + ID_DESCRIPTION_FILE "AppBar.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU_POPUP MENU +BEGIN + POPUP "TEST" + BEGIN + MENUITEM "AutoHide", ID_AUTOHIDE + MENUITEM "AlwaysOnTop", ID_ALWAYSONTOP + MENUITEM "Float", ID_FLOATDOCK, CHECKED + MENUITEM "LeftDock", ID_LEFTDOCK, CHECKED + MENUITEM "TopDock", ID_TOPDOCK, CHECKED + MENUITEM "RightDock", ID_RIGHTDOCK, CHECKED + MENUITEM "BottomDock", ID_BOTTOMDOCK, CHECKED + MENUITEM SEPARATOR + MENUITEM "Register", ID_REGISTER + MENUITEM "Unregister", ID_UNREGISTER + MENUITEM SEPARATOR + MENUITEM "Exit", IDOK + MENUITEM SEPARATOR + MENUITEM "About ..", ID_APP_ABOUT + END +END + +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ApplicationBar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.vcproj new file mode 100644 index 0000000..12e8ed2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBar.vcproj @@ -0,0 +1,940 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.cpp new file mode 100644 index 0000000..c3cb8f7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.cpp @@ -0,0 +1,278 @@ +// ApplicationBarDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ApplicationBar.h" +#include "ApplicationBarDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarDlg dialog + +CApplicationBarDlg::CApplicationBarDlg(CWnd* pParent /*=NULL*/) +: COXAppBar(CApplicationBarDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CApplicationBarDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CApplicationBarDlg::~CApplicationBarDlg() +{ +} +void CApplicationBarDlg::DoDataExchange(CDataExchange* pDX) +{ + COXAppBar::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CApplicationBarDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CApplicationBarDlg, COXAppBar) + //{{AFX_MSG_MAP(CApplicationBarDlg) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_COMMAND(ID_ALWAYSONTOP, OnAlwaysontop) + ON_COMMAND(ID_BOTTOMDOCK, OnBottomdock) + ON_COMMAND(ID_FLOATDOCK, OnFloat) + ON_COMMAND(ID_LEFTDOCK, OnLeftdock) + ON_COMMAND(ID_RIGHTDOCK, OnRightdock) + ON_COMMAND(ID_TOPDOCK, OnTopdock) + ON_COMMAND(ID_UNREGISTER, OnUnregister) + ON_COMMAND(ID_AUTOHIDE, OnAutoHide) + ON_COMMAND(ID_REGISTER, OnRegister) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarDlg message handlers + +BOOL CApplicationBarDlg::OnInitDialog() +{ + COXAppBar::OnInitDialog(); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + + m_menu.LoadMenu(IDR_MENU_POPUP); + Register(); + if (!LoadState()) + { + SetEdge(ABE_RIGHT); + OnAutoHide(); + OnAlwaysontop(); + } + + CMenu* pMenu=m_menu.GetSubMenu(0); + ASSERT(pMenu); + const tBarData* pBarData=GetBarData(); + + UINT nCheck=/*IsAutoHidden()*/pBarData->bAutoHideDesired?MF_CHECKED:MF_UNCHECKED; + pMenu->CheckMenuItem(ID_AUTOHIDE, MF_BYCOMMAND | nCheck); + nCheck=IsAlwaysOnTop()?MF_CHECKED:MF_UNCHECKED; + pMenu->CheckMenuItem(ID_ALWAYSONTOP ,MF_BYCOMMAND | nCheck); + + + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CApplicationBarDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + COXAppBar::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CApplicationBarDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CApplicationBarDlg::DoPopupMenu() +{ + CMenu* pPopupMenu=m_menu.GetSubMenu(0); + + CPoint posMouse; + GetCursorPos(&posMouse); + pPopupMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, + posMouse.x,posMouse.y, this); +} + +void CApplicationBarDlg::OnAutoHide() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + if (IsAutoHidden()) + SetAutoHide(FALSE); + else + SetAutoHide(TRUE); + + UINT nCheck=(IsAutoHidden()?MF_CHECKED:MF_UNCHECKED); + pMenu->CheckMenuItem(ID_AUTOHIDE, MF_BYCOMMAND | nCheck); +} + +void CApplicationBarDlg::OnAlwaysontop() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + if (IsAlwaysOnTop()) + SetAlwaysOnTop(FALSE); + else + SetAlwaysOnTop(TRUE); + + UINT nCheck=(IsAlwaysOnTop()?MF_CHECKED:MF_UNCHECKED); + pMenu->CheckMenuItem(ID_ALWAYSONTOP ,MF_BYCOMMAND | nCheck); + +} + +void CApplicationBarDlg::OnBottomdock() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + UINT nCheck; + DWORD dwStyle=GetBarStyle(); + if (dwStyle & OX_APPBARS_BOTTOM) + { + dwStyle&=~OX_APPBARS_BOTTOM; + SetBarStyle(dwStyle); + nCheck=MF_UNCHECKED; + } + else + { + dwStyle|=OX_APPBARS_BOTTOM; + SetBarStyle(dwStyle); + nCheck=MF_CHECKED; + } + pMenu->CheckMenuItem(ID_BOTTOMDOCK ,MF_BYCOMMAND | nCheck); +} + +void CApplicationBarDlg::OnFloat() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + UINT nCheck; + DWORD dwStyle=GetBarStyle(); + if (dwStyle & OX_APPBARS_FLOAT) + { + dwStyle&=~OX_APPBARS_FLOAT; + SetBarStyle(dwStyle); + nCheck=MF_UNCHECKED; + } + else + { + dwStyle|=OX_APPBARS_FLOAT; + SetBarStyle(dwStyle); + nCheck=MF_CHECKED; + } + pMenu->CheckMenuItem(ID_FLOATDOCK ,MF_BYCOMMAND | nCheck); + +} + + +void CApplicationBarDlg::OnLeftdock() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + UINT nCheck; + DWORD dwStyle=GetBarStyle(); + if (dwStyle & OX_APPBARS_LEFT) + { + dwStyle&=~OX_APPBARS_LEFT; + SetBarStyle(dwStyle); + nCheck=MF_UNCHECKED; + } + else + { + dwStyle|=OX_APPBARS_LEFT; + SetBarStyle(dwStyle); + nCheck=MF_CHECKED; + } + pMenu->CheckMenuItem(ID_LEFTDOCK ,MF_BYCOMMAND | nCheck); + +} + +void CApplicationBarDlg::OnRightdock() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + UINT nCheck; + DWORD dwStyle=GetBarStyle(); + if (dwStyle & OX_APPBARS_RIGHT) + { + dwStyle&=~OX_APPBARS_RIGHT; + SetBarStyle(dwStyle); + nCheck=MF_UNCHECKED; + } + else + { + dwStyle|=OX_APPBARS_RIGHT; + SetBarStyle(dwStyle); + nCheck=MF_CHECKED; + } + pMenu->CheckMenuItem(ID_RIGHTDOCK ,MF_BYCOMMAND | nCheck); + +} + +void CApplicationBarDlg::OnTopdock() +{ + CMenu* pMenu=m_menu.GetSubMenu(0); + UINT nCheck; + DWORD dwStyle=GetBarStyle(); + if (dwStyle & OX_APPBARS_TOP) + { + dwStyle&=~OX_APPBARS_TOP; + SetBarStyle(dwStyle); + nCheck=MF_UNCHECKED; + } + else + { + dwStyle|=OX_APPBARS_TOP; + SetBarStyle(dwStyle); + nCheck=MF_CHECKED; + } + pMenu->CheckMenuItem(ID_TOPDOCK ,MF_BYCOMMAND | nCheck); + +} + +void CApplicationBarDlg::OnSetEdge(UINT nEdge) +{ + UNREFERENCED_PARAMETER(nEdge); +} + +void CApplicationBarDlg::OnUnregister() +{ + Register(FALSE); +} + +void CApplicationBarDlg::OnRegister() +{ + Register(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.h new file mode 100644 index 0000000..1325bcd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ApplicationBarDlg.h @@ -0,0 +1,63 @@ +// ApplicationBarDlg.h : header file +// + +#if !defined(AFX_APPLICATIONBARDLG_H__3F58E76E_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) +#define AFX_APPLICATIONBARDLG_H__3F58E76E_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXAppBar.h" + +///////////////////////////////////////////////////////////////////////////// +// CApplicationBarDlg dialog + +class CApplicationBarDlg : public COXAppBar +{ +// Construction +public: + virtual void OnSetEdge(UINT nEdge); + CMenu m_menu; + void OnAutoHide(); + CApplicationBarDlg(CWnd* pParent = NULL); // standard constructor + + virtual void DoPopupMenu(); + virtual ~CApplicationBarDlg(); +// Dialog Data + //{{AFX_DATA(CApplicationBarDlg) + enum { IDD = IDD_APPLICATIONBAR_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CApplicationBarDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CApplicationBarDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAlwaysontop(); + afx_msg void OnBottomdock(); + afx_msg void OnFloat(); + afx_msg void OnLeftdock(); + afx_msg void OnRightdock(); + afx_msg void OnTopdock(); + afx_msg void OnUnregister(); + afx_msg void OnRegister(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_APPLICATIONBARDLG_H__3F58E76E_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.cpp new file mode 100644 index 0000000..a243dd5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.cpp @@ -0,0 +1,129 @@ +// OptionsDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "ApplicationBar.h" +#include "OptionsDialog.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COptionsDialog dialog + + +COptionsDialog::COptionsDialog(CWnd* pParent /*=NULL*/) + : CDialog(COptionsDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(COptionsDialog) + m_bAutoHide = FALSE; + m_bOnTop = FALSE; + m_nEdge=-1; + //}}AFX_DATA_INIT +} + + +void COptionsDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COptionsDialog) + DDX_Check(pDX, IDC_CHECK_AUTOHIDE, m_bAutoHide); + DDX_Check(pDX, IDC_CHECK_ONTOP, m_bOnTop); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(COptionsDialog, CDialog) + //{{AFX_MSG_MAP(COptionsDialog) + ON_BN_CLICKED(IDC_RADIO_LEFT, OnRadioLeft) + ON_BN_CLICKED(IDC_RADIO_TOP, OnRadioTop) + ON_BN_CLICKED(IDC_RADIO_RIGHT, OnRadioRight) + ON_BN_CLICKED(IDC_RADIO_BOTTOM, OnRadioBottom) + ON_BN_CLICKED(ID_APPLY, OnApply) + ON_BN_CLICKED(IDC_CHECK_AUTOHIDE, OnCheckAutohide) + ON_BN_CLICKED(IDC_CHECK_ONTOP, OnCheckOntop) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COptionsDialog message handlers + +void COptionsDialog::OnRadioLeft() +{ + if (m_nEdge == ABE_LEFT) + return; + + m_nEdge=ABE_LEFT; + EnableApply(); + +} + +void COptionsDialog::OnRadioTop() +{ + if (m_nEdge == ABE_TOP) + return; + + m_nEdge=ABE_TOP; + EnableApply(); +} + +void COptionsDialog::OnRadioRight() +{ + if (m_nEdge == ABE_RIGHT) + return; + + m_nEdge=ABE_RIGHT; + EnableApply(); + +} + +void COptionsDialog::OnRadioBottom() +{ + if (m_nEdge == ABE_BOTTOM) + return; + + m_nEdge=ABE_BOTTOM; + EnableApply(); +} + +void COptionsDialog::OnApply() +{ + //m_appBar.m_nEdge=m_nEdge; + if (!::IsWindow(m_appBar.m_hWnd)) + { + VERIFY(m_appBar.Create(IDD_APPLICATIONBAR_DIALOG,NULL)); + m_appBar.ModifyStyleEx(0,WS_EX_TOOLWINDOW); + m_appBar.Register(TRUE, m_nEdge); + } + else + m_appBar.SetEdge(m_nEdge); + UpdateData(TRUE); + m_appBar.SetAutoHide(m_bAutoHide); + + +} + +void COptionsDialog::EnableApply(BOOL bApply) +{ + CWnd* pWnd=GetDlgItem(ID_APPLY); + pWnd->EnableWindow(bApply); + +} + +void COptionsDialog::OnCheckAutohide() +{ + UpdateData(); + if (m_nEdge!=-1) + EnableApply(); +} + +void COptionsDialog::OnCheckOntop() +{ + UpdateData(); + if (m_nEdge!=-1) + EnableApply(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.h new file mode 100644 index 0000000..3890be2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/OptionsDialog.h @@ -0,0 +1,56 @@ +#if !defined(AFX_OPTIONSDIALOG_H__3F58E777_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) +#define AFX_OPTIONSDIALOG_H__3F58E777_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// OptionsDialog.h : header file +// +#include "ApplicationBarDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// COptionsDialog dialog + +class COptionsDialog : public CDialog +{ +// Construction +public: + void EnableApply(BOOL bApply=TRUE); + UINT m_nEdge; + COptionsDialog(CWnd* pParent = NULL); // standard constructor + CApplicationBarDlg m_appBar; +// Dialog Data + //{{AFX_DATA(COptionsDialog) + enum { IDD = IDD_DIALOG_OPTIONS }; + BOOL m_bAutoHide; + BOOL m_bOnTop; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COptionsDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(COptionsDialog) + afx_msg void OnRadioLeft(); + afx_msg void OnRadioTop(); + afx_msg void OnRadioRight(); + afx_msg void OnRadioBottom(); + afx_msg void OnApply(); + afx_msg void OnCheckAutohide(); + afx_msg void OnCheckOntop(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OPTIONSDIALOG_H__3F58E777_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ReadMe.txt new file mode 100644 index 0000000..8025af6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ApplicationBar +======================================================================== + + +AppWizard has created this ApplicationBar 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 ApplicationBar application. + +ApplicationBar.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ApplicationBar.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CApplicationBarApp application class. + +ApplicationBar.cpp + This is the main application source file that contains the application + class CApplicationBarApp. + +ApplicationBar.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++. + +ApplicationBar.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ApplicationBar.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ApplicationBar.rc. + +res\ApplicationBar.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ApplicationBarDlg.h, ApplicationBarDlg.cpp - the dialog + These files contain your CApplicationBarDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ApplicationBar.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ApplicationBar.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.cpp new file mode 100644 index 0000000..20fb348 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ApplicationBar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.h new file mode 100644 index 0000000..8cdc073 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3F58E770_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__3F58E770_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3F58E770_C82D_11D3_AC76_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.rc2 new file mode 100644 index 0000000..ed9ba45 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/ApplicationBar.rc2 @@ -0,0 +1,13 @@ +// +// APPLICATIONBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/bitmap1.bmp new file mode 100644 index 0000000..82e31d5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/resource.h new file mode 100644 index 0000000..340e38f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ApplicationBar/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ApplicationBar.rc +// +#define ID_AUTOHIDE 101 +#define IDD_APPLICATIONBAR_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDD_DIALOG_OPTIONS 129 +#define IDR_MENU_POPUP 130 +#define ID_DESCRIPTION_FILE 130 +#define IDB_BITMAP1 131 +#define IDC_CHECK_ONTOP 1000 +#define IDC_CHECK_AUTOHIDE 1001 +#define IDC_RADIO_RIGHT 1002 +#define IDC_RADIO_LEFT 1003 +#define IDC_RADIO_TOP 1004 +#define IDC_RADIO_BOTTOM 1005 +#define ID_APPLY 1006 +#define ID_ALWAYSONTOP 32771 +#define ID_FLOATDOCK 32772 +#define ID_LEFTDOCK 32773 +#define ID_TOPDOCK 32774 +#define ID_RIGHTDOCK 32775 +#define ID_BOTTOMDOCK 32776 +#define ID_HASCAPTION 32777 +#define ID_UNREGISTER 32778 +#define ID_REGISTER 32779 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 135 +#define _APS_NEXT_COMMAND_VALUE 32780 +#define _APS_NEXT_CONTROL_VALUE 1008 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.cpp new file mode 100644 index 0000000..6abe7cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.cpp @@ -0,0 +1,99 @@ +// AutoComplete.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "AutoComplete.h" +#include "AutoCompleteDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteApp + +BEGIN_MESSAGE_MAP(CAutoCompleteApp, CWinApp) + //{{AFX_MSG_MAP(CAutoCompleteApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteApp construction + +CAutoCompleteApp::CAutoCompleteApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CAutoCompleteApp object + +CAutoCompleteApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteApp initialization + +BOOL CAutoCompleteApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CAutoCompleteDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CAutoCompleteApp::ExitInstance() +{ + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsp new file mode 100644 index 0000000..6cb73af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsp @@ -0,0 +1,274 @@ +# Microsoft Developer Studio Project File - Name="AutoComplete" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=AutoComplete - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AutoComplete.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AutoComplete.mak" CFG="AutoComplete - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AutoComplete - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "AutoComplete - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "AutoComplete - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "AutoComplete - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "AutoComplete - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AutoComplete - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AutoComplete.exe" + +!ELSEIF "$(CFG)" == "AutoComplete - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"AutoComplete.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AutoComplete - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "AutoComplete___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "AutoComplete___Win32_DebugUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"AutoComplete.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AutoComplete - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AutoComplete___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "AutoComplete___Win32_ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"AutoComplete.exe" + +!ELSEIF "$(CFG)" == "AutoComplete - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AutoComplete___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "AutoComplete___Win32_ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AutoComplete.exe" + +!ENDIF + +# Begin Target + +# Name "AutoComplete - Win32 Release" +# Name "AutoComplete - Win32 Debug" +# Name "AutoComplete - Win32 DebugUnicode" +# Name "AutoComplete - Win32 ReleaseUnicode" +# Name "AutoComplete - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AutoComplete.cpp +# End Source File +# Begin Source File + +SOURCE=.\AutoComplete.rc +# End Source File +# Begin Source File + +SOURCE=.\AutoCompleteDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAutoComplete.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAutoListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AutoComplete.h +# End Source File +# Begin Source File + +SOURCE=.\AutoCompleteDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAutoComplete.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAutoListBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryValFile.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\AutoComplete.ico +# End Source File +# Begin Source File + +SOURCE=.\res\AutoComplete.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\AutoComplete.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsw new file mode 100644 index 0000000..84fc87b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AutoComplete"=".\AutoComplete.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/AutoComplete", CQGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.h new file mode 100644 index 0000000..e264dba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.h @@ -0,0 +1,51 @@ +// AutoComplete.h : main header file for the AUTOCOMPLETE application +// + +#if !defined(AFX_AUTOCOMPLETE_H__7945FE1A_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) +#define AFX_AUTOCOMPLETE_H__7945FE1A_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteApp: +// See AutoComplete.cpp for the implementation of this class +// + +class CAutoCompleteApp : public CWinApp +{ +public: + CAutoCompleteApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAutoCompleteApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CAutoCompleteApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_AUTOCOMPLETE_H__7945FE1A_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.rc new file mode 100644 index 0000000..6513a13 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.rc @@ -0,0 +1,189 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\AutoComplete.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\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\\AutoComplete.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_AUTOCOMPLETE_DIALOG DIALOGEX 0, 0, 192, 125 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "AutoComplete" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "OK",IDOK,135,104,50,14 + EDITTEXT IDC_EDIT1,7,55,178,12,ES_AUTOHSCROLL + LTEXT "This works like IE addressbar. Once you've entered some value and hit Enter it will remember this value and autofill edit box when you will start to type it again. The data is persistent - it will be reload after restart.",IDC_STATIC,7,7,178,34 +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 "040904B0" + BEGIN + VALUE "FileDescription", "AutoComplete MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "AutoComplete" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "AutoComplete.EXE" + VALUE "ProductName", "AutoComplete Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_AUTOCOMPLETE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 185 + TOPMARGIN, 7 + BOTTOMMARGIN, 118 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About AutoComplete..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "AutoComplete Demo" + ID_DESCRIPTION_FILE "COXAutoComplete.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\AutoComplete.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.vcproj new file mode 100644 index 0000000..87117b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoComplete.vcproj @@ -0,0 +1,985 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.cpp new file mode 100644 index 0000000..f2a1f1f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.cpp @@ -0,0 +1,206 @@ +// AutoCompleteDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "AutoComplete.h" +#include "AutoCompleteDlg.h" +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteDlg dialog + +CAutoCompleteDlg::CAutoCompleteDlg(CWnd* pParent /*=NULL*/) + : CDialog(CAutoCompleteDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CAutoCompleteDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CAutoCompleteDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAutoCompleteDlg) + DDX_Control(pDX, IDC_EDIT1, m_editUp); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAutoCompleteDlg, CDialog) + //{{AFX_MSG_MAP(CAutoCompleteDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteDlg message handlers + +BOOL CAutoCompleteDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + m_autoComplete.Attach(m_editUp, NULL, OX_AUTOCOMPLETE_LIST); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CAutoCompleteDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CAutoCompleteDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CAutoCompleteDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CAutoCompleteDlg::OnCancel() +{ + // TODO: Add extra cleanup here + + CDialog::OnCancel(); +} + +void CAutoCompleteDlg::OnOK() +{ + // TODO: Add extra validation here + + CDialog::OnOK(); +} + +BOOL CAutoCompleteDlg::PreTranslateMessage(MSG* pMsg) +{ + + if (pMsg->message!=WM_KEYDOWN) + return CDialog::PreTranslateMessage(pMsg); + else + { + switch (pMsg->wParam) + { + case VK_RETURN: + m_autoComplete.Complete(pMsg->hwnd); + case VK_ESCAPE: + m_autoComplete.Hide(); + return TRUE; + default: + return CDialog::PreTranslateMessage(pMsg); + } + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.h new file mode 100644 index 0000000..684c90b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/AutoCompleteDlg.h @@ -0,0 +1,56 @@ +// AutoCompleteDlg.h : header file +// + +#if !defined(AFX_AUTOCOMPLETEDLG_H__7945FE1C_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) +#define AFX_AUTOCOMPLETEDLG_H__7945FE1C_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXAutoComplete.h" + +///////////////////////////////////////////////////////////////////////////// +// CAutoCompleteDlg dialog + +class CAutoCompleteDlg : public CDialog +{ +// Construction +public: + COXAutoComplete m_autoComplete; + CAutoCompleteDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CAutoCompleteDlg) + enum { IDD = IDD_AUTOCOMPLETE_DIALOG }; + CEdit m_editUp; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAutoCompleteDlg) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CAutoCompleteDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnCancel(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_AUTOCOMPLETEDLG_H__7945FE1C_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/COXAutoComplete.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/COXAutoComplete.rtf new file mode 100644 index 0000000..235abd8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/COXAutoComplete.rtf @@ -0,0 +1,31 @@ +{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f77\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;} +{\f81\froman\fcharset238\fprq2 Times New Roman CE;}{\f82\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f84\froman\fcharset161\fprq2 Times New Roman Greek;}{\f85\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f88\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f697\fswiss\fcharset238\fprq2 Verdana CE;}{\f698\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f700\fswiss\fcharset161\fprq2 Verdana Greek;}{\f701\fswiss\fcharset162\fprq2 Verdana Tur;} +{\f704\fswiss\fcharset186\fprq2 Verdana Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; +\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{ +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\info +{\title The COXAutoComplete class provided similar capabilities to the user}{\author dmitriyf}{\operator dmitriyf}{\creatim\yr2000\mo5\dy12\hr17\min14}{\revtim\yr2000\mo5\dy12\hr17\min23}{\version1}{\edmins9}{\nofpages1}{\nofwords0}{\nofchars0} +{\*\company Dundas}{\nofcharsws0}{\vern8247}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow1\dgvshow1 +\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1 +\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f77\fs20 The }{ +\b\f77\fs20 COXAutoComplete}{\f77\fs20 class provided similar capabilities to the user +\par like IE addressbar. It will remember you}{\f77\fs20 r}{\f77\fs20 last values you've entered in +\par the edit box (number of the values for a window you can set by +\par }{\f77\fs20\cf2 SetDepth()}{\f77\fs20 )}{\f77\fs20 function. }{\f77\fs20 And while you are typing it will suggest you some values from your most recently used ones. +\par }{\f77\fs20 To use this class you }{\f77\fs20 may}{\f77\fs20 have just one}{\f77\fs20 instance }{\f77\fs20 for you application. +\par Call }{\f77\fs20\cf2 Attach}{\f77\fs20\cf2 ()}{\f77\fs20 function for every window you want to provide this +\par functionality. If you want to provide separate list of values for +\par the windows you should supply different names for every window in +\par }{\f77\fs20\cf2 Attach()}{\f77\fs20 . The data is persistent and will be saved in the registry. +\par You do not need call}{\f77\fs20\cf2 Detach()}{\f77\fs20 - it will be done on destruction. +\par To add value to the list you must call }{\f77\fs20\cf2 Complete()}{\f77\fs20 function telling +\par to the }{\b\f77\fs20 COXAutoComplete}{\f77\fs20 to add this value to the list. +\par Usually it will be when user pressed enter. +\par The class has two flags that define his }{\f77\fs20 behavior}{\f77\fs20 . +\par When you call }{\f77\fs20\cf2 Attach()}{\f77\fs20 if you set }{\f77\fs20\ul OX_AUTOCOMPLETE_LIST}{\f77\fs20 flag, it will +\par bring you list box to show you }{\f77\fs20 possible}{\f77\fs20 values. +\par If you set }{\f77\fs20\ul OX_AUTOCOMPLETE_APPEND}{\f77\fs20 style it will fill edit box +\par with }{\f77\fs20 recommended}{\f77\fs20 value. By default all they are set on.}{\f77\fs20 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.cpp new file mode 100644 index 0000000..a5434ed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// AutoComplete.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.h new file mode 100644 index 0000000..546ebf2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__7945FE1E_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__7945FE1E_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__7945FE1E_25D3_11D4_AD2F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.rc2 new file mode 100644 index 0000000..8857ab1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/res/AutoComplete.rc2 @@ -0,0 +1,13 @@ +// +// AUTOCOMPLETE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/resource.h new file mode 100644 index 0000000..ed617c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/AutoComplete/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by AutoComplete.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_AUTOCOMPLETE_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 130 +#define IDC_EDIT1 1000 +#define IDC_EDIT2 1001 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.cpp new file mode 100644 index 0000000..d7c7427 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.cpp @@ -0,0 +1,137 @@ +// BackgroundPainter.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "BackgroundPainter.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "BackgroundPainterDoc.h" +#include "BackgroundPainterView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterApp + +BEGIN_MESSAGE_MAP(CBackgroundPainterApp, CWinApp) + //{{AFX_MSG_MAP(CBackgroundPainterApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterApp construction + +CBackgroundPainterApp::CBackgroundPainterApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CBackgroundPainterApp object + +CBackgroundPainterApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterApp initialization + +BOOL CBackgroundPainterApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + // 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(); // 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_BACKGRTYPE, + RUNTIME_CLASS(CBackgroundPainterDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CBackgroundPainterView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + + +// App command to run the dialog +void CBackgroundPainterApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterApp message handlers + + +int CBackgroundPainterApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsp new file mode 100644 index 0000000..4e01cb1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsp @@ -0,0 +1,485 @@ +# Microsoft Developer Studio Project File - Name="BackgroundPainter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=BackgroundPainter - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BackgroundPainter.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BackgroundPainter.mak" CFG="BackgroundPainter - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BackgroundPainter - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "BackgroundPainter - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "BackgroundPainter - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "BackgroundPainter - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "BackgroundPainter - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BackgroundPainter - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BackgroundPainter.exe" + +!ELSEIF "$(CFG)" == "BackgroundPainter - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BackgroundPainter.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "BackgroundPainter - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BackgroundPainter___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "BackgroundPainter___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BackgroundPainter.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"BackgroundPainter.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "BackgroundPainter - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BackgroundPainter___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "BackgroundPainter___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BackgroundPainter.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BackgroundPainter.exe" + +!ELSEIF "$(CFG)" == "BackgroundPainter - Win32 Unicode_Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BackgroundPainter___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "BackgroundPainter___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BackgroundPainter.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"BackgroundPainter.exe" + +!ENDIF + +# Begin Target + +# Name "BackgroundPainter - Win32 Release" +# Name "BackgroundPainter - Win32 Debug" +# Name "BackgroundPainter - Win32 Unicode_Debug" +# Name "BackgroundPainter - Win32 Release_Shared" +# Name "BackgroundPainter - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBackgroundPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHyperLinkAction.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BackgroundPainter.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackgroundPainter.rc +# End Source File +# Begin Source File + +SOURCE=.\BackgroundPainterDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackgroundPainterView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\LogoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TestDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\BackgroundPainter.h +# End Source File +# Begin Source File + +SOURCE=.\BackgroundPainterDoc.h +# End Source File +# Begin Source File + +SOURCE=.\BackgroundPainterView.h +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\LogoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBackgroundPainter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHistoryCombo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMenuBar.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TestDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\BackgroundPainter.ico +# End Source File +# Begin Source File + +SOURCE=.\res\BackgroundPainter.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\BackgroundPainterDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Logo.bmp +# End Source File +# Begin Source File + +SOURCE=".\res\Maple Trails.bmp" +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\winnt256.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BackgroundPainter.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsw new file mode 100644 index 0000000..df52401 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BackgroundPainter"=".\BackgroundPainter.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/BackgroundPainter", TQGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.h new file mode 100644 index 0000000..e357792 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.h @@ -0,0 +1,50 @@ +// BackgroundPainter.h : main header file for the BACKGROUNDPAINTER application +// + +#if !defined(AFX_BACKGROUNDPAINTER_H__24987B17_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_BACKGROUNDPAINTER_H__24987B17_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterApp: +// See BackgroundPainter.cpp for the implementation of this class +// + +class CBackgroundPainterApp : public CWinApp +{ +public: + CBackgroundPainterApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBackgroundPainterApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CBackgroundPainterApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BACKGROUNDPAINTER_H__24987B17_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.rc new file mode 100644 index 0000000..ed97123 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.rc @@ -0,0 +1,479 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\BackgroundPainter.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" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXHyperLinkAction.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\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\\BackgroundPainter.ico" +IDR_BACKGRTYPE ICON "res\\BackgroundPainterDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDB_WALLPAPER BITMAP "res\\Maple Trails.bmp" +IDB_LOGO BITMAP "res\\Logo.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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + 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 "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Dialog with image viewer", ID_VIEW_TESTDIALOG + MENUITEM "Show a Dialog with back image", ID_VIEW_LOGODLG + END + POPUP "&Help" + BEGIN + MENUITEM "&About BackgroundPainter...", ID_APP_ABOUT + END +END + +IDR_BACKGRTYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + 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 + MENUITEM SEPARATOR + MENUITEM "Dialog with image viewer", ID_VIEW_TESTDIALOG + MENUITEM "Show a Dialog with back image", ID_VIEW_LOGODLG + 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 BackgroundPainter...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "BackgroundPainter MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "BackgroundPainter" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "BackgroundPainter.EXE" + VALUE "ProductName", "BackgroundPainter Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_TEST_DIALOG DIALOG 0, 0, 308, 165 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog with picture object based on COXBackgroundPainter" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "&Tile",IDC_ALIGN_TILE,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,123,20,27,10 + CONTROL "&Stretch",IDC_ALIGN_STRETCH,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,241,20,39,10 + CONTROL "TopL&eft",IDC_ALIGN_TOPLEFT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,51,41,10 + CONTROL "TopCe&nter",IDC_ALIGN_TOPCENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,179,51,49,10 + CONTROL "TopR&ight",IDC_ALIGN_TOPRIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,242,51,45,10 + CONTROL "CenterLe&ft",IDC_ALIGN_CENTERLEFT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,66,49,10 + CONTROL "&Center",IDC_ALIGN_CENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,179,66,37,10 + CONTROL "CenterRi&ght",IDC_ALIGN_CENTERRIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,242,66,53,10 + CONTROL "B&ottomLeft",IDC_ALIGN_BOTTOMLEFT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,81,50,10 + CONTROL "Bo&ttomCenter",IDC_ALIGN_BOTTOMCENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,179,81,59,10 + CONTROL "BottomRig&ht",IDC_ALIGN_BOTTOMRIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,242,82,55,10 + LTEXT "Image",IDC_IMAGE,7,7,104,151,SS_SUNKEN + GROUPBOX "Image painting type",IDC_STATIC,117,3,184,96 + LTEXT "",IDC_SEPARATOR,123,34,171,8,SS_SUNKEN + LTEXT "Background color",IDC_STATIC,161,108,57,8 + CONTROL "\nPick background color for picture control",IDC_BACKCLR, + "Button",BS_OWNERDRAW | WS_TABSTOP,235,105,66,15 + COMBOBOX IDC_FILENAME,118,140,138,50,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + LTEXT "Image file name:",IDC_STATIC,118,129,52,8 +END + +IDD_LOGO_DIALOG DIALOGEX 0, 0, 320, 214 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Dialog with background" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,263,193,50,14,0,WS_EX_TRANSPARENT + LTEXT "www.theUltimateToolBox.com",IDC_WEBLINK,203,152,96,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_TEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 301 + TOPMARGIN, 7 + BOTTOMMARGIN, 158 + END + + IDD_LOGO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 207 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "BackgroundPainter" + IDR_BACKGRTYPE "\nBackgr\nBackgr\n\n\nBackgroundPainter.Document\nBackgr Document" + ID_DESCRIPTION_FILE "BackgroundPainterInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "BackgroundPainter" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\BackgroundPainter.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "UTSampleAbout.rc" +#include "OXHistoryCombo.rc" +#include "OXBitmapButton.rc" +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXHyperLinkAction.rc" +#include "OXMenuBar.rc" +#include "OXPopupBarCtrl.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.vcproj new file mode 100644 index 0000000..ddbf973 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainter.vcproj @@ -0,0 +1,2954 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.cpp new file mode 100644 index 0000000..4dabc4e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.cpp @@ -0,0 +1,84 @@ +// BackgroundPainterDoc.cpp : implementation of the CBackgroundPainterDoc class +// + +#include "stdafx.h" +#include "BackgroundPainter.h" + +#include "BackgroundPainterDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterDoc + +IMPLEMENT_DYNCREATE(CBackgroundPainterDoc, CDocument) + +BEGIN_MESSAGE_MAP(CBackgroundPainterDoc, CDocument) + //{{AFX_MSG_MAP(CBackgroundPainterDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterDoc construction/destruction + +CBackgroundPainterDoc::CBackgroundPainterDoc() +{ + // TODO: add one-time construction code here + +} + +CBackgroundPainterDoc::~CBackgroundPainterDoc() +{ +} + +BOOL CBackgroundPainterDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterDoc serialization + +void CBackgroundPainterDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterDoc diagnostics + +#ifdef _DEBUG +void CBackgroundPainterDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CBackgroundPainterDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.h new file mode 100644 index 0000000..ffa99f8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterDoc.h @@ -0,0 +1,57 @@ +// BackgroundPainterDoc.h : interface of the CBackgroundPainterDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BACKGROUNDPAINTERDOC_H__24987B1F_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_BACKGROUNDPAINTERDOC_H__24987B1F_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CBackgroundPainterDoc : public CDocument +{ +protected: // create from serialization only + CBackgroundPainterDoc(); + DECLARE_DYNCREATE(CBackgroundPainterDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBackgroundPainterDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CBackgroundPainterDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CBackgroundPainterDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BACKGROUNDPAINTERDOC_H__24987B1F_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterInfo.rtf new file mode 100644 index 0000000..716b684 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterInfo.rtf @@ -0,0 +1,66 @@ +{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\froman\fprq2 Times New Roman;}{\f3\froman Times New Roman;}} +{\colortbl\red0\green0\blue0;\red0\green0\blue255;\red255\green0\blue0;} +\deflang1033\horzdoc{\*\fchars }{\*\lchars }\pard\plain\f2\fs40\cf1\b COXBackgroundPainter & COXBackgroundPainterOrganizer\plain\f2\fs40\b +\par \plain\f2\fs16\b Copyright \'a9 Dundas Software Ltd. 1997 - 1998, All Rights Reserved +\par \plain\f2\fs20 +\par COXBackgroundPainter class is designed to simplify the process of window background painting. It provides the functionality of painting the background of the window with specified image and/or color. +\par For some reason background painting never been a trivial task. By default, painting happens when WM_ERASEBKGND message is sent to window. If you +\par don't handle this message in any specific way then Windows use background brush associated with the corresponding window class in order to fill the background of the window. So in order to paint the window using different color you would have to handle WM_ERASEBKGND message or alternatively create new window class for your window with the brush of color you need. +\par Painting window's background with different color is neither difficult nor interesting task. But painting background of window with some image (like Windows Desktop) could add some value to your application. +\par COXBackgroundPainter class provides that kind of functionality. And it takes only one function call in order to setup a window to be painted in new fancy way. +\par As a number of other Ultimate Toolbox classes COXBackgroundPainter class is derived from COXHookWnd class. This class allows to handle any messages before the hooked window does. Also internally COXBackgroundPainter uses COXDIB object in order to draw 256> color images. +\par In order to set any window background to be painted using COXBackgroundPainter object you have to hook such window using the following function: +\par \plain\f2\fs20\cf1\ul Attach()\plain\f2\fs20 +\par In the function you specify the pointer to the window to be hooked, info about the image to be used while painting the background (you can specify COXDIB object, resource or file name), type of image drawing (Tile, Stretch, Center, ...), background color to be used to fill the window background that is not covered by image (refer to the documentation on this function for details), and pointer to the window which top/left point of its paintable rectangle will be used as origin point for painting routines (this is very important if you need to align the background among different child windows of the same parent window). +\par It's highly probable that Attach() function will be the only one that you will use in your applications but we defined a set of additional functions that allows you to control all aspects of the class functionality. +\par Use \plain\f2\fs20\cf1\ul Detach()\plain\f2\fs20 function in order to unhook any attached window. In order to change window background painting properties at run-time without detaching and attaching it use the following set of functions: +\par \plain\f2\fs20\cf1\ul SetWallpaper() +\par SetPaintType() +\par SetBkColor() +\par SetOriginWnd() +\par \plain\f2\fs20 +\par To retrieve background painting properties call: +\par \plain\f2\fs20\cf1\ul GetWallpaperImage() +\par GetPaintType() +\par GetBkColor() +\par GetOriginWnd() +\par \plain\f2\fs20 +\par As you can see it's really easy to use this class, but unfortunately every story has two sides. We mentioned above about the standard way Windows paints the background of any window. It is TRUE for any window unless specific window handles the process of its drawing and paint its background in different way (e.g. in WM_PAINT handler). Almost all \~ standard controls paint their background and almost all of them do this differently. E.g. some of the controls like tree control, list control or toolbar support powerful NM_CUSTOMDRAW notification. Others, like static or edit controls should handle WM_CTLCOLOR message in order to paint the background. And also we shouldn't forget about ownerdraw controls too! +\par The question is how to use COXBackgroundPainter class in such cases. There is no easy answer that will work for any control but generally you can use the following approach: +\par 1) Try to hook the control using Attach() function and test if\~ it paints the background correctly. If everything is alright then you are lucky and you are using the control that was designed consistently with the Windows treat background painting. +\par 2) Otherwise you have to provide the background painting for such control explicitly at some point depending on the functionality of the control (refer to the documentation on the corresponding control to make a decision where to put background painting code). You still\~ can use COXBackgroundPainter class in this case but at the appropriate moment you have to explicitly call the following function in order to paint the background: +\par \plain\f2\fs20\cf1\ul DrawWallpaper() \plain\f2\fs20 +\par You only have to specify the device context to paint the background in and this function will take care of everything else itself. +\par In most applicable cases (like painting the background of dialog, MDIClient or View windows) COXBackgroundPainter class will work without any additional +\par efforts from your side. But you still have to have one COXBackgroundPainter object for every window that is going to be hooked. This could be a little bit inconvenient, especially if you are going to provide background painting support for a number of windows within the same framework. +\par In order to simplify things we designed COXBackgroundPainterOrganizer class. COXBackgroundPainterOrganizer provides very similar to COXBackgroundPainter set of functions. E.g. the definition of Attach() function is completely the same. The only difference is that when you call this function for new window new COXBackgroundPainter object will be instantiated and its Attach() function will be called. At any moment you can define whether given window is attached to a COXBackgroundPainter object calling function: +\par \plain\f2\fs20\cf1\ul IsAttached() \plain\f2\fs20 +\par You can retrieve the pointer to the COXBackgroundPainter object that corresponds to the specified window using function: +\par \plain\f2\fs20\cf1\ul GetPainter();\plain\f2\fs20 +\par Refer to the \plain\f2\fs20\cf1\ul COXBackgroundPainterOrganizer class reference documentation\plain\f2\fs20 for details on the rest of functions. +\par As long as COXBackgroundPainterOrganizer class provides almost the same functionality as COXBackgroundPainter does and it really simplify things when you hook multiple windows within the same parent window, we suggest that COXBackgroundPainterOrganizer should be used preferably. +\par \~ +\par One of an interesting aplication of COXBackgroundPainterOrganizer class is the following: you want to display 256> color image in the About Box of your company logo. If you use Picture (actually, CStatic control) object to do that then you don't have palette support and the size of control will depend on the size of image. Instead you can do the following: +\par 1) Create the window that will be used to display picture +\par 2) Hook this window using COXBackgroundPainterOrganizer object and specify the image that will be displayed +\par Pretty easy. +\par +\par +\par \plain\f2\fs20\cf2\b\i Special note\plain\f2\fs20 :\~\~\~ \plain\f2\fs20\b How to use COXBackgroundPainterOrganizer to display 256> color bitmaps when 256 color video mode is set.\plain\f2\fs20 +\par +\par In order to do that we have to release the background image palette when WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages are sent to attached window. It's implemented automatically for you in COXBackgroundPainter class but there is small problem. WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages are sent only to top-level and overlapped windows. So background images will be correctly displayed for dialog or mainframe window, but for non-overlapped child windows you have to provide some way of notifying them that they have to update system palette. We suggest the following solution for your problem. In the class that is guaranteed to get WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages (e.g. it could be your main frame window or dialog window) you include handlers for them. In the handlers you forward these messages to the windows that are hooked using COXBackgroundPainterOrganizer or alternatively you can send these messages to all descendant windows using CWnd::SendMessageToDescendants() function. +\par +\par +\par All above mentioned techniques are implemented in the \plain\f2\fs20\b BackgroundPainter\plain\f2\fs20 sample that can be found in \plain\f2\fs20\cf2 .\\samples\\gui\\BackgroundPainter\plain\f2\fs20 subdirectory +\par of your Ultimate Toolbox directory. +\par \~ +\par \~ +\par Source code files: +\par "\plain\f2\fs20\b\i OXBackgroundPainter.cpp\plain\f2\fs20 " +\par The following file implements hooking functionality: +\par "\plain\f2\fs20\b\i OXHookWnd.cpp\plain\f2\fs20 " +\par The following file implements support for DIB files: +\par "\plain\f2\fs20\b\i OXDib.cpp"\plain\f2\fs20 +\par +\par } + \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.cpp new file mode 100644 index 0000000..6c3c454 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.cpp @@ -0,0 +1,120 @@ +// BackgroundPainterView.cpp : implementation of the CBackgroundPainterView class +// + +#include "stdafx.h" +#include "BackgroundPainter.h" + +#include "BackgroundPainterDoc.h" + +#include "MainFrm.h" +#include "BackgroundPainterView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView + +IMPLEMENT_DYNCREATE(CBackgroundPainterView, CView) + +BEGIN_MESSAGE_MAP(CBackgroundPainterView, CView) + //{{AFX_MSG_MAP(CBackgroundPainterView) + ON_WM_CREATE() + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView construction/destruction + +CBackgroundPainterView::CBackgroundPainterView() +{ + // TODO: add construction code here + +} + +CBackgroundPainterView::~CBackgroundPainterView() +{ +} + +BOOL CBackgroundPainterView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView drawing + +void CBackgroundPainterView::OnDraw(CDC* pDC) +{ + // TODO: add draw code for native data here + CRect rect; + GetClientRect(rect); + pDC->SetBkMode(TRANSPARENT); + pDC->DrawText(_T("Almost all windows' background in this MDI application was painted using COXBackgroundPainter object!\nCheck out in 'View' menu 'Dialog with image viewer' and 'Test About Dialog' options!"), + rect,DT_CENTER|DT_WORDBREAK); +} + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView printing + +BOOL CBackgroundPainterView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CBackgroundPainterView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CBackgroundPainterView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView diagnostics + +#ifdef _DEBUG +void CBackgroundPainterView::AssertValid() const +{ + CView::AssertValid(); +} + +void CBackgroundPainterView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CBackgroundPainterDoc* CBackgroundPainterView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBackgroundPainterDoc))); + return (CBackgroundPainterDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CBackgroundPainterView message handlers + +int CBackgroundPainterView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + ((CMainFrame*)AfxGetMainWnd())->GetPainter()->Attach(this,IDB_WALLPAPER); + + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.h new file mode 100644 index 0000000..2c2ff6a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/BackgroundPainterView.h @@ -0,0 +1,66 @@ +// BackgroundPainterView.h : interface of the CBackgroundPainterView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BACKGROUNDPAINTERVIEW_H__24987B21_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_BACKGROUNDPAINTERVIEW_H__24987B21_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CBackgroundPainterView : public CView +{ +protected: // create from serialization only + CBackgroundPainterView(); + DECLARE_DYNCREATE(CBackgroundPainterView) + +// Attributes +public: + CBackgroundPainterDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBackgroundPainterView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CBackgroundPainterView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CBackgroundPainterView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in BackgroundPainterView.cpp +inline CBackgroundPainterDoc* CBackgroundPainterView::GetDocument() + { return (CBackgroundPainterDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BACKGROUNDPAINTERVIEW_H__24987B21_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.cpp new file mode 100644 index 0000000..abdcd09 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "BackgroundPainter.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.h new file mode 100644 index 0000000..806fd45 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__24987B1D_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_CHILDFRM_H__24987B1D_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__24987B1D_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Blue Monday.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Blue Monday.bmp new file mode 100644 index 0000000..7c76474 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Blue Monday.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Coffee Bean.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Coffee Bean.bmp new file mode 100644 index 0000000..e1d927d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Coffee Bean.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Fiddle Head.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Fiddle Head.bmp new file mode 100644 index 0000000..c8c0e24 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Fiddle Head.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Furry Dog.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Furry Dog.bmp new file mode 100644 index 0000000..39bdb1b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Furry Dog.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Geometrix.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Geometrix.bmp new file mode 100644 index 0000000..b6f101e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Geometrix.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Gone Fishing.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Gone Fishing.bmp new file mode 100644 index 0000000..402def8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Gone Fishing.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Greenstone.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Greenstone.bmp new file mode 100644 index 0000000..6e7731d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Greenstone.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Hiking Boot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Hiking Boot.bmp new file mode 100644 index 0000000..1dede01 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Hiking Boot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Maple Trails.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Maple Trails.bmp new file mode 100644 index 0000000..38bc971 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Maple Trails.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Prairie Wind.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Prairie Wind.bmp new file mode 100644 index 0000000..dd95b69 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Prairie Wind.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Rhododendron.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Rhododendron.bmp new file mode 100644 index 0000000..047f840 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Rhododendron.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/River Sumida.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/River Sumida.bmp new file mode 100644 index 0000000..83f715c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/River Sumida.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Santa Fe Stucco.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Santa Fe Stucco.bmp new file mode 100644 index 0000000..e99f5a6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Santa Fe Stucco.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Seaside.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Seaside.bmp new file mode 100644 index 0000000..e00b719 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Seaside.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Snakeskin.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Snakeskin.bmp new file mode 100644 index 0000000..4414923 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Snakeskin.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Soap Bubbles.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Soap Bubbles.bmp new file mode 100644 index 0000000..f4e47bb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Soap Bubbles.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Solstice.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Solstice.bmp new file mode 100644 index 0000000..a58189a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Solstice.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Swimming Pool.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Swimming Pool.bmp new file mode 100644 index 0000000..e5934b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Swimming Pool.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Zapotec.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Zapotec.bmp new file mode 100644 index 0000000..7ce98fc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/Zapotec.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/winnt.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/winnt.bmp new file mode 100644 index 0000000..6fe2fe5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/Images/winnt.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.cpp new file mode 100644 index 0000000..ff8f5e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.cpp @@ -0,0 +1,56 @@ +// LogoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "BackgroundPainter.h" +#include "LogoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg dialog + + +CLogoDlg::CLogoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CLogoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CLogoDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CLogoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CLogoDlg) + DDX_Control(pDX, IDC_WEBLINK, m_ctlWebLink); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CLogoDlg, CDialog) + //{{AFX_MSG_MAP(CLogoDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg message handlers + +BOOL CLogoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + m_backPainterOrganizer.Attach(this,IDB_LOGO,Stretch); + m_backPainterOrganizer.Attach(&m_ctlWebLink,IDB_LOGO,Stretch, + CLR_DEFAULT,this); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.h new file mode 100644 index 0000000..f068ab6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/LogoDlg.h @@ -0,0 +1,53 @@ +#if !defined(AFX_LOGODLG_H__24987B30_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_LOGODLG_H__24987B30_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// LogoDlg.h : header file +// + +#include "OXBackgroundPainter.h" +#include "OXStaticHyperLink.h" + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg dialog + +class CLogoDlg : public CDialog +{ +// Construction +public: + CLogoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CLogoDlg) + enum { IDD = IDD_LOGO_DIALOG }; + COXStaticHyperLink m_ctlWebLink; + //}}AFX_DATA + +protected: + // background painter organizer + COXBackgroundPainterOrganizer m_backPainterOrganizer; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLogoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CLogoDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LOGODLG_H__24987B30_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.cpp new file mode 100644 index 0000000..76f89e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.cpp @@ -0,0 +1,215 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "BackgroundPainter.h" + +#include "MainFrm.h" +#include "TestDlg.h" +#include "LogoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_TESTDIALOG, OnViewTestdialog) + ON_COMMAND(ID_VIEW_LOGODLG, OnViewLogodlg) + ON_WM_PALETTECHANGED() + ON_WM_QUERYNEWPALETTE() + //}}AFX_MSG_MAP +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.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + // set transparent style in order to make toolbar to delegate all rights + // for drawing the background to COXBackgroundPainterOrganizer object + // that will hook the toolbar later in the code of this function + m_wndToolBar.ModifyStyle(NULL,TBSTYLE_TRANSPARENT); + + 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); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + + // hook toolbar after it was created and initialized + m_backPainterOrganizer.Attach(&m_wndToolBar,IDB_WALLPAPER,Tile, + CLR_DEFAULT,this); + + // hook the frame window in order to display tab control in client area + VERIFY(m_MTIClientWnd.Attach(this)); + + CWnd* pMDIClient=CWnd::FromHandle(m_hWndMDIClient); + // hook MDIClient window + m_backPainterOrganizer.Attach(pMDIClient,IDB_WALLPAPER,Tile, + CLR_DEFAULT,this); + + // hook tab control in MTI interface + m_backPainterOrganizer.Attach(m_MTIClientWnd.GetTabCtrl(),IDB_WALLPAPER,Tile, + CLR_DEFAULT,this); + + return 0; +} + +void CMainFrame::EnableDocking(DWORD dwDockStyle) +{ + COXMenuBarFrame::EnableDocking(dwDockStyle); + + if(GetControlBar(AFX_IDW_DOCKBAR_TOP)!=NULL && + !m_backPainterOrganizer.IsAttached(GetControlBar(AFX_IDW_DOCKBAR_TOP))) + { + m_backPainterOrganizer.Attach(GetControlBar(AFX_IDW_DOCKBAR_TOP), + IDB_WALLPAPER,Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM)!=NULL && + !m_backPainterOrganizer.IsAttached(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM))) + { + m_backPainterOrganizer.Attach(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM), + IDB_WALLPAPER,Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_LEFT)!=NULL && + !m_backPainterOrganizer.IsAttached(GetControlBar(AFX_IDW_DOCKBAR_LEFT))) + { + m_backPainterOrganizer.Attach(GetControlBar(AFX_IDW_DOCKBAR_LEFT), + IDB_WALLPAPER,Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_RIGHT)!=NULL && + !m_backPainterOrganizer.IsAttached(GetControlBar(AFX_IDW_DOCKBAR_RIGHT))) + { + m_backPainterOrganizer.Attach(GetControlBar(AFX_IDW_DOCKBAR_RIGHT), + IDB_WALLPAPER,Tile,CLR_DEFAULT,this); + } +} + +BOOL CMainFrame::OnCreateMenuBar(HMENU hMenu, CFrameWnd* pFrameWnd, + DWORD dwStyle, UINT nID) +{ + if(!COXMenuBarFrame:: + OnCreateMenuBar(hMenu,pFrameWnd,dwStyle,nID)) + { + return FALSE; + } + + m_backPainterOrganizer.Attach(&GetMenuBar(),IDB_WALLPAPER,Tile, + CLR_DEFAULT,this); + + return TRUE; +} + +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 + + +void CMainFrame::OnViewTestdialog() +{ + // TODO: Add your command handler code here + + CTestDlg dlgTest; + dlgTest.DoModal(); +} + +void CMainFrame::OnViewLogodlg() +{ + // TODO: Add your command handler code here + + CLogoDlg dlgLogo; + dlgLogo.DoModal(); +} + +void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd) +{ + CMDIFrameWnd::OnPaletteChanged(pFocusWnd); + + // TODO: Add your message handler code here + SendMessageToDescendants(WM_PALETTECHANGED,(WPARAM)((HWND)*pFocusWnd),NULL); +} + +BOOL CMainFrame::OnQueryNewPalette() +{ + // TODO: Add your message handler code here and/or call default + + SendMessageToDescendants(WM_QUERYNEWPALETTE,NULL,NULL); + return CMDIFrameWnd::OnQueryNewPalette(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.h new file mode 100644 index 0000000..3eb8f4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/MainFrm.h @@ -0,0 +1,85 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__24987B1B_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__24987B1B_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXBitmapMenuOrganizer.h" +#include "OXTabClientWnd.h" +#include "OXMenuBar.h" +#include "OXBackgroundPainter.h" + +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +protected: + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + + // MTI client window + COXTabClientWnd m_MTIClientWnd; + + // background painter organizer + COXBackgroundPainterOrganizer m_backPainterOrganizer; + +// Operations +public: + + inline COXBackgroundPainterOrganizer* GetPainter() { + return &m_backPainterOrganizer; + } + + virtual void EnableDocking(DWORD dwDockStyle); + +protected: + virtual BOOL OnCreateMenuBar(HMENU hMenu, CFrameWnd* pFrameWnd, + DWORD dwStyle, UINT nID); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnViewTestdialog(); + afx_msg void OnViewLogodlg(); + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg BOOL OnQueryNewPalette(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__24987B1B_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ReadMe.txt new file mode 100644 index 0000000..c516df5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/ReadMe.txt @@ -0,0 +1,117 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : BackgroundPainter +======================================================================== + + +AppWizard has created this BackgroundPainter 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 BackgroundPainter application. + +BackgroundPainter.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +BackgroundPainter.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CBackgroundPainterApp application class. + +BackgroundPainter.cpp + This is the main application source file that contains the application + class CBackgroundPainterApp. + +BackgroundPainter.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++. + +BackgroundPainter.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\BackgroundPainter.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file BackgroundPainter.rc. + +res\BackgroundPainter.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 BackgroundPainter.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +BackgroundPainterDoc.h, BackgroundPainterDoc.cpp - the document + These files contain your CBackgroundPainterDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CBackgroundPainterDoc::Serialize). + +BackgroundPainterView.h, BackgroundPainterView.cpp - the view of the document + These files contain your CBackgroundPainterView class. + CBackgroundPainterView objects are used to view CBackgroundPainterDoc objects. + +res\BackgroundPainterDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CBackgroundPainterDoc class. This icon is included by the main + resource file BackgroundPainter.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named BackgroundPainter.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.cpp new file mode 100644 index 0000000..ff05597 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// BackgroundPainter.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.h new file mode 100644 index 0000000..e2513e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__24987B19_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__24987B19_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#include "OXAdvancedAssert.h" + +#endif // !defined(AFX_STDAFX_H__24987B19_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.cpp new file mode 100644 index 0000000..e133119 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.cpp @@ -0,0 +1,155 @@ +// TestDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "BackgroundPainter.h" +#include "TestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTestDlg dialog + + +CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/) + : CDialog(CTestDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTestDlg) + m_nAlign = Tile; + m_sFilename = _T(""); + //}}AFX_DATA_INIT + m_clrBack=::GetSysColor(COLOR_BTNFACE); +} + + +void CTestDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTestDlg) + DDX_Control(pDX, IDC_FILENAME, m_cmbFilename); + DDX_Control(pDX, IDC_BACKCLR, m_btnBackColor); + DDX_Control(pDX, IDC_SEPARATOR, m_ctlSeparator); + DDX_Radio(pDX, IDC_ALIGN_TILE, m_nAlign); + DDX_CBString(pDX, IDC_FILENAME, m_sFilename); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BACKCLR, m_clrBack); +} + + +BEGIN_MESSAGE_MAP(CTestDlg, CDialog) + //{{AFX_MSG_MAP(CTestDlg) + ON_BN_CLICKED(IDC_ALIGN_BOTTOMCENTER, OnAlign) + ON_BN_CLICKED(IDC_BACKCLR, OnBackclr) + ON_CBN_SELCHANGE(IDC_FILENAME, OnSelchangeFilename) + ON_CBN_EDITCHANGE(IDC_FILENAME, OnEditchangeFilename) + ON_BN_CLICKED(IDC_ALIGN_BOTTOMLEFT, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_BOTTOMRIGHT, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_CENTER, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_CENTERLEFT, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_CENTERRIGHT, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_STRETCH, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_TILE, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_TOPCENTER, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_TOPLEFT, OnAlign) + ON_BN_CLICKED(IDC_ALIGN_TOPRIGHT, OnAlign) + ON_WM_PALETTECHANGED() + ON_WM_QUERYNEWPALETTE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTestDlg message handlers + +BOOL CTestDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + m_cmbFilename.SetAutoPersistent(_T("ImageFileName")); + for(int nIndex=4; nIndexModifyStyle(NULL,TBSTYLE_FLAT); + m_cmbFilename.RefreshToolbar(); + + m_btnBackColor.SetToolTip(TRUE); + m_btnBackColor.SetDefaultColor(m_clrBack); + + CWnd* pCtrl=GetDlgItem(IDC_IMAGE); + ASSERT(pCtrl!=NULL); + + CRect rect; + pCtrl->GetWindowRect(rect); + pCtrl->DestroyWindow(); + ScreenToClient(rect); + m_pictureWnd.Create(NULL,NULL,WS_CHILD|WS_VISIBLE,rect,this,IDC_IMAGE); + m_backPainterOrganizer.Attach(&m_pictureWnd,m_sFilename,(PaintType)m_nAlign); + m_pictureWnd.ModifyStyleEx(NULL,WS_EX_CLIENTEDGE,SWP_DRAWFRAME); + + m_pictureWnd.RedrawWindow(); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + + +void CTestDlg::OnAlign() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + m_backPainterOrganizer.SetPaintType(&m_pictureWnd,(PaintType)m_nAlign); +} + +void CTestDlg::OnBackclr() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + m_backPainterOrganizer.SetBkColor(&m_pictureWnd,m_clrBack); +} + +void CTestDlg::OnSelchangeFilename() +{ + // TODO: Add your control notification handler code here + + if(m_cmbFilename.GetCurSel()!=CB_ERR) + { + m_cmbFilename.GetLBText(m_cmbFilename.GetCurSel(),m_sFilename); + m_backPainterOrganizer.SetWallpaper(&m_pictureWnd,m_sFilename); + } +} + + +void CTestDlg::OnEditchangeFilename() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + m_backPainterOrganizer.SetWallpaper(&m_pictureWnd,m_sFilename); +} + +void CTestDlg::OnPaletteChanged(CWnd* pFocusWnd) +{ + CDialog::OnPaletteChanged(pFocusWnd); + + // TODO: Add your message handler code here + SendMessageToDescendants(WM_PALETTECHANGED,(WPARAM)((HWND)*pFocusWnd),NULL); +} + +BOOL CTestDlg::OnQueryNewPalette() +{ + // TODO: Add your message handler code here and/or call default + + SendMessageToDescendants(WM_QUERYNEWPALETTE,NULL,NULL); + return CDialog::OnQueryNewPalette(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.h new file mode 100644 index 0000000..6bd9ba8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/TestDlg.h @@ -0,0 +1,69 @@ +#if !defined(AFX_TESTDLG_H__24987B29_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) +#define AFX_TESTDLG_H__24987B29_8DEB_11D2_A792_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TestDlg.h : header file +// + +#include "OXSeparator.h" +#include "OXColorPickerButton.h" +#include "OXHistoryCombo.h" +#include "OXBackgroundPainter.h" + +///////////////////////////////////////////////////////////////////////////// +// CTestDlg dialog + +class CTestDlg : public CDialog +{ +// Construction +public: + CTestDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTestDlg) + enum { IDD = IDD_TEST_DIALOG }; + COXHistoryCombo m_cmbFilename; + COXColorPickerButton m_btnBackColor; + COXSeparator m_ctlSeparator; + int m_nAlign; + CString m_sFilename; + //}}AFX_DATA + COLORREF m_clrBack; + +protected: + // background painter organizer + COXBackgroundPainterOrganizer m_backPainterOrganizer; + + // window to display image + CWnd m_pictureWnd; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTestDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnAlign(); + afx_msg void OnBackclr(); + afx_msg void OnSelchangeFilename(); + afx_msg void OnEditchangeFilename(); + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg BOOL OnQueryNewPalette(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TESTDLG_H__24987B29_8DEB_11D2_A792_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.rc2 new file mode 100644 index 0000000..b8b7225 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainter.rc2 @@ -0,0 +1,13 @@ +// +// BACKGROUNDPAINTER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainterDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainterDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/BackgroundPainterDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Logo.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Logo.bmp new file mode 100644 index 0000000..82e31d5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Logo.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Maple Trails.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Maple Trails.bmp new file mode 100644 index 0000000..b7b51ad Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Maple Trails.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/winnt256.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/winnt256.bmp new file mode 100644 index 0000000..956c40b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/res/winnt256.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/resource.h new file mode 100644 index 0000000..70d1178 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BackgroundPainter/resource.h @@ -0,0 +1,63 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by BackgroundPainter.rc +// +#define IDR_MAINFRAME 128 +#define IDR_BACKGRTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDB_WALLPAPER 130 +#define IDD_TEST_DIALOG 131 +#define IDB_LOGO 132 +#define IDD_LOGO_DIALOG 133 +#define IDC_TEXT 1000 +#define IDC_EDITTEXT 1001 +#define IDC_GROUPBOX 1002 +#define IDC_CHECKBOX 1004 +#define IDC_RADIOBTN 1005 +#define IDC_COMBOBOX 1006 +#define IDC_LISTBOX 1007 +#define IDC_SCROLLBARHORZ 1008 +#define IDC_SCROLLBARVERT 1009 +#define IDC_SPIN 1010 +#define IDC_PROGRESSBAR 1011 +#define IDC_SLIDERBAR 1012 +#define IDC_HOTKEY 1013 +#define IDC_LISTCTRL 1014 +#define IDC_TREECTRL 1015 +#define IDC_TABCTRL 1016 +#define IDC_ANIMATECTRL 1017 +#define IDC_RICHEDITCTRL 1018 +#define IDC_DATETIMEPICKER 1019 +#define IDC_MONTHCALENDAR 1020 +#define IDC_IPADDRESS 1021 +#define IDC_COMBOBOXEX 1023 +#define IDC_IMAGE 1024 +#define IDC_ALIGN_TILE 1025 +#define IDC_ALIGN_STRETCH 1026 +#define IDC_ALIGN_TOPLEFT 1027 +#define IDC_ALIGN_TOPCENTER 1028 +#define IDC_ALIGN_TOPRIGHT 1029 +#define IDC_SEPARATOR 1030 +#define IDC_BACKCLR 1032 +#define IDC_ALIGN_CENTERLEFT 1033 +#define IDC_ALIGN_CENTER 1034 +#define IDC_ALIGN_BOTTOMLEFT 1035 +#define IDC_ALIGN_BOTTOMCENTER 1036 +#define IDC_ALIGN_CENTERRIGHT 1037 +#define IDC_ALIGN_BOTTOMRIGHT 1038 +#define IDC_FILENAME 1039 +#define IDC_WEBLINK 1040 +#define ID_VIEW_TESTDIALOG 32771 +#define ID_VIEW_LOGODLG 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1041 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.cpp new file mode 100644 index 0000000..7421400 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.cpp @@ -0,0 +1,91 @@ +// BitmapButtonDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "BitmapButtonDemo.h" +#include "BitmapButtonDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoApp + +BEGIN_MESSAGE_MAP(CBitmapButtonDemoApp, CWinApp) + //{{AFX_MSG_MAP(CBitmapButtonDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoApp construction + +CBitmapButtonDemoApp::CBitmapButtonDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CBitmapButtonDemoApp object + +CBitmapButtonDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoApp initialization + +BOOL CBitmapButtonDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CBitmapButtonDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CBitmapButtonDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsp new file mode 100644 index 0000000..39ef319 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsp @@ -0,0 +1,368 @@ +# Microsoft Developer Studio Project File - Name="BitmapButtonDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=BitmapButtonDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BitmapButtonDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BitmapButtonDemo.mak" CFG="BitmapButtonDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BitmapButtonDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "BitmapButtonDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "BitmapButtonDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "BitmapButtonDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "BitmapButtonDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BitmapButtonDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NO_DITHER" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapButtonDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_DITHER" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BitmapButtonDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BitmapBu" +# PROP BASE Intermediate_Dir "BitmapBu" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NO_DITHER" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NO_DITHER" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapButtonDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapButtonDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BitmapB0" +# PROP BASE Intermediate_Dir "BitmapB0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_DITHER" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_DITHER" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BitmapButtonDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"BitmapButtonDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BitmapB1" +# PROP BASE Intermediate_Dir "BitmapB1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NO_DITHER" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NO_DITHER" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapButtonDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"BitmapButtonDemo.exe" + +!ENDIF + +# Begin Target + +# Name "BitmapButtonDemo - Win32 Release" +# Name "BitmapButtonDemo - Win32 Debug" +# Name "BitmapButtonDemo - Win32 Release_Shared" +# Name "BitmapButtonDemo - Win32 Unicode_Debug" +# Name "BitmapButtonDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp + +!IF "$(CFG)" == "BitmapButtonDemo - Win32 Release" + +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Release_Shared" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Release" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp + +!IF "$(CFG)" == "BitmapButtonDemo - Win32 Release" + +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Release_Shared" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Release" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp + +!IF "$(CFG)" == "BitmapButtonDemo - Win32 Release" + +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Release_Shared" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Debug" + +!ELSEIF "$(CFG)" == "BitmapButtonDemo - Win32 Unicode_Release" + +# ADD BASE CPP /Yu +# ADD CPP /Yu + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BitmapButtonDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\BitmapButtonDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\BitmapButtonDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\HyperDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\BitmapButtonDemo.h +# End Source File +# Begin Source File + +SOURCE=.\BitmapButtonDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\HyperDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDIB.H +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\BitmapButtonDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\space.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sun.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\tick.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ToolBitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ToolBitmap3.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ToolIcon2.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\res\avi_test.avi +# End Source File +# Begin Source File + +SOURCE=.\BitmapButtonDemo.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsw new file mode 100644 index 0000000..6262e92 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BitmapButtonDemo"=".\BitmapButtonDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/BitmapButton", VSGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.h new file mode 100644 index 0000000..4fed806 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.h @@ -0,0 +1,38 @@ +// BitmapButtonDemo.h : main header file for the BITMAPBUTTONDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoApp: +// See BitmapButtonDemo.cpp for the implementation of this class +// + +class CBitmapButtonDemoApp : public CWinApp +{ +public: + CBitmapButtonDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBitmapButtonDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CBitmapButtonDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.rc new file mode 100644 index 0000000..f037a3b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.rc @@ -0,0 +1,310 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// AVI +// + +IDR_AVI_TEST AVI "res\\avi_test.avi" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\BitmapButtonDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXBitmapButton.rc"" // BitmapButton resources\r\n" + "#include ""utsampleabout.rc""\r\n" + "#endif\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\\BitmapButtonDemo.ico" +IDI_TOOL_ICON_2 ICON "res\\ToolIcon2.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_BITMAPBUTTONDEMO_DIALOG DIALOGEX 0, 0, 217, 273 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "BitmapButtonDemo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "\nAdd Your Tool Tip Here",IDC_BUTTON_1,"Button",BS_OWNERDRAW | WS_TABSTOP,7,15,67,43,WS_EX_TRANSPARENT + CONTROL "Toolti&p",IDC_TOOLTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,73,37,10 + CONTROL "T&rack look",IDC_TRACK_LOOK_1,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,7,83,46,10 + CONTROL "&Hyper look",IDC_HYPER_LOOK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,93,46,10 + CONTROL "&Disabled",IDC_DISABLED_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,103,44,10 + CONTROL "&Multiline",IDC_MULTILINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,113,44,10 + CONTROL "Normal",IDC_RADIO_NORMAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,57,73,59,10 + CONTROL "Dropdown",IDC_RADIO_DROPDOWN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,57,83,59,10 + CONTROL "Right Dropdown",IDC_RADIO_RIGHTDROPDOWN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,57,93,67,10 + CONTROL "Dropdown(no arrow)",IDC_RADIO_NOARROWDROPDOWN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,57,102,80,10 + CONTROL "Toggle",IDC_RADIO_TOGGLE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,57,111,59,10 + CONTROL "Toggle - 3 state",IDC_RADIO_TOGGLETHREESTATE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,57,120,65,10 + CONTROL "A&uto resize",IDC_AUTO_RESIZE_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,83,49,10 + CONTROL "&Invoke Action",IDC_ACTION_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,93,56,10 + CONTROL "&Pseudo disable",IDC_PSEUDO_DISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,103,60,10 + CONTROL "",IDC_LEFT_TOP,"Button",BS_AUTORADIOBUTTON | WS_GROUP,157,24,13,8 + CONTROL "",IDC_CENTER_TOP,"Button",BS_AUTORADIOBUTTON,175,24,13,8 + CONTROL "",IDC_RIGHT_TOP,"Button",BS_AUTORADIOBUTTON,191,24,13,8 + CONTROL "",IDC_LEFT_VCENTER,"Button",BS_AUTORADIOBUTTON,157,37,13,8 + CONTROL "",IDC_CENTER_VCENTER,"Button",BS_AUTORADIOBUTTON,175,37,13,8 + CONTROL "",IDC_RIGHT_VCENTER,"Button",BS_AUTORADIOBUTTON,191,37,13,8 + CONTROL "",IDC_LEFT_BOTTOM,"Button",BS_AUTORADIOBUTTON,157,50,13,8 + CONTROL "",IDC_CENTER_BOTTOM,"Button",BS_AUTORADIOBUTTON,175,50,13,8 + CONTROL "",IDC_RIGHT_BOTTOM,"Button",BS_AUTORADIOBUTTON,191,50,13,8 + EDITTEXT IDC_TEXT_1,32,134,90,12,ES_AUTOHSCROLL + PUSHBUTTON "Set",IDC_SET_TEXT,129,133,18,14 + EDITTEXT IDC_TOOLTIP_1,32,152,90,12,ES_AUTOHSCROLL + PUSHBUTTON "Set",IDC_SET_TOOLTIP,129,151,18,14 + PUSHBUTTON "Font - Color",IDC_FONT_1,156,151,54,14,0,WS_EX_TRANSPARENT + CONTROL "\nOne",IDC_BUTTON_10,"Button",BS_OWNERDRAW | WS_TABSTOP,12,177,25,24 + CONTROL "\nTwo",IDC_BUTTON_11,"Button",BS_OWNERDRAW | WS_TABSTOP,39,177,25,24 + CONTROL "\nThree",IDC_BUTTON_12,"Button",BS_OWNERDRAW | WS_TABSTOP,66,177,25,24 + CONTROL "T&rack look",IDC_TRACK_LOOK_1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,179,48,10 + CONTROL "&Disabled",IDC_DISABLED_1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,179,44,10 + CONTROL "T&ext",IDC_TEXT_1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,191,29,10 + LTEXT "Check out the new Hyper look",IDC_NEW,7,214,97,23 + PUSHBUTTON "H&yper demo",IDC_HYPER,115,213,48,14 + CONTROL "\nAnimated Button",IDCANCEL,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,66,246,65,14 + LTEXT "Owner draw",IDC_STATIC_HEADER,7,7,140,8 + GROUPBOX "Alignment",IDC_STATIC,147,13,63,50 + LTEXT "Te&xt",IDC_STATIC,7,137,20,8 + LTEXT "Toolt&ip",IDC_STATIC,7,155,22,8 + LTEXT "Button Row",IDC_STATIC,12,166,35,8 +END + +IDD_HYPER_DLG DIALOGEX 0, 0, 162, 126 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Watch the COXBitmapButton in Hyper look mode. There is a background bitmap with three buttons on it.",IDC_STATIC,7,7,148,25 + GROUPBOX "",IDC_SPACE,7,38,148,50,NOT WS_VISIBLE + CONTROL "\nStar 1",IDC_BUTTON_1,"Button",BS_OWNERDRAW | WS_TABSTOP,11,55,19,15,WS_EX_TRANSPARENT + CONTROL "\nStar 2",IDC_BUTTON_2,"Button",BS_OWNERDRAW | WS_TABSTOP,47,63,19,15,WS_EX_TRANSPARENT + CONTROL "\nStar 3",IDC_BUTTON_3,"Button",BS_OWNERDRAW | WS_TABSTOP,98,44,19,15,WS_EX_TRANSPARENT + LTEXT "PS : The third button is disabled",IDC_STATIC,6,91,124,8 + PUSHBUTTON "Close",IDCANCEL,51,105,50,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,0,0,1 + PRODUCTVERSION 2,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "BITMAPBUTTONDEMO MFC Application" + VALUE "FileVersion", "2, 0, 0, 1" + VALUE "InternalName", "BITMAPBUTTONDEMO" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "BITMAPBUTTONDEMO.EXE" + VALUE "ProductName", "BITMAPBUTTONDEMO Application" + VALUE "ProductVersion", "2, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_BITMAPBUTTONDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 210 + TOPMARGIN, 7 + BOTTOMMARGIN, 266 + END + + IDD_HYPER_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 155 + TOPMARGIN, 7 + BOTTOMMARGIN, 119 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_TOOL_BITMAP_1 BITMAP "res\\ToolBitmap1.bmp" +IDB_TOOL_BITMAP_3 BITMAP "res\\ToolBitmap3.bmp" +IDB_SUN BITMAP "res\\sun.bmp" +IDB_SPACE BITMAP "res\\space.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About BitmapButtonDemo..." + IDS_ACTION_1 "You clicked the COXBitmapButton" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Bitmap Button Demo" + ID_DESCRIPTION_FILE "bitmapbuttonInfo.rtf" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON_TEST ICON "res\\icon1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_TICK BITMAP "res\\tick.bmp" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\BitmapButtonDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXBitmapButton.rc" // BitmapButton resources +#include "utsampleabout.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.vcproj new file mode 100644 index 0000000..9141471 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemo.vcproj @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.cpp new file mode 100644 index 0000000..9221849 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.cpp @@ -0,0 +1,689 @@ + +// BitmapButtonDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "BitmapButtonDemo.h" +#include "BitmapButtonDemoDlg.h" +#include "HyperDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoDlg dialog + +CBitmapButtonDemoDlg::CBitmapButtonDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CBitmapButtonDemoDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CBitmapButtonDemoDlg) + m_bDisabled1 = FALSE; + m_bTrackLook1 = FALSE; + m_bTrackLook1x = TRUE; + m_bAction1 = FALSE; + m_nAlignment = -1; + m_bAutoResize1 = TRUE; + m_sText1 = _T(""); + m_bText1x = FALSE; + m_sToolTipText1 = _T(""); + m_bToolTip = TRUE; + m_bDisabled1X = FALSE; + m_bPseudoDisable = FALSE; + m_bHyperLook = FALSE; + m_nStyle = -1; + m_sHeader = _T(""); + m_bMultiline = FALSE; + //}}AFX_DATA_INIT + nState=0; + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CBitmapButtonDemoDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CBitmapButtonDemoDlg) + DDX_Control(pDX, IDCANCEL, m_wndButtonAnimated); + DDX_Control(pDX, IDC_NEW, m_wndNew); + DDX_Control(pDX, IDC_BUTTON_12, m_wndButton12); + DDX_Control(pDX, IDC_BUTTON_11, m_wndButton11); + DDX_Control(pDX, IDC_BUTTON_10, m_wndButton10); + DDX_Control(pDX, IDC_BUTTON_1, m_wndButton1); + DDX_Check(pDX, IDC_DISABLED_1, m_bDisabled1); + DDX_Check(pDX, IDC_TRACK_LOOK_1, m_bTrackLook1); + DDX_Check(pDX, IDC_TRACK_LOOK_1X, m_bTrackLook1x); + DDX_Check(pDX, IDC_ACTION_1, m_bAction1); + DDX_Radio(pDX, IDC_LEFT_TOP, m_nAlignment); + DDX_Check(pDX, IDC_AUTO_RESIZE_1, m_bAutoResize1); + DDX_Text(pDX, IDC_TEXT_1, m_sText1); + DDX_Check(pDX, IDC_TEXT_1X, m_bText1x); + DDX_Text(pDX, IDC_TOOLTIP_1, m_sToolTipText1); + DDX_Check(pDX, IDC_TOOLTIP, m_bToolTip); + DDX_Check(pDX, IDC_DISABLED_1X, m_bDisabled1X); + DDX_Check(pDX, IDC_PSEUDO_DISABLE, m_bPseudoDisable); + DDX_Check(pDX, IDC_HYPER_LOOK, m_bHyperLook); + DDX_Radio(pDX, IDC_RADIO_NORMAL, m_nStyle); + DDX_Text(pDX, IDC_STATIC_HEADER, m_sHeader); + DDX_Check(pDX, IDC_MULTILINE, m_bMultiline); + //}}AFX_DATA_MAP + DDX_Toggle(pDX, IDC_BUTTON_1, nState); + } + +BEGIN_MESSAGE_MAP(CBitmapButtonDemoDlg, CDialog) + //{{AFX_MSG_MAP(CBitmapButtonDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_DISABLED_1, OnDisabled1) + ON_BN_CLICKED(IDC_TRACK_LOOK_1X, OnTrackLook1x) + ON_BN_CLICKED(IDC_TRACK_LOOK_1, OnTrackLook1) + ON_WM_PALETTECHANGED() + ON_BN_CLICKED(IDC_BUTTON_1, OnButton1) + ON_BN_CLICKED(IDC_LEFT_BOTTOM, OnAlignment) + ON_BN_CLICKED(IDC_AUTO_RESIZE_1, OnAutoResize1) + ON_BN_CLICKED(IDC_SET_TEXT, OnSetText) + ON_BN_CLICKED(IDC_TEXT_1X, OnText1x) + ON_BN_CLICKED(IDC_FONT_1, OnFont1) + ON_BN_CLICKED(IDC_SET_TOOLTIP, OnSetTooltip) + ON_BN_CLICKED(IDC_TOOLTIP, OnTooltip) + ON_BN_CLICKED(IDC_DISABLED_1X, OnDisabled1x) + ON_BN_CLICKED(IDC_HYPER, OnHyper) + ON_BN_CLICKED(IDC_PSEUDO_DISABLE, OnPseudoDisable) + ON_BN_CLICKED(IDC_HYPER_LOOK, OnHyperLook) + ON_BN_CLICKED(IDC_RADIO_NORMAL, OnRadioNormal) + ON_BN_CLICKED(IDC_RADIO_DROPDOWN, OnRadioDropdown) + ON_BN_CLICKED(IDC_RADIO_RIGHTDROPDOWN, OnRadioRightdropdown) + ON_BN_CLICKED(IDC_RADIO_TOGGLE, OnRadioToggle) + ON_BN_CLICKED(IDC_RADIO_NOARROWDROPDOWN, OnRadioNoarrowdropdown) + ON_BN_CLICKED(IDC_RADIO_TOGGLETHREESTATE, OnRadioTogglethreestate) + ON_BN_CLICKED(IDC_ACTION_1, OnAction1) + ON_BN_CLICKED(IDC_LEFT_TOP, OnAlignment) + ON_BN_CLICKED(IDC_LEFT_VCENTER, OnAlignment) + ON_BN_CLICKED(IDC_RIGHT_BOTTOM, OnAlignment) + ON_BN_CLICKED(IDC_RIGHT_TOP, OnAlignment) + ON_BN_CLICKED(IDC_RIGHT_VCENTER, OnAlignment) + ON_BN_CLICKED(IDC_CENTER_BOTTOM, OnAlignment) + ON_BN_CLICKED(IDC_CENTER_TOP, OnAlignment) + ON_BN_CLICKED(IDC_CENTER_VCENTER, OnAlignment) + ON_BN_CLICKED(IDC_MULTILINE, OnMultiline) + //}}AFX_MSG_MAP + ON_NOTIFY(OXBBN_DROPDOWN,IDC_BUTTON_1,OnDropDownButton1) + ON_NOTIFY(OXBBN_TOGGLE,IDC_BUTTON_1,OnToggleButton1) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoDlg message handlers + +BOOL CBitmapButtonDemoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + +// Set button resources + m_originalSize1 = m_wndButton1.GetButtonSize(); +// m_wndButton1.SetInnerFocusOffset(CPoint(-4,-2)); + VERIFY(m_wndButton1.LoadBitmap(IDB_SUN, m_bAutoResize1, RGB(255,0,255))); +// VERIFY(m_wndButton1.LoadIcon(IDI_TOOL_ICON_2, m_bAutoResize1,16,16)); + m_wndButton1.SetText(_T("&Bitmap Button")); + m_wndButton1.SetVerticalAlignment(BS_VCENTER); + m_wndButton1.SetHorizontalAlignment(BS_LEFT); + m_nAlignment = 3; + nState=1; +// m_wndButton1.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); + m_wndButton1.SetStyleEx(OXBB_EX_TOGGLE|OXBB_EX_TOGGLE3STATE); + m_nStyle = 5; + m_bMultiline = (m_wndButton1.GetStyle()&BS_MULTILINE)==BS_MULTILINE; + if(m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_sText1 = m_wndButton1.GetText(); + m_sToolTipText1 = m_wndButton1.GetToolTipText(); + m_sHeader=_T("Owner Draw"); + + VERIFY(m_wndButton10.LoadBitmap(IDB_TOOL_BITMAP_1, TRUE, RGB(255, 0, 255))); + VERIFY(m_wndButton11.LoadIcon(IDI_TOOL_ICON_2, TRUE)); + VERIFY(m_wndButton12.LoadBitmap(IDB_TOOL_BITMAP_3, TRUE, RGB(255, 0, 255))); + + m_wndButton10.SetToolTip(TRUE); + m_wndButton11.SetToolTip(TRUE); + m_wndButton12.SetToolTip(TRUE); + m_wndButton1.SetToolTip(TRUE); + + + m_wndButtonAnimated.LoadAvi(IDR_AVI_TEST); + m_wndButtonAnimated.SetToolTip(TRUE); +// m_wndButtonAnimated.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); +// m_wndButtonAnimated.SetText(_T("Animated")); + m_wndButtonAnimated.SizeToContent(); + + // Set row of buttons next to each other + PositionButtonRow(); + + m_wndButton10.SetTrackLook(TRUE); + m_wndButton11.SetTrackLook(TRUE); + m_wndButton12.SetTrackLook(TRUE); + m_wndButton1.SetTrackLook(TRUE); + + CFont* pFont = m_wndNew.GetFont(); + if (pFont != NULL) + { + LOGFONT logFont; + ::ZeroMemory(&logFont, sizeof(logFont)); + pFont->GetLogFont(&logFont); + logFont.lfHeight = (logFont.lfHeight * 3) / 2; + logFont.lfWidth = 0; + // ... Bold + logFont.lfWeight = 700; + logFont.lfItalic = TRUE; + m_largeFont.CreateFontIndirect(&logFont); + m_wndNew.SetFont(&m_largeFont); + } + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + } + +void CBitmapButtonDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CBitmapButtonDemoDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CBitmapButtonDemoDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CBitmapButtonDemoDlg::OnDisabled1() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.EnableWindow(!m_bDisabled1); + } + +void CBitmapButtonDemoDlg::OnTrackLook1x() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton10.SetTrackLook(m_bTrackLook1x); + m_wndButton11.SetTrackLook(m_bTrackLook1x); + m_wndButton12.SetTrackLook(m_bTrackLook1x); + } + +void CBitmapButtonDemoDlg::OnTrackLook1() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetTrackLook(m_bTrackLook1); + } + +void CBitmapButtonDemoDlg::OnPaletteChanged(CWnd* pFocusWnd) + { + CDialog::OnPaletteChanged(pFocusWnd); + + // TODO: Add your message handler code here + } + + +void CBitmapButtonDemoDlg::OnButton1() + { + if (!UpdateData(TRUE)) + return; + + if (m_bAction1 && !m_wndButton1.IsToggleButton() && !m_wndButton1.IsDropDownButton()) + AfxMessageBox(IDS_ACTION_1, MB_ICONINFORMATION | MB_OK); + + UpdateData(FALSE); + + } + +void CBitmapButtonDemoDlg::OnAlignment() + { + if (!UpdateData(TRUE)) + return; + + DWORD nHorizontalAlignment = (DWORD)-1; + DWORD nVerticalAlignment = (DWORD)-1; + + if ((m_nAlignment == 0) || (m_nAlignment == 1) || (m_nAlignment == 2)) + nVerticalAlignment = BS_TOP; + if ((m_nAlignment == 3) || (m_nAlignment == 4) || (m_nAlignment == 5)) + nVerticalAlignment = BS_VCENTER; + if ((m_nAlignment == 6) || (m_nAlignment == 7) || (m_nAlignment == 8)) + nVerticalAlignment = BS_BOTTOM; + + if ((m_nAlignment == 0) || (m_nAlignment == 3) || (m_nAlignment == 6)) + nHorizontalAlignment = BS_LEFT; + if ((m_nAlignment == 1) || (m_nAlignment == 4) || (m_nAlignment == 7)) + nHorizontalAlignment = BS_CENTER; + if ((m_nAlignment == 2) || (m_nAlignment == 5) || (m_nAlignment == 8)) + nHorizontalAlignment = BS_RIGHT; + + ASSERT(nHorizontalAlignment != (DWORD)-1); + ASSERT(nVerticalAlignment != (DWORD)-1); + + DWORD nOldVerticalAlignment=m_wndButton1.GetVerticalAlignment(); + + m_wndButton1.SetVerticalAlignment(nVerticalAlignment); + m_wndButton1.SetHorizontalAlignment(nHorizontalAlignment); + + if(m_bAutoResize1 && (nOldVerticalAlignment==BS_VCENTER || + nVerticalAlignment==BS_VCENTER)) + { + m_wndButton1.SizeToContent(); + } + } + +void CBitmapButtonDemoDlg::OnAutoResize1() + { + if (!UpdateData(TRUE)) + return; + + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + else + { + // ... Get old position + CRect rect; + m_wndButton1.GetWindowRect(rect); + ScreenToClient(rect); + // ... Move + m_wndButton1.SetWindowPos(NULL, -1, -1, m_originalSize1.cx, m_originalSize1.cy, + SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOACTIVATE); + // ... Invalidate old and new position + InvalidateRect(rect); + m_wndButton1.Invalidate(); + } + } + +void CBitmapButtonDemoDlg::OnSetText() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetText(m_sText1); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + } + +void CBitmapButtonDemoDlg::OnText1x() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton10.SetText(m_bText1x ? _T("&One") : _T("")); + m_wndButton11.SetText(m_bText1x ? _T("&Two") : _T("")); + m_wndButton12.SetText(m_bText1x ? _T("T&hree") : _T("")); + + PositionButtonRow(); + } + +void CBitmapButtonDemoDlg::PositionButtonRow() + { + // First resize them + m_wndButton10.SizeToContent(); + m_wndButton11.SizeToContent(); + m_wndButton12.SizeToContent(); + + CRect rect; + CSize size; + CSize largestSize(0, 0); + + m_wndButton10.GetWindowRect(rect); + largestSize = rect.Size(); + + m_wndButton11.GetWindowRect(rect); + size = rect.Size(); + if (largestSize.cx < size.cx) + largestSize.cx = size.cx; + if (largestSize.cy < size.cy) + largestSize.cy = size.cy; + + m_wndButton12.GetWindowRect(rect); + size = rect.Size(); + if (largestSize.cx < size.cx) + largestSize.cx = size.cx; + if (largestSize.cy < size.cy) + largestSize.cy = size.cy; + + + // The reposition them (next to each other) + CRect firstRect; + CRect secondRect; + + m_wndButton10.GetWindowRect(secondRect); + ScreenToClient(secondRect); + secondRect.right = secondRect.left + largestSize.cx; + secondRect.bottom = secondRect.top + largestSize.cy; + m_wndButton10.MoveWindow(secondRect); + + m_wndButton10.GetWindowRect(firstRect); + m_wndButton11.GetWindowRect(secondRect); + secondRect = secondRect - CPoint(secondRect.left - firstRect.right, secondRect.top - firstRect.top); + ScreenToClient(secondRect); + secondRect.right = secondRect.left + largestSize.cx; + secondRect.bottom = secondRect.top + largestSize.cy; + m_wndButton11.MoveWindow(secondRect); + + m_wndButton11.GetWindowRect(firstRect); + m_wndButton12.GetWindowRect(secondRect); + secondRect = secondRect - CPoint(secondRect.left - firstRect.right, secondRect.top - firstRect.top); + ScreenToClient(secondRect); + secondRect.right = secondRect.left + largestSize.cx; + secondRect.bottom = secondRect.top + largestSize.cy; + m_wndButton12.MoveWindow(secondRect); + } + + +void CBitmapButtonDemoDlg::OnFont1() + { + CFont* pTextFont = m_wndButton1.GetFont(); + ASSERT(pTextFont != NULL); + LOGFONT logFont; + pTextFont->GetLogFont(&logFont); + + CFontDialog fontDlg(&logFont); + fontDlg.m_cf.rgbColors = m_wndButton1.GetTextColor(); + if (fontDlg.DoModal() == IDOK) + { + CFont newTextFont; + // ... CFontDialog::GetCurrentFont() ASSERTs without reason if m_hWnd == NULL, + // so we use m_cf.lpLogFont directly + VERIFY(newTextFont.CreateFontIndirect(fontDlg.m_cf.lpLogFont)); + // ... SetTextFont() will keep a copy + m_wndButton1.SetTextFont(&newTextFont); + m_wndButton1.SetTextColor(fontDlg.GetColor()); + + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + } + } + +void CBitmapButtonDemoDlg::OnSetTooltip() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetToolTipText(m_sToolTipText1); + } + +void CBitmapButtonDemoDlg::OnTooltip() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetToolTip(m_bToolTip); + } + +void CBitmapButtonDemoDlg::OnDisabled1x() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton10.EnableWindow(!m_bDisabled1X); + m_wndButton11.EnableWindow(!m_bDisabled1X); + m_wndButton12.EnableWindow(!m_bDisabled1X); + } + +void CBitmapButtonDemoDlg::OnHyper() + { + CHyperDlg dlg; + dlg.DoModal(); + } + +void CBitmapButtonDemoDlg::OnPseudoDisable() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetPseudoDisableMode(m_bPseudoDisable); + } + +void CBitmapButtonDemoDlg::OnHyperLook() + { + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetHyperLook(m_bHyperLook); + m_bPseudoDisable = m_wndButton1.GetPseudoDisableMode(); + UpdateData(FALSE); + } + +void CBitmapButtonDemoDlg::OnRadioNormal() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(0); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnRadioDropdown() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(OXBB_EX_DROPDOWN); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnRadioRightdropdown() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnRadioToggle() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(OXBB_EX_TOGGLE); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnRadioNoarrowdropdown() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNNOARROW); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnRadioTogglethreestate() +{ + // TODO: Add your control notification handler code here + if (!UpdateData(TRUE)) + return; + + m_wndButton1.SetStyleEx(OXBB_EX_TOGGLE|OXBB_EX_TOGGLE3STATE); + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + m_wndButton1.SetStateEx(m_wndButton1.GetStateEx()& + ~(OXBB_STATE_CHECKED|OXBB_STATE_INDETERMINATE)); + m_wndButton1.RedrawWindow(); + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnDropDownButton1(NMHDR * pNotifyStruct, LRESULT * result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if (m_bAction1) + AfxMessageBox(IDS_ACTION_1, MB_ICONINFORMATION | MB_OK); + + *result=0; +} + +void CBitmapButtonDemoDlg::OnToggleButton1(NMHDR * pNotifyStruct, LRESULT * result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if (!UpdateData(TRUE)) + return; + + if (m_bAction1) + { + if(nState==2) + { + m_sHeader=_T("Owner Draw - Indeterminate"); + } + else if(nState==1) + { + m_sHeader=_T("Owner Draw - On"); + } + else if(nState==0) + { + m_sHeader=_T("Owner Draw - Off"); + } + else + { + m_sHeader=_T("Owner Draw"); + } + } + + UpdateData(FALSE); + + + *result=0; +} + +void CBitmapButtonDemoDlg::OnAction1() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_sHeader=_T("Owner Draw"); + UpdateData(FALSE); +} + +void CBitmapButtonDemoDlg::OnMultiline() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + if(m_bMultiline) + m_wndButton1.ModifyStyle(0,BS_MULTILINE); + else + m_wndButton1.ModifyStyle(BS_MULTILINE,0); + + if (m_bAutoResize1) + m_wndButton1.SizeToContent(); + else + m_wndButton1.Invalidate(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.h new file mode 100644 index 0000000..12caa47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/BitmapButtonDemoDlg.h @@ -0,0 +1,95 @@ +// BitmapButtonDemoDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CBitmapButtonDemoDlg dialog + +#include "OXBitmapButton.h" +#include "OXSoundEffectManager.h" + + +class CBitmapButtonDemoDlg : public CDialog +{ +// Construction +public: + CBitmapButtonDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CBitmapButtonDemoDlg) + enum { IDD = IDD_BITMAPBUTTONDEMO_DIALOG }; + COXBitmapButton m_wndButtonAnimated; + CStatic m_wndNew; + COXBitmapButton m_wndButton12; + COXBitmapButton m_wndButton11; + COXBitmapButton m_wndButton10; + COXBitmapButton m_wndButton1; + BOOL m_bDisabled1; + BOOL m_bTrackLook1; + BOOL m_bTrackLook1x; + BOOL m_bAction1; + int m_nAlignment; + BOOL m_bAutoResize1; + CString m_sText1; + BOOL m_bText1x; + CString m_sToolTipText1; + BOOL m_bToolTip; + BOOL m_bDisabled1X; + BOOL m_bPseudoDisable; + BOOL m_bHyperLook; + int m_nStyle; + CString m_sHeader; + BOOL m_bMultiline; + //}}AFX_DATA + int nState; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBitmapButtonDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + CSize m_originalSize1; + CFont m_largeFont; + + void PositionButtonRow(); + + // Generated message map functions + //{{AFX_MSG(CBitmapButtonDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnDisabled1(); + afx_msg void OnTrackLook1x(); + afx_msg void OnTrackLook1(); + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg void OnButton1(); + afx_msg void OnAlignment(); + afx_msg void OnAutoResize1(); + afx_msg void OnSetText(); + afx_msg void OnText1x(); + afx_msg void OnFont1(); + afx_msg void OnSetTooltip(); + afx_msg void OnTooltip(); + afx_msg void OnDisabled1x(); + afx_msg void OnHyper(); + afx_msg void OnPseudoDisable(); + afx_msg void OnHyperLook(); + afx_msg void OnRadioNormal(); + afx_msg void OnRadioDropdown(); + afx_msg void OnRadioRightdropdown(); + afx_msg void OnRadioToggle(); + afx_msg void OnRadioNoarrowdropdown(); + afx_msg void OnRadioTogglethreestate(); + afx_msg void OnAction1(); + afx_msg void OnMultiline(); + //}}AFX_MSG + afx_msg void OnDropDownButton1(NMHDR * pNotifyStruct, LRESULT * result); + afx_msg void OnToggleButton1(NMHDR * pNotifyStruct, LRESULT * result); + DECLARE_MESSAGE_MAP() + +private: +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.cpp new file mode 100644 index 0000000..fe30254 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.cpp @@ -0,0 +1,177 @@ +// HyperDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "BitmapButtonDemo.h" +#include "HyperDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHyperDlg dialog + + +CHyperDlg::CHyperDlg(CWnd* pParent /*=NULL*/) +: CDialog(CHyperDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CHyperDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + } + + +void CHyperDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CHyperDlg) + DDX_Control(pDX, IDC_BUTTON_3, m_wndButton3); + DDX_Control(pDX, IDC_BUTTON_2, m_wndButton2); + DDX_Control(pDX, IDC_BUTTON_1, m_wndButton1); + DDX_Control(pDX, IDC_SPACE, m_wndSpace); + //}}AFX_DATA_MAP + } + + +BEGIN_MESSAGE_MAP(CHyperDlg, CDialog) + //{{AFX_MSG_MAP(CHyperDlg) + ON_WM_PAINT() + ON_WM_QUERYNEWPALETTE() + ON_WM_PALETTECHANGED() + ON_WM_RBUTTONDOWN() + ON_WM_ACTIVATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHyperDlg message handlers + +BOOL CHyperDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Build image for the background + // ... Get the bitmap data + LPCTSTR lpszBitmapResource = MAKEINTRESOURCE(IDB_SPACE); + HINSTANCE hInstance = NULL; + HRSRC hResourceInfoBlock = NULL; + HGLOBAL hBitmapGlobal = NULL; + HGLOBAL hBitmapCopy = NULL; + DWORD nResourceSize = 0; + LPBITMAPINFOHEADER pCopyBitmapInfoHeader = NULL; + + hInstance = AfxFindResourceHandle(lpszBitmapResource, RT_BITMAP); + hResourceInfoBlock = ::FindResource(hInstance, lpszBitmapResource, RT_BITMAP); + hBitmapGlobal = ::LoadResource(hInstance, hResourceInfoBlock); + if (hBitmapGlobal == NULL) + { + TRACE0("CHyperDlg::OnInitDialog : Failed to load bitmap resource, failing\n"); + return FALSE; + } + + nResourceSize = ::SizeofResource(hInstance, hResourceInfoBlock); + ASSERT(sizeof(BITMAPINFOHEADER) <= nResourceSize); + + // Memory may be read only, make a copy + void* pOldBitmapInfoHeader = (LPBITMAPINFOHEADER)::LockResource(hBitmapGlobal); + hBitmapCopy = ::GlobalAlloc(GMEM_MOVEABLE, nResourceSize); + pCopyBitmapInfoHeader = (LPBITMAPINFOHEADER)::GlobalLock(hBitmapCopy); + ASSERT(pCopyBitmapInfoHeader != NULL); + ::CopyMemory(pCopyBitmapInfoHeader, pOldBitmapInfoHeader, nResourceSize); + + m_space = (HDIB)hBitmapCopy; + + ::UnlockResource(hBitmapGlobal); + if ((::GlobalUnlock(hBitmapCopy) == 0) && (::GetLastError() == NO_ERROR)) + VERIFY(::GlobalFree(hBitmapCopy) == NULL); + + // ... Get the top left + m_wndSpace.GetWindowRect(m_spaceRect); + ScreenToClient(m_spaceRect); + + // Initialize the bitmap buttons + m_wndButton1.LoadBitmap(IDB_SUN, TRUE, RGB(255, 0, 255)); + m_wndButton1.SetTrackLook(TRUE); + m_wndButton1.SetHyperLook(TRUE); + m_wndButton1.SetToolTip(TRUE); + + m_wndButton2.LoadBitmap(IDB_SUN, TRUE, RGB(255, 0, 255)); + m_wndButton2.SetTrackLook(TRUE); + m_wndButton2.SetHyperLook(TRUE); + m_wndButton2.SetToolTip(TRUE); + + m_wndButton3.LoadBitmap(IDB_SUN, TRUE, RGB(255, 0, 255)); + m_wndButton3.SetTrackLook(TRUE); + m_wndButton3.SetHyperLook(TRUE); + m_wndButton3.SetToolTip(TRUE); + m_wndButton3.EnableWindow(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } + +void CHyperDlg::OnPaint() + { + CPaintDC dc(this); + + // First let the base class draw everyhting + DefWindowProc(WM_PAINT, (WPARAM)dc.m_hDC, NULL); + + // Then we draw the traffic light + if (!m_space.IsEmpty()) + m_space.Paint(&dc, m_spaceRect, CRect(CPoint(0,0), m_spaceRect.Size())); + } + +BOOL CHyperDlg::OnQueryNewPalette() + { + if (!m_space.IsEmpty()) + { + CDC* pDC = GetDC(); + pDC->SelectPalette(m_space.GetPalette(), FALSE); + UINT nEntries = pDC->RealizePalette(); + ReleaseDC(pDC); + if (nEntries != 0) + { + // Some colors changed, so we need to do a repaint. + Invalidate(); + } + } + + return CDialog::OnQueryNewPalette(); + } + +void CHyperDlg::OnPaletteChanged(CWnd* pFocusWnd) + { + CDialog::OnPaletteChanged(pFocusWnd); + + // ... Check whether the change was caused by us + if (pFocusWnd != this) + // ... Realize our palette + OnQueryNewPalette(); + } + +void CHyperDlg::OnRButtonDown(UINT nFlags, CPoint point) + { + m_wndButton1.RegrabBackground(); + + CDialog::OnRButtonDown(nFlags, point); + } + +void CHyperDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) + { + CDialog::OnActivate(nState, pWndOther, bMinimized); + + // Realize the palette if we are the new foreground window + // (This window may become the active window of the thread without + // being the foreground window) + if ((((nState & WA_ACTIVE) == WA_ACTIVE) || ((nState & WA_CLICKACTIVE) == WA_CLICKACTIVE)) && + GetForegroundWindow() == this) + { + // ... Realize our palette when we have become active + OnQueryNewPalette(); + } + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.h new file mode 100644 index 0000000..a42a725 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/HyperDlg.h @@ -0,0 +1,48 @@ +// HyperDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CHyperDlg dialog + +#include "OXBitmapButton.h" +#include "OXDIB.h" + +class CHyperDlg : public CDialog +{ +// Construction +public: + CHyperDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CHyperDlg) + enum { IDD = IDD_HYPER_DLG }; + COXBitmapButton m_wndButton3; + COXBitmapButton m_wndButton2; + COXBitmapButton m_wndButton1; + CButton m_wndSpace; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHyperDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CRect m_spaceRect; + COXDIB m_space; + + // Generated message map functions + //{{AFX_MSG(CHyperDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg BOOL OnQueryNewPalette(); + afx_msg void OnPaletteChanged(CWnd* pFocusWnd); + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.cpp new file mode 100644 index 0000000..8e3ffe0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// BitmapButtonDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.h new file mode 100644 index 0000000..74abe4f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/bitmapbuttonInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/bitmapbuttonInfo.rtf new file mode 100644 index 0000000..67d0bbb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/bitmapbuttonInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.rc2 new file mode 100644 index 0000000..87fe63a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/BitmapButtonDemo.rc2 @@ -0,0 +1,13 @@ +// +// BITMAPBUTTONDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXHandCursor.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXHandCursor.cur new file mode 100644 index 0000000..5947588 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXHandCursor.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXNoHandCursor.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXNoHandCursor.cur new file mode 100644 index 0000000..cf6e133 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/OXNoHandCursor.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/Test.AVI b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/Test.AVI new file mode 100644 index 0000000..2e83b64 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/Test.AVI differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/TestBitmap.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/TestBitmap.bmp new file mode 100644 index 0000000..5d456b5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/TestBitmap.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap1.bmp new file mode 100644 index 0000000..8d714d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap3.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap3.bmp new file mode 100644 index 0000000..5840ea0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolBitmap3.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolIcon2.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolIcon2.ico new file mode 100644 index 0000000..fa319ba Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/ToolIcon2.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/avi_test.avi b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/avi_test.avi new file mode 100644 index 0000000..8b5f10a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/avi_test.avi differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bitmap1.bmp new file mode 100644 index 0000000..9073cc5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00001.bmp new file mode 100644 index 0000000..8d714d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00002.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00002.bmp new file mode 100644 index 0000000..452a5f8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00002.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00003.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00003.bmp new file mode 100644 index 0000000..5840ea0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/bmp00003.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/copy_fl.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/copy_fl.bmp new file mode 100644 index 0000000..bd66062 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/copy_fl.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/cursor1.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/cursor1.cur new file mode 100644 index 0000000..048f06b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/cursor1.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/del_file.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/del_file.bmp new file mode 100644 index 0000000..12c9abe Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/del_file.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/dillo.avi b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/dillo.avi new file mode 100644 index 0000000..cc95bf5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/dillo.avi differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/icon1.ico new file mode 100644 index 0000000..c7b9eb8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/search.avi b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/search.avi new file mode 100644 index 0000000..093df22 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/search.avi differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/space.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/space.bmp new file mode 100644 index 0000000..00dfe87 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/space.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/sun.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/sun.bmp new file mode 100644 index 0000000..c0f2a04 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/sun.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/test_bit.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/test_bit.bmp new file mode 100644 index 0000000..4cbff57 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/test_bit.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/tick.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/tick.bmp new file mode 100644 index 0000000..0e2615f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/res/tick.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/resource.h new file mode 100644 index 0000000..8353653 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapButton/resource.h @@ -0,0 +1,75 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by BitmapButtonDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_BITMAPBUTTONDEMO_DIALOG 102 +#define IDS_ACTION_1 102 +#define IDR_MAINFRAME 128 +#define IDB_TEST_BITMAP 129 +#define ID_DESCRIPTION_FILE 129 +#define IDB_TOOL_BITMAP_3 131 +#define IDC_CURSOR1 132 +#define IDI_TOOL_ICON_2 133 +#define IDB_TOOL_BITMAP_1 134 +#define IDD_HYPER_DLG 141 +#define IDB_SPACE 142 +#define IDB_SUN 143 +#define IDR_AVI_TEST 150 +#define IDI_ICON_TEST 156 +#define IDB_TICK 157 +#define IDC_BUTTON_1 1000 +#define IDC_BUTTON_2 1001 +#define IDC_BUTTON_3 1002 +#define IDC_DISABLED_1 1003 +#define IDC_MULTILINE 1004 +#define IDC_BUTTON_10 1006 +#define IDC_BUTTON_11 1007 +#define IDC_BUTTON_12 1008 +#define IDC_TRACK_LOOK_1 1009 +#define IDC_ACTION_1 1010 +#define IDC_TRACK_LOOK_1X 1012 +#define IDC_LEFT_TOP 1013 +#define IDC_CENTER_TOP 1014 +#define IDC_RIGHT_TOP 1015 +#define IDC_LEFT_VCENTER 1016 +#define IDC_LEFT_BOTTOM 1017 +#define IDC_CENTER_BOTTOM 1018 +#define IDC_RIGHT_VCENTER 1019 +#define IDC_RIGHT_BOTTOM 1020 +#define IDC_CENTER_VCENTER 1021 +#define IDC_AUTO_RESIZE_1 1022 +#define IDC_TEXT_1 1023 +#define IDC_SET_TEXT 1024 +#define IDC_TEXT_1X 1025 +#define IDC_TOOLTIP_1 1026 +#define IDC_FONT_1 1027 +#define IDC_SET_TOOLTIP 1028 +#define IDC_TOOLTIP 1029 +#define IDC_DISABLED_1X 1030 +#define IDC_HAND_CURSOR 1031 +#define IDC_HYPER_LOOK 1031 +#define IDC_HYPER 1032 +#define IDC_SPACE 1033 +#define IDC_PSEUDO_DISABLE 1037 +#define IDC_NEW 1041 +#define IDC_RADIO_DROPDOWN 1044 +#define IDC_RADIO_RIGHTDROPDOWN 1045 +#define IDC_RADIO_TOGGLE 1046 +#define IDC_RADIO_NORMAL 1047 +#define IDC_RADIO_TOGGLETHREESTATE 1048 +#define IDC_RADIO_NOARROWDROPDOWN 1049 +#define IDC_STATIC_HEADER 1050 +#define IDC_BUTTON1 1051 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 159 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1052 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.clw new file mode 100644 index 0000000..f44e779 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.clw @@ -0,0 +1,138 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CBitmapMenuDemoView +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "BitmapMenuDemo.h" +LastPage=0 + +ClassCount=5 +Class1=CBitmapMenuDemoApp +Class2=CBitmapMenuDemoDoc +Class3=CBitmapMenuDemoView +Class4=CMainFrame + +ResourceCount=3 +Resource1=IDD_ABOUTBOX +Resource2=IDR_BITMAPTYPE +Class5=CChildFrame +Resource3=IDR_MAINFRAME + +[CLS:CBitmapMenuDemoApp] +Type=0 +HeaderFile=BitmapMenuDemo.h +ImplementationFile=BitmapMenuDemo.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CBitmapMenuDemoApp + +[CLS:CBitmapMenuDemoDoc] +Type=0 +HeaderFile=BitmapMenuDemoDoc.h +ImplementationFile=BitmapMenuDemoDoc.cpp +Filter=N +BaseClass=CDocument +VirtualFilter=DC +LastObject=CBitmapMenuDemoDoc + +[CLS:CBitmapMenuDemoView] +Type=0 +HeaderFile=BitmapMenuDemoView.h +ImplementationFile=BitmapMenuDemoView.cpp +Filter=C +LastObject=CBitmapMenuDemoView +BaseClass=CView +VirtualFilter=VWC + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CMDIFrameWnd +VirtualFilter=fWC +LastObject=CMainFrame + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_TEST_PAGE +Command7=ID_TEST_HELLO +Command8=ID_TEST_MARKEDPAGE +Command9=ID_TEST_DISABLED +Command10=ID_TEST_ENABLED +Command11=ID_APP_ABOUT +CommandCount=11 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_APP_ABOUT +CommandCount=7 + +[MNU:IDR_BITMAPTYPE] +Type=1 +Class=CBitmapMenuDemoView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_APP_EXIT +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_EDIT_COPY +Command10=ID_EDIT_PASTE +Command11=ID_VIEW_TOOLBAR +Command12=ID_VIEW_STATUS_BAR +Command13=ID_WINDOW_NEW +Command14=ID_WINDOW_CASCADE +Command15=ID_WINDOW_TILE_HORZ +Command16=ID_WINDOW_ARRANGE +Command17=ID_TEST_PAGE +Command18=ID_TEST_HELLO +Command19=ID_TEST_MARKEDPAGE +Command20=ID_TEST_DISABLED +Command21=ID_TEST_ENABLED +Command22=ID_APP_ABOUT +CommandCount=22 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.cpp new file mode 100644 index 0000000..ffe4d75 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.cpp @@ -0,0 +1,133 @@ +// BitmapMenuDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "BitmapMenuDemo.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "BitmapMenuDemoDoc.h" +#include "BitmapMenuDemoView.h" + +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoApp + +BEGIN_MESSAGE_MAP(CBitmapMenuDemoApp, CWinApp) + //{{AFX_MSG_MAP(CBitmapMenuDemoApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoApp construction + +CBitmapMenuDemoApp::CBitmapMenuDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CBitmapMenuDemoApp object + +CBitmapMenuDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoApp initialization + +BOOL CBitmapMenuDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + // Change the registry key under which our settings are stored. + // 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(); // 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_BITMAPTYPE, + RUNTIME_CLASS(CBitmapMenuDemoDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CBitmapMenuDemoView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CBitmapMenuDemoApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoApp commands + +int CBitmapMenuDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsp new file mode 100644 index 0000000..1b39a4c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsp @@ -0,0 +1,417 @@ +# Microsoft Developer Studio Project File - Name="BitmapMenuDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=BitmapMenuDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BitmapMenuDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BitmapMenuDemo.mak" CFG="BitmapMenuDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BitmapMenuDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "BitmapMenuDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "BitmapMenuDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "BitmapMenuDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "BitmapMenuDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BitmapMenuDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapMenuDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapMenuDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BitmapMenuDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "BitmapMenuDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BitmapMe" +# PROP BASE Intermediate_Dir "BitmapMe" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapMenuDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapMenuDemo.exe" + +!ELSEIF "$(CFG)" == "BitmapMenuDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BitmapM0" +# PROP BASE Intermediate_Dir "BitmapM0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"BitmapMenuDemo.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"BitmapMenuDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "BitmapMenuDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BitmapM1" +# PROP BASE Intermediate_Dir "BitmapM1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"BitmapMenuDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"BitmapMenuDemo.exe" + +!ENDIF + +# Begin Target + +# Name "BitmapMenuDemo - Win32 Release" +# Name "BitmapMenuDemo - Win32 Debug" +# Name "BitmapMenuDemo - Win32 Release_Shared" +# Name "BitmapMenuDemo - Win32 Unicode_Debug" +# Name "BitmapMenuDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BitmapMenuDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\BitmapMenuDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\BitmapMenuDemoDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\BitmapMenuDemoView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\BitmapMenuDemo.h +# End Source File +# Begin Source File + +SOURCE=.\BitmapMenuDemoDoc.h +# End Source File +# Begin Source File + +SOURCE=.\BitmapMenuDemoView.h +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapMenuOrganizer.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\BitmapMenuDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\BitmapMenuDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\BitmapMenuDemoDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\blankbox.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\FolderOp.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Hellobox.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Page.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\PageChk.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BitmapMenuDemo.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsw new file mode 100644 index 0000000..2336503 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BitmapMenuDemo"=".\BitmapMenuDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/BitmapMenuDemo", KUGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.h new file mode 100644 index 0000000..7dccd6f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.h @@ -0,0 +1,51 @@ +// BitmapMenuDemo.h : main header file for the BITMAPMENUDEMO application +// + +#if !defined(AFX_BITMAPMENUDEMO_H__1E4F0C06_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_BITMAPMENUDEMO_H__1E4F0C06_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoApp: +// See BitmapMenuDemo.cpp for the implementation of this class +// + +class CBitmapMenuDemoApp : public CWinApp +{ +public: + CBitmapMenuDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBitmapMenuDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CBitmapMenuDemoApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BITMAPMENUDEMO_H__1E4F0C06_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rc new file mode 100644 index 0000000..f1babd0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rc @@ -0,0 +1,392 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\BitmapMenuDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\BitmapMenuDemo.ico" +IDR_BITMAPTYPE ICON "res\\BitmapMenuDemoDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDB_EXPLORE BITMAP "res\\blankbox.bmp" +IDB_HELLO BITMAP "res\\Hellobox.bmp" +IDB_PAGE BITMAP "res\\Page.bmp" +IDB_MARKEDPAGE BITMAP "res\\PageChk.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_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Test" + BEGIN + MENUITEM "Page", ID_TEST_PAGE + MENUITEM "Hello", ID_TEST_HELLO + MENUITEM "Marked Page", ID_TEST_MARKEDPAGE + MENUITEM "Disabled", ID_TEST_DISABLED, GRAYED + MENUITEM "Enabled", ID_TEST_ENABLED + END + POPUP "&Help" + BEGIN + POPUP "lalalalalala" + BEGIN + MENUITEM "&About BitmapMenuDemo...", ID_APP_ABOUT + END + END +END + +IDR_BITMAPTYPE 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 "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 "&Test" + BEGIN + MENUITEM "Page", ID_TEST_PAGE + MENUITEM "Hello", ID_TEST_HELLO + MENUITEM "Marked Page", ID_TEST_MARKEDPAGE + MENUITEM "Disabled", ID_TEST_DISABLED, GRAYED + MENUITEM "Enabled", ID_TEST_ENABLED + END + POPUP "&Help" + BEGIN + MENUITEM "&About BitmapMenuDemo...", 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 + "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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "BitmapMenuDemo MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "BitmapMenuDemo" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "BitmapMenuDemo.EXE" + VALUE "ProductName", "BitmapMenuDemo Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "BitmapMenuDemo" + IDR_BITMAPTYPE "\nBitmap\nBitmap\n\n\nBitmapMenuDemo.Document\nBitmap Document" + ID_DESCRIPTION_FILE "BitmapMenuDemo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "BitmapMenuDemo" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\BitmapMenuDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "OXBitmapMenu.rc" +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rtf new file mode 100644 index 0000000..90af9e9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.vcproj new file mode 100644 index 0000000..ea33734 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemo.vcproj @@ -0,0 +1,2198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.cpp new file mode 100644 index 0000000..297f7f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.cpp @@ -0,0 +1,95 @@ +// BitmapMenuDemoDoc.cpp : implementation of the CBitmapMenuDemoDoc class +// + +#include "stdafx.h" +#include "BitmapMenuDemo.h" + +#include "BitmapMenuDemoDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoDoc + +IMPLEMENT_DYNCREATE(CBitmapMenuDemoDoc, CDocument) + +BEGIN_MESSAGE_MAP(CBitmapMenuDemoDoc, CDocument) + //{{AFX_MSG_MAP(CBitmapMenuDemoDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoDoc construction/destruction + +CBitmapMenuDemoDoc::CBitmapMenuDemoDoc() +{ + // TODO: add one-time construction code here + +} + +CBitmapMenuDemoDoc::~CBitmapMenuDemoDoc() +{ +} + +BOOL CBitmapMenuDemoDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoDoc serialization + +void CBitmapMenuDemoDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoDoc diagnostics + +#ifdef _DEBUG +void CBitmapMenuDemoDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CBitmapMenuDemoDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoDoc commands + +BOOL CBitmapMenuDemoDoc::OnSaveDocument(LPCTSTR lpszPathName) +{ + // TODO: Add your specialized code here and/or call the base class + UNREFERENCED_PARAMETER(lpszPathName); + + return TRUE; + + // we don't want to overwright existed file +// return CDocument::OnSaveDocument(lpszPathName); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.h new file mode 100644 index 0000000..069895a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoDoc.h @@ -0,0 +1,58 @@ +// BitmapMenuDemoDoc.h : interface of the CBitmapMenuDemoDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BITMAPMENUDEMODOC_H__1E4F0C0E_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_BITMAPMENUDEMODOC_H__1E4F0C0E_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +class CBitmapMenuDemoDoc : public CDocument +{ +protected: // create from serialization only + CBitmapMenuDemoDoc(); + DECLARE_DYNCREATE(CBitmapMenuDemoDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBitmapMenuDemoDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CBitmapMenuDemoDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CBitmapMenuDemoDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BITMAPMENUDEMODOC_H__1E4F0C0E_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.cpp new file mode 100644 index 0000000..7841160 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.cpp @@ -0,0 +1,82 @@ +// BitmapMenuDemoView.cpp : implementation of the CBitmapMenuDemoView class +// + +#include "stdafx.h" +#include "BitmapMenuDemo.h" + +#include "BitmapMenuDemoDoc.h" +#include "BitmapMenuDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoView + +IMPLEMENT_DYNCREATE(CBitmapMenuDemoView, CView) + +BEGIN_MESSAGE_MAP(CBitmapMenuDemoView, CView) + //{{AFX_MSG_MAP(CBitmapMenuDemoView) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoView construction/destruction + +CBitmapMenuDemoView::CBitmapMenuDemoView() +{ + // TODO: add construction code here + +} + +CBitmapMenuDemoView::~CBitmapMenuDemoView() +{ +} + +BOOL CBitmapMenuDemoView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoView drawing + +void CBitmapMenuDemoView::OnDraw(CDC* pDC) +{ + CBitmapMenuDemoDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + pDC->TextOut(20,20,CString(_T("Check out menu!"))); +} + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoView diagnostics + +#ifdef _DEBUG +void CBitmapMenuDemoView::AssertValid() const +{ + CView::AssertValid(); +} + +void CBitmapMenuDemoView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CBitmapMenuDemoDoc* CBitmapMenuDemoView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBitmapMenuDemoDoc))); + return (CBitmapMenuDemoDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CBitmapMenuDemoView message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.h new file mode 100644 index 0000000..3e99f0e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/BitmapMenuDemoView.h @@ -0,0 +1,61 @@ +// BitmapMenuDemoView.h : interface of the CBitmapMenuDemoView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BITMAPMENUDEMOVIEW_H__1E4F0C10_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_BITMAPMENUDEMOVIEW_H__1E4F0C10_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CBitmapMenuDemoView : public CView +{ +protected: // create from serialization only + CBitmapMenuDemoView(); + DECLARE_DYNCREATE(CBitmapMenuDemoView) + +// Attributes +public: + CBitmapMenuDemoDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBitmapMenuDemoView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CBitmapMenuDemoView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CBitmapMenuDemoView) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in BitmapMenuDemoView.cpp +inline CBitmapMenuDemoDoc* CBitmapMenuDemoView::GetDocument() + { return (CBitmapMenuDemoDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_BITMAPMENUDEMOVIEW_H__1E4F0C10_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.cpp new file mode 100644 index 0000000..31e52cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "BitmapMenuDemo.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.h new file mode 100644 index 0000000..e1fe338 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ChildFrm.h @@ -0,0 +1,52 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__1E4F0C0C_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_CHILDFRM_H__1E4F0C0C_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__1E4F0C0C_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.cpp new file mode 100644 index 0000000..3651232 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.cpp @@ -0,0 +1,170 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "BitmapMenuDemo.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_TEST_ENABLED, OnTestEnabled) + ON_COMMAND(ID_TEST_HELLO, OnTestHello) + ON_COMMAND(ID_TEST_MARKEDPAGE, OnTestMarkedpage) + ON_COMMAND(ID_TEST_PAGE, OnTestPage) + ON_UPDATE_COMMAND_UI(ID_TEST_PAGE, OnUpdateTestPage) + //}}AFX_MSG_MAP +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.Create(this) || + !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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // Set images from toolbar to use with corresponding menu items + Organizer.AutoSetMenuImage(); + // explicitly designate images to use with menu items + Organizer.SetMenuBitmap(ID_TEST_PAGE, MAKEINTRESOURCE(IDB_PAGE)); + Organizer.SetMenuBitmap(ID_TEST_HELLO, MAKEINTRESOURCE(IDB_HELLO)); + Organizer.SetMenuBitmap(ID_TEST_MARKEDPAGE, MAKEINTRESOURCE(IDB_MARKEDPAGE)); + Organizer.SetMenuBitmap(ID_TEST_DISABLED, MAKEINTRESOURCE(IDB_EXPLORE)); + Organizer.SetMenuBitmap(ID_TEST_ENABLED, MAKEINTRESOURCE(IDB_EXPLORE)); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +//// +// Dummy handlers +//// +void CMainFrame::OnTestEnabled() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnTestHello() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnTestMarkedpage() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnTestPage() +{ + // TODO: Add your command handler code here + +} + + +void CMainFrame::OnUpdateTestPage(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + UNREFERENCED_PARAMETER(pCmdUI); + + CMenu* pMenu = GetMenu(); + ASSERT (pMenu); + CTime time = CTime::GetCurrentTime(); + CString menuItem; + if(time.GetSecond()%2) + { + menuItem=time.Format( "%A, %B %d, %Y %H %M %S" ); + } + else + { + menuItem=_T(""); + } + pMenu->ModifyMenu(ID_TEST_PAGE, MF_BYCOMMAND | MF_STRING, + ID_TEST_PAGE, menuItem); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.h new file mode 100644 index 0000000..4f31b21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/MainFrm.h @@ -0,0 +1,64 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__1E4F0C0A_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_MAINFRM_H__1E4F0C0A_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXBitmapMenuOrganizer.h" + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + + COXBitmapMenuOrganizer Organizer; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnTestEnabled(); + afx_msg void OnTestHello(); + afx_msg void OnTestMarkedpage(); + afx_msg void OnTestPage(); + afx_msg void OnUpdateTestPage(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__1E4F0C0A_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ReadMe.txt new file mode 100644 index 0000000..25b375a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/ReadMe.txt @@ -0,0 +1,102 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : BitmapMenuDemo +======================================================================== + + +AppWizard has created this BitmapMenuDemo 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 BitmapMenuDemo application. + +BitmapMenuDemo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CBitmapMenuDemoApp application class. + +BitmapMenuDemo.cpp + This is the main application source file that contains the application + class CBitmapMenuDemoApp. + +BitmapMenuDemo.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 + Developer Studio. + +res\BitmapMenuDemo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file BitmapMenuDemo.rc. + +res\BitmapMenuDemo.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +BitmapMenuDemo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +BitmapMenuDemoDoc.h, BitmapMenuDemoDoc.cpp - the document + These files contain your CBitmapMenuDemoDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CBitmapMenuDemoDoc::Serialize). + +BitmapMenuDemoView.h, BitmapMenuDemoView.cpp - the view of the document + These files contain your CBitmapMenuDemoView class. + CBitmapMenuDemoView objects are used to view CBitmapMenuDemoDoc objects. + +res\BitmapMenuDemoDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CBitmapMenuDemoDoc class. This icon is included by the main + resource file BitmapMenuDemo.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named BitmapMenuDemo.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.cpp new file mode 100644 index 0000000..e033a5a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// BitmapMenuDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.h new file mode 100644 index 0000000..8c98c71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__1E4F0C08_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__1E4F0C08_88DA_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT +#include + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#include "OXAdvancedAssert.h" + +#endif // !defined(AFX_STDAFX_H__1E4F0C08_88DA_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.rc2 new file mode 100644 index 0000000..5465dd1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemo.rc2 @@ -0,0 +1,13 @@ +// +// BITMAPMENUDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemoDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemoDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/BitmapMenuDemoDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/FolderOp.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/FolderOp.bmp new file mode 100644 index 0000000..f246d17 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/FolderOp.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Hellobox.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Hellobox.bmp new file mode 100644 index 0000000..bc8182d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Hellobox.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Page.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Page.bmp new file mode 100644 index 0000000..4b1a08b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Page.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/PageChk.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/PageChk.bmp new file mode 100644 index 0000000..9fb7ede Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/PageChk.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Toolbar.bmp new file mode 100644 index 0000000..3e2d59f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/blankbox.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/blankbox.bmp new file mode 100644 index 0000000..5af4131 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/res/blankbox.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/resource.h new file mode 100644 index 0000000..39b973d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/BitmapMenuDemo/resource.h @@ -0,0 +1,29 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by BitmapMenuDemo.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_BITMAPTYPE 129 +#define IDB_EXPLORE 130 +#define ID_DESCRIPTION_FILE 130 +#define IDB_HELLO 132 +#define IDB_PAGE 133 +#define IDB_MARKEDPAGE 134 +#define ID_TEST_PAGE 32771 +#define ID_TEST_HELLO 32772 +#define ID_TEST_MARKEDPAGE 32773 +#define ID_TEST_DISABLED 32774 +#define ID_TEST_ENABLED 32775 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 137 +#define _APS_NEXT_COMMAND_VALUE 32777 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.CPP new file mode 100644 index 0000000..21618d2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.CPP @@ -0,0 +1,100 @@ +// calc.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "calc.h" +#include "calcdlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCalcApp + +BEGIN_MESSAGE_MAP(CCalcApp, CWinApp) + //{{AFX_MSG_MAP(CCalcApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCalcApp construction + +CCalcApp::CCalcApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCalcApp object + +CCalcApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CCalcApp initialization + +BOOL CCalcApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CCalculator dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CCalcApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.H new file mode 100644 index 0000000..a903520 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALC.H @@ -0,0 +1,38 @@ +// calc.h : main header file for the CALC application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCalcApp: +// See calc.cpp for the implementation of this class +// + +class CCalcApp : public CWinApp +{ +public: + CCalcApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCalcApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CCalcApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCDLG.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCDLG.H new file mode 100644 index 0000000..d3367fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCDLG.H @@ -0,0 +1,76 @@ +// calcdlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCalculator dialog + +#include "oxshape.h" + +enum Operator { OpNone, OpAdd, OpSubtract, OpMultiply, OpDivide }; +enum CalcError { ErrNone, ErrDivideByZero }; + +class CCalculator : public CDialog, public COXShape +{ +private: + BOOL m_bTrackMove; + CPoint m_ptMouse, m_ptLast; + long m_accum; + long m_operand; + BOOL m_bOperandAvail; + HACCEL m_hAccel; + Operator m_operator; + CalcError m_errorState; + +private: + HWND GetHWND() { return m_hWnd; } + void SetTotal(double dbTotal); + void SetOpTotal(); + void InvertTracker(CPoint point); + + // helper functions + void PerformOperation(); + void ClickedNumber(long lNum); + void UpdateDisplay(); + void SetOperand(long nNewValue); + +// Construction +public: + CCalculator(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCalculator) + enum { IDD = IDD_CALCULATOR }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCalculator) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CCalculator) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAdd(); + afx_msg void OnClear(); + afx_msg void OnDiv(); + afx_msg void OnEqual(); + afx_msg void OnMul(); + afx_msg void OnSub(); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnAbout(); + afx_msg void OnNumber(UINT nID); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.CPP new file mode 100644 index 0000000..45feb9f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.CPP @@ -0,0 +1,240 @@ +// CalcKey.cpp : implementation file +// + +#include "stdafx.h" +#include "calckey.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCalcKey + +IMPLEMENT_SHAPECLASS(CCalcKey) + +// Constructor +CCalcKey::CCalcKey() +{ + m_bHasFocus = FALSE; + m_bIsPressed = FALSE; + m_crText = GetSysColor(COLOR_WINDOWTEXT); + m_crBk = GetSysColor(COLOR_WINDOW); + m_crAnimText = m_crText; + m_crAnimBk = m_crBk; +} + +// Destructor +CCalcKey::~CCalcKey() +{ + // Destroy the associated window if necessary + if(::IsWindow(GetSafeHwnd())) + DestroyWindow(); +} + +// Sets the colors used for normal and pressed (animated) state +void CCalcKey::SetColors(COLORREF crText, COLORREF crBk, COLORREF crAnimText, + COLORREF crAnimBk) +{ + m_crText = (crText==-1?GetSysColor(COLOR_BTNTEXT):crText); + m_crBk = (crBk==-1?GetSysColor(COLOR_BTNFACE):crBk); + m_crAnimText = (crAnimText==-1?m_crText:m_crAnimText); + m_crAnimBk = (m_crAnimBk==-1?m_crBk:crAnimBk); +} + +BEGIN_MESSAGE_MAP(CCalcKey, CWnd) + //{{AFX_MSG_MAP(CCalcKey) + ON_WM_PAINT() + ON_MESSAGE(WM_SETTEXT,OnSetText) + ON_MESSAGE(WM_GETTEXT,OnGetText) + ON_WM_CREATE() + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_SETFOCUS() + ON_WM_KILLFOCUS() + ON_WM_KEYDOWN() + ON_WM_TIMER() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CCalcKey message handlers + +// Destroy CCalcKey class - MUST DO THIS for your custom controls +void CCalcKey::PostNcDestroy() +{ + CWnd::PostNcDestroy(); + + // Need to force the destructor the be called since MFC didn't + // create and attach this class -- otherwise we have memory leaks + delete this; +} + +// Handles WM_SETTEXT Windows message +LONG CCalcKey::OnSetText(WPARAM, LPARAM lParam) +{ + // Save the text + m_strTitle = (LPCTSTR) lParam; + Invalidate(); + + return(0L); +} + +// Handles WM_GETTEXT Windows message +LONG CCalcKey::OnGetText(WPARAM wParam, LPARAM lParam) +{ + int nChars = __min((int)wParam,m_strTitle.GetLength()); + LPTSTR lpszOut = (LPTSTR) lParam; + + // Copy out the text + UTBStr::tcsncpy(lpszOut, nChars + 1, (LPCTSTR) m_strTitle,nChars); + + // NULL terminate it + *(lpszOut+nChars) = _T('\0'); + + return(nChars); +} + +// Handles button painting (normal or pressed state) +void CCalcKey::OnPaint() +{ + CPaintDC dc(this); + + RECT rc; + CBrush brNormal(m_crBk); + CBrush brAnim(m_crAnimBk); + + // Fill the button with the specified color + // Notice that we can use FillRect(), the visible region takes care of + // only filling the selected shape + GetClientRect(&rc); + dc.FillRect(&rc,m_bIsPressed?&brAnim:&brNormal); + + // Draw the button's text + TCHAR szTemp[500]; + COLORREF crOldText = dc.SetTextColor(m_bIsPressed?m_crAnimText:m_crText); + int nOldMode = dc.SetBkMode(TRANSPARENT); + GetWindowText(szTemp,sizeof(szTemp)); + dc.DrawText(szTemp,-1,&rc,DT_CENTER|DT_VCENTER|DT_SINGLELINE); + + // Draw a focus rectangle if the button has focus + if(m_bHasFocus) + { + InflateRect(&rc,-6,-6); + dc.DrawFocusRect(&rc); + } + + // Restore everything + dc.SetTextColor(crOldText); + dc.SetBkMode(nOldMode); +} + +// Handle the button's creation +int CCalcKey::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // Set the button's initial text from its CREATESTRUCT + if(lpCreateStruct->lpszName) + OnSetText(0,(LPARAM)(LPCTSTR)lpCreateStruct->lpszName); + + return 0; +} + +// Handles WM_LBUTTONDOWN Windows message +void CCalcKey::OnLButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + + // Set focus to the selected button + SetFocus(); + + // Let the parent know that we were clicked +// FireClick(); + + // Grab the mouse + SetCapture(); + + // Set the pressed flag for painting + m_bIsPressed = TRUE; + + // Paint the button in a pressed state + Invalidate(); +} + +// Handles WM_LBUTTONUP Windows message +void CCalcKey::OnLButtonUp(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(point); + + // Let go of the mouse + ReleaseCapture(); + + // Let the parent know that we were clicked + FireClick(); + + // Clear the pressed flag and paint again + m_bIsPressed = FALSE; + Invalidate(); +} + +// Handles WM_SETFOCUS Windows message +void CCalcKey::OnSetFocus(CWnd* pOldWnd) +{ + CWnd::OnSetFocus(pOldWnd); + + // Set the focus flag + m_bHasFocus = TRUE; + + // Repaint to draw the focus rectangle + Invalidate(); +} + +// Handles WM_KILLFOCUS Windows message +void CCalcKey::OnKillFocus(CWnd* pNewWnd) +{ + CWnd::OnKillFocus(pNewWnd); + + // Reset the focus flag + m_bHasFocus = FALSE; + + // Repaint to remove the focus rectangle + Invalidate(); +} + +// Handles WM_KEYDOWN Windows message +void CCalcKey::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) +{ + UNREFERENCED_PARAMETER(nFlags); + UNREFERENCED_PARAMETER(nRepCnt); + + // Simulate a keyboard button press + switch(nChar) + { + // SPACE key works like mouse click on a button + case VK_SPACE: + // Click the button then delay for a short time + OnLButtonDown(0,0); + SetTimer(1000,50,NULL); + break; + } +} + +// Handles WM_TIMER Windows message +void CCalcKey::OnTimer(UINT nIDEvent) +{ + UNREFERENCED_PARAMETER(nIDEvent); + + // Release the button click now + KillTimer(1000); + OnLButtonUp(0,0); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.H new file mode 100644 index 0000000..ce38977 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CALCKEY.H @@ -0,0 +1,68 @@ +// CalcKey.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCalcKey window + +#include "oxshape.h" + +class CCalcKey : public CWnd, public COXShape +{ + DECLARE_SHAPECLASS(CCalcKey); + +private: + CString m_strTitle; + BOOL m_bHasFocus; + BOOL m_bIsPressed; + COLORREF m_crText; + COLORREF m_crBk; + COLORREF m_crAnimText; + COLORREF m_crAnimBk; + +private: + HWND GetHWND() { return m_hWnd; } + void FireClick() { GetParent()->SendMessage(WM_COMMAND, + MAKEWPARAM(GetDlgCtrlID(),BN_CLICKED), + (LPARAM) m_hWnd); } + +// Construction +public: + CCalcKey(); + +// Attributes +public: + void SetColors(COLORREF crText=-1, COLORREF crBk=-1, COLORREF crAnimText=-1, + COLORREF crAnimBk=-1); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCalcKey) + protected: + virtual void PostNcDestroy(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCalcKey(); + + // Generated message map functions +protected: + //{{AFX_MSG(CCalcKey) + afx_msg void OnPaint(); + afx_msg LONG OnSetText(WPARAM, LPARAM); + afx_msg LONG OnGetText(WPARAM wParam, LPARAM lParam); + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnSetFocus(CWnd* pOldWnd); + afx_msg void OnKillFocus(CWnd* pNewWnd); + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); + afx_msg void OnTimer(UINT nIDEvent); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CalInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CalInfo.rtf new file mode 100644 index 0000000..a43c78d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/CalInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsp new file mode 100644 index 0000000..e9e3654 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsp @@ -0,0 +1,269 @@ +# Microsoft Developer Studio Project File - Name="calc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=calc - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Calc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Calc.mak" CFG="calc - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "calc - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "calc - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "calc - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "calc - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "calc - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "calc - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Calc.exe" + +!ELSEIF "$(CFG)" == "calc - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Calc.exe" + +!ELSEIF "$(CFG)" == "calc - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "calc___W" +# PROP BASE Intermediate_Dir "calc___W" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Calc.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Calc.exe" + +!ELSEIF "$(CFG)" == "calc - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "calc___0" +# PROP BASE Intermediate_Dir "calc___0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Calc.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Calc.exe" + +!ELSEIF "$(CFG)" == "calc - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "calc___1" +# PROP BASE Intermediate_Dir "calc___1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Calc.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Calc.exe" + +!ENDIF + +# Begin Target + +# Name "calc - Win32 Release" +# Name "calc - Win32 Debug" +# Name "calc - Win32 Release_Shared" +# Name "calc - Win32 Unicode_Debug" +# Name "calc - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\SOURCE\OXShape.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\SOURCE\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\calc.cpp +# End Source File +# Begin Source File + +SOURCE=.\calc.rc +# End Source File +# Begin Source File + +SOURCE=.\calcdlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\calckey.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\CALC.H +# End Source File +# Begin Source File + +SOURCE=.\CALCDLG.H +# End Source File +# Begin Source File + +SOURCE=.\CALCKEY.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShape.h +# End Source File +# Begin Source File + +SOURCE=.\STDAFX.H +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\CALC.ICO +# End Source File +# Begin Source File + +SOURCE=.\res\calc.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\stars.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\title.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Calc.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsw new file mode 100644 index 0000000..623cbce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "calc"=".\Calc.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/Calc", QVGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.vcproj new file mode 100644 index 0000000..2d1fc29 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calc.vcproj @@ -0,0 +1,934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calcdlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calcdlg.cpp new file mode 100644 index 0000000..f72c3b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/Calcdlg.cpp @@ -0,0 +1,373 @@ +// calcdlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "calc.h" +#include "calcdlg.h" +#include "calckey.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCalculator dialog + +CCalculator::CCalculator(CWnd* pParent /*=NULL*/) + : CDialog(CCalculator::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCalculator) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + + // Note that LoadAccelerator does not require DestroyAcceleratorTable + m_hAccel = LoadAccelerators(AfxGetResourceHandle(),MAKEINTRESOURCE(IDD)); + + // Initialize the move variable + m_bTrackMove = FALSE; +} + +void CCalculator::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCalculator) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +///////////////////////////////////////////////////////////////////////////// +// CCalculator Internal Methods + +// Called to perform an operation - add, subtract, etc. +void CCalculator::PerformOperation() +{ + // Return if in an invalid state + if (m_errorState != ErrNone) + return; + + // If we can perform an operation... + if (m_bOperandAvail) + { + // Perform the selected operation + if (m_operator == OpNone) + m_accum = m_operand; + else if (m_operator == OpMultiply) + m_accum *= m_operand; + else if (m_operator == OpDivide) + { + if (m_operand == 0) + m_errorState = ErrDivideByZero; + else + m_accum /= m_operand; + } + else if (m_operator == OpAdd) + m_accum += m_operand; + else if (m_operator == OpSubtract) + m_accum -= m_operand; + } + + // Set the next state + m_bOperandAvail = FALSE; + UpdateDisplay(); +} + +// Called to update the total display +void CCalculator::UpdateDisplay() +{ + // Display "Error" is an error occurs, otherwise display the total + CString str; + if (m_errorState != ErrNone) + str = "Error"; + else + { + long lVal = (m_bOperandAvail) ? m_operand : m_accum; + str.Format(_T("%ld"), lVal); + } + + GetDlgItem(IDC_DISPLAY)->SetWindowText(str); +} + +// Draws a tracking rectangle by inverting an area the size of the dialog +void CCalculator::InvertTracker(CPoint point) +{ + CRect rectFrame; + GetWindowRect(&rectFrame); + CDC dc; + dc.Attach(::GetDC(NULL)); + + // Create the frame with a reverse video effect + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y, rectFrame.Width(), + 2, PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x+rectFrame.Width(), point.y-m_ptMouse.y, + 2, rectFrame.Height(), PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y+rectFrame.Height(), + rectFrame.Width()+2, 2, PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y+2, 2, + rectFrame.Height()-2, PATINVERT); + ::ReleaseDC(NULL,dc.Detach()); +} + + +BEGIN_MESSAGE_MAP(CCalculator, CDialog) + //{{AFX_MSG_MAP(CCalculator) + ON_COMMAND_RANGE(IDC_0,IDC_9,OnNumber) + ON_BN_CLICKED(IDC_ADD, OnAdd) + ON_BN_CLICKED(IDC_CLEAR, OnClear) + ON_BN_CLICKED(IDC_DIV, OnDiv) + ON_BN_CLICKED(IDC_EQUAL, OnEqual) + ON_BN_CLICKED(IDC_MUL, OnMul) + ON_BN_CLICKED(IDC_SUB, OnSub) + ON_BN_CLICKED(IDC_ABOUT, OnAbout) + + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_MOUSEMOVE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCalculator message handlers + +BOOL CCalculator::OnInitDialog() +{ + CDialog::OnInitDialog(); + + CString sCaption; + sCaption.LoadString(IDR_MAINFRAME); + SetWindowText(sCaption); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Set the rounded-corner calculator shape + CPoint point(30,30); + SetRoundRectShape(NULL,&point); + + // Make sure the starfield paints before everything else + GetDlgItem(IDC_STARFIELD)->SetWindowPos(&wndTop,0,0,0,0, + SWP_NOMOVE|SWP_NOSIZE); + + // Shape the number keys + CCalcKey* pKey; + int nID; + + for(nID = IDC_0; nID <= IDC_9; nID++) + { + pKey = (CCalcKey*) GetDlgItem(nID); + ASSERT(pKey != NULL); + + // Make them star shaped + pKey->SetStarShape(); + + // Set color to yellow when not pressed, red when pressed + pKey->SetColors(RGB(0,0,0),RGB(255,255,0),RGB(0,0,0),RGB(255,0,0)); + } + + // Shape the operation keys + for(nID = IDC_SUB; nID <= IDC_ADD; nID++) + { + pKey = (CCalcKey*) GetDlgItem(nID); + ASSERT(pKey != NULL); + + // Make them round-corned rectangles + CPoint point(20,20); + pKey->SetRoundRectShape(NULL,&point); + + // Set color to light gray when not pressed, white when pressed + pKey->SetColors(RGB(0,0,0),RGB(192,192,192), + RGB(0,0,0),RGB(255,255,255)); + } + + // Set the total display's appearance + pKey = (CCalcKey*) GetDlgItem(IDC_DISPLAY); + ASSERT(pKey != NULL); + + // Make it a white ellipse + pKey->SetEllipseShape(NULL); + pKey->SetColors(RGB(0,0,0),RGB(255,255,255)); + + // Set the close button's appearance + pKey = (CCalcKey*) GetDlgItem(IDCANCEL); + ASSERT(pKey != NULL); + + // Make it a light gray ellipse + pKey->SetEllipseShape(NULL); + pKey->SetColors(RGB(0,0,0),RGB(192,192,192)); + + // Set the close button's appearance + pKey = (CCalcKey*) GetDlgItem(IDC_ABOUT); + ASSERT(pKey != NULL); + + // Make it a light gray ellipse + pKey->SetEllipseShape(NULL); + // Set color to light gray when not pressed, white when pressed + pKey->SetColors(RGB(0,0,0),RGB(192,192,192), + RGB(0,0,0),RGB(255,255,255)); + // Center the dialog on the screen + CenterWindow(); + + // Initialize the calculator's work variables + OnClear(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +// Called when a number button is clicked +void CCalculator::ClickedNumber(long l) +{ + // Return if in an invalid state + if (m_errorState != ErrNone) + return; + + // If we can perform an operation... + if (!m_bOperandAvail) + m_operand = 0L; + + // Set the next state + SetOperand(m_operand*10+l); + UpdateDisplay(); +} +void CCalculator::OnAbout(){ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +// Called when the left mouse button is pressed +void CCalculator::OnLButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + + // Save the starting point where the mouse was clicked + m_ptMouse = point; + + // Save the point in screen coordinates too + ClientToScreen(&point); + m_ptLast = point; +} + +// Called when the left mouse button is released +void CCalculator::OnLButtonUp(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + + // If moving... + if (m_bTrackMove) + { + // Reset for next move + m_bTrackMove = FALSE; + ReleaseCapture(); + InvertTracker(m_ptLast); + + // Calculate how far we have moved and update + ClientToScreen(&point); + SetWindowPos(NULL, point.x-m_ptMouse.x, point.y-m_ptMouse.y,0,0, + SWP_NOZORDER|SWP_NOSIZE); + } +} + +// Called when the mouse moves +void CCalculator::OnMouseMove(UINT nFlags, CPoint point) +{ + // Are we not moving the window and the left mouse button is now down??? + if(!m_bTrackMove && (nFlags & MK_LBUTTON)) + { + // Begin the move operation + m_bTrackMove = TRUE; + SetCapture(); + InvertTracker(m_ptLast); + } + + // If we moving... + if (m_bTrackMove) + { + // Remove the old tracking rectangle + ClientToScreen(&point); + InvertTracker(m_ptLast); + + // Draw a new one + m_ptLast = point; + InvertTracker(m_ptLast); + } + else CWnd::OnMouseMove(nFlags,point); +} + +// Called when a number key is pressed +void CCalculator::OnNumber(UINT nID) +{ + ASSERT(nID >= IDC_0 && nID <= IDC_9); + ClickedNumber(nID-IDC_0); +} + +// Called when the clear key is pressed +void CCalculator::OnClear() +{ + // Reset the internal state, empty the totals + m_operator = OpNone; + m_operand = 0L; + m_accum = 0L; + m_bOperandAvail = FALSE; + m_errorState = ErrNone; + UpdateDisplay(); +} + +// Called when the divide key is pressed +void CCalculator::OnDiv() +{ + // Perform the division and save the operation + PerformOperation(); + m_operator = OpDivide; +} + +// Called when the equal key is pressed +void CCalculator::OnEqual() +{ + // Get the total and save the operation + PerformOperation(); + m_operator = OpNone; +} + +// Called when the subtract key is pressed +void CCalculator::OnSub() +{ + // Perform the subtraction and save the operation + PerformOperation(); + m_operator = OpSubtract; +} + +// Called when the add key is pressed +void CCalculator::OnAdd() +{ + // Perform the addition and save the operation + PerformOperation(); + m_operator = OpAdd; +} + +// Called when the multiply key is pressed +void CCalculator::OnMul() +{ + // Perform the multiplication and save the operation + PerformOperation(); + m_operator = OpMultiply; +} + +// Saves the last operand value +void CCalculator::SetOperand(long nNewValue) +{ + // Save the operand value and indicate that operation was performed + m_operand = nNewValue; + m_bOperandAvail = TRUE; +} + +// Translate the accelerators for the button keys +BOOL CCalculator::PreTranslateMessage(MSG* pMsg) +{ + if (m_hAccel != NULL && TranslateAccelerator(m_hWnd, m_hAccel, pMsg)) + return TRUE; + + return CDialog::PreTranslateMessage(pMsg); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.CPP new file mode 100644 index 0000000..0f0e27e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.CPP @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// calc.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.H new file mode 100644 index 0000000..d937fff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/STDAFX.H @@ -0,0 +1,13 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.clw new file mode 100644 index 0000000..54bb3f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.clw @@ -0,0 +1,91 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CCalcApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "calc.h" +LastPage=0 + +ClassCount=3 +Class1=CCalcApp +Class2=CCalculator +Class3=CCalcKey + +ResourceCount=1 +Resource1=IDD_CALCULATOR + +[CLS:CCalcApp] +Type=0 +BaseClass=CWinApp +HeaderFile=CALC.H +ImplementationFile=CALC.CPP +Filter=N +VirtualFilter=AC +LastObject=CCalcApp + +[CLS:CCalculator] +Type=0 +BaseClass=CDialog +HeaderFile=CALCDLG.H +ImplementationFile=Calcdlg.cpp + +[CLS:CCalcKey] +Type=0 +BaseClass=CWnd +HeaderFile=CALCKEY.H +ImplementationFile=CALCKEY.CPP + +[DLG:IDD_CALCULATOR] +Type=1 +Class=CCalculator +ControlCount=20 +Control1=IDC_0,CCalcKey,1342242816 +Control2=IDC_1,CCalcKey,1342242816 +Control3=IDC_2,CCalcKey,1342242816 +Control4=IDC_3,CCalcKey,1342242816 +Control5=IDC_4,CCalcKey,1342242816 +Control6=IDC_5,CCalcKey,1342242816 +Control7=IDC_6,CCalcKey,1342242816 +Control8=IDC_7,CCalcKey,1342242816 +Control9=IDC_8,CCalcKey,1342242816 +Control10=IDC_9,CCalcKey,1342242816 +Control11=IDC_ABOUT,CCalcKey,1342242816 +Control12=IDC_MUL,CCalcKey,1342242816 +Control13=IDC_DIV,CCalcKey,1342242816 +Control14=IDC_ADD,CCalcKey,1342242816 +Control15=IDC_SUB,CCalcKey,1342242816 +Control16=IDC_EQUAL,CCalcKey,1342242816 +Control17=IDCANCEL,CCalcKey,1342177280 +Control18=IDC_DISPLAY,CCalcKey,1476395008 +Control19=IDC_STARFIELD,static,1476397070 +Control20=IDC_CLEAR,CCalcKey,1342242816 + +[ACL:IDD_CALCULATOR] +Type=1 +Class=? +Command1=IDC_MUL +Command2=IDC_ADD +Command3=IDC_SUB +Command4=IDC_DIV +Command5=IDC_0 +Command6=IDC_1 +Command7=IDC_2 +Command8=IDC_3 +Command9=IDC_4 +Command10=IDC_5 +Command11=IDC_6 +Command12=IDC_7 +Command13=IDC_8 +Command14=IDC_9 +Command15=IDC_EQUAL +Command16=IDC_CLEAR +Command17=IDC_NOTHING +Command18=IDC_NOTHING +Command19=IDC_NOTHING +Command20=IDC_NOTHING +Command21=IDC_EQUAL +Command22=IDC_CLEAR +CommandCount=22 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.rc new file mode 100644 index 0000000..9c9c89c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/calc.rc @@ -0,0 +1,222 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\calc.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CALCULATOR DIALOG 34, 22, 208, 125 +STYLE DS_SETFONT | WS_POPUP | WS_BORDER +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "0",IDC_0,"CCalcKey",WS_TABSTOP,37,102,19,16 + CONTROL "1",IDC_1,"CCalcKey",WS_TABSTOP,37,82,19,16 + CONTROL "2",IDC_2,"CCalcKey",WS_TABSTOP,63,82,19,16 + CONTROL "3",IDC_3,"CCalcKey",WS_TABSTOP,89,82,19,16 + CONTROL "4",IDC_4,"CCalcKey",WS_TABSTOP,37,62,19,16 + CONTROL "5",IDC_5,"CCalcKey",WS_TABSTOP,63,62,19,16 + CONTROL "6",IDC_6,"CCalcKey",WS_TABSTOP,89,62,19,16 + CONTROL "7",IDC_7,"CCalcKey",WS_TABSTOP,37,42,19,16 + CONTROL "8",IDC_8,"CCalcKey",WS_TABSTOP,63,42,19,16 + CONTROL "9",IDC_9,"CCalcKey",WS_TABSTOP,89,42,19,16 + CONTROL "Info",IDC_ABOUT,"CCalcKey",WS_TABSTOP,155,105,43,16 + CONTROL "X",IDC_MUL,"CCalcKey",WS_TABSTOP,127,61,19,16 + CONTROL "/",IDC_DIV,"CCalcKey",WS_TABSTOP,151,61,19,16 + CONTROL "+",IDC_ADD,"CCalcKey",WS_TABSTOP,127,82,19,16 + CONTROL "-",IDC_SUB,"CCalcKey",WS_TABSTOP,151,82,19,16 + CONTROL "=",IDC_EQUAL,"CCalcKey",WS_TABSTOP,127,101,19,16 + CONTROL "X",IDCANCEL,"CCalcKey",0x0,189,2,11,13 + CONTROL "",IDC_DISPLAY,"CCalcKey",WS_DISABLED,20,20,168,13 + CONTROL 131,IDC_STARFIELD,"Static",SS_BITMAP | SS_REALSIZEIMAGE | WS_DISABLED,0,0,215,131 + CONTROL "Clear",IDC_CLEAR,"CCalcKey",WS_TABSTOP,125,40,43,16 +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 "040904b0" + BEGIN + VALUE "FileDescription", "Stellar Calculator" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "CALC" + VALUE "LegalCopyright", "Copyright © 1996" + VALUE "OriginalFilename", "CALC.EXE" + VALUE "ProductName", "Stellar Calculator" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_STARFIELD BITMAP "res\\stars.bmp" +IDB_TITLE BITMAP "res\\title.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDD_CALCULATOR ACCELERATORS +BEGIN + "*", IDC_MUL, ASCII, NOINVERT + "+", IDC_ADD, ASCII, NOINVERT + "-", IDC_SUB, ASCII, NOINVERT + "/", IDC_DIV, ASCII, NOINVERT + "0", IDC_0, ASCII, NOINVERT + "1", IDC_1, ASCII, NOINVERT + "2", IDC_2, ASCII, NOINVERT + "3", IDC_3, ASCII, NOINVERT + "4", IDC_4, ASCII, NOINVERT + "5", IDC_5, ASCII, NOINVERT + "6", IDC_6, ASCII, NOINVERT + "7", IDC_7, ASCII, NOINVERT + "8", IDC_8, ASCII, NOINVERT + "9", IDC_9, ASCII, NOINVERT + "=", IDC_EQUAL, ASCII, NOINVERT + "C", IDC_CLEAR, ASCII, NOINVERT + VK_LEFT, IDC_NOTHING, VIRTKEY, NOINVERT + VK_RIGHT, IDC_NOTHING, VIRTKEY, NOINVERT + VK_UP, IDC_NOTHING, VIRTKEY, NOINVERT + VK_DOWN, IDC_NOTHING, VIRTKEY, NOINVERT + VK_RETURN, IDC_EQUAL, VIRTKEY, NOINVERT + "c", IDC_CLEAR, ASCII, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "res\\CALC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + ID_DESCRIPTION_FILE "calInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Calculator" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\calc.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.ICO new file mode 100644 index 0000000..6cc4514 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.RC2 new file mode 100644 index 0000000..575988e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/CALC.RC2 @@ -0,0 +1,13 @@ +// +// CALC.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/STARS.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/STARS.BMP new file mode 100644 index 0000000..779fb18 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/STARS.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/title.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/title.bmp new file mode 100644 index 0000000..9e1b93e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/res/title.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/resource.h new file mode 100644 index 0000000..489e7fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Calc/resource.h @@ -0,0 +1,46 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by calc.rc +// +#define ID_DESCRIPTION_FILE 1 +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_CALCULATOR 101 +#define IDD_CALC_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDI_ICON1 130 +#define IDB_STARFIELD 131 +#define IDB_TITLE 132 +#define IDC_0 1000 +#define IDC_1 1001 +#define IDC_2 1002 +#define IDC_3 1003 +#define IDC_4 1004 +#define IDC_5 1005 +#define IDC_6 1006 +#define IDC_7 1007 +#define IDC_8 1008 +#define IDC_9 1009 +#define IDC_SUB 1010 +#define IDC_EQUAL 1011 +#define IDC_CLEAR 1012 +#define IDC_MUL 1013 +#define IDC_DIV 1014 +#define IDC_ADD 1015 +#define IDC_ABOUT 1017 +#define IDC_STARFIELD 1018 +#define IDC_TITLE 1019 +#define IDC_DISPLAY 1200 +#define IDC_NOTHING 32789 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1018 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.cpp new file mode 100644 index 0000000..452960d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.cpp @@ -0,0 +1,80 @@ +// CalculatorCtrl.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CalculatorCtrl.h" +#include "CalculatorCtrlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCalculatorCtrlApp + +BEGIN_MESSAGE_MAP(CCalculatorCtrlApp, CWinApp) + //{{AFX_MSG_MAP(CCalculatorCtrlApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCalculatorCtrlApp construction + +CCalculatorCtrlApp::CCalculatorCtrlApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCalculatorCtrlApp object + +CCalculatorCtrlApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CCalculatorCtrlApp initialization + +BOOL CCalculatorCtrlApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CCalculatorCtrlDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsp new file mode 100644 index 0000000..23395b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsp @@ -0,0 +1,176 @@ +# Microsoft Developer Studio Project File - Name="CalculatorCtrl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CalculatorCtrl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalculatorCtrl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalculatorCtrl.mak" CFG="CalculatorCtrl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalculatorCtrl - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CalculatorCtrl - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CalculatorCtrl - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\include" /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "CalculatorCtrl - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CalculatorCtrl - Win32 Release" +# Name "CalculatorCtrl - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Ultimate ToolBox" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalculatorCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CalculatorCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\CalculatorCtrl.rc +# End Source File +# Begin Source File + +SOURCE=.\CalculatorCtrlDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CalculatorCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorCtrlDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\CalculatorCtrl.ico +# End Source File +# Begin Source File + +SOURCE=.\res\CalculatorCtrl.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CalculatorCtrl.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsw new file mode 100644 index 0000000..a688b19 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CalculatorCtrl"=".\CalculatorCtrl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/CalculatorCtrl", NWGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.h new file mode 100644 index 0000000..9ef19fe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.h @@ -0,0 +1,49 @@ +// CalculatorCtrl.h : main header file for the CALCULATORCTRL application +// + +#if !defined(AFX_CALCULATORCTRL_H__F848674A_083E_41FB_B63D_7EB048943179__INCLUDED_) +#define AFX_CALCULATORCTRL_H__F848674A_083E_41FB_B63D_7EB048943179__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCalculatorCtrlApp: +// See CalculatorCtrl.cpp for the implementation of this class +// + +class CCalculatorCtrlApp : public CWinApp +{ +public: + CCalculatorCtrlApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCalculatorCtrlApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CCalculatorCtrlApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CALCULATORCTRL_H__F848674A_083E_41FB_B63D_7EB048943179__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.rc new file mode 100644 index 0000000..c759dcf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.rc @@ -0,0 +1,197 @@ +// 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\\CalculatorCtrl.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\r\n" + "#include ""OXCalculatorCtrl.rc""\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\\CalculatorCtrl.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About CalculatorCtrl" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "CalculatorCtrl Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2002",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP +END + +IDD_CALCULATORCTRL_DIALOG DIALOGEX 0, 0, 130, 49 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "CalculatorCtrl" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_VALUE,42,18,54,12,ES_RIGHT | ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BUTTON_CALCULATOR,96,18,12,12 + LTEXT "Factor:",IDC_STATIC,18,19,24,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", "The Code Project" + VALUE "FileDescription", "Calculator Control Sample" + VALUE "FileVersion", "1.0.0.1" + VALUE "InternalName", "CalculatorCtrl.exe" + VALUE "OriginalFilename", "CalculatorCtrl.exe" + 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_CALCULATORCTRL_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 123 + TOPMARGIN, 7 + BOTTOMMARGIN, 42 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About CalculatorCtrl..." +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\CalculatorCtrl.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +#include "OXCalculatorCtrl.rc" +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.vcproj new file mode 100644 index 0000000..86f83e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrl.vcproj @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.cpp new file mode 100644 index 0000000..8c3afc8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.cpp @@ -0,0 +1,167 @@ +// CalculatorCtrlDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "CalculatorCtrl.h" +#include "CalculatorCtrlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// 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() + + +// CCalculatorCtrlDlg dialog + + + +CCalculatorCtrlDlg::CCalculatorCtrlDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCalculatorCtrlDlg::IDD, pParent) + , m_fValue(0) +{ + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CCalculatorCtrlDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + DDX_Text(pDX, IDC_EDIT_VALUE, m_fValue); +} + +BEGIN_MESSAGE_MAP(CCalculatorCtrlDlg, CDialog) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP + ON_BN_CLICKED(IDC_BUTTON_CALCULATOR, OnBnClickedCalculator) +END_MESSAGE_MAP() + + +// CCalculatorCtrlDlg message handlers + +BOOL CCalculatorCtrlDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_calc.Create(this); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CCalculatorCtrlDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CCalculatorCtrlDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this function to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CCalculatorCtrlDlg::OnQueryDragIcon() +{ + return static_cast(m_hIcon); +} + +void CCalculatorCtrlDlg::OnBnClickedCalculator() +{ + UpdateData(); + + CRect rc; + GetDlgItem(IDC_BUTTON_CALCULATOR)->GetWindowRect(&rc); + + if (m_calc.Pick(m_fValue, ID_OXCALCULATOR_ALIGNBOTTOM, rc)) + { + // OK was pressed + m_fValue = m_calc.GetCalculatorCtrl()->GetResult(); + UpdateData(FALSE); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.h new file mode 100644 index 0000000..97f6e78 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/CalculatorCtrlDlg.h @@ -0,0 +1,36 @@ +// CalculatorCtrlDlg.h : header file +// + +#pragma once + +#include "OXCalculatorCtrl.h" + +// CCalculatorCtrlDlg dialog +class CCalculatorCtrlDlg : public CDialog +{ +// Construction +public: + CCalculatorCtrlDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + enum { IDD = IDD_CALCULATORCTRL_DIALOG }; + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + + +// Implementation +protected: + HICON m_hIcon; + COXCalculatorPopup m_calc; + + // 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() +public: + afx_msg void OnBnClickedCalculator(); + double m_fValue; +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/ReadMe.txt new file mode 100644 index 0000000..eda026d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : CalculatorCtrl +======================================================================== + + +AppWizard has created this CalculatorCtrl 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 CalculatorCtrl application. + +CalculatorCtrl.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +CalculatorCtrl.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CCalculatorCtrlApp application class. + +CalculatorCtrl.cpp + This is the main application source file that contains the application + class CCalculatorCtrlApp. + +CalculatorCtrl.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++. + +CalculatorCtrl.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\CalculatorCtrl.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file CalculatorCtrl.rc. + +res\CalculatorCtrl.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +CalculatorCtrlDlg.h, CalculatorCtrlDlg.cpp - the dialog + These files contain your CCalculatorCtrlDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in CalculatorCtrl.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named CalculatorCtrl.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.cpp new file mode 100644 index 0000000..f4af6cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// CalculatorCtrl.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.h new file mode 100644 index 0000000..32bceee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__4A26EA36_A3F2_4C63_9C4B_D2694829841C__INCLUDED_) +#define AFX_STDAFX_H__4A26EA36_A3F2_4C63_9C4B_D2694829841C__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + + + +#endif // !defined(AFX_STDAFX_H__4A26EA36_A3F2_4C63_9C4B_D2694829841C__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.rc2 new file mode 100644 index 0000000..c6c8224 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/res/CalculatorCtrl.rc2 @@ -0,0 +1,13 @@ +// +// CALCULATORCTRL.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/resource.h new file mode 100644 index 0000000..30dcddb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CalculatorCtrl/resource.h @@ -0,0 +1,25 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CalculatorCtrl.rc +// +#define IDR_MANIFEST 1 +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_CALCULATORCTRL_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_BUTTON1 1000 +#define IDC_BUTTON_CALCULATOR 1000 +#define IDC_EDIT1 1002 +#define IDC_EDIT_VALUE 1002 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1003 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainter.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainter.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainter.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainterInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainterInfo.rtf new file mode 100644 index 0000000..6a86f49 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CaptionPainterInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.cpp new file mode 100644 index 0000000..83a3485 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.cpp @@ -0,0 +1,222 @@ +// CustomizeCaptionDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeCaptionDlg.h" + +#include "OXColorPickerCtrl.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeCaptionDlg dialog + + +CCustomizeCaptionDlg::CCustomizeCaptionDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeCaptionDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeCaptionDlg) + m_bGradient = FALSE; + m_nGradientAlgorithm = -1; + m_nGradientAlignment = -1; + m_nCaptionState = -1; + m_nEllipsis = -1; + m_nHorizontalAlignment = -1; + m_nVerticalAlignment = -1; + m_sFont = _T(""); + m_nNumberShade = 0; +// m_clrBackground = 0; + //}}AFX_DATA_INIT +} + + +void CCustomizeCaptionDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeCaptionDlg) + DDX_Control(pDX, IDC_EDIT_NUMBER_SHADE, m_ctlEditNumberShade); + DDX_Control(pDX, IDC_COMBO_CAPTION, m_ctlComboCaptionState); + DDX_Control(pDX, IDC_COMBO_GRADIENT_ALGORITHM, m_ctlComboGradientAlgorithm); + DDX_Control(pDX, IDC_COMBO_GRADIENT_ALIGNMENT, m_ctlComboGradientAlignment); + DDX_Control(pDX, IDC_BUTTON_TEXT_FONT, m_ctlButtonFont); + DDX_Control(pDX, IDC_BUTTON_BACKGROUND_COLOR, m_ctlButtonBackground); + DDX_Check(pDX, IDC_CHECK_GRADIENT, m_bGradient); + DDX_CBIndex(pDX, IDC_COMBO_GRADIENT_ALGORITHM, m_nGradientAlgorithm); + DDX_CBIndex(pDX, IDC_COMBO_GRADIENT_ALIGNMENT, m_nGradientAlignment); + DDX_CBIndex(pDX, IDC_COMBO_CAPTION, m_nCaptionState); + DDX_Radio(pDX, IDC_RADIO_ELLIPSIS_NONE, m_nEllipsis); + DDX_Radio(pDX, IDC_RADIO_HORZ_LEFT, m_nHorizontalAlignment); + DDX_Radio(pDX, IDC_RADIO_VERT_TOP, m_nVerticalAlignment); + DDX_Text(pDX, IDC_EDIT_FONT, m_sFont); + DDX_Text(pDX, IDC_EDIT_NUMBER_SHADE, m_nNumberShade); +// DDX_Text(pDX, IDC_EDIT_BACKGROUND_COLOR, m_clrBackground); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_BACKGROUND_COLOR, m_clrBackground); +} + + +BEGIN_MESSAGE_MAP(CCustomizeCaptionDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeCaptionDlg) + ON_BN_CLICKED(IDC_CHECK_GRADIENT, OnCheckGradient) + ON_BN_CLICKED(IDC_BUTTON_TEXT_FONT, OnButtonTextFont) + ON_CBN_SELCHANGE(IDC_COMBO_CAPTION, OnSelchangeComboCaption) + ON_BN_CLICKED(IDC_BUTTON_BACKGROUND_COLOR, OnButtonBackgroundColor) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeCaptionDlg message handlers + +BOOL CCustomizeCaptionDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + m_Caption.Attach(this); + + CMainFrame* pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + ASSERT_VALID(pFrame); + COXCaptionPainter parentCaption; + if(::SendMessage(pFrame->m_hWnd,COXCaptionPainter::m_nGetCaptionPainter,0, + (LPARAM)&parentCaption)) + { + SendMessage(COXCaptionPainter::m_nSetCaptionPainter,0,(LPARAM)&parentCaption); + } + + SendMessage(WM_NCPAINT); + + m_ctlComboCaptionState.AddString(_T("Active")); + m_ctlComboCaptionState.AddString(_T("Inactive")); + + m_ctlComboGradientAlignment.AddString(_T("Left")); + m_ctlComboGradientAlignment.AddString(_T("Center")); + m_ctlComboGradientAlignment.AddString(_T("Right")); + + m_ctlComboGradientAlgorithm.AddString(_T("Linear")); + m_ctlComboGradientAlgorithm.AddString(_T("Square")); + + m_nCaptionState=0; + m_nOldCaptionState=0; + + GetDlgItem(IDC_EDIT_BACKGROUND_COLOR)->ShowWindow(SW_HIDE); +// m_ctlButtonBackground.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); +// m_ctlButtonBackground.SetText(_T("")); +// m_ctlButtonBackground.SetDefaultColor(RGB(0,0,128)); +// m_ctlButtonBackground.SetColorBandHeight(8); + m_ctlButtonBackground.SizeToContent(); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeCaptionDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeCaptionDlg::OnCheckGradient() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CCustomizeCaptionDlg::OnButtonTextFont() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use font common dialog + CFontDialog fontDlg(&arrCustomize[m_nCaptionState].m_lf); + fontDlg.m_cf.rgbColors=arrCustomize[m_nCaptionState].m_clrText; + if(fontDlg.DoModal()==IDOK) + { + arrCustomize[m_nCaptionState].m_clrText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&arrCustomize[m_nCaptionState].m_lf); + m_sFont=arrCustomize[m_nCaptionState].m_lf.lfFaceName; + UpdateData(FALSE); + } +} + +void CCustomizeCaptionDlg::OnSelchangeComboCaption() +{ + // TODO: Add your control notification handler code here + + SetVars(); + GetVars(); +} + +void CCustomizeCaptionDlg::GetVars() +{ + m_bGradient=arrCustomize[m_nCaptionState].m_bGradient; + m_nGradientAlgorithm=arrCustomize[m_nCaptionState].m_nGradientAlgorithm; + m_nGradientAlignment=arrCustomize[m_nCaptionState].m_nGradientAlignment; + m_nEllipsis=arrCustomize[m_nCaptionState].m_nEllipsis; + m_nHorizontalAlignment=arrCustomize[m_nCaptionState].m_nHorizontalAlignment; + m_nVerticalAlignment=arrCustomize[m_nCaptionState].m_nVerticalAlignment; + m_clrBackground=arrCustomize[m_nCaptionState].m_clrBackground; + m_nNumberShade=arrCustomize[m_nCaptionState].m_nNumberShade; + + m_sFont=arrCustomize[m_nCaptionState].m_lf.lfFaceName; + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeCaptionDlg::SetVars() +{ + UpdateData(); + + arrCustomize[m_nOldCaptionState].m_bGradient=m_bGradient; + arrCustomize[m_nOldCaptionState].m_nGradientAlgorithm=m_nGradientAlgorithm; + arrCustomize[m_nOldCaptionState].m_nGradientAlignment=m_nGradientAlignment; + arrCustomize[m_nOldCaptionState].m_nEllipsis=m_nEllipsis; + arrCustomize[m_nOldCaptionState].m_nHorizontalAlignment=m_nHorizontalAlignment; + arrCustomize[m_nOldCaptionState].m_nVerticalAlignment=m_nVerticalAlignment; + arrCustomize[m_nOldCaptionState].m_clrBackground=m_clrBackground; + arrCustomize[m_nOldCaptionState].m_nNumberShade=m_nNumberShade; + + m_nOldCaptionState=m_nCaptionState; + + ShowControls(); +} + +void CCustomizeCaptionDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlComboGradientAlignment.EnableWindow(m_bGradient); + m_ctlComboGradientAlgorithm.EnableWindow(m_bGradient); + m_ctlEditNumberShade.EnableWindow(m_bGradient); + + m_ctlButtonBackground.SetDefaultColor(m_nCaptionState==0 ? + RGB(0,0,128) : RGB(128, 128, 128)); + + UpdateData(FALSE); +} + + +void CCustomizeCaptionDlg::OnButtonBackgroundColor() +{ + // TODO: Add your control notification handler code here + +/* CColorDialog clrDlg(m_clrBackground); + if(clrDlg.DoModal()==IDOK) + { + m_clrBackground=clrDlg.GetColor(); + UpdateData(FALSE); + }*/ +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.h new file mode 100644 index 0000000..6b757b0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeCaptionDlg.h @@ -0,0 +1,78 @@ +#if !defined(_CUSTOMIZECAPTIONDLG_H_) +#define _CUSTOMIZECAPTIONDLG_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeCaptionDlg.h : header file +// + +#include "OXColorPickerButton.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeCaptionDlg dialog + +class CCustomizeCaptionDlg : public CDialog +{ +// Construction +public: + CCustomizeCaptionDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeCaptionDlg) + enum { IDD = IDD_CUSTOMIZE_CAPTION_PAINTER }; + CEdit m_ctlEditNumberShade; + CComboBox m_ctlComboCaptionState; + CComboBox m_ctlComboGradientAlgorithm; + CComboBox m_ctlComboGradientAlignment; + CButton m_ctlButtonFont; + COXColorPickerButton m_ctlButtonBackground; + BOOL m_bGradient; + int m_nGradientAlgorithm; + int m_nGradientAlignment; + int m_nCaptionState; + int m_nEllipsis; + int m_nHorizontalAlignment; + int m_nVerticalAlignment; + CString m_sFont; + int m_nNumberShade; +// DWORD m_clrBackground; + //}}AFX_DATA + struct CustomizeCaption arrCustomize[2]; + int m_nOldCaptionState; + COLORREF m_clrBackground; + +protected: + // caption painter + COXCaptionPainter m_Caption; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeCaptionDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeCaptionDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnCheckGradient(); + afx_msg void OnButtonTextFont(); + afx_msg void OnSelchangeComboCaption(); + afx_msg void OnButtonBackgroundColor(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_CUSTOMIZECAPTIONDLG_H_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.cpp new file mode 100644 index 0000000..a10f842 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.cpp @@ -0,0 +1,178 @@ +// CustomizeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + + +CCustomizeDlg::CCustomizeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeDlg) + m_bCustomizable = FALSE; + m_bFlat = FALSE; + m_bGripper = FALSE; + m_bList = FALSE; + m_bSeparator = FALSE; + m_bText = FALSE; + m_nRows = 0; + m_nWidth = 0; + m_nToolbar = -1; + m_nTextType = -1; + m_nIndent = 0; + //}}AFX_DATA_INIT +} + + +void CCustomizeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeDlg) + DDX_Control(pDX, IDOK, m_ok); + DDX_Control(pDX, IDC_RADIO_PLAIN, m_ctlRadioTextType); + DDX_Control(pDX, IDC_EDIT_WIDTH, m_ctlEditWidth); + DDX_Control(pDX, IDC_EDIT_ROWS, m_ctlEditRows); + DDX_Control(pDX, IDC_COMBO_TOOLBAR, m_ctlComboToolbar); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZABLE, m_bCustomizable); + DDX_Check(pDX, IDC_CHECK_FLAT, m_bFlat); + DDX_Check(pDX, IDC_CHECK_GRIPPER, m_bGripper); + DDX_Check(pDX, IDC_CHECK_LIST, m_bList); + DDX_Check(pDX, IDC_CHECK_SEPARATOR, m_bSeparator); + DDX_Check(pDX, IDC_CHECK_TEXT, m_bText); + DDX_Text(pDX, IDC_EDIT_ROWS, m_nRows); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + DDX_CBIndex(pDX, IDC_COMBO_TOOLBAR, m_nToolbar); + DDX_Radio(pDX, IDC_RADIO_PLAIN, m_nTextType); + DDX_Text(pDX, IDC_EDIT_INDENT, m_nIndent); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeDlg) + ON_CBN_SELCHANGE(IDC_COMBO_TOOLBAR, OnSelchangeComboToolbar) + ON_BN_CLICKED(IDC_CHECK_TEXT, OnCheckText) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg message handlers + +BOOL CCustomizeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + m_Caption.Attach(this); + + CMainFrame* pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + ASSERT_VALID(pFrame); + COXCaptionPainter parentCaption; + if(::SendMessage(pFrame->m_hWnd,COXCaptionPainter::m_nGetCaptionPainter,0, + (LPARAM)&parentCaption)) + { + SendMessage(COXCaptionPainter::m_nSetCaptionPainter,0,(LPARAM)&parentCaption); + } + + SendMessage(WM_NCPAINT); + + m_ctlComboToolbar.AddString(_T("File")); + m_ctlComboToolbar.AddString(_T("Edit")); + m_ctlComboToolbar.AddString(_T("Window")); + + m_nToolbar=0; + m_nOldToolbar=0; + + m_ok.SetButtonStyle(m_ok.GetButtonStyle()|BS_BOTTOM); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeDlg::GetVars() +{ + m_bCustomizable=arrCustomize[m_nToolbar].bCustomizable; + m_bFlat=arrCustomize[m_nToolbar].bFlat; + m_bGripper=arrCustomize[m_nToolbar].bGripper; + m_bList=arrCustomize[m_nToolbar].bList; + m_bSeparator=arrCustomize[m_nToolbar].bSeparator; + m_bText=arrCustomize[m_nToolbar].bText; + m_nTextType=arrCustomize[m_nToolbar].nTextType; + m_nRows=arrCustomize[m_nToolbar].nRows; + m_nWidth=arrCustomize[m_nToolbar].nWidth; + m_nIndent=arrCustomize[m_nOldToolbar].nIndent; + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeDlg::SetVars() +{ + UpdateData(); + + arrCustomize[m_nOldToolbar].bCustomizable=m_bCustomizable; + arrCustomize[m_nOldToolbar].bFlat=m_bFlat; + arrCustomize[m_nOldToolbar].bGripper=m_bGripper; + arrCustomize[m_nOldToolbar].bList=m_bList; + arrCustomize[m_nOldToolbar].bSeparator=m_bSeparator; + arrCustomize[m_nOldToolbar].bText=m_bText; + arrCustomize[m_nOldToolbar].nTextType=m_nTextType; + arrCustomize[m_nOldToolbar].nRows=m_nRows; + arrCustomize[m_nOldToolbar].nWidth=m_nWidth; + arrCustomize[m_nOldToolbar].nIndent=m_nIndent; + + m_nOldToolbar=m_nToolbar; + + ShowControls(); +} + +void CCustomizeDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeDlg::OnSelchangeComboToolbar() +{ + // TODO: Add your control notification handler code here + + SetVars(); + GetVars(); +} + +void CCustomizeDlg::OnCheckText() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CCustomizeDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditRows.EnableWindow(m_bText); + m_ctlEditWidth.EnableWindow(m_bText); + m_ctlRadioTextType.EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_TOOLTIP)->EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_MENU)->EnableWindow(m_bText); + + UpdateData(FALSE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.h new file mode 100644 index 0000000..c304dfd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/CustomizeDlg.h @@ -0,0 +1,73 @@ +#if !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + +class CCustomizeDlg : public CDialog +{ +// Construction +public: + CCustomizeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeDlg) + enum { IDD = IDD_CUSTOMIZE }; + CButton m_ok; + CButton m_ctlRadioTextType; + CEdit m_ctlEditWidth; + CEdit m_ctlEditRows; + CComboBox m_ctlComboToolbar; + BOOL m_bCustomizable; + BOOL m_bFlat; + BOOL m_bGripper; + BOOL m_bList; + BOOL m_bSeparator; + BOOL m_bText; + UINT m_nRows; + UINT m_nWidth; + int m_nToolbar; + int m_nTextType; + UINT m_nIndent; + //}}AFX_DATA + struct CustomizeToolbar arrCustomize[3]; + int m_nOldToolbar; + +protected: + // caption painter + COXCaptionPainter m_Caption; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnSelchangeComboToolbar(); + afx_msg void OnCheckText(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/MultiPad.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/MultiPad.rc new file mode 100644 index 0000000..c45140a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/MultiPad.rc @@ -0,0 +1,642 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "RES\\MULTIPAD.ICO" +IDR_TEXTTYPE ICON "RES\\PADDOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "RES\\TOOLBAR.BMP" +IDR_TOOLBAR_FILE BITMAP "res\\toolbar_.bmp" +IDR_TOOLBAR_EDIT BITMAP "res\\bmp00001.bmp" +IDR_TOOLBAR_WINDOW BITMAP "res\\toolbar1.bmp" +IDR_TOOLBAR_EDIT_HOT BITMAP "res\\bmp00003.bmp" +IDR_TOOLBAR_FILE_HOT BITMAP "res\\bmp00004.bmp" +IDR_TOOLBAR_WINDOW_HOT BITMAP "res\\bmp00006.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +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 "E&xit\tAlt+F4", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Customize &Toolbars...", ID_VIEW_CUSTOMIZE + MENUITEM "Customize &Caption...", ID_VIEW_CUSTOMIZE_CAPTION + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_TEXTTYPE 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 "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+F4", 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 + MENUITEM "Delete\tDel", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "Find &Next\tF3", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Customize &Toolbars...", ID_VIEW_CUSTOMIZE + MENUITEM "Customize &Caption...", ID_VIEW_CUSTOMIZE_CAPTION + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) MENU +#else +IDR_MAINFRAME MENU +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Customize &Toolbars...", ID_VIEW_CUSTOMIZE + MENUITEM "Customize &Caption...", ID_VIEW_CUSTOMIZE_CAPTION + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_TEXTTYPE$(_MAC) MENU +#else +IDR_TEXTTYPE MENU +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Save\t\021S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\t\021X", ID_EDIT_CUT + MENUITEM "&Copy\t\021C", ID_EDIT_COPY + MENUITEM "&Paste\t\021V", ID_EDIT_PASTE + MENUITEM "De&lete\t\021D", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "&Repeat Find\t\021R", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Customize &Toolbars...", ID_VIEW_CUSTOMIZE + MENUITEM "Customize &Caption...", ID_VIEW_CUSTOMIZE_CAPTION + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + END +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME ACCELERATORS +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) ACCELERATORS +#else +IDR_MAINFRAME ACCELERATORS +#endif +BEGIN + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + "D", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "R", ID_EDIT_REPEAT, VIRTKEY, ALT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT +END +#endif + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#include ""afxres.rc""\r\n" + "#include ""afxprint.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""CoolToolBar.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_FILE TOOLBAR 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_EDIT TOOLBAR 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_WINDOW TOOLBAR 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + +IDR_TOOLBAR_EDIT_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_FILE_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_WINDOW_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +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_PRINT_SETUP "Change the printer and printing options\nPrint Setup" + ID_FILE_PRINT "Print the active document\nPrint" +END + +STRINGTABLE +BEGIN + AFX_IDS_DESKACCESSORY "Opens the selected item" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_HELP_INDEX "List Help topics" + ID_HELP_USING "Display instructions about how to use help" + ID_CONTEXT_HELP "Display help for clicked on buttons, menus and windows" + ID_HELP "Display help for current task or command" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" + ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile" +END + +STRINGTABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection\nDelete" + ID_EDIT_COPY "Copy the selection and puts it on the Clipboard\nCopy" + ID_EDIT_CUT "Cut the selection and puts it on the Clipboard\nCut" + ID_EDIT_FIND "Find the specified text\nFind" + ID_EDIT_PASTE "Insert Clipboard contents\nPaste" + ID_EDIT_REPEAT "Repeat last find command\nFind Next" + 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" +END + +STRINGTABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar" + ID_VIEW_STATUS_BAR "Show or hide the status bar" +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_SCCLOSE "Close the active window and prompts to save the documents" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "CaptionPainter" + AFX_IDS_IDLEMESSAGE "Ready" + AFX_IDS_HELPMODEMESSAGE "Select an object on which to get Help" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "MultiPad with CaptionPainter" + IDR_TEXTTYPE "\nUntitled\nTEXT Document\nText Files (*.txt)\n.txt\nTextFileType\nTEXT File Type\nTEXT\nText Files\n" + ID_DESCRIPTION_FILE "CaptionPainterInfo.rtf" +END + +STRINGTABLE +BEGIN + ID_VIEW_CUSTOMIZE "Customize Toolbars/nCustomize Toolbars" + ID_VIEW_CUSTOMIZE_CAPTION "Customize Caption/nCustomize Caption" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG 0, 0, 282, 174 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Toolbars" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO_TOOLBAR,90,8,131,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "&Flat",IDC_CHECK_FLAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,40,27,10 + CONTROL "&List ",IDC_CHECK_LIST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,40,29,10 + CONTROL "&Gripper",IDC_CHECK_GRIPPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,41,39,10 + CONTROL "&Seperator",IDC_CHECK_SEPARATOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,213,41,47,10 + CONTROL "&Customizable",IDC_CHECK_CUSTOMIZABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,64,57,10 + EDITTEXT IDC_EDIT_INDENT,181,64,35,11,ES_AUTOHSCROLL + CONTROL "Set t&ext to buttons",IDC_CHECK_TEXT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,92,73,10 + CONTROL "String &resource",IDC_RADIO_PLAIN,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,149,92,63,10 + CONTROL "T&ooltip",IDC_RADIO_TOOLTIP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,107,37,10 + CONTROL "&Menu resourse",IDC_RADIO_MENU,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,122,63,10 + EDITTEXT IDC_EDIT_WIDTH,63,106,37,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_ROWS,63,121,37,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,87,153,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,153,50,14 + LTEXT "&Toolbar",IDC_STATIC,60,10,25,8 + GROUPBOX "Draw",IDC_STATIC,143,28,124,29 + GROUPBOX "Mode",IDC_STATIC,14,29,124,28 + GROUPBOX "Text",IDC_STATIC,14,80,253,57 + LTEXT "Max &Width",IDC_STATIC,20,108,35,8 + LTEXT "Text &Rows",IDC_STATIC,20,123,35,8 + LTEXT "Indention",IDC_STATIC,145,65,30,8 +END + +IDD_CUSTOMIZE_CAPTION_PAINTER DIALOG 0, 0, 282, 202 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Caption Painter" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO_CAPTION,90,8,121,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "&Background",IDC_BUTTON_BACKGROUND_COLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,20,42,52,14 + PUSHBUTTON "&Font ...",IDC_BUTTON_TEXT_FONT,20,68,51,14 + EDITTEXT IDC_EDIT_FONT,20,87,109,12,ES_AUTOHSCROLL | ES_READONLY + COMBOBOX IDC_COMBO_GRADIENT_ALIGNMENT,188,54,74,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_GRADIENT_ALGORITHM,188,71,74,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_NUMBER_SHADE,209,88,52,12,ES_AUTOHSCROLL + CONTROL "&Gradient Filling",IDC_CHECK_GRADIENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,152,42,62,10 + CONTROL "Left",IDC_RADIO_HORZ_LEFT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,105,120,28,10 + CONTROL "Center",IDC_RADIO_HORZ_CENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,120,37,10 + CONTROL "Right",IDC_RADIO_HORZ_RIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,197,120,33,10 + CONTROL "Top",IDC_RADIO_VERT_TOP,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,105,132,28,10 + CONTROL "Center",IDC_RADIO_VERT_CENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,132,37,10 + CONTROL "Bottom",IDC_RADIO_VERT_BOTTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,197,132,38,10 + CONTROL "None",IDC_RADIO_ELLIPSIS_NONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,105,147,33,10 + CONTROL "End",IDC_RADIO_ELLIPSIS_END,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,147,33,10 + CONTROL "Path",IDC_RADIO_ELLIPSIS_PATH,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,198,147,31,10 + DEFPUSHBUTTON "OK",IDOK,87,181,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,181,50,14 + LTEXT "&Caption",IDC_STATIC,60,10,25,8 + GROUPBOX "Gradient",IDC_STATIC,146,30,121,76 + LTEXT "Alignment",IDC_STATIC,153,56,32,8 + LTEXT "Algorithm",IDC_STATIC,153,73,30,8 + GROUPBOX "Basic",IDC_STATIC,14,31,121,75 + GROUPBOX "Text Format",IDC_STATIC,14,110,253,53 + LTEXT "Vertical alignment",IDC_STATIC,21,132,56,8 + LTEXT "Horizontal alignment",IDC_STATIC,21,120,64,8 + LTEXT "Ellipsis",IDC_STATIC,21,146,22,8 + LTEXT "Number &Shade",IDC_STATIC,153,90,48,8 + EDITTEXT IDC_EDIT_BACKGROUND_COLOR,76,42,53,13,ES_AUTOHSCROLL | ES_READONLY +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 14 + RIGHTMARGIN, 267 + TOPMARGIN, 7 + BOTTOMMARGIN, 167 + END + + IDD_CUSTOMIZE_CAPTION_PAINTER, DIALOG + BEGIN + LEFTMARGIN, 14 + RIGHTMARGIN, 267 + TOPMARGIN, 7 + BOTTOMMARGIN, 195 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "afxres.rc" +#include "afxprint.rc" +#include "OXBitmapButton.rc" +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXPopupBarCtrl.rc" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/Multipad.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/Multipad.cpp new file mode 100644 index 0000000..1dc106e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/Multipad.cpp @@ -0,0 +1,606 @@ +// multipad.cpp : Defines the class behaviors for the Multipad application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" +#include "CustomizeCaptionDlg.h" +#include + +#include "UTSampleAbout.h" + +CMultiPadApp NEAR theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp) + //{{AFX_MSG_MAP(CMultiPadApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) // file commands... + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +BOOL CMultiPadApp::InitInstance() +{ + _tsetlocale(LC_ALL, _T("")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 + Enable3dControls(); // Call this when using MFC in a shared DLL +#endif + + // use registry if you want to save CoolToolBars state + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); + + AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE, + RUNTIME_CLASS(CPadDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CEditView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + + // load saved workspace after all bars were created + ((CMainFrame*)m_pMainWnd)->LoadWorkspace(); + + m_pMainWnd->ShowWindow(m_nCmdShow); + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + return TRUE; +} + +void CMultiPadApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +int CMultiPadApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_TEXTTYPE)); + ASSERT(cs.lpszClass); + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + m_Caption.Attach(this); + + CMainFrame* pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + ASSERT_VALID(pFrame); + COXCaptionPainter parentCaption; + if(::SendMessage(pFrame->m_hWnd,COXCaptionPainter::m_nGetCaptionPainter,0, + (LPARAM)&parentCaption)) + { + SendMessage(COXCaptionPainter::m_nSetCaptionPainter,0,(LPARAM)&parentCaption); + } + + SendMessage(WM_NCPAINT); + + return 0; +} + + +IMPLEMENT_DYNCREATE(CMainFrame, CMDIFrameWnd) +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + ON_COMMAND(ID_VIEW_CUSTOMIZE_CAPTION, OnViewCustomizeCaption) + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnUpdateViewToolbars) + ON_COMMAND_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnViewToolbars) +END_MESSAGE_MAP() + + +// we need these arrays to make our CoolToolBars customizable +// we use them as parameters in function COXCoolToolBar::SetBitmapIds() + +static UINT buttonsFile[] = +{ + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT buttonsEdit[] = +{ + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_EDIT_CLEAR, + ID_EDIT_FIND, + ID_EDIT_REPEAT, +}; + +static UINT buttonsWindow[] = +{ + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, +}; + +static UINT indicators[] = +{ + ID_SEPARATOR, + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if(CMDIFrameWnd::OnCreate(lpCreateStruct)==-1) + { + return -1; + } + + // create standard statusbar + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE(_T("Failed to create status bar\n")); + return -1; // fail to create + } + + // create toolbars + + ////////////////////////////// + // File ToolBar + // this is an example of simple toolbar without text + // but we add here images to show in hot mode + // Note that process of creation of CoolToolBar almost the same as + // standard CToolBar + if (!m_wndToolBarFile.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_FILE) || + !m_wndToolBarFile.LoadToolBar(IDR_TOOLBAR_FILE)) + { + TRACE(_T("Failed to create File toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarFile.SetBitmapIds(buttonsFile, sizeof(buttonsFile)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarFile.IniSizes(CSize(16,16)); + m_wndToolBarFile.SetHotImageList(m_wndToolBarFile.AddImageList(IDR_TOOLBAR_FILE_HOT)); + m_wndToolBarFile.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarFile.SetHotTextColor(RGB(0,0,255)); + m_wndToolBarFile.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarFile.SetBarStyle(m_wndToolBarFile.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarFile.EnableDocking(CBRS_ALIGN_ANY); + ////////////////////////////// + + ////////////////////////////// + // Edit ToolBar + if (!m_wndToolBarEdit.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_EDIT) || + !m_wndToolBarEdit.LoadToolBar(IDR_TOOLBAR_EDIT)) + { + TRACE(_T("Failed to create Edit toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarEdit.SetBitmapIds(buttonsEdit, sizeof(buttonsEdit)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarEdit.IniSizes(CSize(16,16)); + m_wndToolBarEdit.SetHotImageList(m_wndToolBarEdit.AddImageList(IDR_TOOLBAR_EDIT_HOT)); + m_wndToolBarEdit.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarEdit.SetHotTextColor(RGB(0,0,255)); + // we want to use text from string resource in our CoolToolBar + m_wndToolBarEdit.SetButtonsMinMaxWidth(0,70); + m_wndToolBarEdit.SetMaxTextRows(4); + m_wndToolBarEdit.SetButtonTextFromID(COXCoolToolBar::TTID_PLAIN); + m_wndToolBarEdit.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarEdit.SetBarStyle(m_wndToolBarEdit.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + ////////////////////////////// + + ////////////////////////////// + // Window ToolBar + if (!m_wndToolBarWindow.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_WINDOW) || + !m_wndToolBarWindow.LoadToolBar(IDR_TOOLBAR_WINDOW)) + { + TRACE(_T("Failed to create Window toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarWindow.SetBitmapIds(buttonsWindow, sizeof(buttonsWindow)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + // use CoolToolBar in List mode + m_wndToolBarWindow.IniSizes(CSize(16,16)); + m_wndToolBarWindow.SetList(); + m_wndToolBarWindow.SetHotImageList(m_wndToolBarWindow.AddImageList(IDR_TOOLBAR_WINDOW_HOT)); + m_wndToolBarWindow.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarWindow.SetHotTextColor(RGB(0,0,255)); + // we want to use tooltips text in our CoolToolBar + m_wndToolBarWindow.SetMaxTextRows(1); + m_wndToolBarWindow.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarWindow.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarWindow.SetBarStyle(m_wndToolBarWindow.GetBarStyle() | + /*CBRS_TOOLTIPS | */CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarWindow.EnableDocking(CBRS_ALIGN_ANY); + ////////////////////////////// + + + EnableDocking(CBRS_ALIGN_ANY); + + // TODO: Delete these lines if you don't want the toolbar to + // be dockable + DockControlBar(&m_wndToolBarFile); + DockControlBar(&m_wndToolBarWindow); + + // Dock Window toolbar to the right side of File toolbar + m_wndToolBarWindow.DockControlBarLeftOf(&m_wndToolBarFile); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + // Install caption painter + m_Caption.Attach(this); + SendMessage(WM_NCPAINT); + + + return 0; +} + +void CMainFrame::OnUpdateViewToolbars(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CControlBar* pBar=GetControlBar(pCmdUI->m_nID); + if(pBar!=NULL) + { + pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0); + return; + } +} + +void CMainFrame::OnViewToolbars(UINT nID) +{ + // TODO: Add your command handler code here + + CControlBar* pBar = GetControlBar(nID); + if (pBar != NULL) + { + ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE); + } +} + + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + + // before close save the workspace + SaveWorkspace(); + + CMDIFrameWnd::OnClose(); +} + +void CMainFrame::SaveWorkspace() +{ + // save state of framework caption + m_Caption.SaveState(_T("FrameworkCaption")); + + // save states of all CoolToolBar + m_wndToolBarFile.SaveBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.SaveBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.SaveBarState(_T("CoolToolBars"),_T("Window")); + + // save the state of all bars within framework + SaveBarState(_T("FrameworkBarState")); +} + +void CMainFrame::LoadWorkspace() +{ + // load state of framework caption + m_Caption.LoadState(_T("FrameworkCaption")); + SendMessageToDescendants(COXCaptionPainter::m_nSetCaptionPainter,0, + (LPARAM)&m_Caption); + SendMessageToDescendants(WM_NCPAINT); + + LockWindowUpdate(); + + // load all bars state in framework + LoadBarState(_T("FrameworkBarState")); + + // load state of all CoolToolBar + m_wndToolBarFile.LoadBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.LoadBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.LoadBarState(_T("CoolToolBars"),_T("Window")); + + UnlockWindowUpdate(); +} + + +void CMainFrame::OnViewCustomize() +{ + // TODO: Add your command handler code here + + CCustomizeDlg dlgCustomize(this); + dlgCustomize.arrCustomize[0]=GetToolbarProperties(&m_wndToolBarFile); + dlgCustomize.arrCustomize[1]=GetToolbarProperties(&m_wndToolBarEdit); + dlgCustomize.arrCustomize[2]=GetToolbarProperties(&m_wndToolBarWindow); + + if(dlgCustomize.DoModal()==IDOK) + { + SetToolbarProperties(&m_wndToolBarFile,dlgCustomize.arrCustomize[0]); + SetToolbarProperties(&m_wndToolBarEdit,dlgCustomize.arrCustomize[1]); + SetToolbarProperties(&m_wndToolBarWindow,dlgCustomize.arrCustomize[2]); + } + +} + +CustomizeToolbar CMainFrame::GetToolbarProperties(COXCoolToolBar* pBar) +{ + // collect information about CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar ct; + ct.bCustomizable=pBar->IsCustomizable(); + ct.bFlat=pBar->IsFlat(); + ct.bGripper=pBar->IsGripper(); + ct.bList=pBar->IsList(); + ct.bSeparator=pBar->IsSeparator(); + ct.bText=!pBar->GetButtonText(0).IsEmpty(); + ct.nTextType=(int)pBar->GetTextType(); + ct.nRows=pBar->GetTextRows(); + ct.nWidth=pBar->GetButtonsSize().cx; + ct.nIndent=pBar->GetIndent(); + + return ct; +} + +void CMainFrame::SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct) +{ + // change styles and properties of CoolToolBar + pBar->SetCustomizable(ct.bCustomizable); + pBar->SetFlat(ct.bFlat); + pBar->SetGripper(ct.bGripper); + pBar->SetList(ct.bList); + pBar->SetSeparator(ct.bSeparator); + pBar->SetIndent(ct.nIndent); + if(ct.bText) + { + pBar->SetButtonTextFromID((COXCoolToolBar::TextTypeFromID)ct.nTextType); + pBar->SetMaxTextRows(ct.nRows); + pBar->SetButtonsMinMaxWidth(0,ct.nWidth); + pBar->UpdateSizes(); + } + else + { + // if we don't want to use text in CoolToolBar then + // remove all previously associated text + if(pBar->GetTextType()!=COXCoolToolBar::TTID_NOTSET) + { + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NONE); + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NOTSET); + } + pBar->SetMaxTextRows(0); + pBar->SetButtonsMinMaxWidth(0,24); + pBar->IniSizes(CSize(16,16)); + } + + CSize sizeChild; + sizeChild=pBar->GetButtonsSize(); + + CRect rect; + pBar->GetWindowRect(&rect); + // resize window + pBar->SetWindowPos(NULL,0,0,rect.Width(),rect.Height(), + SWP_NOMOVE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED); + + // it is up to framework to reallocate all other control bars + CFrameWnd* pFrameWnd=pBar->GetDockingFrame(); + if(pFrameWnd!=NULL) + { + pFrameWnd->RecalcLayout(); + } +} + +void CMainFrame::OnViewCustomizeCaption() +{ + // TODO: Add your command handler code here + + CCustomizeCaptionDlg dlgCustomize(this); + dlgCustomize.arrCustomize[0]=GetCaptionProperties(TRUE); + dlgCustomize.arrCustomize[1]=GetCaptionProperties(FALSE); + + if(dlgCustomize.DoModal()==IDOK) + { + SetCaptionProperties(TRUE,dlgCustomize.arrCustomize[0]); + SetCaptionProperties(FALSE,dlgCustomize.arrCustomize[1]); + + m_Caption.Reset(); + SendMessage(WM_NCPAINT); + SendMessageToDescendants(COXCaptionPainter::m_nSetCaptionPainter,0, + (LPARAM)&m_Caption); + SendMessageToDescendants(WM_NCPAINT); + + } + +} + +CustomizeCaption CMainFrame::GetCaptionProperties(BOOL bActive) +{ + // collect information about CaptionPainter to use in Customize CaptionPainter dialog + CustomizeCaption cc; + COXCaptionInfo* pCI=m_Caption.GetCaptionInfo(bActive); + + pCI->GetCaptionLogFont(&cc.m_lf); + cc.m_clrBackground=pCI->GetBackgroundColor(bActive); + cc.m_clrText=pCI->GetTextColor(bActive); + cc.m_bGradient=pCI->GetGradient(); + cc.m_nGradientAlgorithm=pCI->GetGradientAlgorithm(); + cc.m_nGradientAlignment=pCI->GetGradientAlignment(); + cc.m_nNumberShade=pCI->GetNumberShade(); + + + UINT nTextFormat=pCI->GetTextFormat(); + + cc.m_nHorizontalAlignment=nTextFormat&DT_RIGHT ? 2 : + (nTextFormat&DT_CENTER ? 1 : 0); + cc.m_nVerticalAlignment=nTextFormat&DT_BOTTOM ? 2 : + (nTextFormat&DT_TOP ? 0 : 1); + cc.m_nEllipsis=nTextFormat&DT_END_ELLIPSIS ? 1 : + (nTextFormat&DT_PATH_ELLIPSIS ? 2 : 0); + + return cc; +} + +void CMainFrame::SetCaptionProperties(BOOL bActive, CustomizeCaption cc) +{ + COXCaptionInfo* pCI=m_Caption.GetCaptionInfo(bActive); + + pCI->SetCaptionLogFont(&cc.m_lf); + pCI->SetTextColor(cc.m_clrText); + pCI->SetBackgroundColor(cc.m_clrBackground); + pCI->SetGradient(cc.m_bGradient); + pCI->SetGradientAlgorithm(cc.m_nGradientAlgorithm); + pCI->SetGradientAlignment(cc.m_nGradientAlignment); + pCI->SetNumberShade(cc.m_nNumberShade); + + UINT nTextFormat=DT_SINGLELINE; + nTextFormat|=cc.m_nHorizontalAlignment==0 ? DT_LEFT : + (cc.m_nHorizontalAlignment==1 ? DT_CENTER : DT_RIGHT); + nTextFormat|=cc.m_nVerticalAlignment==0 ? DT_TOP : + (cc.m_nVerticalAlignment==1 ? DT_VCENTER : DT_BOTTOM); + nTextFormat|=cc.m_nEllipsis==0 ? 0 : + (cc.m_nEllipsis==1 ? DT_END_ELLIPSIS : DT_PATH_ELLIPSIS); + + pCI->SetTextFormat(nTextFormat); +} + +///////////////////////////////////////////////////////////////////////////// + +IMPLEMENT_DYNCREATE(CPadDoc, CDocument) +BEGIN_MESSAGE_MAP(CPadDoc, CDocument) + //{{AFX_MSG_MAP(CPadDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +void CPadDoc::Serialize(CArchive& ar) +{ + ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/mpadmac.r b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/mpadmac.r new file mode 100644 index 0000000..9131760 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/mpadmac.r @@ -0,0 +1,214 @@ +#include "resource.h" + +///////////////////////////////////////////////////////////////////////// +// WLM resources + +#include "ftab.r" +#include "mrc\types.r" +#include "mrc\balloons.r" +#include "systypes.r" + + +///////////////////////////////////////////////////////////////////////// +// MFC resources + +#include "afxaete.r" + + +///////////////////////////////////////////////////////////////////////// +// Code fragment resources + +#include "CodeFrag.r" + + +///////////////////////////////////////////////////////////////////////// +// MultiPad resources + +resource 'SIZE' (-1) +{ + reserved, + acceptSuspendResumeEvents, + reserved, + canBackground, + doesActivateOnFGSwitch, + backgroundAndForeground, + dontGetFrontClicks, + ignoreAppDiedEvents, + is32BitCompatible, + isHighLevelEventAware, + localAndRemoteHLEvents, + isStationeryAware, + dontUseTextEditServices, + reserved, + reserved, + reserved, +#ifdef _MPPC_ + 2500 * 1024, + 2500 * 1024 +#else // 68K Mac +#ifdef _DEBUG + 3000 * 1024, + 3000 * 1024 +#else + 2000 * 1024, + 2000 * 1024 +#endif +#endif +}; + +resource 'vers' (1) +{ + 0x01, + 0x00, + final, + 0x00, + verUS, + "1.0", + "MultiPad 1.0, Copyright \251 Microsoft Corp. 1994-1997" +}; + +resource 'vers' (2) +{ + 0x04, + 0x00, + final, + 0x00, + verUS, + "4.0", + "MFC for Macintosh 4.0" +}; + +resource 'kind' (128) +{ + 'MPAD', + 0, // verUS + { + 'TEXT', "MultiPad text document", + } +}; + +resource 'open' (128) +{ + 'MPAD', + { + 'TEXT', 'ttro' + } +}; + +resource 'BNDL' (128) +{ + 'MPAD', + 0, + { + 'FREF', + { + 0, 128, + 1, 129, + 2, 130 + }, + 'ICN#', + { + 0, IDR_MAINFRAME, + 1, IDR_TEXTTYPE, + 2, 130 + } + } +}; + +type 'MPAD' as 'STR '; +resource 'MPAD' (0) +{ + "MultiPad 1.0 Copyright © 1994-1997 Microsoft Corp." +}; + +resource 'FREF' (128) +{ + 'APPL', + 0, + "" +}; + +resource 'FREF' (129) +{ + 'TEXT', + 1, + "" +}; + +resource 'FREF' (130) { + 'sEXT', + 2, + "" +}; + +/* Balloon help resources */ + +resource 'hfdr' (-5696) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + { + HMSTRResItem {500} + } +}; + +resource 'hovr' (1000) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + + HMStringItem /* missing items override */ + { + "Miscellaneous part of the Microsoft MultiPad " + "Sample Application." + }, + { + HMSkipItem {}, /* title bar */ + HMSkipItem {}, /* reserved. always skip item here */ + HMStringItem /* close box */ + { + "Click here to close the Microsoft MultiPad " + "Sample Application." + }, + HMStringItem /* zoom box */ + { + "Click here to Zoom In or Zoom Out." + }, + HMSkipItem {}, /* active app's inactive window */ + HMStringItem /* inactive app's window */ + { + "This is not part of the Microsoft MultiPad " + "Application. It may be part of the Apple " + "Finder, or some other application." + }, + HMSkipItem {} /* outside modal dialog */ + } +}; + +#ifdef _MPPC_ +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Power Macintosh using Microsoft VC++ " + "Edition for the Apple Power Macintosh" +}; +#else // 68K Mac +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Macintosh using Microsoft VC++ Edition " + "for the Apple Macintosh" +}; +#endif + +#ifdef _MPPC_ +resource 'cfrg' (0) { + { + kPowerPC, + kFullLib, + kNoVersionNum,kNoVersionNum, + 0, 0, + kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork, + "" + } +}; +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.clw new file mode 100644 index 0000000..0ad98e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.clw @@ -0,0 +1,345 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMultiPadApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "multipad.h" +LastPage=0 + +ClassCount=6 +Class1=CCustomizeCaptionDlg +Class2=CCustomizeDlg +Class3=CMultiPadApp +Class4=CChildFrame +Class5=CMainFrame +Class6=CPadDoc + +ResourceCount=12 +Resource1=IDR_MAINFRAME +Resource2=IDR_TEXTTYPE +Resource3=IDR_MAINFRAME (_MAC) +Resource4=IDR_TEXTTYPE (_MAC) +Resource5=IDR_TOOLBAR_FILE +Resource6=IDR_TOOLBAR_EDIT +Resource7=IDR_TOOLBAR_WINDOW +Resource8=IDR_TOOLBAR_EDIT_HOT +Resource9=IDR_TOOLBAR_FILE_HOT +Resource10=IDR_TOOLBAR_WINDOW_HOT +Resource11=IDD_CUSTOMIZE (English (Canada)) +Resource12=IDD_CUSTOMIZE_CAPTION_PAINTER (English (Canada)) + +[CLS:CCustomizeCaptionDlg] +Type=0 +BaseClass=CDialog +HeaderFile=CustomizeCaptionDlg.h +ImplementationFile=CustomizeCaptionDlg.cpp + +[CLS:CCustomizeDlg] +Type=0 +BaseClass=CDialog +HeaderFile=CustomizeDlg.h +ImplementationFile=CustomizeDlg.cpp + +[CLS:CMultiPadApp] +Type=0 +BaseClass=CWinApp +HeaderFile=multipad.h +ImplementationFile=Multipad.cpp +LastObject=CMultiPadApp + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=multipad.h +ImplementationFile=Multipad.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=multipad.h +ImplementationFile=Multipad.cpp + +[CLS:CPadDoc] +Type=0 +BaseClass=CDocument +HeaderFile=multipad.h +ImplementationFile=Multipad.cpp + +[DLG:IDD_CUSTOMIZE_CAPTION_PAINTER] +Type=1 +Class=CCustomizeCaptionDlg + +[DLG:IDD_CUSTOMIZE] +Type=1 +Class=CCustomizeDlg + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR_FILE +Command7=ID_VIEW_TOOLBAR_EDIT +Command8=ID_VIEW_TOOLBAR_WINDOW +Command9=ID_VIEW_STATUS_BAR +Command10=ID_VIEW_CUSTOMIZE +Command11=ID_VIEW_CUSTOMIZE_CAPTION +Command12=ID_APP_ABOUT +CommandCount=12 + +[MNU:IDR_TEXTTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_EDIT_CLEAR +Command15=ID_EDIT_FIND +Command16=ID_EDIT_REPEAT +Command17=ID_EDIT_REPLACE +Command18=ID_EDIT_SELECT_ALL +Command19=ID_VIEW_TOOLBAR_FILE +Command20=ID_VIEW_TOOLBAR_EDIT +Command21=ID_VIEW_TOOLBAR_WINDOW +Command22=ID_VIEW_STATUS_BAR +Command23=ID_VIEW_CUSTOMIZE +Command24=ID_VIEW_CUSTOMIZE_CAPTION +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +Command27=ID_WINDOW_ARRANGE +Command28=ID_APP_ABOUT +CommandCount=28 + +[MNU:IDR_MAINFRAME (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR_FILE +Command7=ID_VIEW_TOOLBAR_EDIT +Command8=ID_VIEW_TOOLBAR_WINDOW +Command9=ID_VIEW_STATUS_BAR +Command10=ID_VIEW_CUSTOMIZE +Command11=ID_VIEW_CUSTOMIZE_CAPTION +CommandCount=11 + +[MNU:IDR_TEXTTYPE (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT_SETUP +Command7=ID_FILE_PRINT +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_EDIT_CLEAR +Command15=ID_EDIT_FIND +Command16=ID_EDIT_REPEAT +Command17=ID_EDIT_REPLACE +Command18=ID_EDIT_SELECT_ALL +Command19=ID_VIEW_TOOLBAR_FILE +Command20=ID_VIEW_TOOLBAR_EDIT +Command21=ID_VIEW_TOOLBAR_WINDOW +Command22=ID_VIEW_STATUS_BAR +Command23=ID_VIEW_CUSTOMIZE +Command24=ID_VIEW_CUSTOMIZE_CAPTION +Command25=ID_WINDOW_CASCADE +Command26=ID_WINDOW_TILE_HORZ +CommandCount=26 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_PRINT +Command5=ID_FILE_SAVE +Command6=ID_EDIT_PASTE +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_CONTEXT_HELP +Command10=ID_EDIT_REPEAT +Command11=ID_NEXT_PANE +Command12=ID_PREV_PANE +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_EDIT_CUT +Command16=ID_EDIT_UNDO +CommandCount=16 + +[ACL:IDR_MAINFRAME (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_FILE_CLOSE +Command6=ID_APP_EXIT +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_EDIT_COPY +Command10=ID_EDIT_PASTE +Command11=ID_EDIT_CUT +Command12=ID_EDIT_REPEAT +Command13=ID_CONTEXT_HELP +Command14=ID_EDIT_REPEAT +Command15=ID_NEXT_PANE +Command16=ID_PREV_PANE +Command17=ID_EDIT_COPY +Command18=ID_EDIT_PASTE +Command19=ID_EDIT_UNDO +Command20=ID_EDIT_CUT +CommandCount=20 + +[TB:IDR_TOOLBAR_FILE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_APP_ABOUT +CommandCount=7 + +[TB:IDR_TOOLBAR_EDIT] +Type=1 +Class=? +Command1=ID_EDIT_CUT +Command2=ID_EDIT_COPY +Command3=ID_EDIT_PASTE +Command4=ID_EDIT_CLEAR +Command5=ID_EDIT_FIND +Command6=ID_EDIT_REPEAT +CommandCount=6 + +[TB:IDR_TOOLBAR_WINDOW] +Type=1 +Class=? +Command1=ID_WINDOW_CASCADE +Command2=ID_WINDOW_TILE_HORZ +Command3=ID_WINDOW_ARRANGE +CommandCount=3 + +[TB:IDR_TOOLBAR_EDIT_HOT] +Type=1 +Class=? +Command1=ID_EDIT_CUT +Command2=ID_EDIT_COPY +Command3=ID_EDIT_PASTE +Command4=ID_EDIT_CLEAR +Command5=ID_EDIT_FIND +Command6=ID_EDIT_REPEAT +CommandCount=6 + +[TB:IDR_TOOLBAR_FILE_HOT] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_APP_ABOUT +CommandCount=7 + +[TB:IDR_TOOLBAR_WINDOW_HOT] +Type=1 +Class=? +Command1=ID_WINDOW_CASCADE +Command2=ID_WINDOW_TILE_HORZ +Command3=ID_WINDOW_ARRANGE +CommandCount=3 + +[DLG:IDD_CUSTOMIZE (English (Canada))] +Type=1 +Class=? +ControlCount=22 +Control1=IDC_COMBO_TOOLBAR,combobox,1344339971 +Control2=IDC_CHECK_FLAT,button,1342242819 +Control3=IDC_CHECK_LIST,button,1342242819 +Control4=IDC_CHECK_GRIPPER,button,1342242819 +Control5=IDC_CHECK_SEPARATOR,button,1342242819 +Control6=IDC_CHECK_CUSTOMIZABLE,button,1342242819 +Control7=IDC_EDIT_INDENT,edit,1350631552 +Control8=IDC_CHECK_TEXT,button,1342242819 +Control9=IDC_RADIO_PLAIN,button,1342373897 +Control10=IDC_RADIO_TOOLTIP,button,1342242825 +Control11=IDC_RADIO_MENU,button,1342242825 +Control12=IDC_EDIT_WIDTH,edit,1350631552 +Control13=IDC_EDIT_ROWS,edit,1350631552 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_STATIC,button,1342177287 +Control18=IDC_STATIC,button,1342177287 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 + +[DLG:IDD_CUSTOMIZE_CAPTION_PAINTER (English (Canada))] +Type=1 +Class=? +ControlCount=30 +Control1=IDC_COMBO_CAPTION,combobox,1344339971 +Control2=IDC_BUTTON_BACKGROUND_COLOR,button,1342242827 +Control3=IDC_BUTTON_TEXT_FONT,button,1342242816 +Control4=IDC_EDIT_FONT,edit,1350633600 +Control5=IDC_COMBO_GRADIENT_ALIGNMENT,combobox,1344339971 +Control6=IDC_COMBO_GRADIENT_ALGORITHM,combobox,1344339971 +Control7=IDC_EDIT_NUMBER_SHADE,edit,1350631552 +Control8=IDC_CHECK_GRADIENT,button,1342242819 +Control9=IDC_RADIO_HORZ_LEFT,button,1342373897 +Control10=IDC_RADIO_HORZ_CENTER,button,1342242825 +Control11=IDC_RADIO_HORZ_RIGHT,button,1342242825 +Control12=IDC_RADIO_VERT_TOP,button,1342373897 +Control13=IDC_RADIO_VERT_CENTER,button,1342242825 +Control14=IDC_RADIO_VERT_BOTTOM,button,1342242825 +Control15=IDC_RADIO_ELLIPSIS_NONE,button,1342373897 +Control16=IDC_RADIO_ELLIPSIS_END,button,1342242825 +Control17=IDC_RADIO_ELLIPSIS_PATH,button,1342242825 +Control18=IDOK,button,1342242817 +Control19=IDCANCEL,button,1342242816 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,button,1342177287 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,button,1342177287 +Control25=IDC_STATIC,button,1342177287 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_EDIT_BACKGROUND_COLOR,edit,1350633600 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsp new file mode 100644 index 0000000..0a561d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsp @@ -0,0 +1,449 @@ +# Microsoft Developer Studio Project File - Name="MultiPad" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MultiPad - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak" CFG="MultiPad - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MultiPad - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MultiPad - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CaptionPainter.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CaptionPainter.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CaptionPainter.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CaptionPainter.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MultiPa0" +# PROP BASE Intermediate_Dir "MultiPa0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"CaptionPainter.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CaptionPainter.exe" + +!ENDIF + +# Begin Target + +# Name "MultiPad - Win32 Release" +# Name "MultiPad - Win32 Debug" +# Name "MultiPad - Win32 Unicode Release" +# Name "MultiPad - Win32 Unicode Debug" +# Name "MultiPad - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CustomizeCaptionDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\mpadmac.r +# End Source File +# Begin Source File + +SOURCE=.\multipad.cpp +# End Source File +# Begin Source File + +SOURCE=.\multipad.rc +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD CPP /Yc"Stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;inl;fi;fd" +# Begin Source File + +SOURCE=.\CustomizeCaptionDlg.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\multipad.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCaptionPainter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPopupBarCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00003.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00004.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00006.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\multipad.ico +# End Source File +# Begin Source File + +SOURCE=.\res\paddoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CaptionPainter.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsw new file mode 100644 index 0000000..b652666 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MultiPad"=".\multipad.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/CaptionPainter", DXGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.h new file mode 100644 index 0000000..1051450 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.h @@ -0,0 +1,160 @@ +// multipad.h : main header file for the Multipad application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "resource.h" +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" + +#include "OXCaptionPainter.h" + +class CMultiPadApp : public CWinApp +{ +public: +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedAssertApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + + //{{AFX_MSG(CMultiPadApp) + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +// special structure to define CoolToolBar properties +// used in Customize Toolbars dialog +struct CustomizeToolbar +{ + BOOL bCustomizable; + BOOL bFlat; + BOOL bGripper; + BOOL bList; + BOOL bSeparator; + BOOL bText; + int nTextType; + UINT nRows; + UINT nWidth; + UINT nIndent; +}; + +// special structure to define CaptionPainter properties +// used in Customize CaptionPainter dialog +struct CustomizeCaption +{ + LOGFONT m_lf; + COLORREF m_clrBackground; + COLORREF m_clrText; + BOOL m_bGradient; + int m_nGradientAlgorithm; + int m_nGradientAlignment; + int m_nEllipsis; + int m_nHorizontalAlignment; + int m_nVerticalAlignment; + int m_nNumberShade; +}; + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +protected: + // caption painter + COXCaptionPainter m_Caption; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNCREATE(CMainFrame) + +public: + //load and save bars placement in Framework and state of all CoolToolBars + void LoadWorkspace(); + void SaveWorkspace(); + + // get properties of CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar GetToolbarProperties(COXCoolToolBar* pBar); + // apply changed properties to CoolToolBar + void SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct); + + // get properties of CaptionPainter to use in Customize CaptionPainter dialog + CustomizeCaption GetCaptionProperties(BOOL bActive); + // apply changed properties to CaptionPainter + void SetCaptionProperties(BOOL bActive, CustomizeCaption ct); + +protected: + // caption painter + COXCaptionPainter m_Caption; + + CStatusBar m_wndStatusBar; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + + // three CoolToolBars + COXCoolToolBar m_wndToolBarFile; + COXCoolToolBar m_wndToolBarEdit; + COXCoolToolBar m_wndToolBarWindow; + + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg void OnViewCustomize(); + afx_msg void OnViewCustomizeCaption(); + //}}AFX_MSG + afx_msg void OnUpdateViewToolbars(CCmdUI* pCmdUI); + afx_msg void OnViewToolbars(UINT nID); + DECLARE_MESSAGE_MAP() +}; + +class CPadDoc : public CDocument +{ + DECLARE_DYNCREATE(CPadDoc) + void Serialize(CArchive& ar); + //{{AFX_MSG(CPadDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.vcproj new file mode 100644 index 0000000..c1b9be5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/multipad.vcproj @@ -0,0 +1,2454 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00001.bmp new file mode 100644 index 0000000..4a96787 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00003.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00003.bmp new file mode 100644 index 0000000..541683a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00003.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00004.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00004.bmp new file mode 100644 index 0000000..74c1feb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00004.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00006.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00006.bmp new file mode 100644 index 0000000..49d95b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/bmp00006.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/multipad.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/multipad.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/multipad.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/paddoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/paddoc.ico new file mode 100644 index 0000000..9e9b961 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/paddoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar.bmp new file mode 100644 index 0000000..913de51 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar1.bmp new file mode 100644 index 0000000..093f758 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar_.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar_.bmp new file mode 100644 index 0000000..0339e85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/res/toolbar_.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/resource.h new file mode 100644 index 0000000..c8a5853 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/resource.h @@ -0,0 +1,65 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MultiPad.rc +// +#define IDR_TOOLBAR_FILE 101 +#define IDR_TOOLBAR_EDIT 103 +#define IDR_TOOLBAR_WINDOW 105 +#define IDR_TOOLBAR_EDIT_HOT 108 +#define IDR_TOOLBAR_FILE_HOT 109 +#define IDD_CUSTOMIZE 109 +#define IDD_CUSTOMIZE_CAPTION_PAINTER 110 +#define IDR_TOOLBAR_WINDOW_HOT 111 +#define IDR_MAINFRAME 128 +#define IDR_TEXTTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_COMBO_TOOLBAR 1000 +#define IDC_CHECK_FLAT 1001 +#define IDC_CHECK_LIST 1002 +#define IDC_CHECK_GRIPPER 1003 +#define IDC_CHECK_SEPARATOR 1004 +#define IDC_CHECK_CUSTOMIZABLE 1005 +#define IDC_CHECK_TEXT 1007 +#define IDC_RADIO_PLAIN 1008 +#define IDC_RADIO_TOOLTIP 1009 +#define IDC_RADIO_MENU 1010 +#define IDC_EDIT_WIDTH 1011 +#define IDC_EDIT_ROWS 1012 +#define IDC_EDIT_INDENT 1013 +#define IDC_COMBO_CAPTION 1014 +#define IDC_CHECK_GRADIENT 1015 +#define IDC_COMBO_GRADIENT_ALIGNMENT 1016 +#define IDC_COMBO_GRADIENT_ALGORITHM 1017 +#define IDC_BUTTON_BACKGROUND_COLOR 1018 +#define IDC_BUTTON_TEXT_FONT 1019 +#define IDC_RADIO_HORZ_LEFT 1022 +#define IDC_RADIO_HORZ_CENTER 1023 +#define IDC_RADIO_HORZ_RIGHT 1024 +#define IDC_RADIO_VERT_TOP 1025 +#define IDC_RADIO_VERT_CENTER 1026 +#define IDC_RADIO_VERT_BOTTOM 1027 +#define IDC_RADIO_ELLIPSIS_NONE 1029 +#define IDC_RADIO_ELLIPSIS_END 1030 +#define IDC_RADIO_ELLIPSIS_MIDDLE 1031 +#define IDC_RADIO_ELLIPSIS_PATH 1031 +#define IDC_RADIO_ELLIPSIS_EVERY_WORD 1032 +#define IDC_CHECK_FONT_DEFAULT 1034 +#define IDC_EDIT_BACKGROUND_COLOR 1035 +#define IDC_EDIT_FONT 1036 +#define IDC_EDIT_NUMBER_SHADE 1037 +#define ID_VIEW_TOOLBAR_FILE 32794 +#define ID_VIEW_TOOLBAR_EDIT 32795 +#define ID_VIEW_TOOLBAR_WINDOW 32796 +#define ID_VIEW_CUSTOMIZE 32797 +#define ID_VIEW_CUSTOMIZE_CAPTION 32798 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 111 +#define _APS_NEXT_COMMAND_VALUE 32799 +#define _APS_NEXT_CONTROL_VALUE 1038 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.cpp new file mode 100644 index 0000000..77150d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.cpp @@ -0,0 +1,15 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.h new file mode 100644 index 0000000..592d4ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/stdafx.h @@ -0,0 +1,22 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently + +#define VC_EXTRALEAN + +#include // MFC core and standard components +#include +#include +#include + +#include "OXAdvancedAssert.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/unicode.utf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/unicode.utf new file mode 100644 index 0000000..4890d4b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CaptionPainter/unicode.utf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.clw new file mode 100644 index 0000000..17e07ce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.clw @@ -0,0 +1,107 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CColorPickerButtonApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ColorPickerButton.h" + +ClassCount=2 +Class1=CColorPickerButtonApp +Class2=CColorPickerButtonDlg + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDD_COLORPICKERBUTTON_DIALOG (English (U.S.)) +Resource3=IDD_COLORPICKERBUTTON_DIALOG + +[CLS:CColorPickerButtonApp] +Type=0 +HeaderFile=ColorPickerButton.h +ImplementationFile=ColorPickerButton.cpp +Filter=N +LastObject=CColorPickerButtonApp +BaseClass=CWinApp +VirtualFilter=AC + +[CLS:CColorPickerButtonDlg] +Type=0 +HeaderFile=ColorPickerButtonDlg.h +ImplementationFile=ColorPickerButtonDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CColorPickerButtonDlg + +[DLG:IDD_COLORPICKERBUTTON_DIALOG] +Type=1 +Class=CColorPickerButtonDlg +ControlCount=31 +Control1=IDC_BUTTON_COLOR_PICKER,button,1342242827 +Control2=IDC_CHECK_TOOLTIP,button,1342242819 +Control3=IDC_CHECK_TRACKLOOK,button,1342242819 +Control4=IDC_CHECK_HYPERLOOK,button,1342242819 +Control5=IDC_CHECK_DISABLED,button,1342242819 +Control6=IDC_CHECK_MULTILINE,button,1342242819 +Control7=IDC_CHECK_AUTORESIZE,button,1342242819 +Control8=IDC_CHECK_IMAGE,button,1342242819 +Control9=IDC_RADIO_LEFTTOP,button,1342373897 +Control10=IDC_RADIO_CENTERTOP,button,1342242825 +Control11=IDC_RADIO_RIGHTTOP,button,1342242825 +Control12=IDC_RADIO_LEFTCENTER,button,1342242825 +Control13=IDC_RADIO_CENTERCENTER,button,1342242825 +Control14=IDC_RADIO_RIGHTCENTER,button,1342242825 +Control15=IDC_RADIO_LEFTBOTTOM,button,1342242825 +Control16=IDC_RADIO_CENTERBOTTOM,button,1342242825 +Control17=IDC_RADIO_RIGHTBOTTOM,button,1342242825 +Control18=IDC_RADIO_ARROWNORMAL,button,1342373897 +Control19=IDC_RADIO_ARROWRIGHT,button,1342242825 +Control20=IDC_RADIO_ARROWNONE,button,1342242825 +Control21=IDC_EDIT_TEXT,edit,1350631552 +Control22=IDC_BUTTON_SETTEXT,button,1342242816 +Control23=IDC_EDIT_TOOLTIP,edit,1350631552 +Control24=IDC_BUTTON_SETTOOLTIP,button,1342242816 +Control25=IDC_COMBO_NUMCOLORS,combobox,1344340227 +Control26=IDC_BUTTON_FONTCOLOR,button,1342242816 +Control27=IDC_STATIC,button,1342177287 +Control28=IDC_STATIC,button,1342177287 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 + +[DLG:IDD_COLORPICKERBUTTON_DIALOG (English (U.S.))] +Type=1 +ControlCount=31 +Control1=IDC_BUTTON_COLOR_PICKER,button,1342242827 +Control2=IDC_CHECK_TOOLTIP,button,1342242819 +Control3=IDC_CHECK_TRACKLOOK,button,1342242819 +Control4=IDC_CHECK_HYPERLOOK,button,1342242819 +Control5=IDC_CHECK_DISABLED,button,1342242819 +Control6=IDC_CHECK_MULTILINE,button,1342242819 +Control7=IDC_CHECK_AUTORESIZE,button,1342242819 +Control8=IDC_CHECK_IMAGE,button,1342242819 +Control9=IDC_RADIO_LEFTTOP,button,1342373897 +Control10=IDC_RADIO_CENTERTOP,button,1342242825 +Control11=IDC_RADIO_RIGHTTOP,button,1342242825 +Control12=IDC_RADIO_LEFTCENTER,button,1342242825 +Control13=IDC_RADIO_CENTERCENTER,button,1342242825 +Control14=IDC_RADIO_RIGHTCENTER,button,1342242825 +Control15=IDC_RADIO_LEFTBOTTOM,button,1342242825 +Control16=IDC_RADIO_CENTERBOTTOM,button,1342242825 +Control17=IDC_RADIO_RIGHTBOTTOM,button,1342242825 +Control18=IDC_RADIO_ARROWNORMAL,button,1342373897 +Control19=IDC_RADIO_ARROWRIGHT,button,1342242825 +Control20=IDC_RADIO_ARROWNONE,button,1342242825 +Control21=IDC_EDIT_TEXT,edit,1350631552 +Control22=IDC_BUTTON_SETTEXT,button,1342242816 +Control23=IDC_EDIT_TOOLTIP,edit,1350631552 +Control24=IDC_BUTTON_SETTOOLTIP,button,1342242816 +Control25=IDC_COMBO_NUMCOLORS,combobox,1344340227 +Control26=IDC_BUTTON_FONTCOLOR,button,1342242816 +Control27=IDC_STATIC,button,1342177287 +Control28=IDC_STATIC,button,1342177287 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.cpp new file mode 100644 index 0000000..5737d82 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.cpp @@ -0,0 +1,92 @@ +// ColorPickerButton.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ColorPickerButton.h" +#include "ColorPickerButtonDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonApp + +BEGIN_MESSAGE_MAP(CColorPickerButtonApp, CWinApp) + //{{AFX_MSG_MAP(CColorPickerButtonApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonApp construction + +CColorPickerButtonApp::CColorPickerButtonApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CColorPickerButtonApp object + +CColorPickerButtonApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonApp initialization + +BOOL CColorPickerButtonApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CColorPickerButtonDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CColorPickerButtonApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsp new file mode 100644 index 0000000..2fdebdd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsp @@ -0,0 +1,292 @@ +# Microsoft Developer Studio Project File - Name="ColorPickerButton" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ColorPickerButton - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ColorPickerButton.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ColorPickerButton.mak" CFG="ColorPickerButton - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ColorPickerButton - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ColorPickerButton - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ColorPickerButton - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ColorPickerButton - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ColorPickerButton - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ColorPickerButton - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ColorPickerButton.exe" + +!ELSEIF "$(CFG)" == "ColorPickerButton - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ColorPickerButton.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ColorPickerButton - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ColorPickerButton.exe" + +!ELSEIF "$(CFG)" == "ColorPickerButton - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ColorPic" +# PROP BASE Intermediate_Dir "ColorPic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ColorPickerButton.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ColorPickerButton.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ColorPickerButton - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ColorPi0" +# PROP BASE Intermediate_Dir "ColorPi0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ColorPickerButton.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ColorPickerButton.exe" + +!ENDIF + +# Begin Target + +# Name "ColorPickerButton - Win32 Release" +# Name "ColorPickerButton - Win32 Debug" +# Name "ColorPickerButton - Win32 Release_Shared" +# Name "ColorPickerButton - Win32 Unicode_Debug" +# Name "ColorPickerButton - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=.\ColorPickerButton.rc +# End Source File +# Begin Source File + +SOURCE=.\ColorPickerButtonDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=.\ColorPickerButtonDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPopupBarCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ColorPickerButton.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ColorPickerButton.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ColorPickerButton.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsw new file mode 100644 index 0000000..356dbee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ColorPickerButton"=".\ColorPickerButton.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ColorPickerButton", GYGBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.h new file mode 100644 index 0000000..d6457d8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.h @@ -0,0 +1,50 @@ +// ColorPickerButton.h : main header file for the COLORPICKERBUTTON application +// + +#if !defined(AFX_COLORPICKERBUTTON_H__875CC117_F4B4_11D1_8862_0080C83F712F__INCLUDED_) +#define AFX_COLORPICKERBUTTON_H__875CC117_F4B4_11D1_8862_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonApp: +// See ColorPickerButton.cpp for the implementation of this class +// + +class CColorPickerButtonApp : public CWinApp +{ +public: + CColorPickerButtonApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CColorPickerButtonApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CColorPickerButtonApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COLORPICKERBUTTON_H__875CC117_F4B4_11D1_8862_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.rc new file mode 100644 index 0000000..8620b59 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.rc @@ -0,0 +1,226 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ColorPickerButton.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXBitmapButton.rc"" // BitmapButton resources\r\n" + "#include ""utsampleabout.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\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\\ColorPickerButton.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_COLORPICKERBUTTON_DIALOG DIALOGEX 0, 0, 206, 229 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "ColorPickerButton" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "\nColor Picker Button",IDC_BUTTON_COLOR_PICKER,"Button",BS_OWNERDRAW | WS_TABSTOP,71,30,64,22 + CONTROL "&Tooltip",IDC_CHECK_TOOLTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,79,37,10 + CONTROL "T&rack look",IDC_CHECK_TRACKLOOK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,92,50,10 + CONTROL "&Hyper look",IDC_CHECK_HYPERLOOK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,105,50,10 + CONTROL "&Disabled",IDC_CHECK_DISABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,118,43,10 + CONTROL "&Multiline",IDC_CHECK_MULTILINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,131,41,10 + CONTROL "&Auto resize",IDC_CHECK_AUTORESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,144,51,10 + CONTROL "&Image",IDC_CHECK_IMAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,157,37,10 + CONTROL "",IDC_RADIO_LEFTTOP,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,69,85,16,8 + CONTROL "",IDC_RADIO_CENTERTOP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,88,85,16,8 + CONTROL "",IDC_RADIO_RIGHTTOP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,108,85,16,8 + CONTROL "",IDC_RADIO_LEFTCENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,69,97,16,8 + CONTROL "",IDC_RADIO_CENTERCENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,88,97,16,8 + CONTROL "",IDC_RADIO_RIGHTCENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,108,97,16,8 + CONTROL "",IDC_RADIO_LEFTBOTTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,69,109,16,8 + CONTROL "",IDC_RADIO_CENTERBOTTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,88,109,16,8 + CONTROL "",IDC_RADIO_RIGHTBOTTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,108,109,16,8 + CONTROL "&Normal",IDC_RADIO_ARROWNORMAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,139,85,38,10 + CONTROL "&Right",IDC_RADIO_ARROWRIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,139,97,38,10 + CONTROL "N&o arrow",IDC_RADIO_ARROWNONE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,139,109,45,10 + EDITTEXT IDC_EDIT_TEXT,61,134,113,12,ES_AUTOHSCROLL + PUSHBUTTON "Set",IDC_BUTTON_SETTEXT,179,132,20,15 + EDITTEXT IDC_EDIT_TOOLTIP,61,158,113,12,ES_AUTOHSCROLL + PUSHBUTTON "Set",IDC_BUTTON_SETTOOLTIP,180,156,20,15 + COMBOBOX IDC_COMBO_NUMCOLORS,7,182,129,54,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Font - Color",IDC_BUTTON_FONTCOLOR,150,181,49,14 + GROUPBOX "Button Alignment",IDC_STATIC,61,75,66,46 + GROUPBOX "Arrow Orientation",IDC_STATIC,133,75,66,46 + LTEXT "Colors in Popup Bar",IDC_STATIC,8,172,63,8 + LTEXT "Text",IDC_STATIC,61,125,15,8 + LTEXT "Tooltip Text",IDC_STATIC,61,150,38,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 "040904B0" + BEGIN + VALUE "FileDescription", "ColorPickerButton MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ColorPickerButton" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "ColorPickerButton.EXE" + VALUE "ProductName", "ColorPickerButton Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_COLORPICKERBUTTON_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 199 + TOPMARGIN, 7 + BOTTOMMARGIN, 222 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IMAGE BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ColorPickerButton..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ColorPickerButton" + ID_DESCRIPTION_FILE "ColorPickerButtonInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ColorPickerButton.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXBitmapButton.rc" // BitmapButton resources +#include "utsampleabout.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.vcproj new file mode 100644 index 0000000..e7f7e4f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButton.vcproj @@ -0,0 +1,1089 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.cpp new file mode 100644 index 0000000..93afa89 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.cpp @@ -0,0 +1,731 @@ +// ColorPickerButtonDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ColorPickerButton.h" +#include "ColorPickerButtonDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +static void GradientFill(CDC* pDC, CRect rect, COLORREF clr, int nAlignment); +static void PaintRect(CDC* pDC, int x, int y, int w, int h, COLORREF color); + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonDlg dialog + +ButtonToolTipIDTable CColorPickerButtonDlg::m_arrStandardColorsTooltips[] = +{ + { RGB(0x00, 0x00, 0x00), IDS_OX_CLRPICKER_BLACK }, + { RGB(0x80, 0x00, 0x00), IDS_OX_CLRPICKER_DARKRED }, + { RGB(0x00, 0x80, 0x00), IDS_OX_CLRPICKER_GREEN }, + { RGB(0x80, 0x80, 0x00), IDS_OX_CLRPICKER_DARKYELLOW }, + { RGB(0x00, 0x00, 0x80), IDS_OX_CLRPICKER_DARKBLUE }, + { RGB(0x80, 0x00, 0x80), IDS_OX_CLRPICKER_VIOLET }, + { RGB(0x00, 0x80, 0x80), IDS_OX_CLRPICKER_TEAL }, + { RGB(0xC0, 0xC0, 0xC0), IDS_OX_CLRPICKER_LIGHTGREY }, + { RGB(0xC0, 0xDC, 0xC0), IDS_OX_CLRPICKER_LIGHTGREEN }, + { RGB(0xA6, 0xCA, 0xF1), IDS_OX_CLRPICKER_LIGHTBLUE }, + { RGB(0xFF, 0xFB, 0xF0), IDS_OX_CLRPICKER_LIGHTYELLOW }, + { RGB(0xA0, 0xA0, 0xA4), IDS_OX_CLRPICKER_GREY40 }, + { RGB(0x80, 0x80, 0x80), IDS_OX_CLRPICKER_GREY50 }, + { RGB(0xFF, 0x00, 0x00), IDS_OX_CLRPICKER_RED }, + { RGB(0x00, 0xFF, 0x00), IDS_OX_CLRPICKER_BRIGHTGREEN }, + { RGB(0xFF, 0xFF, 0x00), IDS_OX_CLRPICKER_YELLOW }, + { RGB(0x00, 0x00, 0xFF), IDS_OX_CLRPICKER_BLUE }, + { RGB(0xFF, 0x00, 0xFF), IDS_OX_CLRPICKER_PINK }, + { RGB(0x00, 0xFF, 0xFF), IDS_OX_CLRPICKER_TURQUOISE }, + { RGB(0xFF, 0xFF, 0xFF), IDS_OX_CLRPICKER_WHITE } +}; + +CColorPickerButtonDlg::CColorPickerButtonDlg(CWnd* pParent /*=NULL*/) + : CDialog(CColorPickerButtonDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CColorPickerButtonDlg) + m_sTooltip = _T(""); + m_sText = _T(""); + m_nArrowStyle = -1; + m_nButtonAlignment = -1; + m_bAutoResize = FALSE; + m_bDisable = FALSE; + m_bHyperlook = FALSE; + m_bImage = FALSE; + m_bMultiline = FALSE; + m_bTooltip = FALSE; + m_bTracklook = FALSE; + m_nNumColors = -1; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CColorPickerButtonDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CColorPickerButtonDlg) + DDX_Control(pDX, IDC_COMBO_NUMCOLORS, m_comboNumColors); + DDX_Control(pDX, IDC_BUTTON_COLOR_PICKER, m_btnColorPicker); + DDX_Control(pDX, IDC_EDIT_TOOLTIP, m_ctlTooltip); + DDX_Control(pDX, IDC_BUTTON_SETTOOLTIP, m_btnSetTooltip); + DDX_Text(pDX, IDC_EDIT_TOOLTIP, m_sTooltip); + DDX_Text(pDX, IDC_EDIT_TEXT, m_sText); + DDX_Radio(pDX, IDC_RADIO_ARROWNORMAL, m_nArrowStyle); + DDX_Radio(pDX, IDC_RADIO_LEFTTOP, m_nButtonAlignment); + DDX_Check(pDX, IDC_CHECK_AUTORESIZE, m_bAutoResize); + DDX_Check(pDX, IDC_CHECK_DISABLED, m_bDisable); + DDX_Check(pDX, IDC_CHECK_HYPERLOOK, m_bHyperlook); + DDX_Check(pDX, IDC_CHECK_IMAGE, m_bImage); + DDX_Check(pDX, IDC_CHECK_MULTILINE, m_bMultiline); + DDX_Check(pDX, IDC_CHECK_TOOLTIP, m_bTooltip); + DDX_Check(pDX, IDC_CHECK_TRACKLOOK, m_bTracklook); + DDX_CBIndex(pDX, IDC_COMBO_NUMCOLORS, m_nNumColors); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_COLOR_PICKER, m_clr); +} + +BEGIN_MESSAGE_MAP(CColorPickerButtonDlg, CDialog) + //{{AFX_MSG_MAP(CColorPickerButtonDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_FONTCOLOR, OnButtonFontcolor) + ON_BN_CLICKED(IDC_BUTTON_SETTEXT, OnButtonSettext) + ON_BN_CLICKED(IDC_BUTTON_SETTOOLTIP, OnButtonSettooltip) + ON_BN_CLICKED(IDC_CHECK_AUTORESIZE, OnCheckAutoresize) + ON_BN_CLICKED(IDC_CHECK_DISABLED, OnCheckDisabled) + ON_BN_CLICKED(IDC_CHECK_HYPERLOOK, OnCheckHyperlook) + ON_BN_CLICKED(IDC_CHECK_IMAGE, OnCheckImage) + ON_BN_CLICKED(IDC_CHECK_MULTILINE, OnCheckMultiline) + ON_BN_CLICKED(IDC_CHECK_TOOLTIP, OnCheckTooltip) + ON_BN_CLICKED(IDC_CHECK_TRACKLOOK, OnCheckTracklook) + ON_BN_CLICKED(IDC_RADIO_ARROWNONE, OnRadioArrow) + ON_BN_CLICKED(IDC_RADIO_CENTERBOTTOM, OnRadioButtonAlignment) + ON_CBN_SELCHANGE(IDC_COMBO_NUMCOLORS, OnSelchangeComboNumcolors) + ON_BN_CLICKED(IDC_BUTTON_COLOR_PICKER, OnButtonColorPicker) + ON_BN_CLICKED(IDC_RADIO_ARROWNORMAL, OnRadioArrow) + ON_BN_CLICKED(IDC_RADIO_ARROWRIGHT, OnRadioArrow) + ON_BN_CLICKED(IDC_RADIO_CENTERCENTER, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_CENTERTOP, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_LEFTBOTTOM, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_LEFTCENTER, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_LEFTTOP, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_RIGHTBOTTOM, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_RIGHTCENTER, OnRadioButtonAlignment) + ON_BN_CLICKED(IDC_RADIO_RIGHTTOP, OnRadioButtonAlignment) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonDlg message handlers + +BOOL CColorPickerButtonDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // Set button resources + m_originalSize = m_btnColorPicker.GetButtonSize(); + m_bAutoResize=TRUE; + + VERIFY(m_btnColorPicker.LoadBitmap(IDB_IMAGE, m_bAutoResize, RGB(255, 0, 255))); + m_bImage=TRUE; + + m_btnColorPicker.SetToolTip(TRUE); + m_bTooltip=TRUE; + + m_sText=_T("Pick color"); + m_btnColorPicker.SetText(m_sText); + + m_btnColorPicker.SetVerticalAlignment(BS_VCENTER); + m_btnColorPicker.SetHorizontalAlignment(BS_LEFT); + m_nButtonAlignment = 3; + + m_nArrowStyle=0; + + m_bMultiline=(m_btnColorPicker.GetStyle()&BS_MULTILINE)==BS_MULTILINE; + + m_sTooltip = m_btnColorPicker.GetToolTipText(); + + m_bDisable=FALSE; + m_bHyperlook=FALSE; + m_bTracklook=FALSE; + + m_comboNumColors.AddString(_T("10 clrs, 2 rows, big buttons")); + m_comboNumColors.AddString(_T("16 clrs, 2 rows")); + m_comboNumColors.AddString(_T("20 clrs, 4 rows, standard colors")); + m_comboNumColors.AddString(_T("40 clrs, 4 rows, default option")); + m_nNumColors=3; + + m_clr=RGB(255,255,255); + m_btnColorPicker.SetDefaultColor(RGB(0,0,128)); + +// m_btnColorPicker.SetColorBandHeight(6); + + m_btnColorPicker.SizeToContent(); + + UpdateData(FALSE); + + ShowControls(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CColorPickerButtonDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CColorPickerButtonDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CPaintDC dc(this); // device context for painting + + if(m_rectTop.IsRectEmpty() || m_rectBottom.IsRectEmpty()) + { + CRect rect; + GetClientRect(&rect); + + rect.DeflateRect(7,7); + m_rectTop=rect; + m_rectBottom=rect; + + m_rectTop.bottom=rect.top+20; + m_rectBottom.top=rect.bottom-20; + } + + GradientFill(&dc,m_rectTop,m_clr,0); + GradientFill(&dc,m_rectBottom,m_clr,2); + + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CColorPickerButtonDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CColorPickerButtonDlg::OnButtonFontcolor() +{ + // TODO: Add your control notification handler code here + + CFont* pTextFont = m_btnColorPicker.GetFont(); + ASSERT(pTextFont != NULL); + LOGFONT logFont; + pTextFont->GetLogFont(&logFont); + + CFontDialog fontDlg(&logFont); + fontDlg.m_cf.rgbColors = m_btnColorPicker.GetTextColor(); + if (fontDlg.DoModal() == IDOK) + { + CFont newTextFont; + // ... CFontDialog::GetCurrentFont() ASSERTs without reason if m_hWnd == NULL, + // so we use m_cf.lpLogFont directly + VERIFY(newTextFont.CreateFontIndirect(fontDlg.m_cf.lpLogFont)); + // ... SetTextFont() will keep a copy + m_btnColorPicker.SetTextFont(&newTextFont); + m_btnColorPicker.SetTextColor(fontDlg.GetColor()); + + if(m_bAutoResize) + { + m_btnColorPicker.SizeToContent(); + } + else + { + m_btnColorPicker.Invalidate(); + } + } +} + +void CColorPickerButtonDlg::OnButtonSettext() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.SetText(m_sText); + if(m_bAutoResize) + { + m_btnColorPicker.SizeToContent(); + } + else + { + m_btnColorPicker.Invalidate(); + } +} + +void CColorPickerButtonDlg::OnButtonSettooltip() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.SetToolTipText(m_sTooltip); +} + +void CColorPickerButtonDlg::OnCheckAutoresize() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + if (m_bAutoResize) + { + m_btnColorPicker.SizeToContent(); + } + else + { + // ... Get old position + CRect rect; + m_btnColorPicker.GetWindowRect(rect); + ScreenToClient(rect); + // ... Move + m_btnColorPicker.SetWindowPos(NULL, -1, -1, m_originalSize.cx, m_originalSize.cy, + SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOACTIVATE); + // ... Invalidate old and new position + InvalidateRect(rect); + m_btnColorPicker.Invalidate(); + } +} + +void CColorPickerButtonDlg::OnCheckDisabled() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.EnableWindow(!m_bDisable); +} + +void CColorPickerButtonDlg::OnCheckHyperlook() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.SetHyperLook(m_bHyperlook); +} + +void CColorPickerButtonDlg::OnCheckImage() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + if(m_bImage) + { + VERIFY(m_btnColorPicker.LoadBitmap(IDB_IMAGE, m_bAutoResize, RGB(255, 0, 255))); + } + else + { + m_btnColorPicker.RemoveImage(m_bAutoResize); + } + + if(!m_bAutoResize) + { + m_btnColorPicker.Invalidate(); + } + +} + +void CColorPickerButtonDlg::OnCheckMultiline() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + if(m_bMultiline) + m_btnColorPicker.ModifyStyle(0,BS_MULTILINE); + else + m_btnColorPicker.ModifyStyle(BS_MULTILINE,0); + + if (m_bAutoResize) + { + m_btnColorPicker.SizeToContent(); + } + else + { + m_btnColorPicker.Invalidate(); + } +} + +void CColorPickerButtonDlg::OnCheckTooltip() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.SetToolTip(m_bTooltip); + + ShowControls(); +} + +void CColorPickerButtonDlg::OnCheckTracklook() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + m_btnColorPicker.SetTrackLook(m_bTracklook); +} + +void CColorPickerButtonDlg::OnRadioArrow() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + switch(m_nArrowStyle) + { + case 0: + { + m_btnColorPicker.SetStyleEx(OXBB_EX_DROPDOWN); + break; + } + case 1: + { + m_btnColorPicker.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); + break; + } + case 2: + { + m_btnColorPicker.SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNNOARROW); + break; + } + } + + if(m_bAutoResize) + { + m_btnColorPicker.SizeToContent(); + } + else + { + m_btnColorPicker.Invalidate(); + } +} + +void CColorPickerButtonDlg::OnRadioButtonAlignment() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + DWORD nHorizontalAlignment = (DWORD)-1; + DWORD nVerticalAlignment = (DWORD)-1; + + if ((m_nButtonAlignment == 0) || (m_nButtonAlignment == 1) || (m_nButtonAlignment == 2)) + nVerticalAlignment = BS_TOP; + if ((m_nButtonAlignment == 3) || (m_nButtonAlignment == 4) || (m_nButtonAlignment == 5)) + nVerticalAlignment = BS_VCENTER; + if ((m_nButtonAlignment == 6) || (m_nButtonAlignment == 7) || (m_nButtonAlignment == 8)) + nVerticalAlignment = BS_BOTTOM; + + if ((m_nButtonAlignment == 0) || (m_nButtonAlignment == 3) || (m_nButtonAlignment == 6)) + nHorizontalAlignment = BS_LEFT; + if ((m_nButtonAlignment == 1) || (m_nButtonAlignment == 4) || (m_nButtonAlignment == 7)) + nHorizontalAlignment = BS_CENTER; + if ((m_nButtonAlignment == 2) || (m_nButtonAlignment == 5) || (m_nButtonAlignment == 8)) + nHorizontalAlignment = BS_RIGHT; + + ASSERT(nHorizontalAlignment != (DWORD)-1); + ASSERT(nVerticalAlignment != (DWORD)-1); + + DWORD nOldVerticalAlignment=m_btnColorPicker.GetVerticalAlignment(); + + m_btnColorPicker.SetVerticalAlignment(nVerticalAlignment); + m_btnColorPicker.SetHorizontalAlignment(nHorizontalAlignment); + + if(m_bAutoResize && (nOldVerticalAlignment==BS_VCENTER || + nVerticalAlignment==BS_VCENTER)) + { + m_btnColorPicker.SizeToContent(); + } +} + +void CColorPickerButtonDlg::OnSelchangeComboNumcolors() +{ + // TODO: Add your control notification handler code here + + if (!UpdateData(TRUE)) + return; + + // get Color Picker + COXColorPickerCtrl* pColorPickerCtrl=m_btnColorPicker.GetColorPickerCtrl(); + + // clear buttons color and tooltips arrays + pColorPickerCtrl->SetButtonDataTable(NULL,0); + pColorPickerCtrl->SetToolTipTextTable(NULL,0); + + // set default style + pColorPickerCtrl->SetPopupBarStyle(0); + + // set default & custom buttons text + pColorPickerCtrl->SetDefaultButtonText(CString(_T("Default"))); + pColorPickerCtrl->SetCustomButtonText(CString(_T("Custom..."))); + + // set default button size + pColorPickerCtrl->SetButtonSize(CSize(18,18)); + + switch(m_nNumColors) + { + case 0: + { + pColorPickerCtrl->SetNumButtons(10); + pColorPickerCtrl->SetNumRows(2); + pColorPickerCtrl->SetButtonSize(CSize(30,30)); + break; + } + case 1: + { + pColorPickerCtrl->SetNumButtons(16); + pColorPickerCtrl->SetNumRows(2); + + pColorPickerCtrl->SetPopupBarStyle(POPUPBAR_NODEFAULT); + pColorPickerCtrl->SetCustomButtonText(_T("More Colors...")); + + break; + } + case 2: + { + pColorPickerCtrl->SetNumButtons(20); + pColorPickerCtrl->SetNumRows(4); + + pColorPickerCtrl->SetPopupBarStyle(POPUPBAR_NODEFAULT|POPUPBAR_NOCUSTOM); + + pColorPickerCtrl->PopulateColorTable(); + pColorPickerCtrl->SetToolTipTextIDTable(m_arrStandardColorsTooltips,20); + + break; + } + case 3: + { + pColorPickerCtrl->SetNumButtons(40); + pColorPickerCtrl->SetNumRows(4); + break; + } + } + +} + +void CColorPickerButtonDlg::OnButtonColorPicker() +{ + // TODO: Add your control notification handler code here + + COLORREF oldColor=m_clr; + + if (!UpdateData(TRUE)) + return; + + if(m_clr!=oldColor) + { + InvalidateRect(m_rectTop); + InvalidateRect(m_rectBottom); + } +} + +void CColorPickerButtonDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlTooltip.EnableWindow(m_bTooltip); + m_btnSetTooltip.EnableWindow(m_bTooltip); + + UpdateData(FALSE); +} + + +static void GradientFill(CDC* pDC, CRect rect, COLORREF clr, int nAlignment) +{ + int cxCap=rect.Width(); + int cyCap=rect.Height(); + + // red, green and blue color vals + int red=GetRValue(clr); + int green=GetGValue(clr); + int blue=GetBValue(clr); + + int nCurBlock; + // width of area to shade and width squared + int nWidth, nWidth_x_2; + // width of one shade band + int nDelta; + UINT nNumberShade=64; + + switch(nAlignment) + { + case 0: + { + nWidth=cxCap; + nWidth_x_2=cxCap*cxCap; + nDelta=__max(nWidth/nNumberShade,1); + nCurBlock=cxCap-nDelta; + + while(nCurBlock>0) + { + // paint bands right to left + int nRest_x_2=(nWidth-nCurBlock)*(nWidth-nCurBlock); + PaintRect(pDC, nCurBlock+rect.left, rect.top, nDelta, cyCap, + RGB(red-(red*nRest_x_2)/nWidth_x_2, + green-(green*nRest_x_2)/nWidth_x_2, + blue-(blue*nRest_x_2)/nWidth_x_2)); + // next band + nCurBlock-=nDelta; + } + // whatever's left ==> black + PaintRect(pDC,rect.left,rect.top,nCurBlock+nDelta,cyCap,RGB(0,0,0)); + + break; + } + case 1: + { + nCurBlock=cxCap/2; + nWidth=cxCap/2; + nWidth_x_2=cxCap*cxCap/4; + nDelta=__max(nWidth/(2*nNumberShade),1); + + while(nCurBlock>0) + { + // paint bands right to left + int nRest_x_2=(nWidth-nCurBlock)*(nWidth-nCurBlock); + PaintRect(pDC, nWidth+nCurBlock+rect.left, rect.top, nDelta, cyCap, + RGB(red-(red*nRest_x_2)/nWidth_x_2, + green-(green*nRest_x_2)/nWidth_x_2, + blue-(blue*nRest_x_2)/nWidth_x_2)); + // next band + nCurBlock-=nDelta; + } + // whatever's left ==> black + PaintRect(pDC,nWidth+rect.left, rect.top,nCurBlock+nDelta,cyCap,RGB(0,0,0)); + + nCurBlock=0; + while(nCurBlock<=nWidth) + { + // paint bands left to right + int nRest_x_2=nCurBlock*nCurBlock; + PaintRect(pDC, nCurBlock+rect.left, rect.top, nDelta, cyCap, + RGB(red-(red*nRest_x_2)/nWidth_x_2, + green-(green*nRest_x_2)/nWidth_x_2, + blue-(blue*nRest_x_2)/nWidth_x_2)); + // next band + nCurBlock+=nDelta; + } + // whatever's left ==> black + PaintRect(pDC,nCurBlock-nDelta+rect.left, rect.top, + nWidth-nCurBlock+nDelta, cyCap,RGB(0,0,0)); + + break; + } + case 2: + { + nCurBlock=0; + nWidth=cxCap; + nWidth_x_2=cxCap*cxCap; + nDelta=__max(nWidth/nNumberShade,1); + + while(nCurBlock black + PaintRect(pDC,nCurBlock-nDelta+rect.left, rect.top, + nWidth-nCurBlock+nDelta-1, cyCap,RGB(0,0,0)); + + break; + } + } +} + + +////////////////// +// Helper to paint rectangle with a color. +// +static void PaintRect(CDC* pDC, int x, int y, int w, int h, COLORREF color) +{ + CBrush brush(color); + CBrush* pOldBrush = pDC->SelectObject(&brush); + pDC->PatBlt(x, y, w, h, PATCOPY); + pDC->SelectObject(pOldBrush); +} + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.h new file mode 100644 index 0000000..cb3e3cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonDlg.h @@ -0,0 +1,89 @@ +// ColorPickerButtonDlg.h : header file +// + +#if !defined(AFX_COLORPICKERBUTTONDLG_H__875CC119_F4B4_11D1_8862_0080C83F712F__INCLUDED_) +#define AFX_COLORPICKERBUTTONDLG_H__875CC119_F4B4_11D1_8862_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CColorPickerButtonDlg dialog + +#include "OXColorPickerButton.h" + +class CColorPickerButtonDlg : public CDialog +{ +// Construction +public: + CColorPickerButtonDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CColorPickerButtonDlg) + enum { IDD = IDD_COLORPICKERBUTTON_DIALOG }; + CComboBox m_comboNumColors; + COXColorPickerButton m_btnColorPicker; + CEdit m_ctlTooltip; + CButton m_btnSetTooltip; + CString m_sTooltip; + CString m_sText; + int m_nArrowStyle; + int m_nButtonAlignment; + BOOL m_bAutoResize; + BOOL m_bDisable; + BOOL m_bHyperlook; + BOOL m_bImage; + BOOL m_bMultiline; + BOOL m_bTooltip; + BOOL m_bTracklook; + int m_nNumColors; + //}}AFX_DATA + COLORREF m_clr; + CSize m_originalSize; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CColorPickerButtonDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + // array of tooltip - color pairs for 20 standard colors + static ButtonToolTipIDTable m_arrStandardColorsTooltips[]; + + CRect m_rectTop; + CRect m_rectBottom; + + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CColorPickerButtonDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonFontcolor(); + afx_msg void OnButtonSettext(); + afx_msg void OnButtonSettooltip(); + afx_msg void OnCheckAutoresize(); + afx_msg void OnCheckDisabled(); + afx_msg void OnCheckHyperlook(); + afx_msg void OnCheckImage(); + afx_msg void OnCheckMultiline(); + afx_msg void OnCheckTooltip(); + afx_msg void OnCheckTracklook(); + afx_msg void OnRadioArrow(); + afx_msg void OnRadioButtonAlignment(); + afx_msg void OnSelchangeComboNumcolors(); + afx_msg void OnButtonColorPicker(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COLORPICKERBUTTONDLG_H__875CC119_F4B4_11D1_8862_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonInfo.rtf new file mode 100644 index 0000000..45cd991 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ColorPickerButtonInfo.rtf @@ -0,0 +1,42 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\froman\fcharset238\fprq2 Times New Roman CE;} +{\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f45\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;\red51\green51\blue153;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive +\ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5183391\rsid6432742 +\rsid6882868}{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr10\min33}{\revtim\yr2005\mo1\dy17\hr10\min35}{\version3}{\edmins2}{\nofpages1}{\nofwords149}{\nofchars850} +{\*\company Dundas India}{\nofcharsws998}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind4\viewscale100\nolnhtadjtbl\rsidroot6882868 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs40\cf17\insrsid6882868\charrsid6432742 COXColorPickerButton +\par }{\insrsid6882868 +\par }{\b\insrsid6882868 Copyright \'a9 The Code Project 1997 - 1998, All Rights Reserved}{\insrsid6882868 +\par +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\b\insrsid6882868\charrsid6882868 COXColorPickerButton}{\insrsid6882868 is derived from }{\b\insrsid6882868\charrsid6882868 COXBitmapButton}{ +\insrsid6882868 (with DROPDOWN style predefined) and uses }{\b\insrsid6882868\charrsid6882868 COXColorPickerCtrl}{\insrsid6882868 to display Color Picker popup bar. +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\insrsid6882868 You can set any color to }{\b\insrsid6882868\charrsid6882868 COXColorPickerButton}{\insrsid6882868 using }{ +\b\insrsid6882868\charrsid6882868 SetColor}{\insrsid6882868 and this color can be retrieved using }{\b\insrsid6882868\charrsid6882868 GetColor}{\insrsid6882868 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par To display the associated color we draw a color band in the bottom of the button. By default the height of that band is 5 p +ixels (if neither image nor text is associated with the button then the color band takes all available space). You can set/get the color band height using: +\par +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\b\insrsid6882868\charrsid6882868 SetColorBandHeight +\par GetColorBandHeight +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\insrsid6882868 The }{\b\insrsid6882868\charrsid6882868 COXColorPickerCtrl}{\insrsid6882868 control associated with }{\b\insrsid6882868\charrsid6882868 +COXColorPickerButton}{\insrsid6882868 can be retrieved using: +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\b\insrsid6882868\charrsid6882868 GetColorPickerCtrl}{\insrsid6882868 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par Also we provide some helper functions to set/get default color of associated +\par Color Picker control: +\par +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\b\insrsid6882868\charrsid6882868 SetDefaultColor}{\insrsid6882868 +\par }{\b\insrsid6882868\charrsid6882868 GetDefaultColor}{\insrsid6882868 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid6882868 +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6882868 {\insrsid6882868 Use }{\b\insrsid6882868\charrsid6882868 COXBitmapButton}{\insrsid6882868 and }{\b\insrsid6882868\charrsid6882868 COXColorPickerCtrl }{ +\insrsid6882868 functions to customize }{\b\insrsid6882868\charrsid6882868 COXColorPickerButton}{\insrsid6882868 .}{\insrsid6882868\charrsid6882868 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ReadMe.txt new file mode 100644 index 0000000..70fa77a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ColorPickerButton +======================================================================== + + +AppWizard has created this ColorPickerButton 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 ColorPickerButton application. + +ColorPickerButton.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CColorPickerButtonApp application class. + +ColorPickerButton.cpp + This is the main application source file that contains the application + class CColorPickerButtonApp. + +ColorPickerButton.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 + Developer Studio. + +res\ColorPickerButton.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ColorPickerButton.rc. + +res\ColorPickerButton.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ColorPickerButton.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ColorPickerButtonDlg.h, ColorPickerButtonDlg.cpp - the dialog + These files contain your CColorPickerButtonDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ColorPickerButton.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ColorPickerButton.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.cpp new file mode 100644 index 0000000..4a3bc6a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ColorPickerButton.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.h new file mode 100644 index 0000000..df75577 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__875CC11B_F4B4_11D1_8862_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__875CC11B_F4B4_11D1_8862_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__875CC11B_F4B4_11D1_8862_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.rc2 new file mode 100644 index 0000000..7d2355f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/ColorPickerButton.rc2 @@ -0,0 +1,13 @@ +// +// COLORPICKERBUTTON.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/bitmap1.bmp new file mode 100644 index 0000000..01a259a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/resource.h new file mode 100644 index 0000000..69460da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ColorPickerButton/resource.h @@ -0,0 +1,51 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ColorPickerButton.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_COLORPICKERBUTTON_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_IMAGE 129 +#define IDC_BUTTON_COLOR_PICKER 1000 +#define IDC_STATIC_RIGHTBAND 1001 +#define IDC_STATIC_LEFTBAND 1002 +#define IDC_CHECK_TOOLTIP 1003 +#define IDC_CHECK_TRACKLOOK 1004 +#define IDC_CHECK_HYPERLOOK 1005 +#define IDC_CHECK_DISABLED 1006 +#define IDC_CHECK_MULTILINE 1007 +#define IDC_CHECK_AUTORESIZE 1008 +#define IDC_CHECK_IMAGE 1009 +#define IDC_RADIO_LEFTTOP 1010 +#define IDC_RADIO_CENTERTOP 1011 +#define IDC_RADIO_RIGHTTOP 1012 +#define IDC_RADIO_LEFTCENTER 1013 +#define IDC_RADIO_ARROWNORMAL 1014 +#define IDC_BUTTON_FONTCOLOR 1015 +#define IDC_COMBO_NUMCOLORS 1016 +#define IDC_EDIT_TEXT 1017 +#define IDC_BUTTON_SETTEXT 1018 +#define IDC_RADIO_CENTERCENTER 1020 +#define IDC_RADIO_RIGHTCENTER 1021 +#define IDC_RADIO_LEFTBOTTOM 1022 +#define IDC_RADIO_CENTERBOTTOM 1023 +#define IDC_RADIO_RIGHTBOTTOM 1024 +#define IDC_RADIO_LEFT 1027 +#define IDC_RADIO_ARROWRIGHT 1029 +#define IDC_RADIO_ARROWNONE 1030 +#define IDC_EDIT_TOOLTIP 1031 +#define IDC_BUTTON_SETTOOLTIP 1032 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.cpp new file mode 100644 index 0000000..b503fc4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.cpp @@ -0,0 +1,605 @@ +// ComboOXTree.cpp: implementation of the CComboOXTree class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ComboOXTree.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CComboOXTree::CComboOXTree() : m_container(this), + m_pCombo(NULL), + m_rectValid(0,0,0,0), + m_hLastSelectedItem(NULL) +{ + +} + +CComboOXTree::~CComboOXTree() +{ + +} + + +BOOL CComboOXTree::PreCreateWindow(CREATESTRUCT& cs) +{ + // create container window + // + + ASSERT(!::IsWindow(m_container.GetSafeHwnd())); + if(::IsWindow(m_container.GetSafeHwnd())) + { + return FALSE; + } + + static CString sContainerWndClass=AfxRegisterWndClass(CS_SAVEBITS); + + if((cs.dwExStyle & + (WS_EX_CLIENTEDGE|WS_EX_STATICEDGE|WS_EX_WINDOWEDGE|WS_EX_DLGMODALFRAME))==0) + { + cs.dwExStyle|=WS_EX_DLGMODALFRAME; + } + + if(!m_container.CreateEx(cs.dwExStyle,sContainerWndClass,_T(""), + (cs.style & 0xffff0000 & ~(WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL))| + WS_POPUP|MFS_SYNCACTIVE,cs.x,cs.y,cs.cx,cs.cy,cs.hwndParent,NULL)) + { + return FALSE; + } + // + /////////////////////////////////////////////// + + + // change create data + cs.style&=~(WS_VISIBLE|WS_POPUP); + // must have buttons + cs.style|=WS_CHILD; + cs.dwExStyle=0; + cs.hwndParent=m_container.GetSafeHwnd(); + cs.x=cs.y=0; + CRect rect; + m_container.GetClientRect(rect); + cs.cx=rect.Width(); + cs.cy=rect.Height(); + + return COXTreeCtrl::PreCreateWindow(cs); +} + + + +LRESULT CComboOXTree::WindowProc(UINT message, + WPARAM wParam, + LPARAM lParam) +{ + LRESULT lResult=0; + + switch(message) + { + case WM_KILLFOCUS: + OnKillFocus(CWnd::FromHandle((HWND)wParam)); + break; + + case WM_LBUTTONDOWN: + OnLButtonDown((UINT)wParam,CPoint(LOWORD(lParam),HIWORD(lParam))); + break; + + case WM_LBUTTONDBLCLK: + OnLButtonDblClk((UINT) wParam, CPoint(LOWORD(lParam),HIWORD(lParam))); + break; + + case WM_MOUSEMOVE: + OnMouseMove((UINT)wParam,CPoint(LOWORD(lParam),HIWORD(lParam))); + break; + + case WM_KEYDOWN: + OnKeyDown((UINT)wParam,LOWORD(lParam),HIWORD(lParam)); + break; + default: + lResult=COXTreeCtrl::WindowProc(message,wParam,lParam); + break; + } + + return lResult; +} + + + +void CComboOXTree::OnKillFocus(CWnd* pNewWnd) +{ + COXTreeCtrl::OnKillFocus(pNewWnd); + + if(pNewWnd!=this && m_pCombo!=NULL) + { + m_pCombo->PostMessage(CB_SHOWDROPDOWN,FALSE); + } +} + + + +void CComboOXTree::OnLButtonDown(UINT nFlags, CPoint point) +{ + + + COXTreeCtrl::OnLButtonDown(nFlags,point); + HTREEITEM hItem=COXTreeCtrl::GetSelectedItem(); + if (hItem) + SelectItem(hItem); +// } +} + + +void CComboOXTree::OnMouseMove(UINT nFlags, CPoint point) +{ + COXTreeCtrl::OnMouseMove(nFlags,point); +} + + +void CComboOXTree::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) +{ + if(m_pCombo!=NULL) + { + if(nChar==VK_ESCAPE || nChar==VK_RETURN) + { + if(nChar==VK_RETURN) + { + HTREEITEM hItem=GetSelectedItem(); + if(hItem!=NULL) + { + m_hLastSelectedItem=hItem; + } + } + m_pCombo->ShowDropDown(FALSE); + m_pCombo->SetFocus(); + return; + } + } + + COXTreeCtrl::OnKeyDown(nChar,nRepCnt,nFlags); +} + + + +void CComboOXTree::AutoResize() +{ + ASSERT(::IsWindow(GetSafeHwnd())); + if(!::IsWindow(GetSafeHwnd())) + { + return; + } + + CRect rectCurrent; + GetWindowRect(rectCurrent); + CRect rectBest=GetBestRect(); + CRect rect=rectBest; + ASSERT(m_sizeMinWidthHeight.cx<=m_sizeMaxWidthHeight.cx || + m_sizeMinWidthHeight.cx==-1 || m_sizeMaxWidthHeight.cx==-1); + ASSERT(m_sizeMinWidthHeight.cy<=m_sizeMaxWidthHeight.cy || + m_sizeMinWidthHeight.cy==-1 || m_sizeMaxWidthHeight.cy==-1); + if(m_sizeMaxWidthHeight.cx>=0 && rect.Width()>m_sizeMaxWidthHeight.cx) + { + rect.right=rect.left+m_sizeMaxWidthHeight.cx; + } + if(m_sizeMaxWidthHeight.cy>=0 && rect.Height()>m_sizeMaxWidthHeight.cy) + { + rect.bottom=rect.top+m_sizeMaxWidthHeight.cy; + } + if(m_sizeMinWidthHeight.cx>=0 && rect.Width()=0 && rect.Height()rect.Height() && + rect.Width()0) + { + CRect rect; + VERIFY(GetItemRect(0,rect,FALSE)); + return rect.Height(); + } + else + { + return OXCOMBOPICKER_DEFAULTITEMHEIGHT; + } +} + + + +BOOL CComboOXTree::IsThereSelectedItem() +{ + if(!::IsWindow(GetSafeHwnd())) + { + return FALSE; + } + + return (m_hLastSelectedItem!=NULL); +} + + + +CImageList* CComboOXTree::GetSelectedItemImage() +{ + if(!IsThereSelectedItem()) + { + return NULL; + } + + int nItemImage=-1; + int nItemSelectedImage=-1; + GetItemImage(m_hLastSelectedItem,nItemImage,nItemSelectedImage); + if(nItemImage==-1) + { + return NULL; + } + + CImageList* pImageList=GetImageList(TVSIL_NORMAL); + if(pImageList==NULL) + { + return NULL; + } + ASSERT(nItemImageGetImageCount()); + + CImageList* pSelectedItemImageList=new CImageList(); + if(!pSelectedItemImageList->Create(pImageList)) + { + delete pSelectedItemImageList; + return NULL; + } + + for(int nIndex=pSelectedItemImageList->GetImageCount()-1; nIndex>=0; nIndex--) + { + if(nIndex!=nItemImage) + { + VERIFY(pSelectedItemImageList->Remove(nIndex)); + } + } + + return pSelectedItemImageList; +} + + +CString CComboOXTree::GetSelectedItemText() +{ + if(!IsThereSelectedItem()) + { + return _T(""); + } + + return GetItemText(m_hLastSelectedItem); +} + + + +CFont* CComboOXTree::GetSelectedItemFont() +{ + if(!IsThereSelectedItem()) + { + return NULL; + } + + return GetFont(); +} + + + +COLORREF CComboOXTree::GetSelectedItemTextColor() +{ + return ::GetSysColor(COLOR_WINDOWTEXT); +} + + + +void CComboOXTree::ResetContent() +{ + if(::IsWindow(GetSafeHwnd())) + { + DeleteAllItems(); + } +} + + + +void CComboOXTree::OnAttachToComboPicker() +{ + ASSERT(m_pCombo!=NULL); + if(m_pCombo!=NULL && ::IsWindow(m_pCombo->GetSafeHwnd()) && + ::IsWindow(GetSafeHwnd())) + { + ASSERT(::IsWindow(m_container.GetSafeHwnd())); + CRect rect; + m_pCombo->GetWindowRect(rect); + CRect rectCalc=rect; + m_container.CalcWindowRect(rectCalc); + // set the minimum width for the control + CSize sizeMinWidthHeight=GetMinWidthHeight(); + sizeMinWidthHeight.cx=2*rect.Width()-rectCalc.Width(); + SetMinWidthHeight(sizeMinWidthHeight); + } +} + + + +void CComboOXTree::OnChangeMinMaxWidthHeight() +{ + if(::IsWindow(GetSafeHwnd())) + { + AutoResize(); + } +} + + + +void CComboOXTree::OnChangeOwnerComboSize() +{ + ASSERT(m_pCombo!=NULL); + if(m_pCombo!=NULL && ::IsWindow(m_pCombo->GetSafeHwnd()) && + ::IsWindow(GetSafeHwnd())) + { + // set the minimum width for the control + ASSERT(::IsWindow(m_container.GetSafeHwnd())); + CRect rect; + m_pCombo->GetWindowRect(rect); + CRect rectCalc=rect; + m_container.CalcWindowRect(rectCalc); + SetMinWidthHeight(2*rect.Width()-rectCalc.Width(),-1); + } +} + + + +void CComboOXTree::ShowDropDown(BOOL bShowIt/*=TRUE*/) +{ + if(m_pCombo!=NULL) + { + if(bShowIt) + { + m_hLastSelectedItem=GetSelectedItem(); + // ASSERT(CanSelectItem(m_hLastSelectedItem)); + + // adjust size of window + AutoResize(); + + // make sure the selected item is visible + if(m_hLastSelectedItem!=NULL) + { + EnsureVisible(m_hLastSelectedItem); + } + } + else + { + //ASSERT(CanSelectItem(m_hLastSelectedItem)); + if (CanSelectItem(m_hLastSelectedItem)) + SelectItem(m_hLastSelectedItem); + } + } +} + + + +BOOL CComboOXTree::CanSelectItem(HTREEITEM hItem) +{ + UNUSED_ALWAYS(hItem); + return TRUE; + +} + + + +void CComboOXTree::ForwardMouseMessage(UINT message, UINT nFlags, + CPoint point) +{ + ASSERT(::IsWindow(GetSafeHwnd())); + if(!::IsWindow(GetSafeHwnd())) + { + return; + } + + CPoint ptScreen=point; + ClientToScreen(&ptScreen); + CWnd* pTargetWnd=CWnd::WindowFromPoint(ptScreen); + if(pTargetWnd==NULL) + { + return; + } + + ASSERT(pTargetWnd!=this); + if(pTargetWnd==this) + { + return; + } + + WPARAM wParam=nFlags; + + int nHitTest= + (int)pTargetWnd->SendMessage(WM_NCHITTEST,0,MAKELONG(ptScreen.x,ptScreen.y)); + if(nHitTest==HTCLIENT) + { + pTargetWnd->ScreenToClient(&ptScreen); + } + else + { + switch(message) + { + case WM_LBUTTONDOWN: + { + message=WM_NCLBUTTONDOWN; + break; + } + case WM_RBUTTONDOWN: + { + message=WM_NCRBUTTONDOWN; + break; + } + case WM_MBUTTONDOWN: + { + message=WM_NCMBUTTONDOWN; + break; + } + case WM_LBUTTONUP: + { + message=WM_NCLBUTTONUP; + break; + } + case WM_RBUTTONUP: + { + message=WM_NCRBUTTONUP; + break; + } + case WM_MBUTTONUP: + { + message=WM_NCMBUTTONUP; + break; + } + case WM_LBUTTONDBLCLK: + { + message=WM_NCLBUTTONDBLCLK; + break; + } + case WM_RBUTTONDBLCLK: + { + message=WM_NCRBUTTONDBLCLK; + break; + } + case WM_MBUTTONDBLCLK: + { + message=WM_NCMBUTTONDBLCLK; + break; + } + case WM_MOUSEMOVE: + { + message=WM_NCMOUSEMOVE; + break; + } + } + wParam=nHitTest; + } + + LPARAM lParam=MAKELONG(ptScreen.x,ptScreen.y); + + pTargetWnd->SendMessage(message,wParam,lParam); +} + +void CComboOXTree::OnLButtonDblClk( UINT nFlags, CPoint point ) +{ + UNUSED_ALWAYS(point); + UNUSED_ALWAYS(nFlags); + + HTREEITEM hItem=GetSelectedItem(); + if(hItem!=NULL) + { + m_hLastSelectedItem=hItem; + } + m_pCombo->ShowDropDown(FALSE); + m_pCombo->SetFocus(); + +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.h new file mode 100644 index 0000000..c0c6902 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboOXTree.h @@ -0,0 +1,80 @@ +// ComboOXTree.h: interface for the CComboOXTree class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_COMBOOXTREE_H__35306228_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) +#define AFX_COMBOOXTREE_H__35306228_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXTreeCtrl.h" +#include "OXComboPickerCtrl.h" + +class CComboOXTree : public COXTreeCtrl , public COXComboDropDown +{ +public: + CComboOXTree(); + virtual ~CComboOXTree(); +protected: + COXDropDownContainer m_container; + COXComboPickerCtrl* m_pCombo; + + // helper rectangle for flicker-free control + CRect m_rectValid; + + // last selected item + HTREEITEM m_hLastSelectedItem; + + +public: + void ForwardMouseMessage(UINT message, UINT nFlags, CPoint point); + +protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + void OnLButtonDblClk( UINT nFlags, CPoint point ); + + +public: + virtual void SetOwnerCombo(COXComboPickerCtrl* pCombo) { m_pCombo=pCombo; } + inline COXComboPickerCtrl* GetOwnerCombo() const { return m_pCombo; } + + virtual BOOL CanSelectItem(HTREEITEM hItem); + + virtual COXDropDownContainer* GetContainer() { return &m_container; } + virtual CWnd* GetWindow() { return this; } + + virtual void ShowDropDown(BOOL bShowIt=TRUE); + + virtual void GetDroppedControlRect(LPRECT lprect) const; + virtual BOOL GetDroppedState() const; + virtual CRect GetBestRect(); + virtual int GetItemHeight(); + + virtual BOOL IsThereSelectedItem(); + virtual CImageList* GetSelectedItemImage(); + virtual CString GetSelectedItemText(); + virtual CFont* GetSelectedItemFont(); + virtual COLORREF GetSelectedItemTextColor(); + + + virtual void ResetContent(); + + virtual BOOL NeedFocus() const { return TRUE; } + + virtual void OnAttachToComboPicker(); + virtual void OnChangeMinMaxWidthHeight(); + virtual void OnChangeOwnerComboSize(); + +protected: + virtual void AutoResize(); + virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); + + virtual void OnKillFocus(CWnd* pNewWnd); + virtual void OnLButtonDown(UINT nFlags, CPoint point); + virtual void OnMouseMove(UINT nFlags, CPoint point); + virtual void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); +}; + +#endif // !defined(AFX_COMBOOXTREE_H__35306228_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.clw new file mode 100644 index 0000000..a391137 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.clw @@ -0,0 +1,58 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CComboTreeDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "combotree.h" +LastPage=0 + +ClassCount=3 +Class1=CComboTreeApp +Class2=CAboutDlg +Class3=CComboTreeDlg + +ResourceCount=1 +Resource1=IDD_COMBOTREE_DIALOG + +[CLS:CComboTreeApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ComboTree.h +ImplementationFile=ComboTree.cpp +Filter=N +VirtualFilter=AC + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ComboTreeDlg.cpp +ImplementationFile=ComboTreeDlg.cpp + +[CLS:CComboTreeDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ComboTreeDlg.h +ImplementationFile=ComboTreeDlg.cpp +LastObject=IDC_MASKED +Filter=D +VirtualFilter=dWC + +[DLG:IDD_COMBOTREE_DIALOG] +Type=1 +Class=CComboTreeDlg +ControlCount=12 +Control1=ID_APPLY,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_STATIC,button,1342177287 +Control5=IDC_EDIT_SHELLTREEWIDTH,edit,1350631552 +Control6=IDC_EDIT_SHELLTREEHEIGHT,edit,1350631552 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_EDIT_OXTREEWIDTH,edit,1350631552 +Control10=IDC_EDIT_OXTREEHEIGHT,edit,1350631552 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.cpp new file mode 100644 index 0000000..17f3586 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.cpp @@ -0,0 +1,92 @@ +// ComboTree.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ComboTree.h" +#include "ComboTreeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeApp + +BEGIN_MESSAGE_MAP(CComboTreeApp, CWinApp) + //{{AFX_MSG_MAP(CComboTreeApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeApp construction + +CComboTreeApp::CComboTreeApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CComboTreeApp object + +CComboTreeApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeApp initialization + +BOOL CComboTreeApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + + CComboTreeDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CComboTreeApp::ExitInstance() +{ + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsp new file mode 100644 index 0000000..21274a9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsp @@ -0,0 +1,370 @@ +# Microsoft Developer Studio Project File - Name="ComboTree" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ComboTree - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ComboTree.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ComboTree.mak" CFG="ComboTree - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ComboTree - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ComboTree - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ComboTree - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ComboTree - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ComboTree - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ComboTree - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ComboTree.exe" + +!ELSEIF "$(CFG)" == "ComboTree - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ComboTree.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ComboTree - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ComboTree___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "ComboTree___Win32_DebugUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ComboTree.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ComboTree - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ComboTree___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "ComboTree___Win32_ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ComboTree.exe" + +!ELSEIF "$(CFG)" == "ComboTree - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ComboTree___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "ComboTree___Win32_ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ComboTree.exe" + +!ENDIF + +# Begin Target + +# Name "ComboTree - Win32 Release" +# Name "ComboTree - Win32 Debug" +# Name "ComboTree - Win32 DebugUnicode" +# Name "ComboTree - Win32 ReleaseUnicode" +# Name "ComboTree - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ComboOXTree.cpp +# End Source File +# Begin Source File + +SOURCE=.\ComboTree.cpp +# End Source File +# Begin Source File + +SOURCE=.\ComboTree.rc +# End Source File +# Begin Source File + +SOURCE=.\ComboTreeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\FolderTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXComboPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellFolderTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellNamespaceNavigator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ComboOXTree.h +# End Source File +# Begin Source File + +SOURCE=.\ComboTree.h +# End Source File +# Begin Source File + +SOURCE=.\ComboTreeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\FolderTree.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXComboPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShellFolderTree.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShellNamespaceNavigator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCal.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeHeader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeItem.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap2.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ComboTree.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ComboTree.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ComboTree.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsw new file mode 100644 index 0000000..f21bc67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ComboTree"=".\ComboTree.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ComboTree", AAHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.h new file mode 100644 index 0000000..f1a204d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.h @@ -0,0 +1,50 @@ +// ComboTree.h : main header file for the COMBOTREE application +// + +#if !defined(AFX_COMBOTREE_H__10B74AFE_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_) +#define AFX_COMBOTREE_H__10B74AFE_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeApp: +// See ComboTree.cpp for the implementation of this class +// + +class CComboTreeApp : public CWinApp +{ +public: + CComboTreeApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CComboTreeApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CComboTreeApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COMBOTREE_H__10B74AFE_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rc new file mode 100644 index 0000000..77782dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rc @@ -0,0 +1,211 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "\r\n" + "#include ""res\\ComboTree.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\r\n" + "#include ""OXCalendarPopup.rc""\r\n" + "#include ""OXShellFolderTree.rc""\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\\ComboTree.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_COMBOTREE_DIALOG DIALOGEX 0, 0, 336, 101 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Combo Tree" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Apply",ID_APPLY,279,59,50,14 + PUSHBUTTON "Exit",IDCANCEL,279,80,50,14 + GROUPBOX "COXShellFolderTree",IDC_STATIC,7,7,124,87 + GROUPBOX "COXTreeCtrl",IDC_STATIC,141,7,130,87 + EDITTEXT IDC_EDIT_SHELLTREEWIDTH,61,59,25,11,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SHELLTREEHEIGHT,61,74,25,11,ES_AUTOHSCROLL + LTEXT "Max Width",IDC_STATIC,17,61,40,8 + LTEXT "Max Height",IDC_STATIC,17,76,40,8 + EDITTEXT IDC_EDIT_OXTREEWIDTH,232,59,25,11,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_OXTREEHEIGHT,232,73,25,11,ES_AUTOHSCROLL + LTEXT "Max Width",IDC_STATIC,188,61,40,8 + LTEXT "Max Height",IDC_STATIC,188,76,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 "040904B0" + BEGIN + VALUE "FileDescription", "ComboTree MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ComboTree" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "ComboTree.EXE" + VALUE "ProductName", "ComboTree Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_COMBOTREE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 329 + TOPMARGIN, 7 + BOTTOMMARGIN, 94 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" +IDB_BITMAP2 BITMAP "res\\bitmap2.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ComboTree..." +END + +STRINGTABLE +BEGIN + ID_DESCRIPTION_FILE "ComboTree.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 + +#include "res\ComboTree.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#include "OXCalendarPopup.rc" +#include "OXShellFolderTree.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rtf new file mode 100644 index 0000000..5635d1b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.vcproj new file mode 100644 index 0000000..d08a609 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTree.vcproj @@ -0,0 +1,1716 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.cpp new file mode 100644 index 0000000..9c63bd4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.cpp @@ -0,0 +1,343 @@ +// ComboTreeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ComboTree.h" +#include "ComboTreeDlg.h" +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeDlg dialog + +CComboTreeDlg::CComboTreeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CComboTreeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CComboTreeDlg) + m_nOXTreeHeight = 0; + m_nOXTreeWidth = 0; + m_nShellHeight = 0; + m_nShellWidth = 0; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CComboTreeDlg::~CComboTreeDlg() +{ +} +void CComboTreeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CComboTreeDlg) + DDX_Text(pDX, IDC_EDIT_OXTREEHEIGHT, m_nOXTreeHeight); + DDV_MinMaxUInt(pDX, m_nOXTreeHeight, 0, 300); + DDX_Text(pDX, IDC_EDIT_OXTREEWIDTH, m_nOXTreeWidth); + DDV_MinMaxUInt(pDX, m_nOXTreeWidth, 0, 300); + DDX_Text(pDX, IDC_EDIT_SHELLTREEHEIGHT, m_nShellHeight); + DDV_MinMaxUInt(pDX, m_nShellHeight, 0, 300); + DDX_Text(pDX, IDC_EDIT_SHELLTREEWIDTH, m_nShellWidth); + DDV_MinMaxUInt(pDX, m_nShellWidth, 0, 300); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CComboTreeDlg, CDialog) + //{{AFX_MSG_MAP(CComboTreeDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(ID_APPLY, OnApply) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CComboTreeDlg message handlers + +BOOL CComboTreeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + + InitializeControls(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CComboTreeDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CComboTreeDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CComboTreeDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + + +void CComboTreeDlg::InitializeControls() +{ + //initializing shell tree + VERIFY(m_pckShell.Create(WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | CBS_DROPDOWNLIST, + CRect(20,30,160,40),this,IDC_PICKER)); + VERIFY(m_cmbShell.Create(WS_CHILD | TVS_HASBUTTONS | TVS_TRACKSELECT | TVS_LINESATROOT | TVS_HASLINES, + CRect(0,0,0,0),this,IDC_COMBO)); + + m_cmbShell.SetOwnerCombo(&m_pckShell); + m_pckShell.AttachDropDown(&m_cmbShell); + m_pckShell.SetMaxDropdownHeight(200); + m_cmbShell.InitializeTree(); + + //initializing COXTreeCtrl combo + VERIFY(m_pckOXTree.Create(WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | CBS_DROPDOWNLIST, + CRect(220,30,380,40),this,IDC_PICKER_OX)); + VERIFY(m_cmbOXTree.Create(WS_CHILD | TVS_HASBUTTONS | TVS_TRACKSELECT | TVS_LINESATROOT | TVS_HASLINES, + CRect(0,0,0,0),this,IDC_COMBO_OX,NULL)); + + m_cmbOXTree.SetOwnerCombo(&m_pckOXTree); + + + + + +static CImageList m_il; m_il.Create(IDB_BITMAP1,32,1,RGB(255,255,255)); +static CImageList m_il1; m_il1.Create(IDB_BITMAP1,32,1,RGB(255,255,255)); +static CImageList m_ils; m_ils.Create(IDB_BITMAP2,13,1,RGB(255,255,255)); + + CStringArray saComboStr; + CStringArray saDates; + saDates.Add(_T("01/01/1998")); + saDates.Add(_T("31/12/1998")); + int i=0; + for(i=0;i < 10;i++) + { + CString s; + s.Format(_T("Option %d"),i+1); + saComboStr.Add(s); + } + + CString sItem; + for (i = 1; i<=10; i++) + { + sItem.Format(_T("Item %d"),i); + m_cmbOXTree.InsertItem(sItem); + } + + LV_COLUMN lvc; + memset(&lvc,0,sizeof(lvc)); + lvc.fmt = LVCFMT_LEFT; + lvc.cx = 100; + lvc.pszText = _T("Column"); + lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; + m_cmbOXTree.SetColumn(0,&lvc); + m_cmbOXTree.InsertColumn(1,_T("Dummy"),LVCFMT_LEFT,100,1); + m_cmbOXTree.InsertColumn(2,_T("SuperDummy"),LVCFMT_LEFT,100,2); + m_cmbOXTree.InsertColumn(3,_T("ComboBox"),LVCFMT_LEFT,100,3); + m_cmbOXTree.InsertColumn(4,_T("Dates"),LVCFMT_RIGHT,100,4); + m_cmbOXTree.SetImageList(&m_il1,TVSIL_NORMAL); + m_cmbOXTree.SetImageList(&m_ils,TVSIL_STATE); + for(i=0;i<1;i++) + { + CString sItem; + sItem.Format(_T("Item %d"),i); + HTREEITEM hti = m_cmbOXTree.InsertItem(sItem,TVI_ROOT); + sItem.Format(_T("Column2 Item %d"),i); + m_cmbOXTree.SetSubItem(hti,1,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetSubItem(hti,2,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetNoEditMode(hti,1); + m_cmbOXTree.SetNoEditMode(hti,2); + m_cmbOXTree.SetSubItem(hti,3,OX_SUBITEM_TEXT|OX_SUBITEM_IMAGE,sItem,1); +// m_cmbOXTree.SetItemColor(hti,RGB(255 - 10*i,0,0)); +// m_cmbOXTree.SetItemColor(hti,RGB(0,255 - 10*i,0),1); + m_cmbOXTree.SetEditMode(hti,OXET_COMBO,saComboStr,3); + + m_cmbOXTree.SetSubItem(hti,4,OX_SUBITEM_TEXT,_T("None")); + m_cmbOXTree.SetEditMode(hti,OXET_CALENDAR,saDates,4); + TV_ITEM tvi; + memset(&tvi,0,sizeof(tvi)); + tvi.cChildren=1; + tvi.mask=TVIF_CHILDREN | TVIF_HANDLE; + tvi.hItem = hti; + if(!i) + { + tvi.mask |= TVIF_TEXT; + tvi.pszText = LPSTR_TEXTCALLBACK; + m_cmbOXTree.SetItem(&tvi); + } + else if(i == 1) + { + tvi.mask |= TVIF_STATE; + tvi.stateMask = TVIS_STATEIMAGEMASK; + tvi.state = INDEXTOSTATEIMAGEMASK(2); + m_cmbOXTree.SetItem(&tvi); + } + else if(i == 2) + { + LOGFONT lf; + CFont f,*pF = GetFont(); + if(pF->GetLogFont(&lf)) + { + lf.lfItalic = TRUE; + f.CreateFontIndirect(&lf); + m_cmbOXTree.SetItemFont(hti,&f); + } + m_cmbOXTree.SetItem(&tvi); + } + else + m_cmbOXTree.SetItem(&tvi); + + m_cmbOXTree.SetItemImage(hti,0,1); + + for(int j=100;j >= 0;j--) + { + sItem.Format(_T("Item %d-%d"),i,j); + HTREEITEM h =m_cmbOXTree.InsertItem(sItem,hti); + if(!j) + { + CFont f; + f.CreatePointFont(-80,_T("Arial")); + m_cmbOXTree.SetItemFont(h,&f); + } + + sItem.Format(_T("Option %d"),j); + m_cmbOXTree.SetSubItem(h,1,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetSubItem(h,2,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetNoEditMode(h,1); + m_cmbOXTree.SetNoEditMode(h,2); + m_cmbOXTree.SetSubItem(h,3,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetEditMode(h,OXET_COMBO,saComboStr,3); + m_cmbOXTree.SetSubItem(h,4,OX_SUBITEM_TEXT,_T("None")); + m_cmbOXTree.SetEditMode(h,OXET_CALENDAR,saDates,4); + + for(int k=0;k<10;k++) + { + sItem.Format(_T("Item %d-%d -%d"),i,j,k); + HTREEITEM hSubitem=m_cmbOXTree.InsertItem(sItem,h); + sItem.Format(_T("SubItem %d"),k); + m_cmbOXTree.SetSubItem(hSubitem,1,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetSubItem(hSubitem,2,OX_SUBITEM_TEXT,sItem); + m_cmbOXTree.SetNoEditMode(hSubitem,1); + m_cmbOXTree.SetNoEditMode(hSubitem,2); + m_cmbOXTree.SetSubItem(hSubitem,3,OX_SUBITEM_TEXT|OX_SUBITEM_IMAGE, + sItem,1); + m_cmbOXTree.SetPlainEditMode(hSubitem,1); + + if(k == 1) + { + tvi.mask = TVIF_STATE | TVIF_HANDLE | TVIF_CHILDREN; + tvi.cChildren=1; + tvi.hItem = hSubitem; + tvi.stateMask = TVIS_STATEIMAGEMASK; + tvi.state = INDEXTOSTATEIMAGEMASK(2); + m_cmbOXTree.SetItem(&tvi); + } + } + } + } + + m_cmbOXTree.ModifyExStyle(0,TVOXS_COLUMNHDR); + m_cmbOXTree.ModifyExStyle(0,TVOXS_MULTISEL); + m_cmbOXTree.ModifyStyle(0,TVS_EDITLABELS); + m_cmbOXTree.ModifyStyle(0,TVS_HASBUTTONS); + m_cmbOXTree.ModifyStyle(0,TVS_HASLINES); + m_cmbOXTree.ModifyStyle(0,TVS_LINESATROOT); + m_cmbOXTree.ModifyStyle(0,TVS_SHOWSELALWAYS); + m_cmbOXTree.ModifyExStyle(0,TVOXS_VGRID); + m_cmbOXTree.ModifyExStyle(0,TVOXS_HGRID); + m_cmbOXTree.ModifyExStyle(0,TVOXS_FLGRID); + m_cmbOXTree.ModifyExStyle(0,TVOXS_ROWSEL); + m_cmbOXTree.ModifyExStyle(0,TVOXS_PICKANYWHERE); + m_cmbOXTree.ModifyExStyle(0,TVOXS_ITEMTIPS); + + + m_pckOXTree.AttachDropDown(&m_cmbOXTree); + m_pckOXTree.SetMaxDropdownHeight(300); + m_cmbOXTree.ShowWindow(SW_SHOW); + + m_cmbOXTree.SelectItem(m_cmbOXTree.GetNextItem(TVI_ROOT,TVGN_CHILD)); + +// m_cmbOXTree.SelectItem(m_cmbOXTree.GetItemFromIndex(0)); + + UpdateData(FALSE); + + +} + +void CComboTreeDlg::OnApply() +{ + UpdateData(); + + m_cmbOXTree.SetMinWidthHeight(1,1); + m_cmbOXTree.SetMaxWidthHeight(m_nOXTreeWidth?m_nOXTreeWidth:-1, + m_nOXTreeHeight?m_nOXTreeHeight:-1); + m_cmbShell.SetMinWidthHeight(1,1); + m_cmbShell.SetMaxWidthHeight(m_nShellWidth?m_nShellWidth:-1, + m_nShellHeight?m_nShellHeight:-1); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.h new file mode 100644 index 0000000..4757ca8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/ComboTreeDlg.h @@ -0,0 +1,88 @@ +// ComboTreeDlg.h : header file +// + +#if !defined(AFX_COMBOTREEDLG_H__10B74B00_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_) +#define AFX_COMBOTREEDLG_H__10B74B00_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_ + +#include "..\..\..\INCLUDE\OXComboPickerCtrl.h" // Added by ClassView +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +#include "FolderTree.h" +#include "..\..\..\INCLUDE\OXTreeCtrl.h" // Added by ClassView +#include "ComboOXTree.h" + +///////////////////////////////////////////////////////////////////////////// +// CMulticolumnTree + +class CMulticolumnTree : public COXTreeComboDropDown +{ +public: + virtual CRect GetBestRect() + { + CRect rect=COXTreeComboDropDown::GetBestRect(); + + int nWidth=0; + for(int nIndex=0; nIndexitemHeight=m_pDropDown->GetItemHeight(); + } + else + { + lpMeasureItemStruct->itemHeight=38; + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderPicker.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderPicker.h new file mode 100644 index 0000000..97a95e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderPicker.h @@ -0,0 +1,23 @@ +// FolderPicker.h: interface for the CFolderPicker class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FOLDERPICKER_H__35306227_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) +#define AFX_FOLDERPICKER_H__35306227_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "..\..\..\INCLUDE\OXComboPickerCtrl.h" + +class CFolderPicker : public COXComboPickerCtrl +{ +public: + CFolderPicker(); + virtual ~CFolderPicker(); + virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); + +}; + +#endif // !defined(AFX_FOLDERPICKER_H__35306227_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.cpp new file mode 100644 index 0000000..d51bd72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.cpp @@ -0,0 +1,42 @@ +// FolderTree.cpp: implementation of the CFolderTree class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "FolderTree.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CFolderTree::CFolderTree() +{ + +} + +CFolderTree::~CFolderTree() +{ +} + +BOOL CFolderTree::CanSelectItem(HTREEITEM hItem) +{ + if (hItem) + { + CString sFullPath=GetFullPath(hItem); + return (sFullPath.IsEmpty()==FALSE); + } + return FALSE; +} + +CString CFolderTree::GetSelectedItemText() +{ + + CString sResult; + HTREEITEM hItem=GetSelectedItem(); + if (hItem) + sResult=GetFullPath(hItem); + return sResult; + +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.h new file mode 100644 index 0000000..8e52a50 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/FolderTree.h @@ -0,0 +1,26 @@ +// FolderTree.h: interface for the CFolderTree class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FOLDERTREE_H__35306226_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) +#define AFX_FOLDERTREE_H__35306226_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "..\..\..\INCLUDE\OXShellFolderTree.h" +#include "OXComboPickerCtrl.h" + + +class CFolderTree : public COXTreeComboDropDown +{ +public: + CFolderTree(); + virtual BOOL CanSelectItem(HTREEITEM hItem); + virtual ~CFolderTree(); + virtual CString GetSelectedItemText(); + +}; + +#endif // !defined(AFX_FOLDERTREE_H__35306226_1C37_11D4_AD1F_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.cpp new file mode 100644 index 0000000..450f800 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ComboTree.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.h new file mode 100644 index 0000000..aa13575 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__10B74B02_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__10B74B02_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__10B74B02_15F6_11D4_AD12_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.rc2 new file mode 100644 index 0000000..7667abd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/ComboTree.rc2 @@ -0,0 +1,13 @@ +// +// COMBOTREE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap1.bmp new file mode 100644 index 0000000..d3c9dc1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap2.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap2.bmp new file mode 100644 index 0000000..bfb9c91 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/res/bitmap2.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/resource.h new file mode 100644 index 0000000..0d0819e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ComboTree/resource.h @@ -0,0 +1,32 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ComboTree.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDC_PICKER 101 +#define IDD_COMBOTREE_DIALOG 102 +#define IDC_COMBO 102 +#define IDC_PICKER_OX 103 +#define IDC_COMBO_OX 104 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 130 +#define IDB_BITMAP1 131 +#define IDB_BITMAP2 132 +#define IDC_EDIT_SHELLTREEWIDTH 1004 +#define IDC_EDIT_SHELLTREEHEIGHT 1005 +#define ID_APPLY 1006 +#define IDC_EDIT_OXTREEWIDTH 1008 +#define IDC_EDIT_OXTREEHEIGHT 1009 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 105 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/CntxHlpInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/CntxHlpInfo.rtf new file mode 100644 index 0000000..254ca77 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/CntxHlpInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.clw new file mode 100644 index 0000000..dbc5ac7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.clw @@ -0,0 +1,109 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CContextHelpApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "contexthelp.h" +LastPage=0 + +ClassCount=6 +Class1=CContextHelpApp +Class2=CContextHelpDlg +Class3=CTest2Page +Class4=CTestDialog +Class5=CTestPage +Class6=CTestSheet + +ResourceCount=4 +Resource1=IDD_COLOR +Resource2=IDD_TESTBOX +Resource3=IDD_CONTEXTHELP_DIALOG +Resource4=IDD_STYLE + +[CLS:CContextHelpApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ContextHelp.h +ImplementationFile=ContextHelp.cpp +Filter=N +VirtualFilter=AC +LastObject=CContextHelpApp + +[CLS:CContextHelpDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ContextHelpDlg.h +ImplementationFile=ContextHelpDlg.cpp + +[CLS:CTest2Page] +Type=0 +BaseClass=COXContextHelpPropertyPage +HeaderFile=test2page.h +ImplementationFile=test2page.cpp + +[CLS:CTestDialog] +Type=0 +BaseClass=COXContextHelpDialog +HeaderFile=TestDialog.h +ImplementationFile=TestDialog.cpp +LastObject=1004 +Filter=D +VirtualFilter=dWC + +[CLS:CTestPage] +Type=0 +BaseClass=COXContextHelpPropertyPage +HeaderFile=testpage.h +ImplementationFile=testpage.cpp + +[CLS:CTestSheet] +Type=0 +BaseClass=COXContextHelpPropertySheet +HeaderFile=TestSheet.h +ImplementationFile=TestSheet.cpp +LastObject=1004 + +[DLG:IDD_CONTEXTHELP_DIALOG] +Type=1 +Class=CContextHelpDlg +ControlCount=2 +Control1=IDC_BUTTON1,button,1342242816 +Control2=IDC_BUTTON2,button,1342242816 + +[DLG:IDD_COLOR] +Type=1 +Class=CTest2Page +ControlCount=5 +Control1=IDC_SCROLLBAR2,scrollbar,1342177281 +Control2=IDC_TESTCHECK1,button,1342242819 +Control3=IDC_TESTCOMBO1,combobox,1344341251 +Control4=IDC_TESTBUTTON2,button,1342242816 +Control5=IDC_LIST1,listbox,1352728835 + +[DLG:IDD_TESTBOX] +Type=1 +Class=CTestDialog +ControlCount=10 +Control1=IDOK,button,1342373889 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_BITMAP,static,1342244878 +Control4=IDC_STATIC1,static,1342308352 +Control5=IDC_EDIT1,edit,1350631552 +Control6=IDC_STATIC2,button,1342177287 +Control7=1004,button,1342242816 +Control8=IDC_CHECK1,button,1342242819 +Control9=IDC_COMBO1,combobox,1344341251 +Control10=IDC_SCROLLBAR1,scrollbar,1342177280 + +[DLG:IDD_STYLE] +Type=1 +Class=CTestPage +ControlCount=5 +Control1=IDC_STATIC3,button,1342177287 +Control2=IDC_TESTEDIT,edit,1350631552 +Control3=IDC_STATIC4,static,1342308364 +Control4=IDC_TESTBUTTON,button,1342242816 +Control5=IDC_CHECK3,button,1342242819 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.cpp new file mode 100644 index 0000000..3e14f11 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.cpp @@ -0,0 +1,98 @@ +// ContextHelp.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ContextHelp.h" +#include "ContextHelpDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpApp + +BEGIN_MESSAGE_MAP(CContextHelpApp, CWinApp) + //{{AFX_MSG_MAP(CContextHelpApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpApp construction + +CContextHelpApp::CContextHelpApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CContextHelpApp object + +CContextHelpApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpApp initialization + +BOOL CContextHelpApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CContextHelpDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CContextHelpApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsp new file mode 100644 index 0000000..4b9dce8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsp @@ -0,0 +1,309 @@ +# Microsoft Developer Studio Project File - Name="ContextHelp" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ContextHelp - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ContextHelp.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ContextHelp.mak" CFG="ContextHelp - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ContextHelp - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ContextHelp - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ContextHelp - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ContextHelp - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ContextHelp - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ContextHelp - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ContextHelp.exe" + +!ELSEIF "$(CFG)" == "ContextHelp - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ContextHelp.exe" + +!ELSEIF "$(CFG)" == "ContextHelp - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ContextH" +# PROP BASE Intermediate_Dir "ContextH" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ContextHelp.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ContextHelp.exe" + +!ELSEIF "$(CFG)" == "ContextHelp - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Context0" +# PROP BASE Intermediate_Dir "Context0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ContextHelp.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ContextHelp.exe" + +!ELSEIF "$(CFG)" == "ContextHelp - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Context1" +# PROP BASE Intermediate_Dir "Context1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ContextHelp.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ContextHelp.exe" + +!ENDIF + +# Begin Target + +# Name "ContextHelp - Win32 Release" +# Name "ContextHelp - Win32 Debug" +# Name "ContextHelp - Win32 Release_Shared" +# Name "ContextHelp - Win32 Unicode_Debug" +# Name "ContextHelp - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXContextHelpDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXContextHelpPropertyPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXContextHelpPropertySheet.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ContextHelp.cpp +# End Source File +# Begin Source File + +SOURCE=.\ContextHelp.hpj +# End Source File +# Begin Source File + +SOURCE=.\ContextHelp.rc +# End Source File +# Begin Source File + +SOURCE=.\ContextHelpDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\test2page.cpp +# End Source File +# Begin Source File + +SOURCE=.\TestDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\testpage.cpp +# End Source File +# Begin Source File + +SOURCE=.\TestSheet.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ContextHelp.h +# End Source File +# Begin Source File + +SOURCE=.\ContextHelpDlg.h +# End Source File +# Begin Source File + +SOURCE=.\HelpIDs.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXContextHelpDialog.h +# End Source File +# Begin Source File + +SOURCE=.\resource.hm +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\test2page.h +# End Source File +# Begin Source File + +SOURCE=.\TestDialog.h +# End Source File +# Begin Source File + +SOURCE=.\testpage.h +# End Source File +# Begin Source File + +SOURCE=.\TestSheet.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ContextHelp.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ContextHelp.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ContextHelp.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsw new file mode 100644 index 0000000..3a08723 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ContextHelp"=".\ContextHelp.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ContextHelp", ABHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.h new file mode 100644 index 0000000..2d18419 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.h @@ -0,0 +1,38 @@ +// ContextHelp.h : main header file for the CONTEXTHELP application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpApp: +// See ContextHelp.cpp for the implementation of this class +// + +class CContextHelpApp : public CWinApp +{ +public: + CContextHelpApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CContextHelpApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CContextHelpApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.hlp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.hlp new file mode 100644 index 0000000..8818a3b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.hlp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rc new file mode 100644 index 0000000..bc2d8df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rc @@ -0,0 +1,299 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +// Generated Help ID header file +#define APSTUDIO_HIDDEN_SYMBOLS +#include "resource.hm" +#undef APSTUDIO_HIDDEN_SYMBOLS + +#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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CONTEXTHELP_DIALOG DIALOGEX 0, 0, 185, 60 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Context Help/Tooltips" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "Dialog with Context Sensitive help and Tooltips",IDC_BUTTON1,8,13,170,14 + PUSHBUTTON "Prop. Sheet with Context Sensitive help and Tooltips",IDC_BUTTON2,8,34,170,14 +END + +IDD_COLOR DIALOG 0, 0, 225, 41 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Test2" +FONT 8, "MS Sans Serif" +BEGIN + SCROLLBAR IDC_SCROLLBAR2,215,0,10,41,SBS_VERT + CONTROL "Check1",IDC_TESTCHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,0,39,10 + COMBOBOX IDC_TESTCOMBO1,0,15,48,42,CBS_DROPDOWNLIST | CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Button2",IDC_TESTBUTTON2,60,15,50,14 + LISTBOX IDC_LIST1,142,0,48,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP +END + +IDD_STYLE DIALOG 0, 0, 224, 41 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Test" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "A group box",IDC_STATIC3,0,0,224,41 + EDITTEXT IDC_TESTEDIT,5,20,60,14,ES_AUTOHSCROLL + CONTROL "Static text",IDC_STATIC4,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,5,10,50,8 + PUSHBUTTON "Button1",IDC_TESTBUTTON,80,20,50,14 + CONTROL "Check again",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,17,54,10 +END + +IDD_TESTBOX DIALOGEX 0, 0, 253, 111 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Dialog with Context Sensitive help and Tootips" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,197,7,49,14,WS_GROUP,0,HIDOK + PUSHBUTTON "Cancel",IDCANCEL,196,27,50,14,0,0,HIDCANCEL + CONTROL 130,IDC_BITMAP,"Static",SS_BITMAP | SS_REALSIZEIMAGE | WS_TABSTOP,7,7,36,33,WS_EX_DLGMODALFRAME,HIDC_BITMAP + LTEXT "Example of COXContextHelpDialog classes",IDC_STATIC1,67,16,117,8,0,0,HIDC_STATIC1 + EDITTEXT IDC_EDIT1,77,28,70,14,ES_AUTOHSCROLL,0,HIDC_EDIT1 + GROUPBOX "Static",IDC_STATIC2,59,7,128,43,0,0,HIDC_STATIC2 + PUSHBUTTON "Button",1004,7,58,50,14,0,0,0x808103ec + CONTROL "ENABLE TOOLTIPS",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,73,87,89,10,0,HIDC_CHECK1 + COMBOBOX IDC_COMBO1,198,58,48,57,CBS_DROPDOWNLIST | CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,0,HIDC_COMBO1 + SCROLLBAR IDC_SCROLLBAR1,135,58,56,11,0,0,HIDC_SCROLLBAR1 +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 "040904B0" + BEGIN + VALUE "FileDescription", "CONTEXTHELP MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "CONTEXTHELP" + VALUE "LegalCopyright", "Copyright © 1997" + VALUE "OriginalFilename", "CONTEXTHELP.EXE" + VALUE "ProductName", "CONTEXTHELP Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CONTEXTHELP_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 53 + END + + IDD_TESTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 104 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_COLOR DLGINIT +BEGIN + IDC_TESTCOMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_TESTCOMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_TESTCOMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_TESTCOMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + IDC_TESTCOMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3520, "\000" + 0 +END + +IDD_TESTBOX DLGINIT +BEGIN + IDC_COMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_COMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_COMBO1, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ContextHelp..." +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Context Sensitive Help" + ID_DESCRIPTION_FILE "CntxHlpInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Context help and tooltip files" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ContextHelp.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\ContextHelp.ico" +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ContextHelp.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rtf new file mode 100644 index 0000000..1e17672 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.rtf @@ -0,0 +1,22 @@ +{\rtf1\ansi \deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f7\fswiss\fcharset0\fprq2 MS Sans Serif;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;}{\stylesheet{\widctlpar \f4\fs20\lang2057 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s15\widctlpar \f4\fs20\lang2057 \sbasedon0\snext15 footnote text;}{\*\cs16 \additive\super \sbasedon10 footnote reference;}} +{\info{\author David Oxley}{\operator David Oxley}{\creatim\yr1996\mo12\dy2\hr14\min5}{\revtim\yr1996\mo12\dy6\min30}{\version2}{\edmins1}{\nofpages10}{\nofwords38}{\nofchars219}{\*\company OxSoft}{\vern57431}}\paperw11906\paperh16838 +\widowctrl\ftnbj\aenddoc\hyphcaps0\formshade \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \widctlpar \f4\fs20\lang2057 +{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_COMBO1}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_TESTCOMBO1}}{\f7\fs16 This is a combo box. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_STATIC1}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_STATIC3}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 { +\cs16\super #}IDH_STATIC4}}{\f7\fs16 This is static text. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_STATIC2}}{\f7\fs16 This is a group box. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_BITMAP}}{\f7\fs16 This is a bitmap +\par with a raised border. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_EDIT1}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_TESTEDIT}}{\f7\fs16 This is an edit field. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_BUTTON2}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_TESTBUTTON}#{\footnote \pard\plain \s15\widctlpar +\f4\fs20\lang2057 {\cs16\super #}IDH_TESTBUTTON2}}{\f7\fs16 This is another button. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_CHECK1}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_CHECK3}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 { +\cs16\super #}IDH_TESTCHECK1}}{\f7\fs16 This is a check box. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_SCROLLBAR1}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_SCROLLBAR2}}{\f7\fs16 This is a scrollbar. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_LIST1}}{\f7\fs16 This is a list box. +\par \page }{\cs16\f7\fs16\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_COLOR}#{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang2057 {\cs16\super #}IDH_STYLE}}{\f7\fs16 This is a property sheet.} +\par } \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj new file mode 100644 index 0000000..51c6adf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj @@ -0,0 +1,1197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj.vspscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj.vspscc new file mode 100644 index 0000000..d334d87 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelp.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "relative:samples\\gui\\ContextHelp" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.cpp new file mode 100644 index 0000000..9e4d147 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.cpp @@ -0,0 +1,154 @@ +// ContextHelpDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ContextHelp.h" +#include "ContextHelpDlg.h" + +#include "UTSampleAbout.h" + +#include "TestDialog.h" +#include "TestPage.h" +#include "Test2Page.h" +#include "TestSheet.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpDlg dialog + +CContextHelpDlg::CContextHelpDlg(CWnd* pParent /*=NULL*/) + : CDialog(CContextHelpDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CContextHelpDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CContextHelpDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CContextHelpDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CContextHelpDlg, CDialog) + //{{AFX_MSG_MAP(CContextHelpDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON1, OnButton1) + ON_BN_CLICKED(IDC_BUTTON2, OnButton2) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpDlg message handlers + +BOOL CContextHelpDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CContextHelpDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CContextHelpDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CContextHelpDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CContextHelpDlg::OnButton1() +{ + CTestDialog testDlg; + testDlg.m_bCheck1=TRUE; + testDlg.DoModal(); + +} + +void CContextHelpDlg::OnButton2() +{ + CTestSheet dlgPropertySheet(AFX_IDS_APP_TITLE); + CTestPage testPage; + CTest2Page test2Page; + + dlgPropertySheet.AddPage(&testPage); + dlgPropertySheet.AddPage(&test2Page); + + dlgPropertySheet.DoModal() ; + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.h new file mode 100644 index 0000000..1e63032 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/ContextHelpDlg.h @@ -0,0 +1,39 @@ +// ContextHelpDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CContextHelpDlg dialog + +class CContextHelpDlg : public CDialog +{ +// Construction +public: + CContextHelpDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CContextHelpDlg) + enum { IDD = IDD_CONTEXTHELP_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CContextHelpDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CContextHelpDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButton1(); + afx_msg void OnButton2(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/HelpIDs.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/HelpIDs.h new file mode 100644 index 0000000..aff313b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/HelpIDs.h @@ -0,0 +1,20 @@ +#define IDH_BITMAP 1001 +#define IDH_STATIC2 1002 +#define IDH_STATIC1 1003 +#define IDH_EDIT1 1004 +#define IDH_BUTTON2 1005 +#define IDH_CHECK1 1006 +#define IDH_SCROLLBAR1 1007 +#define IDH_COMBO1 1008 +#define IDH_STATIC3 1009 +#define IDH_STATIC4 1010 +#define IDH_TESTEDIT 1011 +#define IDH_TESTBUTTON 1012 +#define IDH_CHECK3 1013 +#define IDH_TESTCHECK1 1014 +#define IDH_TESTCOMBO1 1015 +#define IDH_TESTBUTTON2 1016 +#define IDH_LIST1 1017 +#define IDH_SCROLLBAR2 1018 +#define IDH_COLOR 1019 +#define IDH_STYLE 1020 \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.cpp new file mode 100644 index 0000000..899d3f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ContextHelp.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.h new file mode 100644 index 0000000..29ef4bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "helpids.h" + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.cpp new file mode 100644 index 0000000..4a2210a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.cpp @@ -0,0 +1,177 @@ +// TestDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "contexthelp.h" +#include "TestDialog.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTestDialog dialog + +const DWORD CTestDialog::m_nHelpIDs[] = +{ + IDC_BITMAP, IDH_BITMAP, + IDC_STATIC2, IDH_STATIC2, + IDC_STATIC1, IDH_STATIC1, + IDC_EDIT1, IDH_EDIT1, + IDC_BUTTON2, IDH_BUTTON2, + IDC_CHECK1, IDH_CHECK1, + IDC_SCROLLBAR1, IDH_SCROLLBAR1, + IDC_COMBO1, IDH_COMBO1, + 0, 0 +}; + +CTestDialog::CTestDialog(CWnd* pParent /*=NULL*/) + : COXContextHelpDialog(CTestDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTestDialog) + m_bCheck1 = FALSE; + //}}AFX_DATA_INIT + + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + + +void CTestDialog::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTestDialog) + DDX_Control(pDX, IDC_SCROLLBAR1, m_scroll1); + DDX_Control(pDX, IDC_EDIT1, m_edit1); + DDX_Control(pDX, IDC_COMBO1, m_combo1); + DDX_Control(pDX, IDC_CHECK1, m_check1); + DDX_Control(pDX, IDC_BUTTON2, m_btTwo); + DDX_Control(pDX, IDCANCEL, m_btCancel); + DDX_Control(pDX, IDOK, m_btOk); + DDX_Check(pDX, IDC_CHECK1, m_bCheck1); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTestDialog, COXContextHelpDialog) + //{{AFX_MSG_MAP(CTestDialog) + ON_BN_CLICKED(IDC_CHECK1, OnCheck1) + ON_WM_PAINT() + ON_WM_SYSCOMMAND() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTestDialog message handlers + +BOOL CTestDialog::AdjustToolTips() +{ + //Set up the Tooltip + BOOL rt = m_Tooltip.AddTool(this, _T("Test Dialog Box")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_btOk, _T("Save Changes")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_btCancel, _T("Cancel Changes")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_btTwo, _T("Another Button")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_combo1, _T("A ComboBox")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_scroll1, _T("A Scroll Bar")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_check1, _T("A Check Box to disable/enable Tooltips")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_edit1, _T("An Edit Field")); + ASSERT(rt != 0) ; + + return rt; + } + +void CTestDialog::OnCheck1() +{ + SetTooltipActive(!GetTooltipActive()); +} + +BOOL CTestDialog::OnInitDialog() +{ + COXContextHelpDialog::OnInitDialog(); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CTestDialog::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CTestDialog::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CTestDialog::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.h new file mode 100644 index 0000000..26cfa0a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestDialog.h @@ -0,0 +1,52 @@ +// TestDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CTestDialog dialog +#include "OXContextHelpDialog.h" + +class CTestDialog : public COXContextHelpDialog +{ +// Construction +public: + CTestDialog(CWnd* pParent = NULL); // standard constructor + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CTestDialog) + enum { IDD = IDD_TESTBOX }; + CScrollBar m_scroll1; + CEdit m_edit1; + CComboBox m_combo1; + CButton m_check1; + CButton m_btTwo; + CButton m_btCancel; + CButton m_btOk; + BOOL m_bCheck1; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTestDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CTestDialog) + afx_msg void OnCheck1(); + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.cpp new file mode 100644 index 0000000..900fe50 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.cpp @@ -0,0 +1,160 @@ +// TestSheet.cpp : implementation file +// + +#include "stdafx.h" +#include "ContextHelp.h" +#include "TestSheet.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTestSheet dialog + +const DWORD CTestSheet::m_nHelpIDs[] = +{ + 0, 0 +}; + +CTestSheet::CTestSheet(UINT nIDCaption, CWnd *pParentWnd, + UINT iSelectPage) : COXContextHelpPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CTestSheet::CTestSheet(LPCTSTR pszCaption, CWnd *pParentWnd, + UINT iSelectPage) : COXContextHelpPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CTestSheet::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertySheet::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTestSheet) + DDX_Control(pDX, IDCANCEL, m_btCancel); + DDX_Control(pDX, IDOK, m_btOk); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTestSheet, COXContextHelpPropertySheet) + //{{AFX_MSG_MAP(CTestSheet) + // NOTE: the ClassWizard will add message map macros here + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTestSheet message handlers + +BOOL CTestSheet::AdjustToolTips() +{ + //Set up the Tooltip + BOOL rt = m_Tooltip.AddTool(this, _T("COXContextHelpPropertySheet")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_btOk, _T("Save Changes")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_btCancel, _T("Cancel Changes")); + ASSERT(rt != 0) ; + + return rt; +} + +BOOL CTestSheet::OnInitDialog() +{ + CPropertySheet::OnInitDialog(); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + // TODO: Add extra initialization here + static CFont font; + if (font.m_hObject != NULL) + font.CreatePointFont(-16,_T("Times New Roman")); + SetFont(&font); + + + return TRUE; +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CTestSheet::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CPropertySheet::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CTestSheet::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CTestSheet::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + COXContextHelpPropertySheet::OnSysCommand(nID, lParam); + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.h new file mode 100644 index 0000000..a35d37a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/TestSheet.h @@ -0,0 +1,51 @@ +// TestSheet.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CTestSheet dialog + +#include "OXContextHelpPropertySheet.h" + +class CTestSheet : public COXContextHelpPropertySheet +{ +// Construction +public: + CTestSheet(UINT nIDCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + CTestSheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + +protected: + BOOL AdjustToolTips() ; + +// Dialog Data + //{{AFX_DATA(CTestSheet) + enum { IDD = IDD_TESTBOX }; + CButton m_btCancel; + CButton m_btOk; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTestSheet) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CTestSheet) + // NOTE: the ClassWizard will add member functions here + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.rc2 new file mode 100644 index 0000000..568c439 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/ContextHelp.rc2 @@ -0,0 +1,13 @@ +// +// CONTEXTHELP.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/bitmap1.bmp new file mode 100644 index 0000000..d7a2091 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.h new file mode 100644 index 0000000..7898585 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.h @@ -0,0 +1,43 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ContextHelp.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_CONTEXTHELP_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDD_TESTBOX 129 +#define IDB_BITMAP 130 +#define IDD_STYLE 130 +#define IDD_COLOR 131 +#define IDC_BUTTON1 1000 +#define IDC_BUTTON2 1001 +#define IDC_BITMAP 1001 +#define IDC_EDIT1 1002 +#define IDC_STATIC1 1003 +#define IDC_CHECK1 1005 +#define IDC_COMBO1 1007 +#define IDC_SCROLLBAR1 1009 +#define IDC_STATIC2 1013 +#define IDC_STATIC3 1014 +#define IDC_STATIC4 1015 +#define IDC_TESTEDIT 1016 +#define IDC_TESTBUTTON 1017 +#define IDC_SCROLLBAR2 1018 +#define IDC_TESTCHECK1 1020 +#define IDC_TESTCOMBO1 1021 +#define IDC_TESTBUTTON2 1022 +#define IDC_LIST1 1023 +#define IDC_CHECK3 1024 +#define ID_DESCRIPTION_FILE 57345 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.hm b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.hm new file mode 100644 index 0000000..1231433 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/resource.hm @@ -0,0 +1,12 @@ +// Microsoft Developer Studio generated Help ID include file. +// Used by ContextHelp.rc +// +#define HIDCANCEL 0x80640002 +#define HIDC_BITMAP 0x806403e9 +#define HIDC_CHECK1 0x806403ed +#define HIDC_COMBO1 0x806403ef +#define HIDC_EDIT1 0x806403ea +#define HIDC_SCROLLBAR1 0x806403f1 +#define HIDC_STATIC1 0x806403eb +#define HIDC_STATIC2 0x806403f5 +#define HIDOK 0x80640001 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.cpp new file mode 100644 index 0000000..8400d07 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.cpp @@ -0,0 +1,69 @@ +#include "stdafx.h" +#include "ContextHelp.h" + +#include "OXContextHelpPropertyPage.h" +#include "Test2Page.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTest2Page property page + +const DWORD CTest2Page::m_nHelpIDs[] = +{ + IDC_TESTCHECK1, IDH_TESTCHECK1, + IDC_TESTCOMBO1, IDH_TESTCOMBO1, + IDC_TESTBUTTON2, IDH_TESTBUTTON2, + IDC_LIST1, IDH_LIST1, + IDC_SCROLLBAR1, IDH_SCROLLBAR1, + IDD_COLOR, IDH_COLOR, + 0, 0 +}; + +CTest2Page::CTest2Page() + : COXContextHelpPropertyPage(CTest2Page::IDD) +{ + //{{AFX_DATA_INIT(CTest2Page) + //}}AFX_DATA_INIT +} + +void CTest2Page::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTest2Page) + DDX_Control(pDX, IDC_SCROLLBAR2, m_scroll1); + DDX_Control(pDX, IDC_TESTCOMBO1, m_combo1); + DDX_Control(pDX, IDC_TESTCHECK1, m_check1); + DDX_Control(pDX, IDC_TESTBUTTON2, m_button2); + DDX_Control(pDX, IDC_LIST1, m_list); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CTest2Page, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CTest2Page) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTest2Page message handlers + +BOOL CTest2Page::AdjustToolTips() +{ + //Set up the Tooltip + BOOL rt = m_Tooltip.AddTool(&m_scroll1, _T("A Scroll Bar")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_combo1, _T("A Combo Box")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_check1, _T("A Check Box")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_button2, _T("A Button")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_list, _T("A List Box")); + ASSERT(rt != 0) ; + + return rt; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.h new file mode 100644 index 0000000..76e4051 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/test2page.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// CTest2Page dialog + +#include "OXContextHelpPropertyPage.h" + +class CTest2Page : public COXContextHelpPropertyPage +{ +// Construction +public: + CTest2Page(); + + BOOL AdjustToolTips(); + + +// Dialog Data + //{{AFX_DATA(CTest2Page) + enum { IDD = IDD_COLOR }; + CScrollBar m_scroll1; + CComboBox m_combo1; + CButton m_check1; + CButton m_button2; + CListBox m_list; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CTest2Page) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CTest2Page) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.cpp new file mode 100644 index 0000000..21ac95d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.cpp @@ -0,0 +1,75 @@ +#include "stdafx.h" +#include "Contexthelp.h" + +#include "OXContextHelpPropertyPage.h" +#include "TestPage.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTestPage dialog + +const DWORD CTestPage::m_nHelpIDs[] = +{ + IDC_STATIC3, IDH_STATIC3, + IDC_STATIC4, IDH_STATIC4, + IDC_TESTEDIT, IDH_TESTEDIT, + IDC_TESTBUTTON, IDH_TESTBUTTON, + IDC_CHECK3, IDH_CHECK3, + IDD_STYLE, IDH_STYLE, + 0, 0 +}; + +CTestPage::CTestPage() : COXContextHelpPropertyPage(CTestPage::IDD) +{ + //{{AFX_DATA_INIT(CTestPage) + //}}AFX_DATA_INIT +} + +void CTestPage::DoDataExchange(CDataExchange* pDX) +{ + COXContextHelpPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTestPage) + DDX_Control(pDX, IDC_STATIC3, m_static3); + DDX_Control(pDX, IDC_STATIC4, m_static4); + DDX_Control(pDX, IDC_TESTEDIT, m_edit1); + DDX_Control(pDX, IDC_CHECK3, m_check1); + DDX_Control(pDX, IDC_TESTBUTTON, m_button2); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CTestPage, COXContextHelpPropertyPage) + //{{AFX_MSG_MAP(CTestPage) + ON_BN_CLICKED(IDC_TESTBUTTON, OnTestbutton) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTestPage message handlers + +BOOL CTestPage::AdjustToolTips() +{ + //Set up the Tooltip + BOOL rt = m_Tooltip.AddTool(&m_static3, _T("A Group Box")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_static4, _T("Some static Text")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_edit1, _T("An Edit Field")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_check1, _T("A Check Box")); + ASSERT(rt != 0) ; + rt = m_Tooltip.AddTool(&m_button2, _T("A Button")); + ASSERT(rt != 0) ; + + return rt; +} + + +void CTestPage::OnTestbutton() +{ + AfxMessageBox(_T("Hi, there ...")); + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.h new file mode 100644 index 0000000..19d71d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ContextHelp/testpage.h @@ -0,0 +1,38 @@ +#include "OXContextHelpPropertyPage.h" + +class CTestPage : public COXContextHelpPropertyPage +{ +// Construction +public: + CTestPage(); + + BOOL AdjustToolTips(); + +// Dialog Data + //{{AFX_DATA(CTestPage) + enum { IDD = IDD_STYLE }; + CStatic m_static3; + CStatic m_static4; + CEdit m_edit1; + CButton m_check1; + CButton m_button2; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CTestPage) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + static const DWORD m_nHelpIDs[]; + virtual const DWORD* GetHelpIDs() {return m_nHelpIDs;} +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CTestPage) + afx_msg void OnTestbutton(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBar.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBarInfo.rtf new file mode 100644 index 0000000..b2638dc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CoolBarInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.cpp new file mode 100644 index 0000000..8f83115 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.cpp @@ -0,0 +1,181 @@ +// CustomizeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + + +CCustomizeDlg::CCustomizeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeDlg) + m_bCustomizable = FALSE; + m_bFlat = FALSE; + m_bList = FALSE; + m_bSeparator = FALSE; + m_bText = FALSE; + m_nRows = 0; + m_nWidth = 0; + m_nToolbar = -1; + m_nTextType = -1; + m_sBandText = _T(""); + m_nImage = -1; + //}}AFX_DATA_INIT +} + + +void CCustomizeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeDlg) + DDX_Control(pDX, IDC_COMBO_IMAGE, m_ctlComboImage); + DDX_Control(pDX, IDC_RADIO_PLAIN, m_ctlRadioTextType); + DDX_Control(pDX, IDC_EDIT_WIDTH, m_ctlEditWidth); + DDX_Control(pDX, IDC_EDIT_ROWS, m_ctlEditRows); + DDX_Control(pDX, IDC_COMBO_TOOLBAR, m_ctlComboToolbar); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZABLE, m_bCustomizable); + DDX_Check(pDX, IDC_CHECK_FLAT, m_bFlat); + DDX_Check(pDX, IDC_CHECK_LIST, m_bList); + DDX_Check(pDX, IDC_CHECK_SEPARATOR, m_bSeparator); + DDX_Check(pDX, IDC_CHECK_TEXT, m_bText); + DDX_Text(pDX, IDC_EDIT_ROWS, m_nRows); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + DDX_CBIndex(pDX, IDC_COMBO_TOOLBAR, m_nToolbar); + DDX_Radio(pDX, IDC_RADIO_PLAIN, m_nTextType); + DDX_Text(pDX, IDC_EDIT_BAND_TEXT, m_sBandText); + DDX_CBIndex(pDX, IDC_COMBO_IMAGE, m_nImage); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeDlg) + ON_CBN_SELCHANGE(IDC_COMBO_TOOLBAR, OnSelchangeComboToolbar) + ON_BN_CLICKED(IDC_CHECK_TEXT, OnCheckText) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg message handlers + +BOOL CCustomizeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + // names of bands + m_ctlComboToolbar.AddString(_T("File")); + m_ctlComboToolbar.AddString(_T("Edit")); + m_ctlComboToolbar.AddString(_T("Window")); + + // names of images + m_ctlComboImage.AddString(_T("File")); + m_ctlComboImage.AddString(_T("Edit")); + m_ctlComboImage.AddString(_T("Window")); + m_ctlComboImage.AddString(_T("None")); + + m_nToolbar=0; + m_nOldToolbar=0; + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeDlg::GetVars() +{ + m_bCustomizable=arrCustomize[m_nToolbar].bCustomizable; + m_bFlat=arrCustomize[m_nToolbar].bFlat; + m_bList=arrCustomize[m_nToolbar].bList; + m_bSeparator=arrCustomize[m_nToolbar].bSeparator; + m_bText=arrCustomize[m_nToolbar].bText; + m_nTextType=arrCustomize[m_nToolbar].nTextType; + m_nRows=arrCustomize[m_nToolbar].nRows; + m_nWidth=arrCustomize[m_nToolbar].nWidth; + m_nImage=arrCustomize[m_nToolbar].nImage; + m_sBandText=arrCustomize[m_nToolbar].sBandText; + + if(m_nImage==-1) + { + m_nImage=3; + } + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeDlg::SetVars() +{ + UpdateData(); + + arrCustomize[m_nOldToolbar].bCustomizable=m_bCustomizable; + arrCustomize[m_nOldToolbar].bFlat=m_bFlat; + arrCustomize[m_nOldToolbar].bList=m_bList; + arrCustomize[m_nOldToolbar].bSeparator=m_bSeparator; + arrCustomize[m_nOldToolbar].bText=m_bText; + arrCustomize[m_nOldToolbar].nTextType=m_nTextType; + arrCustomize[m_nOldToolbar].nRows=m_nRows; + arrCustomize[m_nOldToolbar].nWidth=m_nWidth; + arrCustomize[m_nOldToolbar].nImage=m_nImage; + arrCustomize[m_nOldToolbar].sBandText=m_sBandText; + + if(arrCustomize[m_nOldToolbar].nImage==3) + { + arrCustomize[m_nOldToolbar].nImage=-1; + } + + m_nOldToolbar=m_nToolbar; + + ShowControls(); +} + +void CCustomizeDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeDlg::OnSelchangeComboToolbar() +{ + // TODO: Add your control notification handler code here + + SetVars(); + GetVars(); +} + +void CCustomizeDlg::OnCheckText() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CCustomizeDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditRows.EnableWindow(m_bText); + m_ctlEditWidth.EnableWindow(m_bText); + m_ctlRadioTextType.EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_TOOLTIP)->EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_MENU)->EnableWindow(m_bText); + + UpdateData(FALSE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.h new file mode 100644 index 0000000..c789e02 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/CustomizeDlg.h @@ -0,0 +1,69 @@ +#if !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + +class CCustomizeDlg : public CDialog +{ +// Construction +public: + CCustomizeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeDlg) + enum { IDD = IDD_CUSTOMIZE }; + CComboBox m_ctlComboImage; + CButton m_ctlRadioTextType; + CEdit m_ctlEditWidth; + CEdit m_ctlEditRows; + CComboBox m_ctlComboToolbar; + BOOL m_bCustomizable; + BOOL m_bFlat; + BOOL m_bList; + BOOL m_bSeparator; + BOOL m_bText; + UINT m_nRows; + UINT m_nWidth; + int m_nToolbar; + int m_nTextType; + CString m_sBandText; + int m_nImage; + //}}AFX_DATA + struct CustomizeBand arrCustomize[3]; + int m_nOldToolbar; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnSelchangeComboToolbar(); + afx_msg void OnCheckText(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/MultiPad.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/MultiPad.rc new file mode 100644 index 0000000..da4f4f0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/MultiPad.rc @@ -0,0 +1,604 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "RES\\MULTIPAD.ICO" +IDR_TEXTTYPE ICON DISCARDABLE "RES\\PADDOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_TOOLBAR_FILE BITMAP DISCARDABLE "res\\toolbar_.bmp" +IDR_TOOLBAR_EDIT BITMAP DISCARDABLE "res\\bmp00001.bmp" +IDR_TOOLBAR_WINDOW BITMAP DISCARDABLE "res\\toolbar1.bmp" +IDR_TOOLBAR_EDIT_HOT BITMAP DISCARDABLE "res\\bmp00003.bmp" +IDR_TOOLBAR_FILE_HOT BITMAP DISCARDABLE "res\\bmp00004.bmp" +IDR_TOOLBAR_WINDOW_HOT BITMAP DISCARDABLE "res\\bmp00006.bmp" +IDB_COOLBAR_WALLPAPER BITMAP DISCARDABLE "res\\CoolBarWallPaper.bmp" +IDR_COOLBAR_IMAGELIST BITMAP DISCARDABLE "res\\coolbar_.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME MENU DISCARDABLE +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 "E&xit\tAlt+F4", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "C&oolbar", IDW_COOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_TEXTTYPE MENU DISCARDABLE +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 "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+F4", 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 + MENUITEM "Delete\tDel", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "Find &Next\tF3", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + MENUITEM "C&oolbar", IDW_COOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) MENU DISCARDABLE +#else +IDR_MAINFRAME MENU DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "C&oolbar", IDW_COOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_TEXTTYPE$(_MAC) MENU DISCARDABLE +#else +IDR_TEXTTYPE MENU DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Save\t\021S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\t\021X", ID_EDIT_CUT + MENUITEM "&Copy\t\021C", ID_EDIT_COPY + MENUITEM "&Paste\t\021V", ID_EDIT_PASTE + MENUITEM "De&lete\t\021D", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "&Repeat Find\t\021R", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + MENUITEM "C&oolbar", IDW_COOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + END +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) ACCELERATORS PRELOAD MOVEABLE PURE +#else +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +#endif +BEGIN + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + "D", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "R", ID_EDIT_REPEAT, VIRTKEY, ALT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT +END +#endif + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#include ""afxres.rc""\r\n" + "#include ""afxprint.rc""\r\n" + "#include ""OXCoolBar.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_FILE TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_EDIT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_WINDOW TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + +IDR_TOOLBAR_EDIT_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_FILE_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_WINDOW_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + +IDR_COOLBAR_IMAGELIST TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_BUTTON32799 + BUTTON ID_BUTTON32800 + BUTTON ID_BUTTON32801 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 24 +// + +1 24 DISCARDABLE "CoolBar.exe.manifest" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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_PRINT_SETUP "Change the printer and printing options\nPrint Setup" + ID_FILE_PRINT "Print the active document\nPrint" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_DESKACCESSORY "Opens the selected item" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_HELP_INDEX "List Help topics" + ID_HELP_USING "Display instructions about how to use help" + ID_CONTEXT_HELP "Display help for clicked on buttons, menus and windows" + ID_HELP "Display help for current task or command" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" + ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection\nDelete" + ID_EDIT_COPY "Copy the selection and puts it on the Clipboard\nCopy" + ID_EDIT_CUT "Cut the selection and puts it on the Clipboard\nCut" + ID_EDIT_FIND "Find the specified text\nFind" + ID_EDIT_PASTE "Insert Clipboard contents\nPaste" + ID_EDIT_REPEAT "Repeat last find command\nFind Next" + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar" + ID_VIEW_STATUS_BAR "Show or hide the status bar" +END + +STRINGTABLE DISCARDABLE +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_SCCLOSE "Close the active window and prompts to save the documents" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "CoolBar" + AFX_IDS_IDLEMESSAGE "Ready" + AFX_IDS_HELPMODEMESSAGE "Select an object on which to get Help" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "MultiPad with CoolBar" + IDR_TEXTTYPE "\nUntitled\nTEXT Document\nText Files (*.txt)\n.txt\nTextFileType\nTEXT File Type\nTEXT\nText Files\n" + ID_DESCRIPTION_FILE "CoolBarInfo.rtf" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_CUSTOMIZE "Customize Toolbars/nCustomize" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDW_COOLBAR "Show or hide the Coolbar" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG DISCARDABLE 0, 0, 282, 185 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Toolbars" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO_TOOLBAR,90,8,131,48,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "&Flat",IDC_CHECK_FLAT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,20,40,27,10 + CONTROL "&List ",IDC_CHECK_LIST,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,84,40,27,10 + CONTROL "&Customizable",IDC_CHECK_CUSTOMIZABLE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,143,40,58,10 + CONTROL "&Seperator",IDC_CHECK_SEPARATOR,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,217,41,47,10 + CONTROL "Set t&ext to buttons",IDC_CHECK_TEXT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,20,74,73,10 + EDITTEXT IDC_EDIT_WIDTH,63,88,37,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_ROWS,63,103,37,12,ES_AUTOHSCROLL + CONTROL "String &resource",IDC_RADIO_PLAIN,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,149,74,63,10 + CONTROL "T&ooltip",IDC_RADIO_TOOLTIP,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,149,89,37,10 + CONTROL "&Menu resourse",IDC_RADIO_MENU,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,149,104,63,10 + EDITTEXT IDC_EDIT_BAND_TEXT,42,136,110,12,ES_AUTOHSCROLL + COMBOBOX IDC_COMBO_IMAGE,186,135,76,48,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,87,164,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,164,50,14 + LTEXT "&Band",IDC_STATIC,60,10,25,8 + GROUPBOX "Draw",IDC_STATIC,211,28,56,29 + GROUPBOX "Mode",IDC_STATIC,14,29,192,28 + GROUPBOX "Text",IDC_STATIC,14,62,253,57 + LTEXT "Max &Width",IDC_STATIC,20,90,35,8 + LTEXT "Text &Rows",IDC_STATIC,20,105,35,8 + GROUPBOX "Band &Properties",IDC_STATIC,14,125,253,29 + LTEXT "&Text",IDC_STATIC,21,138,18,8 + LTEXT "&Image",IDC_STATIC,162,137,24,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 14 + RIGHTMARGIN, 267 + TOPMARGIN, 7 + BOTTOMMARGIN, 178 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "afxres.rc" +#include "afxprint.rc" +#include "OXCoolBar.rc" +#include "OXCoolToolBar.rc" +#include "OXBitmapMenu.rc" + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/Multipad.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/Multipad.cpp new file mode 100644 index 0000000..ec1ebb9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/Multipad.cpp @@ -0,0 +1,709 @@ +// multipad.cpp : Defines the class behaviors for the Multipad application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" +#include + +#include "UTSampleAbout.h" + +CMultiPadApp NEAR theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp) + //{{AFX_MSG_MAP(CMultiPadApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) // file commands... + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +BOOL CMultiPadApp::InitInstance() +{ + _tsetlocale(LC_ALL, _T("")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + Enable3dControls(); + + // use registry if you want to save CoolToolBars state + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); + +#ifdef _MDI_INTERFACE + AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE, + RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CMDIChildWnd), + RUNTIME_CLASS(CEditView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + m_pMainWnd->ShowWindow(m_nCmdShow); +#else + AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME, + RUNTIME_CLASS(CPadDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CEditView))); +#endif + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + // load saved workspace after all bars were created + ((CMainFrame*)m_pMainWnd)->LoadWorkspace(); + + return TRUE; +} + +void CMultiPadApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +int CMultiPadApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} + +IMPLEMENT_DYNCREATE(CMainFrame, CMainFrameWindow) + +BEGIN_MESSAGE_MAP(CMainFrame, CMainFrameWindow) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + ON_COMMAND(IDW_COOLBAR, OnCoolbar) + ON_UPDATE_COMMAND_UI(IDW_COOLBAR, OnUpdateCoolbar) + //}}AFX_MSG_MAP +#if _MFC_VER>=0x0420 + ON_NOTIFY(NM_CUSTOMDRAW,IDW_COOLBAR,OnCustomDraw) +#endif +END_MESSAGE_MAP() + + +// we need these arrays to make our CoolToolBars customizable +// we use them as parameters in function COXCoolToolBar::SetBitmapIds() + +static UINT buttonsFile[] = +{ + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT buttonsEdit[] = +{ + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_EDIT_CLEAR, + ID_EDIT_FIND, + ID_EDIT_REPEAT, +}; + +static UINT buttonsWindow[] = +{ + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, +}; + +static UINT indicators[] = +{ + ID_SEPARATOR, + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL +}; + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if(CMainFrameWindow::OnCreate(lpCreateStruct)==-1) + { + return -1; + } + + // create standard statusbar + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE(_T("Failed to create status bar\n")); + return -1; // fail to create + } + + // Create cool bar + // refer to the documentation about styles used to create Coolbar + if (!m_wndCoolBar.Create(this, + WS_CHILD|WS_VISIBLE|WS_BORDER|WS_CLIPSIBLINGS|WS_CLIPCHILDREN| + RBS_TOOLTIPS|RBS_BANDBORDERS|RBS_VARHEIGHT)) + { + TRACE(_T("Failed to create cool bar\n")); + return -1; // fail to create + } + + // create toolbars + + ////////////////////////////// + // File ToolBar + // this is an example of simple toolbar without text + // but we add here images to show in hot mode + // Note that process of creation of CoolToolBar almost the same as + // standard CToolBar + if (!m_wndToolBarFile.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_FILE) || + !m_wndToolBarFile.LoadToolBar(IDR_TOOLBAR_FILE)) + { + TRACE(_T("Failed to create File toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarFile.SetBitmapIds(buttonsFile, sizeof(buttonsFile)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarFile.IniSizes(CSize(16,16)); + // we want to use this CoolToolBar in CoolBar + // so we have to set it in cool mode + m_wndToolBarFile.SetCool(); + m_wndToolBarFile.SetHotImageList(m_wndToolBarFile. + AddImageList(IDR_TOOLBAR_FILE_HOT)); + m_wndToolBarFile.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarFile.SetHotTextColor(RGB(0,0,255)); + m_wndToolBarFile.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarFile.SetBarStyle(m_wndToolBarFile.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + ////////////////////////////// + + ////////////////////////////// + // Edit ToolBar + if (!m_wndToolBarEdit.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_EDIT) || + !m_wndToolBarEdit.LoadToolBar(IDR_TOOLBAR_EDIT)) + { + TRACE(_T("Failed to create Edit toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarEdit.SetBitmapIds(buttonsEdit, sizeof(buttonsEdit)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarEdit.IniSizes(CSize(16,16)); + // we want to use this CoolToolBar in CoolBar + // so we have to set it in cool mode + m_wndToolBarEdit.SetCool(); + m_wndToolBarEdit.SetHotImageList(m_wndToolBarEdit. + AddImageList(IDR_TOOLBAR_EDIT_HOT)); + m_wndToolBarEdit.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarEdit.SetHotTextColor(RGB(0,0,255)); + // we want to use text from string resource in our CoolToolBar + m_wndToolBarEdit.SetButtonsMinMaxWidth(0,70); + m_wndToolBarEdit.SetMaxTextRows(4); + m_wndToolBarEdit.SetButtonTextFromID(COXCoolToolBar::TTID_PLAIN); + m_wndToolBarEdit.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarEdit.SetBarStyle(m_wndToolBarEdit.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + ////////////////////////////// + + ////////////////////////////// + // Window ToolBar + if (!m_wndToolBarWindow.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_VIEW_TOOLBAR_WINDOW) || + !m_wndToolBarWindow.LoadToolBar(IDR_TOOLBAR_WINDOW)) + { + TRACE(_T("Failed to create Window toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarWindow.SetBitmapIds(buttonsWindow, sizeof(buttonsWindow)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + // use CoolToolBar in List mode + m_wndToolBarWindow.IniSizes(CSize(16,16)); + // we want to use this CoolToolBar in CoolBar + // so we have to set it in cool mode + m_wndToolBarWindow.SetCool(); + m_wndToolBarWindow.SetList(); + m_wndToolBarWindow.SetHotImageList(m_wndToolBarWindow. + AddImageList(IDR_TOOLBAR_WINDOW_HOT)); + m_wndToolBarWindow.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarWindow.SetHotTextColor(RGB(0,0,255)); + // we want to use tooltips text in our CoolToolBar + m_wndToolBarWindow.SetMaxTextRows(1); + m_wndToolBarWindow.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarWindow.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarWindow.SetBarStyle(m_wndToolBarWindow.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + ////////////////////////////// + + + // create object of COXCoolBarInfo class to attach image list to the Coolbar + COXCoolBarInfo rbi; + // if you call COXCoolBar::AddImageList function to set an image list + // then CoolBar will take care about creating, saving and + // destroying of that image list object + rbi.SetImageList(m_wndCoolBar.AddImageList(IDR_COOLBAR_IMAGELIST)); + if(!m_wndCoolBar.SetBarInfo(&rbi)) + { + TRACE(_T("Failed to set CoolBar info\n")); + return -1; // fail to insert + } + + // attaching toolbars to Coolbar + // the only way to attach any window to the Coolbar + // is to create object of COXCoolBarBandInfo class, + // set all properties and insert it into the CoolBar + COXCoolBarBandInfo rbbi; + // we want the background bitmap does not move + // when the band is resized + rbbi.SetStyle(RBBS_FIXEDBMP); + // set the CoolToolBar as child window + rbbi.SetChildWindow(&m_wndToolBarFile); + // set the CoolToolBar window min size + // the first argument is width and the second is height + rbbi.SetChildWindowMinSize(m_wndToolBarFile.CalcDynamicLayout(-1,0).cx, + m_wndToolBarFile.CalcDynamicLayout(-1,LM_HORZ).cy-4); + // set background bitmap + // if you call COXCoolBar::AddBitmap function to add bitmap + // then CoolBar will take care about creating, saving and + // destroying of bitmap object + rbbi.SetBackgroundBitmap(m_wndCoolBar.AddBitmap(IDB_COOLBAR_WALLPAPER)); + // set the text to the band + rbbi.SetText(_T("File Toolbar")); + // set the zero based index number in image list associated with CoolBar + rbbi.SetImage(0); + // you have to set to the band an unique, non zero ID + rbbi.SetID(ID_VIEW_TOOLBAR_FILE); + // try to insert the band + if(!m_wndCoolBar.InsertBand((UINT)-1,&rbbi)) + { + TRACE(_T("Failed to insert band\n")); + return -1; // fail to insert + } + + + // as far as we use the same COXCoolBarBandInfo object + // we have to change only a few properties. + // Using COXCoolBarBandInfo::Reset() function you can reset + // COXCoolBarBandInfo object + + // we want this band to be displayed on the next line + rbbi.SetStyle(RBBS_FIXEDBMP|RBBS_BREAK); + // set the CoolToolBar as child window + rbbi.SetChildWindow(&m_wndToolBarEdit); + // set the CoolToolBar window min size + // the first argument is width and the second is height + rbbi.SetChildWindowMinSize(m_wndToolBarEdit.CalcDynamicLayout(-1,0).cx, + m_wndToolBarEdit.CalcDynamicLayout(-1,LM_HORZ).cy-4); + // set the zero based index number in image list associated with CoolBar + rbbi.SetImage(1); + // set the text to the band + rbbi.SetText(_T("Edit Toolbar")); + // you have to set to the band an unique, non zero ID + rbbi.SetID(ID_VIEW_TOOLBAR_EDIT); + // try to insert the band + if(!m_wndCoolBar.InsertBand((UINT)-1,&rbbi)) + { + TRACE(_T("Failed to insert band\n")); + return -1; // fail to insert + } + + // as far as we use the same COXCoolBarBandInfo object + // we have to change only a few properties + + // set the CoolToolBar as child window + rbbi.SetChildWindow(&m_wndToolBarWindow); + // set the CoolToolBar window min size + // the first argument is width and the second is height + rbbi.SetChildWindowMinSize(m_wndToolBarWindow.CalcDynamicLayout(-1,0).cx, + m_wndToolBarWindow.CalcDynamicLayout(-1,LM_HORZ).cy-4); + // set the zero based index number in image list associated with CoolBar + rbbi.SetImage(2); + // set the text to the band + rbbi.SetText(_T("Window Toolbar")); + // you have to set to the band an unique, non zero ID + rbbi.SetID(ID_VIEW_TOOLBAR_WINDOW); + // try to insert the band + if(!m_wndCoolBar.InsertBand((UINT)-1,&rbbi)) + { + TRACE(_T("Failed to insert band\n")); + return -1; // fail to insert + } + + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + return 0; +} + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + + // before close save the workspace + SaveWorkspace(); + + CMainFrameWindow::OnClose(); +} + +void CMainFrame::SaveWorkspace() +{ + // save the state of all bands within CoolBar + m_wndCoolBar.SaveState(_T("CoolBar")); + + // save states of all CoolToolBar + m_wndToolBarFile.SaveBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.SaveBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.SaveBarState(_T("CoolToolBars"),_T("Window")); + + // save the state of all bars within framework + SaveBarState(_T("FrameworkBarState")); +} + +void CMainFrame::LoadWorkspace() +{ + LockWindowUpdate(); + + // load all bars state in framework + LoadBarState(_T("FrameworkBarState")); + + // load state of all CoolToolBar + m_wndToolBarFile.LoadBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.LoadBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.LoadBarState(_T("CoolToolBars"),_T("Window")); + + // load the state of all bands within CoolBar + m_wndCoolBar.LoadState(_T("CoolBar")); + + UnlockWindowUpdate(); +} + + +void CMainFrame::OnViewCustomize() +{ + // TODO: Add your command handler code here + + CCustomizeDlg dlgCustomize(this); + dlgCustomize.arrCustomize[0]=GetToolbarProperties(&m_wndToolBarFile); + dlgCustomize.arrCustomize[1]=GetToolbarProperties(&m_wndToolBarEdit); + dlgCustomize.arrCustomize[2]=GetToolbarProperties(&m_wndToolBarWindow); + + if(dlgCustomize.DoModal()==IDOK) + { + LockWindowUpdate(); + + SetToolbarProperties(&m_wndToolBarFile,dlgCustomize.arrCustomize[0]); + SetToolbarProperties(&m_wndToolBarEdit,dlgCustomize.arrCustomize[1]); + SetToolbarProperties(&m_wndToolBarWindow,dlgCustomize.arrCustomize[2]); + + // we applied all changes in SetToolbarProperties function + // but I believe due to the bug in common control dll when we + // change band's text from non empty string to empty one the system + // doesn't recalculate the size of the band. + // Workaround is to repopulate Coolbar + COXCoolBarBandInfo biFirst; + COXCoolBarBandInfo biSecond; + COXCoolBarBandInfo biThird; + int nBand; + int nBackward; + // save all CoolBar's bands info + if(m_wndCoolBar.GetBandInfo(0,&biFirst) && m_wndCoolBar.GetBandInfo(1,&biSecond) && + m_wndCoolBar.GetBandInfo(2,&biThird)) + { + // delete all bands + for(nBand=0; nBand<3; nBand++) + { + if(!m_wndCoolBar.DeleteBand(0)) + { + break; + } + } + // insert saved bands in back order to make sure + // the initial width of bands will stay the same + for(nBackward=nBand-1; nBackward>=0; nBackward--) + { + switch(nBackward) + { + case 0: + { + m_wndCoolBar.InsertBand(0,&biFirst); + break; + } + case 1: + { + m_wndCoolBar.InsertBand(0,&biSecond); + break; + } + case 2: + { + m_wndCoolBar.InsertBand(0,&biThird); + break; + } + } + } + } + + UnlockWindowUpdate(); + } +} + +CustomizeBand CMainFrame::GetToolbarProperties(COXCoolToolBar* pBar) +{ + // collect information about CoolBar's band and + // corresponding CoolToolBar to use in Customize Toolbars dialog + CustomizeBand ct; + ct.bCustomizable=pBar->IsCustomizable(); + ct.bFlat=pBar->IsFlat(); + ct.bList=pBar->IsList(); + ct.bSeparator=pBar->IsSeparator(); + ct.bText=!pBar->GetButtonText(0).IsEmpty(); + ct.nTextType=(int)pBar->GetTextType(); + ct.nRows=pBar->GetTextRows(); + ct.nWidth=pBar->GetButtonsSize().cx; + + UINT nBand; + if(!m_wndCoolBar.GetBandNumber(pBar->GetDlgCtrlID(),nBand)) + { + ct.nImage=-1; + ct.sBandText=CString(_T("")); + } + else + { + if(!m_wndCoolBar.GetBandImage(nBand,ct.nImage)) + { + ct.nImage=-1; + } + CString sText; + if(!m_wndCoolBar.GetBandText(nBand,sText)) + { + ct.sBandText=CString(_T("")); + } + else + { + ct.sBandText=sText; + } + } + + return ct; +} + +void CMainFrame::SetToolbarProperties(COXCoolToolBar* pBar, CustomizeBand ct) +{ + // change styles and properties of CoolToolBar + pBar->SetCustomizable(ct.bCustomizable); + pBar->SetFlat(ct.bFlat); + pBar->SetList(ct.bList); + pBar->SetSeparator(ct.bSeparator); + if(ct.bText) + { + pBar->SetButtonTextFromID((COXCoolToolBar::TextTypeFromID)ct.nTextType); + pBar->SetMaxTextRows(ct.nRows); + pBar->SetButtonsMinMaxWidth(0,ct.nWidth); + pBar->UpdateSizes(); + } + else + { + // if we don't want to use text in CoolToolBar then + // remove all previously associated text + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NONE); + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NOTSET); + pBar->SetMaxTextRows(0); + pBar->SetButtonsMinMaxWidth(0,24); + pBar->IniSizes(CSize(16,16)); + } + + // change the CoolBar's band properties + UINT nBand; + if(m_wndCoolBar.GetBandNumber(pBar->GetDlgCtrlID(),nBand)) + { + // change the text associated with the band + CString sText; + sText=ct.sBandText; + try + { + m_wndCoolBar.SetBandText(nBand,sText.GetBuffer(sText.GetLength())); + sText.ReleaseBuffer(); + } + catch(CMemoryException* e) + { + AfxMessageBox(_T("Out of memory!"),MB_ICONSTOP); + e->Delete(); + } + + // change the number of index in CoolBar's image list + m_wndCoolBar.SetBandImage(nBand,ct.nImage); + + // the size of CoolToolBar could have changed + // then reset the min Chid Window Size + CSize sizeChild; + if(m_wndCoolBar.GetBandChildWindowMinSize(nBand,sizeChild)) + { + sizeChild=pBar->GetButtonsSize(); + m_wndCoolBar.SetBandChildWindowMinSize(nBand, + pBar->CalcDynamicLayout(-1,0).cx, + sizeChild.cy+4); + } + + } + + CRect rect; + pBar->GetWindowRect(&rect); + // resize window + pBar->SetWindowPos(NULL,0,0,rect.Width(),rect.Height(), + SWP_NOMOVE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED); + + // it is up to framework to reallocate all other control bars + CFrameWnd* pFrameWnd=pBar->GetDockingFrame(); + if(pFrameWnd!=NULL) + { + pFrameWnd->RecalcLayout(); + } +} + + +///////////////////////////////////////////////////////////////////////////// + +IMPLEMENT_DYNCREATE(CPadDoc, CDocument) +BEGIN_MESSAGE_MAP(CPadDoc, CDocument) + //{{AFX_MSG_MAP(CPadDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +void CPadDoc::Serialize(CArchive& ar) +{ + ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// + +void CMainFrame::OnUpdateCoolbar(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CControlBar* pBar=GetControlBar(pCmdUI->m_nID); + if(pBar!=NULL) + { + pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0); + return; + } +} + +void CMainFrame::OnCoolbar() +{ + // TODO: Add your command handler code here + + CControlBar* pBar = (CControlBar*)&m_wndCoolBar; + if (pBar != NULL) + { + ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE); + } +} + +#if _MFC_VER>=0x0420 +////////////////////// +// custom draw of a toolbar is available since MFC 4.2 +// in you derived class you can provide your own custom draw routines +afx_msg void CMainFrame::OnCustomDraw(NMHDR* pNotify, LRESULT* pResult) +{ + LPNMCUSTOMDRAW pCDRW; + pCDRW=(LPNMCUSTOMDRAW)pNotify; + + *pResult = CDRF_DODEFAULT; + switch( pCDRW->dwDrawStage ) + { + case CDDS_PREPAINT: + { + *pResult=CDRF_NOTIFYITEMDRAW; + break; + } + case CDDS_ITEMPREPAINT: + { + *pResult=CDRF_NEWFONT; + + CDC dc; + dc.Attach(pCDRW->hdc); + + CFont* pFont=dc.GetCurrentFont(); + if(pFont) + { + LOGFONT lf; + VERIFY(pFont->GetLogFont(&lf)); + if(lf.lfWeight!=1000) + lf.lfWeight=1000; + lf.lfHeight=-24; + if((HFONT)m_CoolbarFont) + m_CoolbarFont.DeleteObject(); + VERIFY(m_CoolbarFont.CreateFontIndirect(&lf)); + } + else + TRACE(_T("CMainFrame::OnCustomDraw: failed to get DC font")); + + dc.Detach(); + + if((HFONT)m_CoolbarFont) + ::SelectObject(pCDRW->hdc, (HFONT)m_CoolbarFont); + ::SetTextColor(pCDRW->hdc, RGB(255,0,0)); + break; + } + default: + { + TRACE(_T("Unknown draw stage ...\n")); + break; + } + } +} +////////////////////// +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/mpadmac.r b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/mpadmac.r new file mode 100644 index 0000000..9131760 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/mpadmac.r @@ -0,0 +1,214 @@ +#include "resource.h" + +///////////////////////////////////////////////////////////////////////// +// WLM resources + +#include "ftab.r" +#include "mrc\types.r" +#include "mrc\balloons.r" +#include "systypes.r" + + +///////////////////////////////////////////////////////////////////////// +// MFC resources + +#include "afxaete.r" + + +///////////////////////////////////////////////////////////////////////// +// Code fragment resources + +#include "CodeFrag.r" + + +///////////////////////////////////////////////////////////////////////// +// MultiPad resources + +resource 'SIZE' (-1) +{ + reserved, + acceptSuspendResumeEvents, + reserved, + canBackground, + doesActivateOnFGSwitch, + backgroundAndForeground, + dontGetFrontClicks, + ignoreAppDiedEvents, + is32BitCompatible, + isHighLevelEventAware, + localAndRemoteHLEvents, + isStationeryAware, + dontUseTextEditServices, + reserved, + reserved, + reserved, +#ifdef _MPPC_ + 2500 * 1024, + 2500 * 1024 +#else // 68K Mac +#ifdef _DEBUG + 3000 * 1024, + 3000 * 1024 +#else + 2000 * 1024, + 2000 * 1024 +#endif +#endif +}; + +resource 'vers' (1) +{ + 0x01, + 0x00, + final, + 0x00, + verUS, + "1.0", + "MultiPad 1.0, Copyright \251 Microsoft Corp. 1994-1997" +}; + +resource 'vers' (2) +{ + 0x04, + 0x00, + final, + 0x00, + verUS, + "4.0", + "MFC for Macintosh 4.0" +}; + +resource 'kind' (128) +{ + 'MPAD', + 0, // verUS + { + 'TEXT', "MultiPad text document", + } +}; + +resource 'open' (128) +{ + 'MPAD', + { + 'TEXT', 'ttro' + } +}; + +resource 'BNDL' (128) +{ + 'MPAD', + 0, + { + 'FREF', + { + 0, 128, + 1, 129, + 2, 130 + }, + 'ICN#', + { + 0, IDR_MAINFRAME, + 1, IDR_TEXTTYPE, + 2, 130 + } + } +}; + +type 'MPAD' as 'STR '; +resource 'MPAD' (0) +{ + "MultiPad 1.0 Copyright © 1994-1997 Microsoft Corp." +}; + +resource 'FREF' (128) +{ + 'APPL', + 0, + "" +}; + +resource 'FREF' (129) +{ + 'TEXT', + 1, + "" +}; + +resource 'FREF' (130) { + 'sEXT', + 2, + "" +}; + +/* Balloon help resources */ + +resource 'hfdr' (-5696) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + { + HMSTRResItem {500} + } +}; + +resource 'hovr' (1000) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + + HMStringItem /* missing items override */ + { + "Miscellaneous part of the Microsoft MultiPad " + "Sample Application." + }, + { + HMSkipItem {}, /* title bar */ + HMSkipItem {}, /* reserved. always skip item here */ + HMStringItem /* close box */ + { + "Click here to close the Microsoft MultiPad " + "Sample Application." + }, + HMStringItem /* zoom box */ + { + "Click here to Zoom In or Zoom Out." + }, + HMSkipItem {}, /* active app's inactive window */ + HMStringItem /* inactive app's window */ + { + "This is not part of the Microsoft MultiPad " + "Application. It may be part of the Apple " + "Finder, or some other application." + }, + HMSkipItem {} /* outside modal dialog */ + } +}; + +#ifdef _MPPC_ +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Power Macintosh using Microsoft VC++ " + "Edition for the Apple Power Macintosh" +}; +#else // 68K Mac +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Macintosh using Microsoft VC++ Edition " + "for the Apple Macintosh" +}; +#endif + +#ifdef _MPPC_ +resource 'cfrg' (0) { + { + kPowerPC, + kFullLib, + kNoVersionNum,kNoVersionNum, + 0, 0, + kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork, + "" + } +}; +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsp new file mode 100644 index 0000000..5dc2c46 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsp @@ -0,0 +1,389 @@ +# Microsoft Developer Studio Project File - Name="MultiPad" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MultiPad - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak" CFG="MultiPad - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MultiPad - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MultiPad - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CoolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CoolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CoolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MultiPad" +# PROP BASE Intermediate_Dir "MultiPad" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolBar.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolBar.exe" + +!ENDIF + +# Begin Target + +# Name "MultiPad - Win32 Release" +# Name "MultiPad - Win32 Debug" +# Name "MultiPad - Win32 Unicode Release" +# Name "MultiPad - Win32 Unicode Debug" +# Name "MultiPad - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CustomizeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\mpadmac.r +# End Source File +# Begin Source File + +SOURCE=.\multipad.cpp +# End Source File +# Begin Source File + +SOURCE=.\multipad.rc +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD CPP /Yc"Stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;inl;fi;fd" +# Begin Source File + +SOURCE=.\CustomizeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\multipad.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00003.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00004.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00006.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\coolbar_.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\CoolBarWallPaper.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\multipad.ico +# End Source File +# Begin Source File + +SOURCE=.\res\paddoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolBar.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsw new file mode 100644 index 0000000..61a942c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MultiPad"=".\multipad.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/CoolBar", HCHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.h new file mode 100644 index 0000000..f4e6ee6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.h @@ -0,0 +1,113 @@ +// multipad.h : main header file for the Multipad application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "resource.h" +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXCoolBar.h" + +#define _MDI_INTERFACE + +#ifdef _MDI_INTERFACE +#define CMainFrameWindow CMDIFrameWnd +#else +#define CMainFrameWindow CFrameWnd +#endif + +class CMultiPadApp : public CWinApp +{ +public: +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedAssertApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + + //{{AFX_MSG(CMultiPadApp) + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +// special structure to define CoolToolBar and CoolBar band properties +// used in Customize Toolbars dialog +struct CustomizeBand +{ + BOOL bCustomizable; + BOOL bFlat; + BOOL bList; + BOOL bSeparator; + BOOL bText; + int nTextType; + UINT nRows; + UINT nWidth; + CString sBandText; + int nImage; +}; + +class CMainFrame : public CMainFrameWindow +{ + DECLARE_DYNCREATE(CMainFrame) + +public: + //load and save bars placement in Framework and state of CoolBar and + //all CoolToolBars within it + void LoadWorkspace(); + void SaveWorkspace(); + + // get properties of CoolBar's band to use in Customize Toolbars dialog + CustomizeBand GetToolbarProperties(COXCoolToolBar* pBar); + // apply changed properties to CoolToolBar + void SetToolbarProperties(COXCoolToolBar* pBar, CustomizeBand ct); + +protected: + CStatusBar m_wndStatusBar; + CFont m_CoolbarFont; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + + //CoolBar - container for toolbars + COXCoolBar m_wndCoolBar; + + // three CoolToolBars + COXCoolToolBar m_wndToolBarFile; + COXCoolToolBar m_wndToolBarEdit; + COXCoolToolBar m_wndToolBarWindow; + + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg void OnViewCustomize(); + afx_msg void OnCoolbar(); + afx_msg void OnUpdateCoolbar(CCmdUI* pCmdUI); + //}}AFX_MSG +#if _MFC_VER>=0x0420 + afx_msg void OnCustomDraw(NMHDR* pNotifyStruct, LRESULT* result); +#endif + DECLARE_MESSAGE_MAP() +}; + +class CPadDoc : public CDocument +{ + DECLARE_DYNCREATE(CPadDoc) + void Serialize(CArchive& ar); + //{{AFX_MSG(CPadDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.vcproj new file mode 100644 index 0000000..edb30f6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/multipad.vcproj @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/CoolBarWallPaper.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/CoolBarWallPaper.bmp new file mode 100644 index 0000000..a24240a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/CoolBarWallPaper.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00001.bmp new file mode 100644 index 0000000..4a96787 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00003.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00003.bmp new file mode 100644 index 0000000..9cb7376 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00003.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00004.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00004.bmp new file mode 100644 index 0000000..c6d64bb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00004.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00006.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00006.bmp new file mode 100644 index 0000000..47aef51 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/bmp00006.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/coolbar_.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/coolbar_.bmp new file mode 100644 index 0000000..cc4fac2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/coolbar_.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/multipad.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/multipad.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/multipad.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/paddoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/paddoc.ico new file mode 100644 index 0000000..9e9b961 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/paddoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar.bmp new file mode 100644 index 0000000..913de51 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar1.bmp new file mode 100644 index 0000000..093f758 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar_.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar_.bmp new file mode 100644 index 0000000..0339e85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/toolbar_.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/wallppr.pal b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/wallppr.pal new file mode 100644 index 0000000..7c91430 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/res/wallppr.pal differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/resource.h new file mode 100644 index 0000000..eb94748 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/resource.h @@ -0,0 +1,48 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MultiPad.rc +// +#define IDR_TOOLBAR_FILE 101 +#define IDR_TOOLBAR_EDIT 103 +#define IDR_TOOLBAR_WINDOW 105 +#define IDR_TOOLBAR_EDIT_HOT 108 +#define IDR_TOOLBAR_FILE_HOT 109 +#define IDD_CUSTOMIZE 109 +#define IDB_COOLBAR_WALLPAPER 110 +#define IDR_TOOLBAR_WINDOW_HOT 111 +#define IDR_COOLBAR_IMAGELIST 112 +#define IDR_MAINFRAME 128 +#define IDR_TEXTTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_COMBO_TOOLBAR 1000 +#define IDC_CHECK_FLAT 1001 +#define IDC_CHECK_LIST 1002 +#define IDC_COMBO_IMAGE 1003 +#define IDC_CHECK_SEPARATOR 1004 +#define IDC_CHECK_CUSTOMIZABLE 1005 +#define IDC_CHECK_TEXT 1007 +#define IDC_RADIO_PLAIN 1008 +#define IDC_RADIO_TOOLTIP 1009 +#define IDC_RADIO_MENU 1010 +#define IDC_EDIT_WIDTH 1011 +#define IDC_EDIT_ROWS 1012 +#define IDC_EDIT_BAND_TEXT 1013 +#define ID_VIEW_TOOLBAR_FILE 32794 +#define ID_VIEW_TOOLBAR_EDIT 32795 +#define ID_VIEW_TOOLBAR_WINDOW 32796 +#define ID_VIEW_CUSTOMIZE 32797 +#define ID_BUTTON32799 32799 +#define ID_BUTTON32800 32800 +#define ID_BUTTON32801 32801 +#define IDW_COOLBAR 32802 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 115 +#define _APS_NEXT_COMMAND_VALUE 32804 +#define _APS_NEXT_CONTROL_VALUE 1009 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.cpp new file mode 100644 index 0000000..77150d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.cpp @@ -0,0 +1,15 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.h new file mode 100644 index 0000000..5b29bee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/stdafx.h @@ -0,0 +1,20 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently + +#define VC_EXTRALEAN + +#include // MFC core and standard components +#include +#include +#include diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/unicode.utf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/unicode.utf new file mode 100644 index 0000000..4890d4b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolBar/unicode.utf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.clw new file mode 100644 index 0000000..b03e56d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.clw @@ -0,0 +1,189 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CCoolComboApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "CoolCombo.h" +LastPage=0 + +ClassCount=5 +Class1=CCoolComboApp +Class2=CCoolComboDoc +Class3=CCoolComboView +Class4=CMainFrame + +ResourceCount=9 +Resource1=IDR_MAINFRAME +Resource2=IDD_COOLCOMBO_FORM (English (U.S.)) +Resource7=IDD_ABOUTBOX (English (U.S.)) +Resource8=IDR_MAINFRAME (English (U.S.)) +Class5=CAboutDlg +Resource9=IDD_COOLCOMBO_FORM + +[CLS:CCoolComboApp] +Type=0 +HeaderFile=CoolCombo.h +ImplementationFile=CoolCombo.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CCoolComboApp + +[CLS:CCoolComboDoc] +Type=0 +HeaderFile=CoolComboDoc.h +ImplementationFile=CoolComboDoc.cpp +Filter=N + +[CLS:CCoolComboView] +Type=0 +HeaderFile=CoolComboView.h +ImplementationFile=CoolComboView.cpp +Filter=D +BaseClass=CFormView +VirtualFilter=VWC +LastObject=CCoolComboView + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +LastObject=CMainFrame + + + + +[CLS:CAboutDlg] +Type=0 +HeaderFile=CoolCombo.cpp +ImplementationFile=CoolCombo.cpp +Filter=D +LastObject=CAboutDlg + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_MRU_FILE1 +Command6=ID_APP_EXIT +Command7=ID_VIEW_TOOLBAR +Command8=ID_VIEW_STATUS_BAR +Command9=ID_APP_ABOUT +CommandCount=9 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[DLG:IDD_COOLCOMBO_FORM] +Type=1 +Class=CCoolComboView +ControlCount=10 +Control1=IDC_CHECK_COOL,button,1342275587 +Control2=IDC_CHECK_DISABLE,button,1342275587 +Control3=IDC_RADIO_DROPDOWN,button,1342373897 +Control4=IDC_RADIO_DROPDOWNLIST,button,1342242825 +Control5=IDC_EDIT_TOOLTIPTEXT,edit,1350631552 +Control6=IDC_CHECK_DISABLEINTOOLBAR,button,1342275587 +Control7=IDC_COMBO,combobox,1344356610 +Control8=IDC_HEADING,static,1342312960 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_SEPARATOR,static,1342312960 + +[DLG:IDD_COOLCOMBO_FORM (English (U.S.))] +Type=1 +Class=CCoolComboView +ControlCount=10 +Control1=IDC_CHECK_COOL,button,1342275587 +Control2=IDC_CHECK_DISABLE,button,1342275587 +Control3=IDC_RADIO_DROPDOWN,button,1342373897 +Control4=IDC_RADIO_DROPDOWNLIST,button,1342242825 +Control5=IDC_EDIT_TOOLTIPTEXT,edit,1350631552 +Control6=IDC_CHECK_DISABLEINTOOLBAR,button,1342275587 +Control7=IDC_COMBO,combobox,1344340226 +Control8=IDC_HEADING,static,1342312960 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_SEPARATOR,static,1342312960 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=IDC_COMBO +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_MRU_FILE1 +Command6=ID_APP_EXIT +Command7=ID_VIEW_TOOLBAR +Command8=ID_VIEW_STATUS_BAR +Command9=ID_APP_ABOUT +CommandCount=9 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=IDC_COMBO +Command5=ID_APP_ABOUT +CommandCount=5 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.cpp new file mode 100644 index 0000000..e77ae7a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.cpp @@ -0,0 +1,129 @@ +// CoolCombo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CoolCombo.h" + +#include "MainFrm.h" +#include "CoolComboDoc.h" +#include "CoolComboView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboApp + +BEGIN_MESSAGE_MAP(CCoolComboApp, CWinApp) + //{{AFX_MSG_MAP(CCoolComboApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboApp construction + +CCoolComboApp::CCoolComboApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCoolComboApp object + +CCoolComboApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboApp initialization + +BOOL CCoolComboApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // 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(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CCoolComboDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CCoolComboView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + + +// App command to run the dialog +void CCoolComboApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(AFX_IDS_APP_TITLE,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboApp message handlers + + +int CCoolComboApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsp new file mode 100644 index 0000000..549c1de --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsp @@ -0,0 +1,394 @@ +# Microsoft Developer Studio Project File - Name="CoolCombo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CoolCombo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CoolCombo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CoolCombo.mak" CFG="CoolCombo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CoolCombo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CoolCombo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CoolCombo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "CoolCombo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "CoolCombo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CoolCombo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolCombo.exe" + +!ELSEIF "$(CFG)" == "CoolCombo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CoolCombo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "CoolCombo - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CoolCombo___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "CoolCombo___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolCombo.exe" + +!ELSEIF "$(CFG)" == "CoolCombo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CoolCombo___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "CoolCombo___Win32_Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CoolCombo.exe" + +!ELSEIF "$(CFG)" == "CoolCombo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "CoolCombo___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "CoolCombo___Win32_Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CoolCombo.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CoolCombo - Win32 Release" +# Name "CoolCombo - Win32 Debug" +# Name "CoolCombo - Win32 Release_Shared" +# Name "CoolCombo - Win32 Unicode_Release" +# Name "CoolCombo - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolCombo.cpp +# End Source File +# Begin Source File + +SOURCE=.\CoolCombo.rc +# End Source File +# Begin Source File + +SOURCE=.\CoolComboDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\CoolComboView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CoolCombo.h +# End Source File +# Begin Source File + +SOURCE=.\CoolComboDoc.h +# End Source File +# Begin Source File + +SOURCE=.\CoolComboView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\CoolCombo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\CoolCombo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\CoolComboDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolCombo.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsw new file mode 100644 index 0000000..e255358 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CoolCombo"=".\CoolCombo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/CoolCombo", LDHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.h new file mode 100644 index 0000000..0e749ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.h @@ -0,0 +1,50 @@ +// CoolCombo.h : main header file for the COOLCOMBO application +// + +#if !defined(AFX_COOLCOMBO_H__FE6B1BC9_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_COOLCOMBO_H__FE6B1BC9_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboApp: +// See CoolCombo.cpp for the implementation of this class +// + +class CCoolComboApp : public CWinApp +{ +public: + CCoolComboApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCoolComboApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CCoolComboApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COOLCOMBO_H__FE6B1BC9_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.rc new file mode 100644 index 0000000..c0ab022 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.rc @@ -0,0 +1,382 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\CoolCombo.ico" +IDR_COOLCOTYPE ICON "res\\CoolComboDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 IDC_COMBO + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + 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 CoolCombo...", 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 + "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_COOLCOMBO_FORM DIALOG 0, 0, 216, 155 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "&Cool state",IDC_CHECK_COOL,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,7,54,47,10 + CONTROL "Dis&abled",IDC_CHECK_DISABLE,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,7,68,43,10 + CONTROL "CBS_DROPDOWN",IDC_RADIO_DROPDOWN,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,103,54,78,10 + CONTROL "CBS_DROPDOWNLIST",IDC_RADIO_DROPDOWNLIST,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,103,68,93,10 + EDITTEXT IDC_EDIT_TOOLTIPTEXT,51,90,158,12,ES_AUTOHSCROLL + CONTROL "&Disable cool combobox control in the toolbar",IDC_CHECK_DISABLEINTOOLBAR, + "Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,7,138,155,10 + COMBOBOX IDC_COMBO,6,21,203,68,CBS_DROPDOWN | CBS_SORT | CBS_LOWERCASE | WS_VSCROLL | WS_TABSTOP + LTEXT "Cool ComboBox Control",IDC_HEADING,7,7,202,8,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Tooltip text",IDC_STATIC,7,92,36,8 + LTEXT "",IDC_SEPARATOR,7,124,202,8,SS_CENTERIMAGE | SS_SUNKEN +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 "040904B0" + BEGIN + VALUE "FileDescription", "CoolCombo MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "CoolCombo" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "CoolCombo.EXE" + VALUE "ProductName", "CoolCombo Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_COOLCOMBO_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 209 + TOPMARGIN, 7 + BOTTOMMARGIN, 148 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "CoolCombo\n\nCoolCo\n\n\nCoolCombo.Document\nCoolCo Document" + ID_DESCRIPTION_FILE "CoolComboBoxInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Cool ComboBox Demo" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\CoolCombo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\CoolCombo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#include "OXCoolToolBar.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.vcproj new file mode 100644 index 0000000..02f9127 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolCombo.vcproj @@ -0,0 +1,2232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboBoxInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboBoxInfo.rtf new file mode 100644 index 0000000..78629bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboBoxInfo.rtf @@ -0,0 +1,121 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;} +{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid1510598\rsid2827592 +\rsid5183391\rsid8147271\rsid16398236}{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr11\min12}{\revtim\yr2005\mo1\dy17\hr11\min15}{\version5}{\edmins3}{\nofpages3}{\nofwords869} +{\nofchars4954}{\*\company Dundas India}{\nofcharsws5812}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot8147271 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs42\cf2\insrsid16398236\charrsid2827592 COXCoolComboBox}{\b\fs42\insrsid16398236\charrsid2827592 +\par }{\b\fs16\insrsid16398236\charrsid2827592 Copyright \'a9 }{\b\fs16\insrsid8147271\charrsid2827592 The Code Project}{\b\fs16\insrsid16398236\charrsid2827592 1997 1998, All Rights Reserved +\par }{\insrsid16398236\charrsid2827592 +\par COXCoolComboBox class implements standard combo box as cool control. Refer to }{\cf2\insrsid16398236\charrsid2827592 description of COXCoolCtrl}{\insrsid16398236\charrsid2827592 class for details on cool controls. Briefly,}{\insrsid1510598 }{ +\insrsid16398236\charrsid2827592 we call any control (generally speaking, any window) as cool one if it supports normal or hot state. By definition, window is in hot state when mouse cursor is over it or it has focus. Otherwise window is in normal state. + +\par +\par COXCoolComboBox is derived from COXCoolCtrl. COXCoolComboBox doesn't have it's own public functions and it relies heavily on COXCoolCtrl class. }{\insrsid16398236 +\par }{\insrsid1510598\charrsid2827592 +\par }{\insrsid16398236\charrsid2827592 Refer to }{\cf2\insrsid16398236\charrsid2827592 COXCoolCtrl function reference}{\insrsid16398236\charrsid2827592 for details. +\par +\par Basically, COXCoolComboBox provides drawing routines for normal and hot state.Use COXCoolComboBox class the same way you would use standard CComboBox. +\par +\par Note that COXCoolCtrl automatically support tooltip for control. You can set/retrieve tooltip text using the following functions: +\par +\par \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL SetTooltipText(const CString& sTooltipText);}{\insrsid16398236\charrsid2827592 +\par \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL GetTooltipText(CString& sTooltipText) const; +\par }{\insrsid16398236\charrsid2827592 +\par }{\b\insrsid16398236\charrsid2827592 Dependencies}{\insrsid16398236\charrsid2827592 : +\par +\par \~\~ }{\b\insrsid16398236\charrsid2827592 #include "OXCoolComboBox.h"}{\insrsid16398236\charrsid2827592 +\par +\par Source code files: +\par +\par }{\b\insrsid16398236\charrsid2827592 \~\~\~ "OXCoolComboBox.cpp" +\par }{\b\fs48\cf2\insrsid16398236\charrsid2827592 +\par }{\b\fs42\cf2\insrsid16398236\charrsid2827592 COXCoolCtrl}{\b\fs48\insrsid16398236\charrsid2827592 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0\pararsid2827592 {\b\fs16\insrsid2827592\charrsid2827592 Copyright \'a9 The Code Project 1997 1998, All Rights Reserved +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid16398236\charrsid2827592 +\par Almost every application uses some of common controls in its implementation. Users used to see these common controls and khow how to use them. +\par +\par This the primary reason why you usually don't want to change +the look and functionality of existing controls too much. But sometimes even by slightly changing the appearance of a control you can achive good results in terms of enhancing the feel and look of your application's user interface. +\par +\par We suggest the following new feature for common controls: every control (generally speaking, any window) can be in normal or hot state. By definition,}{\insrsid16398236 }{\insrsid16398236\charrsid2827592 +window is in hot state when mouse cursor is over it or it has focus. Otherwise window is in normal state. Naturally, in order to distinguish window in +different states some graphical effects should be applied. E.g. the drawing of window borders in different states might be different. +\par +\par We call controls that support normal and hot state - cool controls. +\par +\par We designed template class COXCoolCtrl that simplifies process of converting of common controls to cool ones. +\par +\par COXCoolCtrl template has one argument that specifies the parent class of the new cool control. E.g. if you would like to design your own cool listbox class you can declare it as following: +\par +\par }{\b\insrsid16398236\charrsid2827592 \~\~\~ class CCoolListBox : public COXCoolCtrl +\par }{\insrsid16398236\charrsid2827592 +\par +\par While implementing cool control using COXCoolCtrl derivation you might would like to override the following protected virtual functions: +\par +\par \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual void OnChangeHotState(BOOL bInHotState); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual void OnFocusChange(CWnd* pWndGainFocus, CWnd* pWndLooseFocus); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual void OnMouseEnter(const CPoint ptCursor); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual void OnMouseLeave(const CPoint ptCursor); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual BOOL HandleKey(const int nVirtKey); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 virtual BOOL OnChangeTooltipText(const CString& sTooltipText); +\par }{\insrsid16398236\charrsid2827592 +\par Refer to the }{\insrsid16398236\charrsid16398236 class reference}{\insrsid16398236\charrsid2827592 for detailed function explanations. +\par +\par Almost always you would like to override }{\cf2\insrsid16398236\charrsid2827592 OnChangeHotState()}{\insrsid16398236\charrsid2827592 function which is called when window is about to change its state from hot to normal and vise versa. }{\insrsid1510598 I} +{\insrsid16398236\charrsid2827592 n your implementation of this function you might redraw the window in order to show that window has changed its state. +\par +\par }{\cf2\insrsid16398236\charrsid2827592 OnFocusChange()}{\insrsid16398236\charrsid2827592 is called every time window looses or gains focus and }{\cf2\insrsid16398236\charrsid2827592 OnMouseEnter()}{\insrsid16398236\charrsid2827592 and }{ +\cf2\insrsid16398236\charrsid2827592 OnMouseLeave()}{\insrsid16398236\charrsid2827592 functions are called every time mouse enters or leaves the screen space taken by the window correspondingly. +\par +\par }{\cf2\insrsid16398236\charrsid2827592 HandleKey()}{\insrsid16398236\charrsid2827592 function will be called every time when user presses any key down. Overriding this function you can handle pressed key before control has a chance +to do that. By returning TRUE you will notify control that you handled the event yourself and don't want to run default handler implementation. +\par +\par One of the additional useful feature that COXCoolCtrl supports is tooltip for the control. You can set/retrieve tooltip text using the following functions: +\par +\par \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL SetTooltipText(const CString& sTooltipText); +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL GetTooltipText(CString& sTooltipText) const; +\par }{\insrsid16398236\charrsid2827592 +\par +\par Every time you change the tooltip text }{\cf2\insrsid16398236\charrsid2827592 OnChangeTooltipText()}{\insrsid16398236\charrsid2827592 + function will be called. By overriding this function you can control the process of setting of tooltip text. By returning FALSE you specify that you don't allow to change the tooltip text. +\par +\par There are a few additional public functions that you might find useful: +\par +\par \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL IsInHotState() const; +\par }{\insrsid16398236\charrsid2827592 \~\~\~ }{\cf2\insrsid16398236\charrsid2827592 BOOL IsMouseOver() const; +\par }{\insrsid16398236\charrsid2827592 +\par }{\cf2\insrsid16398236\charrsid2827592 IsInHotState()}{\insrsid16398236\charrsid2827592 function retrieves the flag that specifies whether the window is in hot or normal state. }{\cf2\insrsid16398236\charrsid2827592 IsMouseOver()}{ +\insrsid16398236\charrsid2827592 function retrieves the flag that specifies whether the current mouse position is over the window or not. +\par +\par Although it's not a must requirement but it would be nice if control was able to support standard and new cool state. By default when control is created of subclassed the existing one it is set to cool state. But calli +ng the following function you can set it back to statndard state: +\par +\par }{\cf2\insrsid16398236\charrsid2827592 virtual void SetCoolState(const BOOL bCoolState); +\par }{\insrsid16398236\charrsid2827592 +\par You can retrieve the flag that specifies whether the control is in cool or normal state +\par +\par }{\cf2\insrsid16398236\charrsid2827592 virtual BOOL IsInCoolState() const; +\par }{\insrsid16398236\charrsid2827592 +\par As you can see both of these functions are declared as virtual so if you don't want to support standard appearance of the control you might override this function (}{\cf2\insrsid16398236\charrsid2827592 SetCoolState()}{\insrsid16398236\charrsid2827592 + would do nothing and }{\cf2\insrsid16398236\charrsid2827592 IsInCoolState()}{\insrsid16398236\charrsid2827592 would always return TRUE). +\par +\par +\par +\par Again we would like to emphasize that COXCoolCtrl class is designed specifically in order to help you to create coll common controls. We are going to come up}{\insrsid16398236 }{\insrsid16398236\charrsid2827592 +with classes that implements some common controls as cool ones (take look at the}{\insrsid16398236 }{\cf2\insrsid16398236\charrsid2827592 COXCoolComboBox}{\insrsid16398236\charrsid2827592 class which implements cool combobox). +\par +\par }{\b\insrsid16398236\charrsid16398236 Dependencies}{\insrsid16398236\charrsid2827592 : +\par +\par }{\b\insrsid16398236\charrsid2827592 #include "OXCoolCtrl.h"}{\insrsid16398236\charrsid2827592 +\par +\par Source code files: +\par +\par }{\b\insrsid16398236\charrsid2827592 "OXCoolCtrl.h"}{\fs20\insrsid16398236\charrsid2827592 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.cpp new file mode 100644 index 0000000..ad5338c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.cpp @@ -0,0 +1,84 @@ +// CoolComboDoc.cpp : implementation of the CCoolComboDoc class +// + +#include "stdafx.h" +#include "CoolCombo.h" + +#include "CoolComboDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboDoc + +IMPLEMENT_DYNCREATE(CCoolComboDoc, CDocument) + +BEGIN_MESSAGE_MAP(CCoolComboDoc, CDocument) + //{{AFX_MSG_MAP(CCoolComboDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboDoc construction/destruction + +CCoolComboDoc::CCoolComboDoc() +{ + // TODO: add one-time construction code here + +} + +CCoolComboDoc::~CCoolComboDoc() +{ +} + +BOOL CCoolComboDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboDoc serialization + +void CCoolComboDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboDoc diagnostics + +#ifdef _DEBUG +void CCoolComboDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CCoolComboDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.h new file mode 100644 index 0000000..09dcf43 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboDoc.h @@ -0,0 +1,57 @@ +// CoolComboDoc.h : interface of the CCoolComboDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_COOLCOMBODOC_H__FE6B1BCF_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_COOLCOMBODOC_H__FE6B1BCF_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CCoolComboDoc : public CDocument +{ +protected: // create from serialization only + CCoolComboDoc(); + DECLARE_DYNCREATE(CCoolComboDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCoolComboDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCoolComboDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCoolComboDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COOLCOMBODOC_H__FE6B1BCF_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.cpp new file mode 100644 index 0000000..57e68cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.cpp @@ -0,0 +1,212 @@ +// CoolComboView.cpp : implementation of the CCoolComboView class +// + +#include "stdafx.h" +#include "CoolCombo.h" + +#include "CoolComboDoc.h" +#include "CoolComboView.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboView + +IMPLEMENT_DYNCREATE(CCoolComboView, CFormView) + +BEGIN_MESSAGE_MAP(CCoolComboView, CFormView) + //{{AFX_MSG_MAP(CCoolComboView) + ON_BN_CLICKED(IDC_CHECK_COOL, OnCheckCool) + ON_BN_CLICKED(IDC_CHECK_DISABLE, OnCheckDisable) + ON_BN_CLICKED(IDC_CHECK_DISABLEINTOOLBAR, OnCheckDisableintoolbar) + ON_EN_CHANGE(IDC_EDIT_TOOLTIPTEXT, OnChangeEditTooltiptext) + ON_BN_CLICKED(IDC_RADIO_DROPDOWN, OnRadioDropdown) + ON_BN_CLICKED(IDC_RADIO_DROPDOWNLIST, OnRadioDropdownlist) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboView construction/destruction + +CCoolComboView::CCoolComboView() + : CFormView(CCoolComboView::IDD) +{ + //{{AFX_DATA_INIT(CCoolComboView) + m_bCoolState = FALSE; + m_bDisabled = FALSE; + m_bDisabledInToolbar = FALSE; + m_sTooltipText = _T(""); + m_nComboStyle = -1; + //}}AFX_DATA_INIT + // TODO: add construction code here + +} + +CCoolComboView::~CCoolComboView() +{ +} + +void CCoolComboView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCoolComboView) + DDX_Control(pDX, IDC_SEPARATOR, m_separator); + DDX_Control(pDX, IDC_HEADING, m_heading); + DDX_Control(pDX, IDC_COMBO, m_combo); + DDX_Check(pDX, IDC_CHECK_COOL, m_bCoolState); + DDX_Check(pDX, IDC_CHECK_DISABLE, m_bDisabled); + DDX_Check(pDX, IDC_CHECK_DISABLEINTOOLBAR, m_bDisabledInToolbar); + DDX_Text(pDX, IDC_EDIT_TOOLTIPTEXT, m_sTooltipText); + DDX_Radio(pDX, IDC_RADIO_DROPDOWN, m_nComboStyle); + //}}AFX_DATA_MAP +} + +BOOL CCoolComboView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFormView::PreCreateWindow(cs); +} + +void CCoolComboView::OnInitialUpdate() +{ + CFormView::OnInitialUpdate(); + CMainFrame* pFrame=(CMainFrame*)GetParentFrame(); + ASSERT(pFrame!=NULL); + pFrame->RecalcLayout(); + ResizeParentToFit(); + + PopulateCombo(); + + m_heading.SetTextColor(::GetSysColor(COLOR_WINDOW)); + + m_sTooltipText=_T("Tooltip for Cool ComboBox"); + + m_bCoolState=m_combo.IsInCoolState(); + m_bDisabled=!m_combo.IsWindowEnabled(); + m_bDisabledInToolbar=!pFrame->m_wndToolBar.m_combo.IsWindowEnabled(); + VERIFY(m_combo.SetTooltipText(m_sTooltipText)); + m_nComboStyle=m_combo.GetStyle() & CBS_DROPDOWN ? 0 : 1; + + UpdateData(FALSE); +} + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboView diagnostics + +#ifdef _DEBUG +void CCoolComboView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CCoolComboView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CCoolComboDoc* CCoolComboView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCoolComboDoc))); + return (CCoolComboDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCoolComboView message handlers + +void CCoolComboView::OnCheckCool() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_combo.SetCoolState(m_bCoolState); +} + +void CCoolComboView::OnCheckDisable() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_combo.EnableWindow(!m_bDisabled); +} + +void CCoolComboView::OnCheckDisableintoolbar() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + CMainFrame* pFrame=(CMainFrame*)GetParentFrame(); + ASSERT(pFrame!=NULL); + pFrame->m_wndToolBar.m_combo.EnableWindow(!m_bDisabledInToolbar); +} + +void CCoolComboView::OnChangeEditTooltiptext() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CFormView::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + + UpdateData(); + VERIFY(m_combo.SetTooltipText(m_sTooltipText)); +} + +void CCoolComboView::OnRadioDropdown() +{ + // TODO: Add your control notification handler code here + RecreateCombo(CBS_DROPDOWN,CBS_DROPDOWNLIST); +} + +void CCoolComboView::OnRadioDropdownlist() +{ + // TODO: Add your control notification handler code here + RecreateCombo(CBS_DROPDOWNLIST,CBS_DROPDOWN); +} + + +void CCoolComboView::RecreateCombo(const DWORD dwAddStyle, const DWORD dwRemoveStyle) +{ + DWORD dwStyle=m_combo.GetStyle(); + dwStyle&=~dwRemoveStyle; + dwStyle|=dwAddStyle; + CRect rect; + m_combo.GetWindowRect(rect); + ScreenToClient(rect); + + CRect rectListBox; + m_combo.GetDroppedControlRect(rectListBox); + rect.bottom=rect.top+rectListBox.Height(); + + m_combo.DestroyWindow(); + m_combo.Create(dwStyle,rect,this,IDC_COMBO); + + + // Restore the font + m_combo.SetFont(GetFont()); + + VERIFY(m_combo.SetTooltipText(m_sTooltipText)); + + PopulateCombo(); +} + + +void CCoolComboView::PopulateCombo() +{ + for(int nIndex=0; nIndex<10; nIndex++) + { + CString sText; + sText.Format(_T("Cool combobox item %d"),nIndex); + m_combo.AddString(sText); + } + m_combo.SendMessage(CB_SETCURSEL,0); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.h new file mode 100644 index 0000000..05544f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/CoolComboView.h @@ -0,0 +1,87 @@ +// CoolComboView.h : interface of the CCoolComboView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_COOLCOMBOVIEW_H__FE6B1BD1_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_COOLCOMBOVIEW_H__FE6B1BD1_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXSeparator.h" +#include "OXCoolComboBox.h" + +class CCoolComboView : public CFormView +{ +protected: // create from serialization only + CCoolComboView(); + DECLARE_DYNCREATE(CCoolComboView) + +public: + //{{AFX_DATA(CCoolComboView) + enum { IDD = IDD_COOLCOMBO_FORM }; + COXSeparator m_separator; + COXSeparator m_heading; + COXCoolComboBox m_combo; + BOOL m_bCoolState; + BOOL m_bDisabled; + BOOL m_bDisabledInToolbar; + CString m_sTooltipText; + int m_nComboStyle; + //}}AFX_DATA + +// Attributes +public: + CCoolComboDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCoolComboView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnInitialUpdate(); // called first time after construct + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCoolComboView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + void RecreateCombo(const DWORD dwAddStyle, const DWORD dwRemoveStyle); + void PopulateCombo(); + +// Generated message map functions +protected: + //{{AFX_MSG(CCoolComboView) + afx_msg void OnCheckCool(); + afx_msg void OnCheckDisable(); + afx_msg void OnCheckDisableintoolbar(); + afx_msg void OnChangeEditTooltiptext(); + afx_msg void OnRadioDropdown(); + afx_msg void OnRadioDropdownlist(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in CoolComboView.cpp +inline CCoolComboDoc* CCoolComboView::GetDocument() + { return (CCoolComboDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COOLCOMBOVIEW_H__FE6B1BD1_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.cpp new file mode 100644 index 0000000..128d3e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.cpp @@ -0,0 +1,141 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "CoolCombo.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + m_wndToolBar.IniSizes(CSize(16,16)); + m_wndToolBar.UpdateSizes(); + + 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 + } + + const int nDropHeight = 100; + + // Create the combo box + m_wndToolBar.SetButtonInfo(4, IDC_COMBO, TBBS_SEPARATOR, 180); + + // Design guide advises 12 pixel gap between combos and buttons + CRect rect; + m_wndToolBar.GetItemRect(4, &rect); + rect.bottom = rect.top + nDropHeight; + if (!m_wndToolBar.m_combo.Create(CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP, + rect, &m_wndToolBar, IDC_COMBO)) + { + TRACE(_T("Failed to create combo-box\n")); + return FALSE; + } + + // add some stuff + m_wndToolBar.m_combo.AddString(_T("Messages")); + m_wndToolBar.m_combo.AddString(_T("Messages with AutoPreview")); + m_wndToolBar.m_combo.AddString(_T("By Message Flag")); + m_wndToolBar.m_combo.AddString(_T("Last Seven Days")); + m_wndToolBar.m_combo.AddString(_T("Flagged For Next Seven Days")); + m_wndToolBar.m_combo.AddString(_T("By Conversation Topic")); + m_wndToolBar.m_combo.AddString(_T("By Sender")); + m_wndToolBar.m_combo.AddString(_T("Unread Messages")); + m_wndToolBar.m_combo.AddString(_T("Sent To")); + m_wndToolBar.m_combo.AddString(_T("Message Timeline")); + + m_wndToolBar.m_font.CreatePointFont(85,_T("Arial")); + m_wndToolBar.m_combo.SetFont(&m_wndToolBar.m_font); + VERIFY(m_wndToolBar.m_combo.SetTooltipText(_T("Cool ComboBox"))); + + // 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( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.h new file mode 100644 index 0000000..f665055 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/MainFrm.h @@ -0,0 +1,68 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__FE6B1BCD_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_MAINFRM_H__FE6B1BCD_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXCoolToolBar.h" +#include "OXCoolComboBox.h" + +class CMyToolBar : public COXCoolToolBar +{ +public: + COXCoolComboBox m_combo; + CFont m_font; +}; + +class CMainFrame : public CFrameWnd +{ + +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +public: // control bar embedded members + CStatusBar m_wndStatusBar; + CMyToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__FE6B1BCD_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/ReadMe.txt new file mode 100644 index 0000000..3af8e12 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/ReadMe.txt @@ -0,0 +1,105 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : CoolCombo +======================================================================== + + +AppWizard has created this CoolCombo 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 CoolCombo application. + +CoolCombo.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +CoolCombo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CCoolComboApp application class. + +CoolCombo.cpp + This is the main application source file that contains the application + class CCoolComboApp. + +CoolCombo.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++. + +CoolCombo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\CoolCombo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file CoolCombo.rc. + +res\CoolCombo.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CFrameWnd and controls all SDI 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 CoolCombo.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +CoolComboDoc.h, CoolComboDoc.cpp - the document + These files contain your CCoolComboDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CCoolComboDoc::Serialize). + +CoolComboView.h, CoolComboView.cpp - the view of the document + These files contain your CCoolComboView class. + CCoolComboView objects are used to view CCoolComboDoc objects. + + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named CoolCombo.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.cpp new file mode 100644 index 0000000..41fb3d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// CoolCombo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.h new file mode 100644 index 0000000..139e28b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/StdAfx.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__FE6B1BCB_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) +#define AFX_STDAFX_H__FE6B1BCB_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#if _MSC_VER > 0x0421 +#include // MFC support for Internet Explorer 4 Common Controls +#endif // _MSC_VER > 0x0421 +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#include "OXAdvancedAssert.h" + +#endif // !defined(AFX_STDAFX_H__FE6B1BCB_A5BD_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.rc2 new file mode 100644 index 0000000..ddc1cb6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolCombo.rc2 @@ -0,0 +1,13 @@ +// +// COOLCOMBO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolComboDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolComboDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/CoolComboDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/Toolbar.bmp new file mode 100644 index 0000000..74d063e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/resource.h new file mode 100644 index 0000000..6a9b829 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolCombo/resource.h @@ -0,0 +1,30 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CoolCombo.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_COOLCOMBO_FORM 101 +#define IDR_MAINFRAME 128 +#define IDR_COOLCOTYPE 129 +#define ID_DESCRIPTION_FILE 129 +#define IDC_COMBO 1000 +#define IDC_HEADING 1001 +#define IDC_CHECK_DISABLE 1002 +#define IDC_RADIO_DROPDOWN 1003 +#define IDC_RADIO_DROPDOWNLIST 1004 +#define IDC_CHECK_COOL 1005 +#define IDC_EDIT_TOOLTIPTEXT 1006 +#define IDC_SEPARATOR 1007 +#define IDC_CHECK_DISABLEINTOOLBAR 1008 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.clw new file mode 100644 index 0000000..135650c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.clw @@ -0,0 +1,179 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CPropertyPageNewControls +LastTemplate=CPropertyPage +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "CoolControls.h" + +ClassCount=7 +Class1=CCoolControlsApp +Class2=CCoolControlsDlg +Class3=CPropertyPageEdit + +ResourceCount=6 +Resource1=IDR_MAINFRAME +Resource2=IDD_DIALOG_NEWCONTROLS +Class4=CPropertyPageButtonComboBox +Resource3=IDD_DIALOG_EDIT +Class5=CPropertyPageListTree +Resource4=IDD_DIALOG_LISTTREE +Class6=CPropertyPageSpinAndOthers +Resource5=IDD_DIALOG_BUTTON_COMBOBOX +Class7=CPropertyPageNewControls +Resource6=IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER + +[CLS:CCoolControlsApp] +Type=0 +HeaderFile=CoolControls.h +ImplementationFile=CoolControls.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=IDC_COMBO_SIMPLE + +[CLS:CCoolControlsDlg] +Type=0 +HeaderFile=CoolControlsDlg.h +ImplementationFile=CoolControlsDlg.cpp +Filter=D +LastObject=CCoolControlsDlg + +[DLG:IDD_DIALOG_EDIT] +Type=1 +Class=CPropertyPageEdit +ControlCount=18 +Control1=IDC_EDIT_PLAIN,edit,1350631552 +Control2=IDC_EDIT_MULTILINE,edit,1353781252 +Control3=IDC_HOTKEY,msctls_hotkey32,1350631424 +Control4=IDC_RICHEDIT_MULTILINE,RICHEDIT,1353781252 +Control5=IDC_EDIT_SPIN_RIGHT,edit,1350631552 +Control6=IDC_SPIN_RIGHT,msctls_updown32,1342177334 +Control7=IDC_EDIT_SPIN_LEFT,edit,1350631552 +Control8=IDC_SPIN_LEFT,msctls_updown32,1342177338 +Control9=IDC_EDIT_SPIN_UNATTACHED,edit,1350631552 +Control10=IDC_SPIN_UNATTACHED,msctls_updown32,1342177330 +Control11=IDC_EDIT_OX,edit,1350631552 +Control12=IDC_EDIT_MASKED,edit,1350631552 +Control13=IDC_EDIT_NUMERIC,edit,1350631552 +Control14=IDC_EDIT_CURRENCY,edit,1350631552 +Control15=IDC_CHECK_DISABLE_ALL,button,1342242819 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,button,1342177287 +Control18=IDC_STATIC,static,1342308352 + +[CLS:CPropertyPageEdit] +Type=0 +HeaderFile=PropertyPageEdit.h +ImplementationFile=PropertyPageEdit.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC +LastObject=IDC_CHECK_DISABLE_ALL + +[DLG:IDD_DIALOG_BUTTON_COMBOBOX] +Type=1 +Class=CPropertyPageButtonComboBox +ControlCount=19 +Control1=IDC_BUTTON_DEFAULT,button,1342242817 +Control2=IDC_BUTTON_PUSH1,button,1342242816 +Control3=IDC_BUTTON_PUSH2,button,1342242816 +Control4=IDC_BUTTON_PUSH3,button,1342242816 +Control5=IDC_CHECK_RIGHT,button,1342242819 +Control6=IDC_CHECK_LEFT,button,1342242851 +Control7=IDC_CHECK_PUSHLIKE,button,1342246918 +Control8=IDC_RADIO1,button,1342373897 +Control9=IDC_RADIO2,button,1342242825 +Control10=IDC_RADIO3,button,1342242825 +Control11=IDC_RADIO_PUSHLIKE1,button,1342377993 +Control12=IDC_RADIO_PUSHLIKE2,button,1342246921 +Control13=IDC_RADIO_PUSHLIKE3,button,1342246921 +Control14=IDC_COMBO_SIMPLE,combobox,1344339969 +Control15=IDC_COMBO_DROPDOWN,combobox,1344339970 +Control16=IDC_COMBO_DROPDOWNLIST,combobox,1344339971 +Control17=IDC_CHECK_DISABLE_ALL,button,1342242819 +Control18=IDC_STATIC,button,1342177287 +Control19=IDC_STATIC,button,1342177287 + +[CLS:CPropertyPageButtonComboBox] +Type=0 +HeaderFile=PropertyPageButtonComboBox.h +ImplementationFile=PropertyPageButtonComboBox.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC +LastObject=IDC_BUTTON_PUSH1 + +[DLG:IDD_DIALOG_LISTTREE] +Type=1 +Class=CPropertyPageListTree +ControlCount=7 +Control1=IDC_LISTCTRL,SysListView32,1350647817 +Control2=IDC_LISTBOX,listbox,1353777409 +Control3=IDC_TREE,SysTreeView32,1350631463 +Control4=IDC_CHECK_DISABLE_ALL,button,1342242819 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_STATIC,button,1342177287 +Control7=IDC_STATIC,button,1342177287 + +[CLS:CPropertyPageListTree] +Type=0 +HeaderFile=PropertyPageListTree.h +ImplementationFile=PropertyPageListTree.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC + +[DLG:IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER] +Type=1 +Class=CPropertyPageSpinAndOthers +ControlCount=16 +Control1=IDC_CHECK_DISABLE_ALL,button,1342242819 +Control2=IDC_SPIN_VERT1,msctls_updown32,1342242848 +Control3=IDC_SPIN_VERT2,msctls_updown32,1342242848 +Control4=IDC_SPIN_HORZ,msctls_updown32,1342242912 +Control5=IDC_SCROLLBAR_VERT,scrollbar,1342242817 +Control6=IDC_SCROLLBAR_HORZ,scrollbar,1342177280 +Control7=IDC_PROGRESS_HORZ,msctls_progress32,1350565888 +Control8=IDC_SLIDER_HORZ_BOTH,msctls_trackbar32,1342242872 +Control9=IDC_SLIDER_HORZ_TOP,msctls_trackbar32,1342242836 +Control10=IDC_SLIDER_HORZ_BOTTOM,msctls_trackbar32,1342242832 +Control11=IDC_SLIDER_VERT_BOTH,msctls_trackbar32,1342242827 +Control12=IDC_SLIDER_VERT_LEFT,msctls_trackbar32,1342242870 +Control13=IDC_SLIDER_VERT_RIGHT,msctls_trackbar32,1342242819 +Control14=IDC_STATIC,button,1342177287 +Control15=IDC_STATIC,button,1342177287 +Control16=IDC_STATIC,button,1342177287 + +[CLS:CPropertyPageSpinAndOthers] +Type=0 +HeaderFile=PropertyPageSpinAndOthers.h +ImplementationFile=PropertyPageSpinAndOthers.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC +LastObject=CPropertyPageSpinAndOthers + +[DLG:IDD_DIALOG_NEWCONTROLS] +Type=1 +Class=CPropertyPageNewControls +ControlCount=8 +Control1=IDC_DATETIMEPICKER_DROPDOWN,SysDateTimePick32,1342242816 +Control2=IDC_DATETIMEPICKER_UPDOWN,SysDateTimePick32,1342242849 +Control3=IDC_MONTHCALENDAR,SysMonthCal32,1342242819 +Control4=IDC_IPADDRESS,SysIPAddress32,1342242816 +Control5=IDC_CHECK_DISABLE_ALL,button,1342242819 +Control6=IDC_STATIC,button,1342177287 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_STATIC,button,1342177287 + +[CLS:CPropertyPageNewControls] +Type=0 +HeaderFile=PropertyPageNewControls.h +ImplementationFile=PropertyPageNewControls.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC +LastObject=IDC_IPADDRESS + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.cpp new file mode 100644 index 0000000..e75248c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.cpp @@ -0,0 +1,127 @@ +// CoolControls.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "CoolControlsDlg.h" +#include "PropertyPageEdit.h" +#include "PropertyPageButtonComboBox.h" +#include "PropertyPageListTree.h" +#include "PropertyPageSpinAndOthers.h" +#include "PropertyPageNewControls.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsApp + +BEGIN_MESSAGE_MAP(CCoolControlsApp, CWinApp) + //{{AFX_MSG_MAP(CCoolControlsApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsApp construction + +CCoolControlsApp::CCoolControlsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCoolControlsApp object + +CCoolControlsApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsApp initialization + +BOOL CCoolControlsApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CCoolControlsDlg dlg(_T("Cool Controls")); + // change property sheet properties + // to show icon and remove Apply Now button + HICON hIcon=LoadIcon(IDR_MAINFRAME); + dlg.m_psh.dwFlags|=PSH_NOAPPLYNOW; + dlg.m_psh.dwFlags|=PSH_USEHICON; + dlg.m_psh.hIcon=hIcon; + + CPropertyPageEdit pageEdit; + CPropertyPageButtonComboBox pageButtonComboBox; + CPropertyPageListTree pageListTree; + CPropertyPageSpinAndOthers pageSpinAndOthers; +#if _MSC_VER > 0x0421 + CPropertyPageNewControls pageNewControls; +#endif // _MSC_VER > 0x0421 + + dlg.AddPage(&pageEdit); + dlg.AddPage(&pageButtonComboBox); + dlg.AddPage(&pageListTree); + dlg.AddPage(&pageSpinAndOthers); +#if _MSC_VER > 0x0421 + dlg.AddPage(&pageNewControls); +#endif // _MSC_VER > 0x0421 + + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CCoolControlsApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsp new file mode 100644 index 0000000..5eac314 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsp @@ -0,0 +1,334 @@ +# Microsoft Developer Studio Project File - Name="CoolControls" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CoolControls - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CoolControls.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CoolControls.mak" CFG="CoolControls - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CoolControls - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CoolControls - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CoolControls - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "CoolControls - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "CoolControls - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CoolControls - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolControls.exe" + +!ELSEIF "$(CFG)" == "CoolControls - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CoolControls.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "CoolControls - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolControls.exe" + +!ELSEIF "$(CFG)" == "CoolControls - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode_Release" +# PROP BASE Intermediate_Dir "Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CoolControls.exe" + +!ELSEIF "$(CFG)" == "CoolControls - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode_Debug" +# PROP BASE Intermediate_Dir "Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CoolControls.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CoolControls - Win32 Release" +# Name "CoolControls - Win32 Debug" +# Name "CoolControls - Win32 Release_Shared" +# Name "CoolControls - Win32 Unicode_Release" +# Name "CoolControls - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDateTimeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMaskedEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMonthCalCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolControls.cpp +# End Source File +# Begin Source File + +SOURCE=.\CoolControls.rc +# End Source File +# Begin Source File + +SOURCE=.\CoolControlsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageButtonComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageEdit.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageListTree.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageNewControls.cpp +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageSpinAndOthers.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CoolControls.h +# End Source File +# Begin Source File + +SOURCE=.\CoolControlsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMaskedEdit.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageButtonComboBox.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageEdit.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageListTree.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageNewControls.h +# End Source File +# Begin Source File + +SOURCE=.\PropertyPageSpinAndOthers.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\CoolControls.ico +# End Source File +# Begin Source File + +SOURCE=.\res\CoolControls.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\il_small.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolControls.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsw new file mode 100644 index 0000000..9d4eede --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CoolControls"=".\CoolControls.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/CoolControls", LEHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.h new file mode 100644 index 0000000..f575295 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.h @@ -0,0 +1,50 @@ +// CoolControls.h : main header file for the COOLCONTROLS application +// + +#if !defined(AFX_COOLCONTROLS_H__3696ECD8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_COOLCONTROLS_H__3696ECD8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsApp: +// See CoolControls.cpp for the implementation of this class +// + +class CCoolControlsApp : public CWinApp +{ +public: + CCoolControlsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCoolControlsApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CCoolControlsApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COOLCONTROLS_H__3696ECD8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.rc new file mode 100644 index 0000000..5d14942 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.rc @@ -0,0 +1,383 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\CoolControls.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\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\\CoolControls.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "CoolControls MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "CoolControls" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "CoolControls.EXE" + VALUE "ProductName", "CoolControls Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_EDIT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 269 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END + + IDD_DIALOG_BUTTON_COMBOBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 269 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END + + IDD_DIALOG_LISTTREE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 269 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END + + IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 269 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END + + IDD_DIALOG_NEWCONTROLS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 269 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_EDIT DIALOG 0, 0, 276, 199 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Cool Edit Controls" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT_PLAIN,14,19,110,13,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_MULTILINE,14,36,111,42,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL + CONTROL "HotKey1",IDC_HOTKEY,"msctls_hotkey32",WS_BORDER | WS_TABSTOP,181,19,80,13 + CONTROL "",IDC_RICHEDIT_MULTILINE,"RICHEDIT",TCS_FOCUSONBUTTONDOWN | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,149,36,113,42 + EDITTEXT IDC_EDIT_SPIN_RIGHT,14,86,72,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_RIGHT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,86,87,11,13 + EDITTEXT IDC_EDIT_SPIN_LEFT,100,87,72,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_LEFT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNLEFT | UDS_AUTOBUDDY | UDS_ARROWKEYS,172,87,11,13 + EDITTEXT IDC_EDIT_SPIN_UNATTACHED,187,86,62,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_UNATTACHED,"msctls_updown32",UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,250,86,11,15 + EDITTEXT IDC_EDIT_OX,14,130,107,13,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_MASKED,14,146,107,13,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_NUMERIC,152,130,107,13,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_CURRENCY,152,146,107,13,ES_AUTOHSCROLL + CONTROL "Disable all controls",IDC_CHECK_DISABLE_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,182,75,10 + GROUPBOX "Standard edit controls",IDC_STATIC,7,7,262,103 + GROUPBOX "Extended edit controls",IDC_STATIC,7,115,262,55 + LTEXT "Hot Key",IDC_STATIC,150,21,26,8 +END + +IDD_DIALOG_BUTTON_COMBOBOX DIALOG 0, 0, 276, 199 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Cool Button and Combo Box Controls" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Default Button",IDC_BUTTON_DEFAULT,13,18,57,17 + PUSHBUTTON "Push Button1",IDC_BUTTON_PUSH1,77,18,57,17 + PUSHBUTTON "Push Button2",IDC_BUTTON_PUSH2,141,18,57,17 + PUSHBUTTON "Push Button3",IDC_BUTTON_PUSH3,205,18,57,17 + CONTROL "Check box (right text)",IDC_CHECK_RIGHT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,48,83,10 + CONTROL "Check box (left text)",IDC_CHECK_LEFT,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,14,64,79,10 + CONTROL "Pushlike check box",IDC_CHECK_PUSHLIKE,"Button",BS_AUTO3STATE | BS_PUSHLIKE | WS_TABSTOP,13,84,81,13 + CONTROL "Radio1",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,133,45,39,10 + CONTROL "Radio2",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,133,57,39,10 + CONTROL "Radio3",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,133,70,39,10 + CONTROL "Radio1",IDC_RADIO_PUSHLIKE1,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_GROUP | WS_TABSTOP,133,84,39,13 + CONTROL "Radio2",IDC_RADIO_PUSHLIKE2,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_TABSTOP,175,84,39,13 + CONTROL "Radio3",IDC_RADIO_PUSHLIKE3,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_TABSTOP,215,84,39,13 + COMBOBOX IDC_COMBO_SIMPLE,13,117,103,50,CBS_SIMPLE | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_DROPDOWN,137,115,125,49,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_DROPDOWNLIST,137,143,125,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Disable all controls",IDC_CHECK_DISABLE_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,182,75,10 + GROUPBOX "Button",IDC_STATIC,7,7,262,95 + GROUPBOX "Combo box",IDC_STATIC,7,106,262,66 +END + +IDD_DIALOG_LISTTREE DIALOGEX 0, 0, 276, 199 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Cool List and Tree Controls" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + CONTROL "List1",IDC_LISTCTRL,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,11,16,254,59 + LISTBOX IDC_LISTBOX,13,95,111,74,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + CONTROL "Tree1",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,151,95,113,73 + CONTROL "Disable all controls",IDC_CHECK_DISABLE_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,182,75,10 + GROUPBOX "List control",IDC_STATIC,7,7,262,72 + GROUPBOX "List Box",IDC_STATIC,7,84,123,88 + GROUPBOX "Tree control",IDC_STATIC,146,84,123,88 +END + +IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER DIALOGEX 0, 0, 276, 199 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Cool spin, scroll, progress and slider controls" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Disable all controls",IDC_CHECK_DISABLE_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,182,75,10 + CONTROL "Spin1",IDC_SPIN_VERT1,"msctls_updown32",UDS_ARROWKEYS | WS_TABSTOP,13,17,20,38 + CONTROL "Spin1",IDC_SPIN_VERT2,"msctls_updown32",UDS_ARROWKEYS | WS_TABSTOP,51,17,20,38,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + CONTROL "Spin2",IDC_SPIN_HORZ,"msctls_updown32",UDS_ARROWKEYS | UDS_HORZ | WS_TABSTOP,13,62,57,13 + SCROLLBAR IDC_SCROLLBAR_VERT,98,18,26,52,SBS_VERT | WS_TABSTOP + SCROLLBAR IDC_SCROLLBAR_HORZ,133,18,128,20 + CONTROL "Progress1",IDC_PROGRESS_HORZ,"msctls_progress32",WS_BORDER,133,54,128,14 + CONTROL "Slider1",IDC_SLIDER_HORZ_BOTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,14,99,134,19 + CONTROL "Slider1",IDC_SLIDER_HORZ_TOP,"msctls_trackbar32",TBS_TOP | TBS_NOTICKS | WS_TABSTOP,14,124,134,19 + CONTROL "Slider1",IDC_SLIDER_HORZ_BOTTOM,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,13,150,134,15 + CONTROL "Slider2",IDC_SLIDER_VERT_BOTH,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_TABSTOP,167,98,27,68 + CONTROL "Slider2",IDC_SLIDER_VERT_LEFT,"msctls_trackbar32",TBS_VERT | TBS_TOP | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,204,98,22,68 + CONTROL "Slider2",IDC_SLIDER_VERT_RIGHT,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | WS_TABSTOP,234,98,22,68 + GROUPBOX "Spin Button",IDC_STATIC,7,7,70,73 + GROUPBOX "Sliders",IDC_STATIC,7,88,262,86 + GROUPBOX "Scroll && Progress Bars",IDC_STATIC,89,7,180,73 +END + +IDD_DIALOG_NEWCONTROLS DIALOGEX 0, 0, 276, 199 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "New controls" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "DateTimePicker1",IDC_DATETIMEPICKER_DROPDOWN, + "SysDateTimePick32",WS_TABSTOP,11,19,111,14 + CONTROL "DateTimePicker1",IDC_DATETIMEPICKER_UPDOWN, + "SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP,11,41,111,14 + CONTROL "MonthCalendar1",IDC_MONTHCALENDAR,"SysMonthCal32",MCS_DAYSTATE | MCS_MULTISELECT | WS_TABSTOP,142,18,120,97,WS_EX_CLIENTEDGE + CONTROL "IPAddress1",IDC_IPADDRESS,"SysIPAddress32",WS_TABSTOP,13,97,102,13 + CONTROL "Disable all controls",IDC_CHECK_DISABLE_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,182,75,10 + GROUPBOX "Date-time picker",IDC_STATIC,7,7,119,59 + GROUPBOX "Month Calendar",IDC_STATIC,135,7,134,115 + GROUPBOX "IP Address",IDC_STATIC,7,82,121,40 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_DIALOG_BUTTON_COMBOBOX DLGINIT +BEGIN + IDC_COMBO_SIMPLE, 0x403, 17, 0 +0x6953, 0x706d, 0x656c, 0x6320, 0x6d6f, 0x6f62, 0x6220, 0x786f, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3520, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_SIMPLE, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWN, 0x403, 19, 0 +0x7244, 0x706f, 0x6f64, 0x6e77, 0x6320, 0x6d6f, 0x6f62, 0x6220, 0x786f, +"\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3520, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWN, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 24, 0 +0x7244, 0x706f, 0x6f64, 0x6e77, 0x6c20, 0x7369, 0x2074, 0x6f63, 0x626d, +0x206f, 0x6f62, 0x0078, + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3520, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO_DROPDOWNLIST, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IL_SMALL BITMAP "res\\il_small.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About CoolControls..." + ID_DESCRIPTION_FILE "CoolControlsInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "CoolControls" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\CoolControls.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.vcproj new file mode 100644 index 0000000..e8aabcf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControls.vcproj @@ -0,0 +1,1407 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.cpp new file mode 100644 index 0000000..4ff845d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.cpp @@ -0,0 +1,125 @@ +// CoolControlsDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "CoolControlsDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsDlg dialog + +CCoolControlsDlg:: +CCoolControlsDlg(UINT nIDCaption, CWnd *pParentWnd, UINT iSelectPage) : +CPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CCoolControlsDlg:: +CCoolControlsDlg(LPCTSTR pszCaption, CWnd *pParentWnd, UINT iSelectPage) : +CPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +BEGIN_MESSAGE_MAP(CCoolControlsDlg, CPropertySheet) + //{{AFX_MSG_MAP(CCoolControlsDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsDlg message handlers + +BOOL CCoolControlsDlg::OnInitDialog() +{ + CPropertySheet::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CCoolControlsDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CPropertySheet::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CCoolControlsDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CPropertySheet::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CCoolControlsDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.h new file mode 100644 index 0000000..0d2e18d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsDlg.h @@ -0,0 +1,40 @@ +// CoolControlsDlg.h : header file +// + +#if !defined(AFX_COOLCONTROLSDLG_H__3696ECDA_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_COOLCONTROLSDLG_H__3696ECDA_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CCoolControlsDlg dialog + +class CCoolControlsDlg : public CPropertySheet +{ +// Construction +public: + CCoolControlsDlg(UINT nIDCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + CCoolControlsDlg(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, + UINT iSelectPage = 0); + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CCoolControlsDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COOLCONTROLSDLG_H__3696ECDA_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsInfo.rtf new file mode 100644 index 0000000..2f36753 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/CoolControlsInfo.rtf @@ -0,0 +1,61 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;} +{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5183391\rsid15942976} +{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr11\min22}{\revtim\yr2005\mo1\dy17\hr11\min23}{\version2}{\edmins1}{\nofpages2}{\nofwords429}{\nofchars2451}{\*\company Dundas India} +{\nofcharsws2875}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot15942976 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid15942976 Cool Controls}{\b\fs48\insrsid15942976 +\par }{\b\fs20\insrsid15942976 Copyright \'a9 }{\b\fs20\insrsid15942976 The Code Project}{\b\fs20\insrsid15942976 1997 - 1998, All Rights Reserved +\par }{\b\fs48\insrsid15942976 +\par }{\insrsid15942976 Just as a reminder, we assume that a common control can be called "}{\b\insrsid15942976 cool}{\insrsid15942976 " if it can take normal or hot state. By definition, a window is in a hot state when the mouse cursor + is over it or it has focus. Otherwise a window is in normal state. Naturally, in order to distinguish between a window in different states some graphical effects should be applied. E.g. the drawing of window borders in different states might be different +. +\par +\par }{\b\insrsid15942976 COXCoolCtrl}{\insrsid15942976 class is the basic class that is used to create cool controls. This is a template class and it can be easily used in order to create "}{\b\insrsid15942976 cool}{\insrsid15942976 +" versions of common controls. Actually our implementation of classes for cool common controls doesn't have any public functions, so it's strongly recommended to refer to }{\ul\cf2\insrsid15942976 COXCoolCtrl reference}{\cf2\insrsid15942976 }{ +\insrsid15942976 for the functionality available for all cool controls (e.g. all cool controls support tooltips). +\par +\par When we were talking about implementation of "cool" versions of coo +l controls we mentioned that it doesn't require too much work to be done because almost everything is covered by COXCoolCtrl. Actually, for the following common controls "cool" state will be supported automatically if you use corresponding MFC class as te +mplate argument. +\par +\par }{\b\ul\insrsid15942976 Common Control\tab MFC class\tab UTB class\tab }{\ul\insrsid15942976 +\par }{\insrsid15942976 \tab \tab \tab +\par }{\fs20\ul\insrsid15942976 Edit control}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CEdit}{\b\fs20\insrsid15942976 \tab \tab COXCoolCtrl\tab +\par }{\fs20\ul\insrsid15942976 Rich edit control}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CRichEditCtr}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 Tree view}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CTreeCtr}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 List view}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CListCtrl}{\b\fs20\insrsid15942976 \tab \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 List box}{\b\fs20\insrsid15942976 \tab \tab \tab }{\fs20\insrsid15942976 CListBox}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 Progress bar}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CProgressCtrl}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 Hot key control}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CHotKeyCtrl}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 Date-time picker}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CDateTimeCtrl}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 Month calendar}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CMonthCalCtrl}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\fs20\ul\insrsid15942976 IP Address control}{\b\fs20\insrsid15942976 \tab }{\fs20\insrsid15942976 CIPAddressCtrl}{\b\fs20\insrsid15942976 \tab COXCoolCtrl \tab +\par }{\insrsid15942976 +\par +\par For the other common controls, where additional drawing routines were required, we had to come up with new classes. Below you will find the list of all such controls and the corresponding Ultimate Toolbox classes. +\par +\par }{\b\ul\insrsid15942976 Common Control\tab MFC class\tab UTB class \tab }{\ul\insrsid15942976 +\par }{\insrsid15942976 +\par }{\fs20\ul\insrsid15942976 Push button }{\b\fs20\insrsid15942976 \tab \tab \tab +\par }{\fs20\ul\insrsid15942976 Check button}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CButton}{\b\fs20\insrsid15942976 \tab \tab COXCoolButton \tab +\par }{\fs20\ul\insrsid15942976 Radio button controls}{\b\fs20\insrsid15942976 \tab \tab \tab +\par }{\fs20\ul\insrsid15942976 Spin button}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CSpinButtonCtrl}{\b\fs20\insrsid15942976 \tab COXCoolSpinButtonCtrl \tab +\par }{\fs20\ul\insrsid15942976 Combo box}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CComboBox}{\b\fs20\insrsid15942976 \tab COXCoolComboBox \tab +\par }{\fs20\ul\insrsid15942976 Slider}{\b\fs20\insrsid15942976 \tab \tab \tab }{\fs20\insrsid15942976 CSliderCtrl}{\b\fs20\insrsid15942976 \tab COXCoolSliderCtrl \tab +\par }{\fs20\ul\insrsid15942976 Scroll bar}{\b\fs20\insrsid15942976 \tab \tab }{\fs20\insrsid15942976 CScrollBar}{\b\fs20\insrsid15942976 \tab COXCoolScrollBar \tab +\par }{\insrsid15942976 +\par +\par We would like to emphasize again that these classes }{\b\insrsid15942976 do not}{\insrsid15942976 have any public functions of their own.\~ These implementations do not add any public functions to the standard implementation.\~ + So the only change you need to worry about is in the declarations. +\par +\par All above mentioned classes can be used without any restrictions in place of the standard ones. Take look at the }{\b\insrsid15942976 CoolControls}{\insrsid15942976 sample that demonstrates th +e use of all cool controls classes. This sample can be found in }{\b\insrsid15942976 .\\Samples\\gui\\CoolControls}{\insrsid15942976 +\par }{\fs20\insrsid15942976 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.cpp new file mode 100644 index 0000000..11e2b0a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.cpp @@ -0,0 +1,93 @@ +// PropertyPageButtonComboBox.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "PropertyPageButtonComboBox.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageButtonComboBox property page + +IMPLEMENT_DYNCREATE(CPropertyPageButtonComboBox, CPropertyPage) + +CPropertyPageButtonComboBox::CPropertyPageButtonComboBox() : CPropertyPage(CPropertyPageButtonComboBox::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageButtonComboBox) + m_bDisable = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageButtonComboBox::~CPropertyPageButtonComboBox() +{ +} + +void CPropertyPageButtonComboBox::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageButtonComboBox) + DDX_Control(pDX, IDC_BUTTON_PUSH3, m_btnPush3); + DDX_Control(pDX, IDC_BUTTON_PUSH2, m_btnPush2); + DDX_Control(pDX, IDC_RADIO1, m_radio1); + DDX_Control(pDX, IDC_RADIO2, m_radio2); + DDX_Control(pDX, IDC_RADIO3, m_radio3); + DDX_Control(pDX, IDC_RADIO_PUSHLIKE1, m_radioPushlike1); + DDX_Control(pDX, IDC_RADIO_PUSHLIKE2, m_radioPushlike2); + DDX_Control(pDX, IDC_RADIO_PUSHLIKE3, m_radioPushlike3); + DDX_Control(pDX, IDC_COMBO_SIMPLE, m_comboSimple); + DDX_Control(pDX, IDC_COMBO_DROPDOWNLIST, m_comboDropdownlist); + DDX_Control(pDX, IDC_COMBO_DROPDOWN, m_comboDropdown); + DDX_Control(pDX, IDC_CHECK_RIGHT, m_btnCheckRight); + DDX_Control(pDX, IDC_CHECK_PUSHLIKE, m_btnCheckPushlike); + DDX_Control(pDX, IDC_CHECK_LEFT, m_btnCheckLeft); + DDX_Control(pDX, IDC_CHECK_DISABLE_ALL, m_btnDisable); + DDX_Control(pDX, IDC_BUTTON_PUSH1, m_btnPush1); + DDX_Control(pDX, IDC_BUTTON_DEFAULT, m_btnDefault); + DDX_Check(pDX, IDC_CHECK_DISABLE_ALL, m_bDisable); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropertyPageButtonComboBox, CPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageButtonComboBox) + ON_BN_CLICKED(IDC_CHECK_DISABLE_ALL, OnCheckDisableAll) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageButtonComboBox message handlers + +void CPropertyPageButtonComboBox::OnCheckDisableAll() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + + CWnd* pChildWnd=GetWindow(GW_CHILD); + while(pChildWnd!=NULL) + { + if(pChildWnd!=&m_btnDisable) + pChildWnd->EnableWindow(!m_bDisable); + pChildWnd=pChildWnd->GetWindow(GW_HWNDNEXT); + } +} + +BOOL CPropertyPageButtonComboBox::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + UpdateData(FALSE); + + m_comboDropdown.SetCurSel(0); + m_comboDropdownlist.SetCurSel(0); + m_comboSimple.SetCurSel(0); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.h new file mode 100644 index 0000000..8cb73ce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageButtonComboBox.h @@ -0,0 +1,69 @@ +#if !defined(AFX_PROPERTYPAGEBUTTONCOMBOBOX_H__3696ECE6_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_PROPERTYPAGEBUTTONCOMBOBOX_H__3696ECE6_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// PropertyPageButtonComboBox.h : header file +// + +#include "OXCoolComboBox.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageButtonComboBox dialog + +class CPropertyPageButtonComboBox : public CPropertyPage +{ + DECLARE_DYNCREATE(CPropertyPageButtonComboBox) + +// Construction +public: + CPropertyPageButtonComboBox(); + ~CPropertyPageButtonComboBox(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageButtonComboBox) + enum { IDD = IDD_DIALOG_BUTTON_COMBOBOX }; + COXCoolButton m_btnPush3; + COXCoolButton m_btnPush2; + COXCoolButton m_radio1; + COXCoolButton m_radio2; + COXCoolButton m_radio3; + COXCoolButton m_radioPushlike1; + COXCoolButton m_radioPushlike2; + COXCoolButton m_radioPushlike3; + COXCoolComboBox m_comboSimple; + COXCoolComboBox m_comboDropdownlist; + COXCoolComboBox m_comboDropdown; + COXCoolButton m_btnCheckRight; + COXCoolButton m_btnCheckPushlike; + COXCoolButton m_btnCheckLeft; + COXCoolButton m_btnDisable; + COXCoolButton m_btnPush1; + COXCoolButton m_btnDefault; + BOOL m_bDisable; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageButtonComboBox) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CPropertyPageButtonComboBox) + afx_msg void OnCheckDisableAll(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEBUTTONCOMBOBOX_H__3696ECE6_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.cpp new file mode 100644 index 0000000..86f4a64 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.cpp @@ -0,0 +1,101 @@ +// PropertyPageEdit.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "PropertyPageEdit.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageEdit property page + +IMPLEMENT_DYNCREATE(CPropertyPageEdit, CPropertyPage) + +CPropertyPageEdit::CPropertyPageEdit() : CPropertyPage(CPropertyPageEdit::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageEdit) + m_bDisable = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageEdit::~CPropertyPageEdit() +{ +} + +void CPropertyPageEdit::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageEdit) + DDX_Control(pDX, IDC_HOTKEY, m_hotKey); + DDX_Control(pDX, IDC_SPIN_UNATTACHED, m_spinUnattached); + DDX_Control(pDX, IDC_SPIN_RIGHT, m_spinRight); + DDX_Control(pDX, IDC_SPIN_LEFT, m_spinLeft); + DDX_Control(pDX, IDC_RICHEDIT_MULTILINE, m_richeditMultiline); + DDX_Control(pDX, IDC_EDIT_SPIN_UNATTACHED, m_editSpinUnattached); + DDX_Control(pDX, IDC_EDIT_SPIN_RIGHT, m_editSpinRight); + DDX_Control(pDX, IDC_EDIT_SPIN_LEFT, m_editSpinLeft); + DDX_Control(pDX, IDC_EDIT_PLAIN, m_editPlain); + DDX_Control(pDX, IDC_EDIT_OX, m_editExtended); + DDX_Control(pDX, IDC_EDIT_NUMERIC, m_editNumeric); + DDX_Control(pDX, IDC_EDIT_MULTILINE, m_editMultiline); + DDX_Control(pDX, IDC_EDIT_MASKED, m_editMasked); + DDX_Control(pDX, IDC_EDIT_CURRENCY, m_editCurrency); + DDX_Control(pDX, IDC_CHECK_DISABLE_ALL, m_btnDisable); + DDX_Check(pDX, IDC_CHECK_DISABLE_ALL, m_bDisable); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropertyPageEdit, CPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageEdit) + ON_BN_CLICKED(IDC_CHECK_DISABLE_ALL, OnCheckDisableAll) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageEdit message handlers + +BOOL CPropertyPageEdit::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + UpdateData(FALSE); + + m_richeditMultiline.SetWindowText(_T("Rich edit control\ntext\ntext\ntext\ntext\ntext\ntext\ntext\ntext\ntext\ntext\ntext")); + m_spinUnattached.SetRange(0,100); + m_spinRight.SetRange(0,100); + m_spinLeft.SetRange(0,100); + m_editPlain.SetWindowText(_T("Edit control")); + m_editExtended.SetWindowText(_T("Extended edit control")); + m_editExtended.SetTextColor(RGB(255,255,0)); + m_editExtended.SetBkColor(RGB(0,0,255)); + m_editNumeric.SetTextColor(RGB(0,0,255)); + m_editNumeric.SetMask(_T("Numeric data: #")); + m_editMultiline.SetWindowText(_T("Multiline edit control")); + m_editMasked.SetMask(_T("Phone:(###)###-#### Ext:####")); + m_editCurrency.SetNegativeTextColor(RGB(255,0,0)); + m_editCurrency.SetMask(_T("Currency data: #")); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CPropertyPageEdit::OnCheckDisableAll() +{ + // TODO: Add your control notification handler code here + UpdateData(); + + CWnd* pChildWnd=GetWindow(GW_CHILD); + while(pChildWnd!=NULL) + { + if(pChildWnd!=&m_btnDisable) + pChildWnd->EnableWindow(!m_bDisable); + pChildWnd=pChildWnd->GetWindow(GW_HWNDNEXT); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.h new file mode 100644 index 0000000..7575bc7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageEdit.h @@ -0,0 +1,71 @@ +#if !defined(AFX_PROPERTYPAGEEDIT_H__3696ECE4_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_PROPERTYPAGEEDIT_H__3696ECE4_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXCoolCtrl.h" +#include "OXEdit.h" +#include "OXMaskedEdit.h" + +// PropertyPageEdit.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageEdit dialog + +class CPropertyPageEdit : public CPropertyPage +{ + DECLARE_DYNCREATE(CPropertyPageEdit) + +// Construction +public: + CPropertyPageEdit(); + ~CPropertyPageEdit(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageEdit) + enum { IDD = IDD_DIALOG_EDIT }; + COXCoolCtrl m_hotKey; + COXCoolSpinButtonCtrl m_spinUnattached; + COXCoolSpinButtonCtrl m_spinRight; + COXCoolSpinButtonCtrl m_spinLeft; + COXCoolCtrl m_richeditMultiline; + COXCoolCtrl m_editSpinUnattached; + COXCoolCtrl m_editSpinRight; + COXCoolCtrl m_editSpinLeft; + COXCoolCtrl m_editPlain; + COXCoolCtrl m_editExtended; + COXCoolCtrl m_editNumeric; + COXCoolCtrl m_editMultiline; + COXCoolCtrl m_editMasked; + COXCoolCtrl m_editCurrency; + COXCoolButton m_btnDisable; + BOOL m_bDisable; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageEdit) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CPropertyPageEdit) + virtual BOOL OnInitDialog(); + afx_msg void OnCheckDisableAll(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGEEDIT_H__3696ECE4_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.cpp new file mode 100644 index 0000000..ae4ccfb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.cpp @@ -0,0 +1,132 @@ +// PropertyPageListTree.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "PropertyPageListTree.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageListTree property page + +IMPLEMENT_DYNCREATE(CPropertyPageListTree, CPropertyPage) + +CPropertyPageListTree::CPropertyPageListTree() : CPropertyPage(CPropertyPageListTree::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageListTree) + m_bDisable = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageListTree::~CPropertyPageListTree() +{ +} + +void CPropertyPageListTree::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageListTree) + DDX_Control(pDX, IDC_TREE, m_tree); + DDX_Control(pDX, IDC_LISTCTRL, m_list); + DDX_Control(pDX, IDC_LISTBOX, m_listbox); + DDX_Control(pDX, IDC_CHECK_DISABLE_ALL, m_btnDisable); + DDX_Check(pDX, IDC_CHECK_DISABLE_ALL, m_bDisable); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropertyPageListTree, CPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageListTree) + ON_BN_CLICKED(IDC_CHECK_DISABLE_ALL, OnCheckDisableAll) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageListTree message handlers + +void CPropertyPageListTree::OnCheckDisableAll() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + + CWnd* pChildWnd=GetWindow(GW_CHILD); + while(pChildWnd!=NULL) + { + if(pChildWnd!=&m_btnDisable) + pChildWnd->EnableWindow(!m_bDisable); + pChildWnd=pChildWnd->GetWindow(GW_HWNDNEXT); + } +} + +BOOL CPropertyPageListTree::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + UpdateData(FALSE); + + VERIFY(m_il.Create(IDB_IL_SMALL,16,1,RGB(128,128,128))); + + // populate list control + m_list.SetImageList(&m_il,LVSIL_SMALL); + + CString sColumnText; + CString sItemText; + for (int nColumn=0; nColumn<8; nColumn++) + { + sColumnText.Format(_T("Column %d"),nColumn+1); + m_list.InsertColumn(nColumn,sColumnText,LVCFMT_LEFT,100); + + for(int nRow=0; nRow<50; nRow++) + { + sItemText.Format(_T("Item %d in column %d"),nRow+1,nColumn+1); + if(nColumn==0) + m_list.InsertItem(nRow,sItemText,0); + else + m_list.SetItem(nRow,nColumn,LVIF_TEXT,sItemText,NULL,NULL,NULL,NULL); + } + } + + m_list.SetTooltipText("This is a cool edit control"); + + ///////////////////////////////// + + + // populate tree control + m_tree.SetImageList(&m_il,TVSIL_NORMAL); + + CString sParentText; + int nIndex=0; + for (nIndex=0; nIndex<15; nIndex++) + { + sParentText.Format(_T("Tree item %d"),nIndex+1); + HTREEITEM hParent=m_tree.InsertItem(sParentText,0,0); + ASSERT(hParent!=NULL); + + for(int nSubItem=0; nSubItem<5; nSubItem++) + { + sItemText.Format(_T("SubItem %d of parent item %d"),nSubItem+1,nIndex+1); + m_tree.InsertItem(sItemText,0,0,hParent); + } + } + ///////////////////////////////// + + + // populate listbox control + for (nIndex=0; nIndex<100; nIndex++) + { + sItemText.Format(_T("Listbox item %d"),nIndex+1); + m_listbox.AddString(sItemText); + } + ///////////////////////////////// + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.h new file mode 100644 index 0000000..b2cfa7b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageListTree.h @@ -0,0 +1,57 @@ +#if !defined(AFX_PROPERTYPAGELISTTREE_H__3696ECE8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_PROPERTYPAGELISTTREE_H__3696ECE8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// PropertyPageListTree.h : header file +// + +#include "OXCoolCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageListTree dialog + +class CPropertyPageListTree : public CPropertyPage +{ + DECLARE_DYNCREATE(CPropertyPageListTree) + +// Construction +public: + CPropertyPageListTree(); + ~CPropertyPageListTree(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageListTree) + enum { IDD = IDD_DIALOG_LISTTREE }; + COXCoolCtrl m_tree; + COXCoolCtrl m_list; + COXCoolCtrl m_listbox; + COXCoolButton m_btnDisable; + BOOL m_bDisable; + //}}AFX_DATA + CImageList m_il; + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageListTree) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CPropertyPageListTree) + afx_msg void OnCheckDisableAll(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGELISTTREE_H__3696ECE8_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.cpp new file mode 100644 index 0000000..d48b9cb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.cpp @@ -0,0 +1,79 @@ +// PropertyPageNewControls.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "PropertyPageNewControls.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#if _MSC_VER > 0x0421 + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageNewControls property page + +IMPLEMENT_DYNCREATE(CPropertyPageNewControls, CPropertyPage) + +CPropertyPageNewControls::CPropertyPageNewControls() : CPropertyPage(CPropertyPageNewControls::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageNewControls) + m_bDisable = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageNewControls::~CPropertyPageNewControls() +{ +} + +void CPropertyPageNewControls::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageNewControls) + DDX_Control(pDX, IDC_IPADDRESS, m_ipAddress); + DDX_Control(pDX, IDC_MONTHCALENDAR, m_monthCal); + DDX_Control(pDX, IDC_DATETIMEPICKER_UPDOWN, m_dtpUpDown); + DDX_Control(pDX, IDC_DATETIMEPICKER_DROPDOWN, m_dtpDropDown); + DDX_Control(pDX, IDC_CHECK_DISABLE_ALL, m_btnDisable); + DDX_Check(pDX, IDC_CHECK_DISABLE_ALL, m_bDisable); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropertyPageNewControls, CPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageNewControls) + ON_BN_CLICKED(IDC_CHECK_DISABLE_ALL, OnCheckDisableAll) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageNewControls message handlers + +void CPropertyPageNewControls::OnCheckDisableAll() +{ + // TODO: Add your control notification handler code here + UpdateData(); + + CWnd* pChildWnd=GetWindow(GW_CHILD); + while(pChildWnd!=NULL) + { + if(pChildWnd!=&m_btnDisable) + pChildWnd->EnableWindow(!m_bDisable); + pChildWnd=pChildWnd->GetWindow(GW_HWNDNEXT); + } +} + +BOOL CPropertyPageNewControls::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +#endif // _MSC_VER > 0x0421 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.h new file mode 100644 index 0000000..8d21652 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageNewControls.h @@ -0,0 +1,61 @@ +#if !defined(AFX_PROPERTYPAGENEWCONTROLS_H__3696ECEB_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_PROPERTYPAGENEWCONTROLS_H__3696ECEB_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// PropertyPageNewControls.h : header file +// + +#if _MSC_VER > 0x0421 + +#include "OXCoolCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageNewControls dialog + +class CPropertyPageNewControls : public CPropertyPage +{ + DECLARE_DYNCREATE(CPropertyPageNewControls) + +// Construction +public: + CPropertyPageNewControls(); + ~CPropertyPageNewControls(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageNewControls) + enum { IDD = IDD_DIALOG_NEWCONTROLS }; + COXCoolCtrl m_ipAddress; + COXCoolCtrl m_monthCal; + COXCoolCtrl m_dtpUpDown; + COXCoolCtrl m_dtpDropDown; + COXCoolButton m_btnDisable; + BOOL m_bDisable; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageNewControls) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CPropertyPageNewControls) + afx_msg void OnCheckDisableAll(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +#endif // _MSC_VER > 0x0421 + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGENEWCONTROLS_H__3696ECEB_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.cpp new file mode 100644 index 0000000..79851d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.cpp @@ -0,0 +1,99 @@ +// PropertyPageSpinAndOthers.cpp : implementation file +// + +#include "stdafx.h" +#include "CoolControls.h" +#include "PropertyPageSpinAndOthers.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSpinAndOthers property page + +IMPLEMENT_DYNCREATE(CPropertyPageSpinAndOthers, CPropertyPage) + +CPropertyPageSpinAndOthers::CPropertyPageSpinAndOthers() : CPropertyPage(CPropertyPageSpinAndOthers::IDD) +{ + //{{AFX_DATA_INIT(CPropertyPageSpinAndOthers) + m_bDisable = FALSE; + //}}AFX_DATA_INIT +} + +CPropertyPageSpinAndOthers::~CPropertyPageSpinAndOthers() +{ +} + +void CPropertyPageSpinAndOthers::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropertyPageSpinAndOthers) + DDX_Control(pDX, IDC_SPIN_VERT2, m_spinVert2); + DDX_Control(pDX, IDC_SPIN_VERT1, m_spinVert1); + DDX_Control(pDX, IDC_SPIN_HORZ, m_spinHorz); + DDX_Control(pDX, IDC_SLIDER_VERT_RIGHT, m_sliderVertRight); + DDX_Control(pDX, IDC_SLIDER_VERT_LEFT, m_sliderVertLeft); + DDX_Control(pDX, IDC_SLIDER_VERT_BOTH, m_sliderVertBoth); + DDX_Control(pDX, IDC_SLIDER_HORZ_TOP, m_sliderHorzTop); + DDX_Control(pDX, IDC_SLIDER_HORZ_BOTTOM, m_sliderHorzBottom); + DDX_Control(pDX, IDC_SLIDER_HORZ_BOTH, m_sliderHorzBoth); + DDX_Control(pDX, IDC_SCROLLBAR_VERT, m_scrollVert); + DDX_Control(pDX, IDC_SCROLLBAR_HORZ, m_scrollHorz); + DDX_Control(pDX, IDC_PROGRESS_HORZ, m_progressHorz); + DDX_Control(pDX, IDC_CHECK_DISABLE_ALL, m_btnDisable); + DDX_Check(pDX, IDC_CHECK_DISABLE_ALL, m_bDisable); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropertyPageSpinAndOthers, CPropertyPage) + //{{AFX_MSG_MAP(CPropertyPageSpinAndOthers) + ON_BN_CLICKED(IDC_CHECK_DISABLE_ALL, OnCheckDisableAll) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSpinAndOthers message handlers + +void CPropertyPageSpinAndOthers::OnCheckDisableAll() +{ + // TODO: Add your control notification handler code here + UpdateData(); + + CWnd* pChildWnd=GetWindow(GW_CHILD); + while(pChildWnd!=NULL) + { + if(pChildWnd!=&m_btnDisable) + pChildWnd->EnableWindow(!m_bDisable); + pChildWnd=pChildWnd->GetWindow(GW_HWNDNEXT); + } +} + +BOOL CPropertyPageSpinAndOthers::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + SCROLLINFO si={ sizeof(SCROLLINFO) }; + si.fMask=SIF_ALL; + si.nMin=0; + si.nMax=20; + si.nPage=3; + si.nPos=7; + si.nTrackPos=0; + m_scrollHorz.SetScrollInfo(&si); + m_scrollVert.SetScrollInfo(&si); + + m_progressHorz.SetRange(0,100); + m_progressHorz.SetPos(60); + + m_sliderHorzBoth.SetRange(0,100); + m_sliderHorzBoth.SetSelection(20,40); + + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.h new file mode 100644 index 0000000..846dd69 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/PropertyPageSpinAndOthers.h @@ -0,0 +1,67 @@ +#if !defined(AFX_PROPERTYPAGESPINANDOTHERS_H__3696ECE9_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_PROPERTYPAGESPINANDOTHERS_H__3696ECE9_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXCoolCtrl.h" + +// PropertyPageSpinAndOthers.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPropertyPageSpinAndOthers dialog + +class CPropertyPageSpinAndOthers : public CPropertyPage +{ + DECLARE_DYNCREATE(CPropertyPageSpinAndOthers) + +// Construction +public: + CPropertyPageSpinAndOthers(); + ~CPropertyPageSpinAndOthers(); + +// Dialog Data + //{{AFX_DATA(CPropertyPageSpinAndOthers) + enum { IDD = IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER }; + COXCoolSpinButtonCtrl m_spinVert2; + COXCoolSpinButtonCtrl m_spinVert1; + COXCoolSpinButtonCtrl m_spinHorz; + COXCoolSliderCtrl m_sliderVertRight; + COXCoolSliderCtrl m_sliderVertLeft; + COXCoolSliderCtrl m_sliderVertBoth; + COXCoolSliderCtrl m_sliderHorzTop; + COXCoolSliderCtrl m_sliderHorzBottom; + COXCoolSliderCtrl m_sliderHorzBoth; + COXCoolScrollBar m_scrollVert; + COXCoolScrollBar m_scrollHorz; + COXCoolCtrl m_progressHorz; + COXCoolButton m_btnDisable; + BOOL m_bDisable; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropertyPageSpinAndOthers) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CPropertyPageSpinAndOthers) + afx_msg void OnCheckDisableAll(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYPAGESPINANDOTHERS_H__3696ECE9_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/ReadMe.txt new file mode 100644 index 0000000..84dd814 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : CoolControls +======================================================================== + + +AppWizard has created this CoolControls 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 CoolControls application. + +CoolControls.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +CoolControls.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CCoolControlsApp application class. + +CoolControls.cpp + This is the main application source file that contains the application + class CCoolControlsApp. + +CoolControls.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++. + +CoolControls.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\CoolControls.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file CoolControls.rc. + +res\CoolControls.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +CoolControlsDlg.h, CoolControlsDlg.cpp - the dialog + These files contain your CCoolControlsDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in CoolControls.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named CoolControls.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.cpp new file mode 100644 index 0000000..3ee71bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// CoolControls.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.h new file mode 100644 index 0000000..40cc845 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3696ECDC_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__3696ECDC_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#if _MSC_VER > 0x0421 +#include // MFC support for Internet Explorer 4 Common Controls +#endif // _MSC_VER > 0x0421 +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3696ECDC_C73B_11D2_A7CA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.rc2 new file mode 100644 index 0000000..cbce018 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/CoolControls.rc2 @@ -0,0 +1,13 @@ +// +// COOLCONTROLS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/il_small.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/il_small.bmp new file mode 100644 index 0000000..77b4f76 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/res/il_small.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/resource.h new file mode 100644 index 0000000..540fce5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolControls/resource.h @@ -0,0 +1,77 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CoolControls.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_COOLCONTROLS_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDD_DIALOG_EDIT 129 +#define IDD_DIALOG_BUTTON_COMBOBOX 130 +#define IDD_DIALOG_LISTTREE 131 +#define IDB_IL_SMALL 131 +#define IDD_DIALOG_SPINSCROLLHOTKEYPROGRESSSLIDER 132 +#define IDD_DIALOG_NEWCONTROLS 133 +#define IDC_EDIT_PLAIN 1000 +#define IDC_EDIT_MULTILINE 1001 +#define IDC_EDIT_SPIN_RIGHT 1002 +#define IDC_SPIN_RIGHT 1003 +#define IDC_EDIT_SPIN_LEFT 1004 +#define IDC_SPIN_LEFT 1005 +#define IDC_EDIT_SPIN_UNATTACHED 1006 +#define IDC_SPIN_UNATTACHED 1007 +#define IDC_EDIT_OX 1008 +#define IDC_EDIT_MASKED 1009 +#define IDC_EDIT_NUMERIC 1010 +#define IDC_EDIT_CURRENCY 1011 +#define IDC_RICHEDIT_MULTILINE 1012 +#define IDC_CHECK_DISABLE_ALL 1013 +#define IDC_BUTTON_DEFAULT 1014 +#define IDC_BUTTON_PUSH1 1015 +#define IDC_CHECK_RIGHT 1016 +#define IDC_RADIO1 1017 +#define IDC_RADIO2 1018 +#define IDC_RADIO3 1019 +#define IDC_RADIO_PUSHLIKE1 1020 +#define IDC_CHECK_LEFT 1021 +#define IDC_CHECK_PUSHLIKE 1022 +#define IDC_RADIO_PUSHLIKE2 1023 +#define IDC_RADIO_PUSHLIKE3 1024 +#define IDC_BUTTON_PUSH2 1025 +#define IDC_COMBO_SIMPLE 1026 +#define IDC_COMBO_DROPDOWN 1027 +#define IDC_LISTCTRL 1027 +#define IDC_COMBO_DROPDOWNLIST 1028 +#define IDC_LISTBOX 1028 +#define IDC_BUTTON_PUSH3 1029 +#define IDC_TREE 1029 +#define IDC_HOTKEY 1030 +#define IDC_SPIN_VERT1 1031 +#define IDC_SPIN_HORZ 1032 +#define IDC_SPIN_VERT2 1033 +#define IDC_SCROLLBAR_VERT 1034 +#define IDC_SCROLLBAR_HORZ 1035 +#define IDC_PROGRESS_HORZ 1036 +#define IDC_SLIDER_HORZ_BOTH 1038 +#define IDC_SLIDER_HORZ_TOP 1039 +#define IDC_SLIDER_HORZ_BOTTOM 1040 +#define IDC_SLIDER_VERT_BOTH 1041 +#define IDC_SLIDER_VERT_LEFT 1042 +#define IDC_DATETIMEPICKER_DROPDOWN 1042 +#define IDC_SLIDER_VERT_RIGHT 1043 +#define IDC_DATETIMEPICKER_UPDOWN 1043 +#define IDC_MONTHCALENDAR 1044 +#define IDC_IPADDRESS 1045 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1046 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBar.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBarInfo.rtf new file mode 100644 index 0000000..35de35f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CoolToolBarInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.cpp new file mode 100644 index 0000000..53b5b3b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.cpp @@ -0,0 +1,165 @@ +// CustomizeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + + +CCustomizeDlg::CCustomizeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeDlg) + m_bCustomizable = FALSE; + m_bFlat = FALSE; + m_bGripper = FALSE; + m_bList = FALSE; + m_bSeparator = FALSE; + m_bText = FALSE; + m_nRows = 0; + m_nWidth = 0; + m_nToolbar = -1; + m_nTextType = -1; + m_nIndent = 0; + //}}AFX_DATA_INIT +} + + +void CCustomizeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeDlg) + DDX_Control(pDX, IDOK, m_ok); + DDX_Control(pDX, IDC_RADIO_PLAIN, m_ctlRadioTextType); + DDX_Control(pDX, IDC_EDIT_WIDTH, m_ctlEditWidth); + DDX_Control(pDX, IDC_EDIT_ROWS, m_ctlEditRows); + DDX_Control(pDX, IDC_COMBO_TOOLBAR, m_ctlComboToolbar); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZABLE, m_bCustomizable); + DDX_Check(pDX, IDC_CHECK_FLAT, m_bFlat); + DDX_Check(pDX, IDC_CHECK_GRIPPER, m_bGripper); + DDX_Check(pDX, IDC_CHECK_LIST, m_bList); + DDX_Check(pDX, IDC_CHECK_SEPARATOR, m_bSeparator); + DDX_Check(pDX, IDC_CHECK_TEXT, m_bText); + DDX_Text(pDX, IDC_EDIT_ROWS, m_nRows); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + DDX_CBIndex(pDX, IDC_COMBO_TOOLBAR, m_nToolbar); + DDX_Radio(pDX, IDC_RADIO_PLAIN, m_nTextType); + DDX_Text(pDX, IDC_EDIT_INDENT, m_nIndent); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeDlg) + ON_CBN_SELCHANGE(IDC_COMBO_TOOLBAR, OnSelchangeComboToolbar) + ON_BN_CLICKED(IDC_CHECK_TEXT, OnCheckText) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg message handlers + +BOOL CCustomizeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + m_ctlComboToolbar.AddString(_T("File")); + m_ctlComboToolbar.AddString(_T("Edit")); + m_ctlComboToolbar.AddString(_T("Window")); + + m_nToolbar=0; + m_nOldToolbar=0; + + m_ok.SetButtonStyle(m_ok.GetButtonStyle()|BS_BOTTOM); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeDlg::GetVars() +{ + m_bCustomizable=arrCustomize[m_nToolbar].bCustomizable; + m_bFlat=arrCustomize[m_nToolbar].bFlat; + m_bGripper=arrCustomize[m_nToolbar].bGripper; + m_bList=arrCustomize[m_nToolbar].bList; + m_bSeparator=arrCustomize[m_nToolbar].bSeparator; + m_bText=arrCustomize[m_nToolbar].bText; + m_nTextType=arrCustomize[m_nToolbar].nTextType; + m_nRows=arrCustomize[m_nToolbar].nRows; + m_nWidth=arrCustomize[m_nToolbar].nWidth; + m_nIndent=arrCustomize[m_nOldToolbar].nIndent; + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeDlg::SetVars() +{ + UpdateData(); + + arrCustomize[m_nOldToolbar].bCustomizable=m_bCustomizable; + arrCustomize[m_nOldToolbar].bFlat=m_bFlat; + arrCustomize[m_nOldToolbar].bGripper=m_bGripper; + arrCustomize[m_nOldToolbar].bList=m_bList; + arrCustomize[m_nOldToolbar].bSeparator=m_bSeparator; + arrCustomize[m_nOldToolbar].bText=m_bText; + arrCustomize[m_nOldToolbar].nTextType=m_nTextType; + arrCustomize[m_nOldToolbar].nRows=m_nRows; + arrCustomize[m_nOldToolbar].nWidth=m_nWidth; + arrCustomize[m_nOldToolbar].nIndent=m_nIndent; + + m_nOldToolbar=m_nToolbar; + + ShowControls(); +} + +void CCustomizeDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeDlg::OnSelchangeComboToolbar() +{ + // TODO: Add your control notification handler code here + + SetVars(); + GetVars(); +} + +void CCustomizeDlg::OnCheckText() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CCustomizeDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditRows.EnableWindow(m_bText); + m_ctlEditWidth.EnableWindow(m_bText); + m_ctlRadioTextType.EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_TOOLTIP)->EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_MENU)->EnableWindow(m_bText); + + UpdateData(FALSE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.h new file mode 100644 index 0000000..6e7336c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeDlg.h @@ -0,0 +1,69 @@ +#if !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + +class CCustomizeDlg : public CDialog +{ +// Construction +public: + CCustomizeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeDlg) + enum { IDD = IDD_CUSTOMIZE }; + CButton m_ok; + CButton m_ctlRadioTextType; + CEdit m_ctlEditWidth; + CEdit m_ctlEditRows; + CComboBox m_ctlComboToolbar; + BOOL m_bCustomizable; + BOOL m_bFlat; + BOOL m_bGripper; + BOOL m_bList; + BOOL m_bSeparator; + BOOL m_bText; + UINT m_nRows; + UINT m_nWidth; + int m_nToolbar; + int m_nTextType; + UINT m_nIndent; + //}}AFX_DATA + struct CustomizeToolbar arrCustomize[3]; + int m_nOldToolbar; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnSelchangeComboToolbar(); + afx_msg void OnCheckText(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeMTIWorkspace.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeMTIWorkspace.cpp new file mode 100644 index 0000000..cefcf15 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/CustomizeMTIWorkspace.cpp @@ -0,0 +1,97 @@ +// CustomizeMTIWorkspace.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeMTIWorkspace.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeMTIWorkspace dialog + + +#define STYLESCOUNT 10 + +static DWORD arrStyles[STYLESCOUNT]={ 1,2,16,32,64,128,256,512, + 1024,2048 }; + + +CCustomizeMTIWorkspace::CCustomizeMTIWorkspace(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeMTIWorkspace::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeMTIWorkspace) + m_dwOffset = 0; + //}}AFX_DATA_INIT + m_dwStyle=0; +} + + +void CCustomizeMTIWorkspace::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeMTIWorkspace) + DDX_Control(pDX, IDC_SPIN_OFFSET, m_spinOffset); + DDX_Control(pDX, IDC_LIST_STYLES, m_lbStyles); + DDX_Text(pDX, IDC_EDIT_OFFSET, m_dwOffset); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeMTIWorkspace, CDialog) + //{{AFX_MSG_MAP(CCustomizeMTIWorkspace) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeMTIWorkspace message handlers + +BOOL CCustomizeMTIWorkspace::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + m_spinOffset.SetRange(0,50); + + m_lbStyles.AddString(_T("TCS_SCROLLOPPOSITE")); + m_lbStyles.AddString(_T("TCS_BOTTOM/TCS_RIGHT")); + m_lbStyles.AddString(_T("TCS_FORCEICONLEFT")); + m_lbStyles.AddString(_T("TCS_FORCELABELLEFT")); + m_lbStyles.AddString(_T("TCS_HOTTRACK")); + m_lbStyles.AddString(_T("TCS_VERTICAL")); + m_lbStyles.AddString(_T("TCS_BUTTONS")); + m_lbStyles.AddString(_T("TCS_MULTILINE")); + m_lbStyles.AddString(_T("TCS_FIXEDWIDTH")); + m_lbStyles.AddString(_T("TCS_RAGGEDRIGHT")); + + for(int nIndex=0; nIndex= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeMTIWorkspace.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeMTIWorkspace dialog + +class CCustomizeMTIWorkspace : public CDialog +{ +// Construction +public: + CCustomizeMTIWorkspace(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeMTIWorkspace) + enum { IDD = IDD_MTICUSTOMIZE }; + CSpinButtonCtrl m_spinOffset; + CListBox m_lbStyles; + DWORD m_dwOffset; + //}}AFX_DATA + DWORD m_dwStyle; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeMTIWorkspace) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeMTIWorkspace) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEMTIWORKSPACE_H__229EBDA3_561B_11D2_B475_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/MultiPad.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/MultiPad.rc new file mode 100644 index 0000000..377e7db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/MultiPad.rc @@ -0,0 +1,648 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "RES\\MULTIPAD.ICO" +IDR_TEXTTYPE ICON "RES\\PADDOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "RES\\TOOLBAR.BMP" +IDR_TOOLBAR_FILE BITMAP "res\\toolbar_.bmp" +IDR_TOOLBAR_EDIT BITMAP "res\\bmp00001.bmp" +IDR_TOOLBAR_WINDOW BITMAP "res\\toolbar1.bmp" +IDR_TOOLBAR_EDIT_HOT BITMAP "res\\bmp00003.bmp" +IDR_TOOLBAR_FILE_HOT BITMAP "res\\bmp00004.bmp" +IDR_TOOLBAR_WINDOW_HOT BITMAP "res\\bmp00006.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +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 "E&xit\tAlt+F4", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "Customize &MTI workspace...", ID_VIEW_MTICUSTOMIZE + MENUITEM "M&TI Interface", ID_VIEW_MTI + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_TEXTTYPE 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 "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+F4", 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 + MENUITEM "Delete\tDel", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "Find &Next\tF3", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "Customize &MTI workspace...", ID_VIEW_MTICUSTOMIZE + MENUITEM "M&TI Interface", ID_VIEW_MTI + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) MENU +#else +IDR_MAINFRAME MENU +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "Customize &MTI workspace...", ID_VIEW_MTICUSTOMIZE + MENUITEM "M&TI Interface", ID_VIEW_MTI + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_TEXTTYPE$(_MAC) MENU +#else +IDR_TEXTTYPE MENU +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Save\t\021S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\t\021X", ID_EDIT_CUT + MENUITEM "&Copy\t\021C", ID_EDIT_COPY + MENUITEM "&Paste\t\021V", ID_EDIT_PASTE + MENUITEM "De&lete\t\021D", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "&Repeat Find\t\021R", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "Customize &MTI workspace...", ID_VIEW_MTICUSTOMIZE + MENUITEM "M&TI Interface", ID_VIEW_MTI + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + END +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME ACCELERATORS +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) ACCELERATORS +#else +IDR_MAINFRAME ACCELERATORS +#endif +BEGIN + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + "D", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "R", ID_EDIT_REPEAT, VIRTKEY, ALT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT +END +#endif + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#include ""afxres.rc""\r\n" + "#include ""afxprint.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXMenuBar.rc""\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_FILE TOOLBAR 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_EDIT TOOLBAR 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_WINDOW TOOLBAR 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + SEPARATOR + BUTTON ID_WINDOW_TILE_HORZ + SEPARATOR + BUTTON ID_WINDOW_ARRANGE +END + +IDR_TOOLBAR_EDIT_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_FILE_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_WINDOW_HOT TOOLBAR 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + SEPARATOR + BUTTON ID_WINDOW_TILE_HORZ + SEPARATOR + BUTTON ID_WINDOW_ARRANGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +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_PRINT_SETUP "Change the printer and printing options\nPrint Setup" + ID_FILE_PRINT "Print the active document\nPrint" +END + +STRINGTABLE +BEGIN + AFX_IDS_DESKACCESSORY "Opens the selected item" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_HELP_INDEX "List Help topics" + ID_HELP_USING "Display instructions about how to use help" + ID_CONTEXT_HELP "Display help for clicked on buttons, menus and windows" + ID_HELP "Display help for current task or command" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" + ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile" +END + +STRINGTABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection\nDelete" + ID_EDIT_COPY "Copy the selection and puts it on the Clipboard\nCopy" + ID_EDIT_CUT "Cut the selection and puts it on the Clipboard\nCut" + ID_EDIT_FIND "Find the specified text\nFind" + ID_EDIT_PASTE "Insert Clipboard contents\nPaste" + ID_EDIT_REPEAT "Repeat last find command\nFind Next" + 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" +END + +STRINGTABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar" + ID_VIEW_STATUS_BAR "Show or hide the status bar" +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_SCCLOSE "Close the active window and prompts to save the documents" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "MultiPad" + AFX_IDS_IDLEMESSAGE "Ready" + AFX_IDS_HELPMODEMESSAGE "Select an object on which to get Help" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "MultiPad with CoolToolBars" + IDR_TEXTTYPE "\nUntitled\nTEXT Document\nText Files (*.txt)\n.txt\nTextFileType\nTEXT File Type\nTEXT\nText Files\n" + ID_DESCRIPTION_FILE "CoolToolBarInfo.rtf" +END + +STRINGTABLE +BEGIN + ID_VIEW_CUSTOMIZE "Customize Toolbars/nCustomize" + ID_VIEW_WORKSPACE "Set workspace settings" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG 0, 0, 282, 174 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Toolbars" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO_TOOLBAR,90,8,131,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "&Flat",IDC_CHECK_FLAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,40,27,10 + CONTROL "&List ",IDC_CHECK_LIST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,40,29,10 + CONTROL "&Gripper",IDC_CHECK_GRIPPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,41,39,10 + CONTROL "&Seperator",IDC_CHECK_SEPARATOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,213,41,47,10 + CONTROL "&Customizable",IDC_CHECK_CUSTOMIZABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,64,57,10 + EDITTEXT IDC_EDIT_INDENT,181,64,35,11,ES_AUTOHSCROLL + CONTROL "Set t&ext to buttons",IDC_CHECK_TEXT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,92,73,10 + CONTROL "String &resource",IDC_RADIO_PLAIN,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,149,93,63,10 + CONTROL "T&ooltip",IDC_RADIO_TOOLTIP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,107,37,10 + CONTROL "&Menu resourse",IDC_RADIO_MENU,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,149,122,63,10 + EDITTEXT IDC_EDIT_WIDTH,63,106,37,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_ROWS,63,121,37,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,87,153,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,153,50,14 + LTEXT "&Toolbar",IDC_STATIC,60,10,25,8 + GROUPBOX "Draw",IDC_STATIC,143,28,124,29 + GROUPBOX "Mode",IDC_STATIC,14,29,124,28 + GROUPBOX "Text",IDC_STATIC,14,80,253,57 + LTEXT "Max &Width",IDC_STATIC,20,108,35,8 + LTEXT "Text &Rows",IDC_STATIC,20,123,35,8 + LTEXT "Indention",IDC_STATIC,145,65,30,8 +END + +IDD_DIALOG_WORKSPACE DIALOG 0, 0, 143, 61 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "WorkSpace" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Save WorkSpace on &Exit",IDC_CHECK_SAVE_ON_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,111,10 + CONTROL "Load WorkSpace on En&ter",IDC_CHECK_LOAD_ON_ENTER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,117,10 + DEFPUSHBUTTON "&OK",IDOK,7,40,40,14 + PUSHBUTTON "&Cancel",IDCANCEL,51,40,40,14 + PUSHBUTTON "&Save",IDC_SAVE_WORKSPACE,96,40,40,14 +END + +IDD_MTICUSTOMIZE DIALOG 0, 0, 186, 221 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize MTI workspace" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,200,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,200,50,14 + LISTBOX IDC_LIST_STYLES,7,20,172,145,LBS_MULTIPLESEL | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LTEXT "Offset from borders",IDC_STATIC,7,178,60,8 + EDITTEXT IDC_EDIT_OFFSET,79,176,30,13,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_OFFSET,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,108,176,10,14 + LTEXT "Tab control styles:",IDC_STATIC,7,9,58,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 14 + RIGHTMARGIN, 267 + TOPMARGIN, 7 + BOTTOMMARGIN, 167 + END + + IDD_MTICUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 214 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "afxres.rc" +#include "afxprint.rc" +#include "OXCoolToolBar.rc" +#include "OXBitmapMenu.rc" +#include "OXMenuBar.rc" +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/Multipad.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/Multipad.cpp new file mode 100644 index 0000000..19ba3f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/Multipad.cpp @@ -0,0 +1,607 @@ +// multipad.cpp : Defines the class behaviors for the Multipad application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" +#include "WorkspaceDlg.h" +#include "CustomizeMTIWorkspace.h" +#include + +#include "UTSampleAbout.h" + +CMultiPadApp NEAR theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp) + //{{AFX_MSG_MAP(CMultiPadApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace) + //}}AFX_MSG_MAP + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) // file commands... + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +BOOL CMultiPadApp::InitInstance() +{ + _tsetlocale(LC_ALL, _T("")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // Initialize OLE libraries + if (!AfxOleInit()) + { + TRACE(_T("CMultiPadApp::InitInstance: failed to initialize OLE libraries")); + return FALSE; + } + + Enable3dControls(); + + // use registry if you want to save CoolToolBars state + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); + +#ifdef _MDI_INTERFACE + AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE, + RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CMDIChildWnd), + RUNTIME_CLASS(CEditView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + m_pMainWnd->ShowWindow(m_nCmdShow); +#else + AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME, + RUNTIME_CLASS(CPadDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CEditView))); +#endif + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + IniAppVars(); + + // load saved workspace after all bars were created + if(m_bLoadWSOnEnter) + { + ((CMainFrame*)m_pMainWnd)->LoadWorkspace(); + } + + SetCurrentSkin(_T("Office 2003")); + + return TRUE; +} + +int CMultiPadApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // save all application variables in registry + SaveAppVars(); + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} + +void CMultiPadApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +void CMultiPadApp::IniAppVars() +{ + m_bLoadWSOnEnter=GetProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),FALSE); + m_bSaveWSOnExit=GetProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),FALSE); +} + +void CMultiPadApp::SaveAppVars() +{ + WriteProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),m_bLoadWSOnEnter); + WriteProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),m_bSaveWSOnExit); +} + +void CMultiPadApp::OnViewWorkspace() +{ + // TODO: Add your command handler code here + + CWorkspaceDlg workspaceDlg; + + workspaceDlg.m_bLoadOnEnter=m_bLoadWSOnEnter; + workspaceDlg.m_bSaveOnExit=m_bSaveWSOnExit; + + if(workspaceDlg.DoModal()==IDOK) + { + m_bLoadWSOnEnter=workspaceDlg.m_bLoadOnEnter; + m_bSaveWSOnExit=workspaceDlg.m_bSaveOnExit; + } + +} + + +IMPLEMENT_DYNCREATE(CMainFrame, CMainFrameWindow) +BEGIN_MESSAGE_MAP(CMainFrame, CMainFrameWindow) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + ON_COMMAND(ID_VIEW_MTI, OnViewMTI) + ON_UPDATE_COMMAND_UI(ID_VIEW_MTI, OnUpdateViewMTI) + ON_COMMAND(ID_VIEW_MTICUSTOMIZE, OnViewMticustomize) + ON_UPDATE_COMMAND_UI(ID_VIEW_MTICUSTOMIZE, OnUpdateViewMticustomize) + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnUpdateViewToolbars) + ON_COMMAND_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnViewToolbars) + ON_NOTIFY(TBN_DROPDOWN, ID_VIEW_TOOLBAR_FILE, OnDropDown) +END_MESSAGE_MAP() + + +// we need these arrays to make our CoolToolBars customizable +// we use them as parameters in function COXCoolToolBar::SetBitmapIds() + +static UINT buttonsFile[] = +{ + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT buttonsEdit[] = +{ + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_EDIT_CLEAR, + ID_EDIT_FIND, + ID_EDIT_REPEAT, +}; + +static UINT buttonsWindow[] = +{ + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, +}; + +static UINT indicators[] = +{ + ID_SEPARATOR, + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL +}; + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if(CMainFrameWindow::OnCreate(lpCreateStruct)==-1) + { + return -1; + } + + // create standard statusbar + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE(_T("Failed to create status bar\n")); + return -1; // fail to create + } + + // create toolbars + + ////////////////////////////// + // File ToolBar + // this is an example of simple toolbar without text + // but we add here images to show in hot mode + // Note that process of creation of CoolToolBar almost the same as + // standard CToolBar + if (!m_wndToolBarFile.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_GRIPPER, + ID_VIEW_TOOLBAR_FILE) || + !m_wndToolBarFile.LoadToolBar(IDR_TOOLBAR_FILE)) + { + TRACE(_T("Failed to create File toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarFile.SetBitmapIds(buttonsFile, sizeof(buttonsFile)/sizeof(UINT)); + +// ShowControlBar(&m_wndToolBarFile,FALSE,TRUE); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarFile.IniSizes(CSize(16,16)); + m_wndToolBarFile.SetHotImageList(m_wndToolBarFile.AddImageList(IDR_TOOLBAR_FILE_HOT)); + m_wndToolBarFile.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarFile.SetHotTextColor(RGB(0,0,255)); + m_wndToolBarFile.UpdateSizes(); + //////////// + + m_wndToolBarFile.SetButtonStyle(2, + m_wndToolBarFile.GetButtonStyle(2)|TBSTYLE_DROPDOWN); + m_wndToolBarFile.SetDropDownArrow(TRUE); + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarFile.SetBarStyle(m_wndToolBarFile.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + CRect rect; + m_wndToolBarFile.EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM); + ////////////////////////////// + + ////////////////////////////// + // Edit ToolBar + if (!m_wndToolBarEdit.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_GRIPPER, + ID_VIEW_TOOLBAR_EDIT) || + !m_wndToolBarEdit.LoadToolBar(IDR_TOOLBAR_EDIT)) + { + TRACE(_T("Failed to create Edit toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarEdit.SetBitmapIds(buttonsEdit, sizeof(buttonsEdit)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarEdit.IniSizes(CSize(16,16)); + m_wndToolBarEdit.SetHotImageList(m_wndToolBarEdit. + AddImageList(IDR_TOOLBAR_EDIT_HOT)); + m_wndToolBarEdit.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarEdit.SetHotTextColor(RGB(0,0,255)); + // we want to use text from string resource in our CoolToolBar + m_wndToolBarEdit.SetButtonsMinMaxWidth(0,100); + m_wndToolBarEdit.SetMaxTextRows(3); + m_wndToolBarEdit.SetButtonTextFromID(COXCoolToolBar::TTID_PLAIN); + m_wndToolBarEdit.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarEdit.SetBarStyle(m_wndToolBarEdit.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarEdit.EnableDocking(CBRS_ALIGN_ANY); + ////////////////////////////// + + ////////////////////////////// + // Window ToolBar + if (!m_wndToolBarWindow.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_GRIPPER, + ID_VIEW_TOOLBAR_WINDOW) || + !m_wndToolBarWindow.LoadToolBar(IDR_TOOLBAR_WINDOW)) + { + TRACE(_T("Failed to create Window toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarWindow.SetBitmapIds(buttonsWindow, + sizeof(buttonsWindow)/sizeof(UINT)); + +// ShowControlBar(&m_wndToolBarWindow,FALSE,TRUE); + + ///////////// + // COXCoolToolBar specific functions + // use CoolToolBar in List mode + m_wndToolBarWindow.IniSizes(CSize(16,16)); + m_wndToolBarWindow.SetList(); + m_wndToolBarWindow.SetHotImageList(m_wndToolBarWindow. + AddImageList(IDR_TOOLBAR_WINDOW_HOT)); + m_wndToolBarWindow.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarWindow.SetHotTextColor(RGB(0,0,255)); + // we want to use tooltips text in our CoolToolBar + m_wndToolBarWindow.SetMaxTextRows(1); + m_wndToolBarWindow.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarWindow.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarWindow.SetBarStyle(m_wndToolBarWindow.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarWindow.EnableDocking(CBRS_ALIGN_ANY); + ////////////////////////////// + + EnableDocking(CBRS_ALIGN_ANY); + + // TODO: Delete these lines if you don't want the toolbar to + // be dockable + DockControlBar(&m_wndToolBarEdit); + DockControlBar(&m_wndToolBarFile); + DockControlBar(&m_wndToolBarWindow); + + // Dock Window toolbar to the right side of File toolbar + m_wndToolBarWindow.DockControlBarLeftOf(&m_wndToolBarFile); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + +#ifdef _MDI_INTERFACE + // hook the frame window in order to display tab control in client area + VERIFY(m_MTIClientWnd.Attach(this)); + m_dwOffset=m_MTIClientWnd.GetTabCtrl()->GetOffset(); + m_dwStyle=m_MTIClientWnd.GetTabCtrl()->GetStyle(); +#endif + + return 0; +} + +void CMainFrame::OnUpdateViewToolbars(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CControlBar* pBar=GetControlBar(pCmdUI->m_nID); + if(pBar!=NULL) + { + pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0); + return; + } +} + +void CMainFrame::OnViewToolbars(UINT nID) +{ + // TODO: Add your command handler code here + + CControlBar* pBar = GetControlBar(nID); + if (pBar != NULL) + { + ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE); + } +} + + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + + // before close save the workspace + if(((CMultiPadApp*)AfxGetApp())->m_bSaveWSOnExit) + { + SaveWorkspace(); + } + + CMainFrameWindow::OnClose(); +} + +void CMainFrame::SaveWorkspace() +{ + // save states of all CoolToolBar + m_wndToolBarFile.SaveBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.SaveBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.SaveBarState(_T("CoolToolBars"),_T("Window")); + + // save the state of all bars within framework + SaveBarState(_T("FrameworkBarState")); +} + +void CMainFrame::LoadWorkspace() +{ + LockWindowUpdate(); + + // load all bars state in framework + LoadBarState(_T("FrameworkBarState")); + + // load state of all CoolToolBar + m_wndToolBarFile.LoadBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.LoadBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.LoadBarState(_T("CoolToolBars"),_T("Window")); + + UnlockWindowUpdate(); +} + +static CFrameWnd* pFrame=NULL; + +void CMainFrame::OnViewCustomize() +{ + // TODO: Add your command handler code here + + CCustomizeDlg dlgCustomize(this); + dlgCustomize.arrCustomize[0]=GetToolbarProperties(&m_wndToolBarFile); + dlgCustomize.arrCustomize[1]=GetToolbarProperties(&m_wndToolBarEdit); + dlgCustomize.arrCustomize[2]=GetToolbarProperties(&m_wndToolBarWindow); + + if(dlgCustomize.DoModal()==IDOK) + { + SetToolbarProperties(&m_wndToolBarFile,dlgCustomize.arrCustomize[0]); + SetToolbarProperties(&m_wndToolBarEdit,dlgCustomize.arrCustomize[1]); + SetToolbarProperties(&m_wndToolBarWindow,dlgCustomize.arrCustomize[2]); + } +} + +CustomizeToolbar CMainFrame::GetToolbarProperties(COXCoolToolBar* pBar) +{ + // collect information about CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar ct; + ct.bCustomizable=pBar->IsCustomizable(); + ct.bFlat=pBar->IsFlat(); + ct.bGripper=pBar->IsGripper(); + ct.bList=pBar->IsList(); + ct.bSeparator=pBar->IsSeparator(); + ct.bText=!pBar->GetButtonText(0).IsEmpty(); + ct.nTextType=(int)pBar->GetTextType(); + ct.nRows=pBar->GetTextRows(); + ct.nWidth=pBar->GetButtonsSize().cx; + ct.nIndent=pBar->GetIndent(); + + return ct; +} + +void CMainFrame::SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct) +{ + // change styles and properties of CoolToolBar + pBar->SetCustomizable(ct.bCustomizable); + pBar->SetFlat(ct.bFlat); + pBar->SetGripper(ct.bGripper); + pBar->SetList(ct.bList); + pBar->SetSeparator(ct.bSeparator); + pBar->SetIndent(ct.nIndent); + if(ct.bText) + { + pBar->SetButtonTextFromID((COXCoolToolBar::TextTypeFromID)ct.nTextType); + pBar->SetMaxTextRows(ct.nRows); + pBar->SetButtonsMinMaxWidth(0,ct.nWidth); + pBar->UpdateSizes(); + } + else + { + // if we don't want to use text in CoolToolBar then + // remove all previously associated text + if(pBar->GetTextType()!=COXCoolToolBar::TTID_NOTSET) + { + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NONE); + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NOTSET); + } + pBar->SetMaxTextRows(0); + pBar->SetButtonsMinMaxWidth(0,24); + pBar->IniSizes(CSize(16,16)); + } + + CSize sizeChild; + sizeChild=pBar->GetButtonsSize(); + + CRect rect; + pBar->GetWindowRect(&rect); + // resize window + pBar->SetWindowPos(NULL,0,0,rect.Width(),rect.Height(), + SWP_NOMOVE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED); + + // it is up to framework to reallocate all other control bars + CFrameWnd* pFrameWnd=pBar->GetDockingFrame(); + if(pFrameWnd!=NULL) + { + pFrameWnd->RecalcLayout(); + } +} + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + // this function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBarFile.GetItemRect(m_wndToolBarFile.CommandToIndex(pNMToolBar->iItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + if(pNMToolBar->iItem == ID_FILE_OPEN) + { + CMenu menu; + CMenu* pPopup; + + // the font popup is stored in a resource + menu.LoadMenu(IDR_MAINFRAME); + pPopup = menu.GetSubMenu(0); + pPopup->RemoveMenu(ID_FILE_NEW,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_SEPARATOR,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_FILE_PRINT_SETUP,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_APP_EXIT,MF_BYCOMMAND); + pPopup->RemoveMenu(pPopup->GetMenuItemCount()-1,MF_BYPOSITION); + pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, + rect.top + 1, AfxGetMainWnd()); + } + *pResult = TBDDRET_DEFAULT; +} + + +void CMainFrame::OnViewMTI() +{ + // TODO: Add your command handler code here + +#ifdef _MDI_INTERFACE + if(m_MTIClientWnd.IsAttached()) + VERIFY(m_MTIClientWnd.Detach()); + else + { + VERIFY(m_MTIClientWnd.Attach(this,m_dwStyle)); + m_MTIClientWnd.GetTabCtrl()->SetOffset(m_dwOffset); + } +#endif +} + +void CMainFrame::OnUpdateViewMTI(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetCheck(m_MTIClientWnd.IsAttached()); +} + +void CMainFrame::OnViewMticustomize() +{ + // TODO: Add your command handler code here + +#ifdef _MDI_INTERFACE + ASSERT(m_MTIClientWnd.IsAttached()); + + CCustomizeMTIWorkspace dlgCustomizeMTI(this); + dlgCustomizeMTI.m_dwOffset=m_MTIClientWnd.GetTabCtrl()->GetOffset(); + dlgCustomizeMTI.m_dwStyle=m_MTIClientWnd.GetTabCtrl()->GetStyle(); + + if(dlgCustomizeMTI.DoModal()==IDOK) + { + VERIFY(m_MTIClientWnd.Detach()); + VERIFY(m_MTIClientWnd.Attach(this,dlgCustomizeMTI.m_dwStyle)); + m_MTIClientWnd.GetTabCtrl()->SetOffset(dlgCustomizeMTI.m_dwOffset); + m_dwOffset=dlgCustomizeMTI.m_dwOffset; + m_dwStyle=dlgCustomizeMTI.m_dwStyle; + } +#endif +} + +void CMainFrame::OnUpdateViewMticustomize(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->Enable(m_MTIClientWnd.IsAttached()); +} + + +///////////////////////////////////////////////////////////////////////////// + +IMPLEMENT_DYNCREATE(CPadDoc, CDocument) +BEGIN_MESSAGE_MAP(CPadDoc, CDocument) + //{{AFX_MSG_MAP(CPadDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +void CPadDoc::Serialize(CArchive& ar) +{ + ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.cpp new file mode 100644 index 0000000..7baa167 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.cpp @@ -0,0 +1,53 @@ +// WorkspaceDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "WorkspaceDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + + +CWorkspaceDlg::CWorkspaceDlg(CWnd* pParent /*=NULL*/) + : CDialog(CWorkspaceDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CWorkspaceDlg) + m_bLoadOnEnter = FALSE; + m_bSaveOnExit = FALSE; + //}}AFX_DATA_INIT +} + + +void CWorkspaceDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceDlg) + DDX_Check(pDX, IDC_CHECK_LOAD_ON_ENTER, m_bLoadOnEnter); + DDX_Check(pDX, IDC_CHECK_SAVE_ON_EXIT, m_bSaveOnExit); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CWorkspaceDlg, CDialog) + //{{AFX_MSG_MAP(CWorkspaceDlg) + ON_BN_CLICKED(IDC_SAVE_WORKSPACE, OnSaveWorkspace) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg message handlers + +void CWorkspaceDlg::OnSaveWorkspace() +{ + // TODO: Add your control notification handler code here + + CMultiPadApp* pApp=(CMultiPadApp*)AfxGetApp(); + ((CMainFrame*)pApp->m_pMainWnd)->SaveWorkspace(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.h new file mode 100644 index 0000000..867fac4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/WorkspaceDlg.h @@ -0,0 +1,47 @@ +#if !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// WorkspaceDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + +class CWorkspaceDlg : public CDialog +{ +// Construction +public: + CWorkspaceDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CWorkspaceDlg) + enum { IDD = IDD_DIALOG_WORKSPACE }; + BOOL m_bLoadOnEnter; + BOOL m_bSaveOnExit; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CWorkspaceDlg) + afx_msg void OnSaveWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/mpadmac.r b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/mpadmac.r new file mode 100644 index 0000000..9131760 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/mpadmac.r @@ -0,0 +1,214 @@ +#include "resource.h" + +///////////////////////////////////////////////////////////////////////// +// WLM resources + +#include "ftab.r" +#include "mrc\types.r" +#include "mrc\balloons.r" +#include "systypes.r" + + +///////////////////////////////////////////////////////////////////////// +// MFC resources + +#include "afxaete.r" + + +///////////////////////////////////////////////////////////////////////// +// Code fragment resources + +#include "CodeFrag.r" + + +///////////////////////////////////////////////////////////////////////// +// MultiPad resources + +resource 'SIZE' (-1) +{ + reserved, + acceptSuspendResumeEvents, + reserved, + canBackground, + doesActivateOnFGSwitch, + backgroundAndForeground, + dontGetFrontClicks, + ignoreAppDiedEvents, + is32BitCompatible, + isHighLevelEventAware, + localAndRemoteHLEvents, + isStationeryAware, + dontUseTextEditServices, + reserved, + reserved, + reserved, +#ifdef _MPPC_ + 2500 * 1024, + 2500 * 1024 +#else // 68K Mac +#ifdef _DEBUG + 3000 * 1024, + 3000 * 1024 +#else + 2000 * 1024, + 2000 * 1024 +#endif +#endif +}; + +resource 'vers' (1) +{ + 0x01, + 0x00, + final, + 0x00, + verUS, + "1.0", + "MultiPad 1.0, Copyright \251 Microsoft Corp. 1994-1997" +}; + +resource 'vers' (2) +{ + 0x04, + 0x00, + final, + 0x00, + verUS, + "4.0", + "MFC for Macintosh 4.0" +}; + +resource 'kind' (128) +{ + 'MPAD', + 0, // verUS + { + 'TEXT', "MultiPad text document", + } +}; + +resource 'open' (128) +{ + 'MPAD', + { + 'TEXT', 'ttro' + } +}; + +resource 'BNDL' (128) +{ + 'MPAD', + 0, + { + 'FREF', + { + 0, 128, + 1, 129, + 2, 130 + }, + 'ICN#', + { + 0, IDR_MAINFRAME, + 1, IDR_TEXTTYPE, + 2, 130 + } + } +}; + +type 'MPAD' as 'STR '; +resource 'MPAD' (0) +{ + "MultiPad 1.0 Copyright © 1994-1997 Microsoft Corp." +}; + +resource 'FREF' (128) +{ + 'APPL', + 0, + "" +}; + +resource 'FREF' (129) +{ + 'TEXT', + 1, + "" +}; + +resource 'FREF' (130) { + 'sEXT', + 2, + "" +}; + +/* Balloon help resources */ + +resource 'hfdr' (-5696) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + { + HMSTRResItem {500} + } +}; + +resource 'hovr' (1000) +{ + HelpMgrVersion, hmDefaultOptions, 0, 0, + + HMStringItem /* missing items override */ + { + "Miscellaneous part of the Microsoft MultiPad " + "Sample Application." + }, + { + HMSkipItem {}, /* title bar */ + HMSkipItem {}, /* reserved. always skip item here */ + HMStringItem /* close box */ + { + "Click here to close the Microsoft MultiPad " + "Sample Application." + }, + HMStringItem /* zoom box */ + { + "Click here to Zoom In or Zoom Out." + }, + HMSkipItem {}, /* active app's inactive window */ + HMStringItem /* inactive app's window */ + { + "This is not part of the Microsoft MultiPad " + "Application. It may be part of the Apple " + "Finder, or some other application." + }, + HMSkipItem {} /* outside modal dialog */ + } +}; + +#ifdef _MPPC_ +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Power Macintosh using Microsoft VC++ " + "Edition for the Apple Power Macintosh" +}; +#else // 68K Mac +resource 'STR ' (500) +{ + "This is the Win32 MultiPad sample application " + "ported to the Macintosh using Microsoft VC++ Edition " + "for the Apple Macintosh" +}; +#endif + +#ifdef _MPPC_ +resource 'cfrg' (0) { + { + kPowerPC, + kFullLib, + kNoVersionNum,kNoVersionNum, + 0, 0, + kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork, + "" + } +}; +#endif + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad.h new file mode 100644 index 0000000..ab49e0d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad.h @@ -0,0 +1,125 @@ +// multipad.h : main header file for the Multipad application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "resource.h" +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXTabClientWnd.h" +#include "OXMenuBar.h" +#include "oxskins.h" + +#define _MDI_INTERFACE + +#ifdef _MDI_INTERFACE +#define CMainFrameWindow CMDIFrameWnd +#else +#define CMainFrameWindow CFrameWnd +#endif + +class CMultiPadApp : public COXSkinnedApp +{ +public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + + // load workspace on enter or not + BOOL m_bLoadWSOnEnter; + // save workspace on exit or not + BOOL m_bSaveWSOnExit; + +protected: + void IniAppVars(); + void SaveAppVars(); + +public: + //{{AFX_MSG(CMultiPadApp) + afx_msg void OnAppAbout(); + afx_msg void OnViewWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +// special structure to define CoolToolBar properties +// used in Customize Toolbars dialog +struct CustomizeToolbar +{ + BOOL bCustomizable; + BOOL bFlat; + BOOL bGripper; + BOOL bList; + BOOL bSeparator; + BOOL bText; + int nTextType; + UINT nRows; + UINT nWidth; + UINT nIndent; +}; + +// Derive you mainframe window from COXMenuBarFrame template class +// and specify parent frame window and dock bar +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNCREATE(CMainFrame) + +public: + //load and save bars placement in Framework and state of all CoolToolBars + void LoadWorkspace(); + void SaveWorkspace(); + + // get properties of CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar GetToolbarProperties(COXCoolToolBar* pBar); + // apply changed properties to CoolToolBar + void SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct); + +protected: + CStatusBar m_wndStatusBar; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + + // three CoolToolBars + COXCoolToolBar m_wndToolBarFile; + COXCoolToolBar m_wndToolBarEdit; + COXCoolToolBar m_wndToolBarWindow; + + // MTI client window + COXTabClientWnd m_MTIClientWnd; + DWORD m_dwStyle; + DWORD m_dwOffset; + + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg void OnViewCustomize(); + afx_msg void OnViewMTI(); + afx_msg void OnUpdateViewMTI(CCmdUI* pCmdUI); + afx_msg void OnViewMticustomize(); + afx_msg void OnUpdateViewMticustomize(CCmdUI* pCmdUI); + //}}AFX_MSG + afx_msg void OnUpdateViewToolbars(CCmdUI* pCmdUI); + afx_msg void OnViewToolbars(UINT nID); + afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + DECLARE_MESSAGE_MAP() +}; + +class CPadDoc : public CDocument +{ + DECLARE_DYNCREATE(CPadDoc) + void Serialize(CArchive& ar); + //{{AFX_MSG(CPadDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.dsp new file mode 100644 index 0000000..204d545 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.dsp @@ -0,0 +1,415 @@ +# Microsoft Developer Studio Project File - Name="MultiPad2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MultiPad2 - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "multipad2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "multipad2.mak" CFG="MultiPad2 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MultiPad2 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad2 - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad2 - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad2 - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MultiPad2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolToolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"Stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"CoolToolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad2 - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"CoolToolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad2 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"CoolToolBar.exe" + +!ELSEIF "$(CFG)" == "MultiPad2 - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MultiPad" +# PROP BASE Intermediate_Dir "MultiPad" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /Op /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Fr /Yu"Stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolToolBar.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolToolBar.exe" + +!ENDIF + +# Begin Target + +# Name "MultiPad2 - Win32 Release" +# Name "MultiPad2 - Win32 Debug" +# Name "MultiPad2 - Win32 Unicode Release" +# Name "MultiPad2 - Win32 Unicode Debug" +# Name "MultiPad2 - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CustomizeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeMTIWorkspace.cpp +# End Source File +# Begin Source File + +SOURCE=.\mpadmac.r +# End Source File +# Begin Source File + +SOURCE=.\multipad.cpp +# End Source File +# Begin Source File + +SOURCE=.\multipad.rc +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD CPP /Yc"Stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;inl;fi;fd" +# Begin Source File + +SOURCE=.\CustomizeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeMTIWorkspace.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\multipad.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTabClientWnd.h +# End Source File +# Begin Source File + +SOURCE=.\OXTabClientWnd.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00003.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00004.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00006.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\multipad.ico +# End Source File +# Begin Source File + +SOURCE=.\res\paddoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CoolToolBar.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.vcproj new file mode 100644 index 0000000..3456df0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/multipad2.vcproj @@ -0,0 +1,2163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00001.bmp new file mode 100644 index 0000000..4a96787 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00003.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00003.bmp new file mode 100644 index 0000000..541683a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00003.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00004.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00004.bmp new file mode 100644 index 0000000..74c1feb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00004.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00006.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00006.bmp new file mode 100644 index 0000000..49d95b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/bmp00006.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/multipad.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/multipad.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/multipad.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/paddoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/paddoc.ico new file mode 100644 index 0000000..9e9b961 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/paddoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar.bmp new file mode 100644 index 0000000..913de51 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar1.bmp new file mode 100644 index 0000000..093f758 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar_.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar_.bmp new file mode 100644 index 0000000..0339e85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/res/toolbar_.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/resource.h new file mode 100644 index 0000000..13bc599 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/resource.h @@ -0,0 +1,54 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MultiPad.rc +// +#define IDC_SAVE_WORKSPACE 3 +#define IDR_TOOLBAR_FILE 101 +#define IDR_TOOLBAR_EDIT 103 +#define IDR_TOOLBAR_WINDOW 105 +#define IDR_TOOLBAR_EDIT_HOT 108 +#define IDR_TOOLBAR_FILE_HOT 109 +#define IDD_CUSTOMIZE 109 +#define IDD_DIALOG_WORKSPACE 110 +#define IDR_TOOLBAR_WINDOW_HOT 111 +#define IDD_MTICUSTOMIZE 111 +#define IDR_MAINFRAME 128 +#define IDR_TEXTTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_COMBO_TOOLBAR 1000 +#define IDC_CHECK_FLAT 1001 +#define IDC_CHECK_LIST 1002 +#define IDC_CHECK_GRIPPER 1003 +#define IDC_CHECK_SEPARATOR 1004 +#define IDC_CHECK_CUSTOMIZABLE 1005 +#define IDC_CHECK_TEXT 1007 +#define IDC_RADIO_PLAIN 1008 +#define IDC_RADIO_TOOLTIP 1009 +#define IDC_RADIO_MENU 1010 +#define IDC_EDIT_WIDTH 1011 +#define IDC_EDIT_ROWS 1012 +#define IDC_EDIT_INDENT 1013 +#define IDC_RADIO_NOTSET 1014 +#define IDC_CHECK_SAVE_ON_EXIT 1015 +#define IDC_CHECK_LOAD_ON_ENTER 1016 +#define IDC_LIST_STYLES 1016 +#define IDC_EDIT_OFFSET 1017 +#define IDC_SPIN_OFFSET 1018 +#define ID_VIEW_TOOLBAR_FILE 32794 +#define ID_VIEW_TOOLBAR_EDIT 32795 +#define ID_VIEW_TOOLBAR_WINDOW 32796 +#define ID_VIEW_CUSTOMIZE 32797 +#define ID_VIEW_WORKSPACE 32798 +#define ID_VIEW_MTI 32799 +#define ID_VIEW_MTICUSTOMIZE 32801 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 113 +#define _APS_NEXT_COMMAND_VALUE 32802 +#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.cpp new file mode 100644 index 0000000..77150d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.cpp @@ -0,0 +1,15 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.h new file mode 100644 index 0000000..241deed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/stdafx.h @@ -0,0 +1,24 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently + +#define VC_EXTRALEAN + +#include // MFC core and standard components +#include +#include +#include + +#include +#include +#include "OXAdvancedAssert.h" \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/unicode.utf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/unicode.utf new file mode 100644 index 0000000..4890d4b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/CoolToolBar/unicode.utf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.clw new file mode 100644 index 0000000..21fe49f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.clw @@ -0,0 +1,130 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CDateTimePickerDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "datetimepicker.h" +LastPage=0 + +ClassCount=2 +Class1=CDateTimePickerApp +Class2=CDateTimePickerDlg + +ResourceCount=2 +Resource1=IDD_DATETIMEPICKER_DIALOG (English (U.S.)) +Resource2=IDD_DATETIMEPICKER_DIALOG + +[CLS:CDateTimePickerApp] +Type=0 +BaseClass=CWinApp +HeaderFile=DateTimePicker.h +ImplementationFile=DateTimePicker.cpp +LastObject=CDateTimePickerApp +Filter=N +VirtualFilter=AC + +[CLS:CDateTimePickerDlg] +Type=0 +BaseClass=CDialog +HeaderFile=DateTimePickerDlg.h +ImplementationFile=DateTimePickerDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=IDC_BUTTON_CLRBK + +[DLG:IDD_DATETIMEPICKER_DIALOG] +Type=1 +Class=CDateTimePickerDlg +ControlCount=42 +Control1=IDC_DATETIMEPICKER,static,1342312448 +Control2=IDC_CHECK_UPDOWN,button,1342242819 +Control3=IDC_CHECK_SHOWNONE,button,1342242819 +Control4=IDC_CHECK_CANPARSE,button,1342242819 +Control5=IDC_CHECK_RIGHTALIGN,button,1342242819 +Control6=IDC_RADIO_TIMEFORMAT,button,1342373897 +Control7=IDC_RADIO_SHORTDATEFORMAT,button,1342242825 +Control8=IDC_RADIO_LONGDATEFORMAT,button,1342242825 +Control9=IDC_COMBO_DATEFORMAT,combobox,1344339971 +Control10=IDC_COMBO_TIMEFORMAT,combobox,1344339971 +Control11=IDC_CHECK_NOTODAY,button,1342242819 +Control12=IDC_CHECK_NOTODAYCIRCLE,button,1342242819 +Control13=IDC_CHECK_WEEKNUMBERS,button,1342242819 +Control14=IDC_COMBO_DIMENSION,combobox,1344339971 +Control15=IDC_COMBO_FIRSTDAY,combobox,1344339971 +Control16=IDC_EDIT_SCROLLRATE,edit,1350631552 +Control17=IDC_SPIN_SCROLLRATE,msctls_updown32,1342177462 +Control18=IDC_BUTTON_CALFONT,button,1342242816 +Control19=IDC_BUTTON_CLRBK,button,1342242827 +Control20=IDC_BUTTON_CLRTEXT,button,1342242827 +Control21=IDC_BUTTON_CLRMONTHBK,button,1342243083 +Control22=IDC_BUTTON_CLRTITLETEXT,button,1342242827 +Control23=IDC_BUTTON_CLRTITLEBK,button,1342243083 +Control24=IDC_BUTTON_CLRTRAILINGTEXT,button,1342242827 +Control25=IDC_STYLES,button,1342177287 +Control26=IDC_COLORS,button,1342177287 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,button,1342177287 +Control34=IDC_STATIC,button,1342177287 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,button,1342177287 +Control37=IDC_STATIC,static,1342308352 +Control38=IDC_STATIC,static,1342308352 +Control39=IDC_STATIC,button,1342177287 +Control40=IDC_STATIC_CALFONT,static,1342312960 +Control41=IDC_STATIC,static,1342308352 +Control42=IDC_STATIC,static,1342308352 + +[DLG:IDD_DATETIMEPICKER_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=42 +Control1=IDC_DATETIMEPICKER,static,1342312448 +Control2=IDC_CHECK_UPDOWN,button,1342242819 +Control3=IDC_CHECK_SHOWNONE,button,1342242819 +Control4=IDC_CHECK_CANPARSE,button,1342242819 +Control5=IDC_CHECK_RIGHTALIGN,button,1342242819 +Control6=IDC_RADIO_TIMEFORMAT,button,1342373897 +Control7=IDC_RADIO_SHORTDATEFORMAT,button,1342242825 +Control8=IDC_RADIO_LONGDATEFORMAT,button,1342242825 +Control9=IDC_COMBO_DATEFORMAT,combobox,1344339971 +Control10=IDC_COMBO_TIMEFORMAT,combobox,1344339971 +Control11=IDC_CHECK_NOTODAY,button,1342242819 +Control12=IDC_CHECK_NOTODAYCIRCLE,button,1342242819 +Control13=IDC_CHECK_WEEKNUMBERS,button,1342242819 +Control14=IDC_COMBO_DIMENSION,combobox,1344339971 +Control15=IDC_COMBO_FIRSTDAY,combobox,1344339971 +Control16=IDC_EDIT_SCROLLRATE,edit,1350631552 +Control17=IDC_SPIN_SCROLLRATE,msctls_updown32,1342177462 +Control18=IDC_BUTTON_CALFONT,button,1342242816 +Control19=IDC_BUTTON_CLRBK,button,1342242827 +Control20=IDC_BUTTON_CLRTEXT,button,1342242827 +Control21=IDC_BUTTON_CLRMONTHBK,button,1342243083 +Control22=IDC_BUTTON_CLRTITLETEXT,button,1342242827 +Control23=IDC_BUTTON_CLRTITLEBK,button,1342243083 +Control24=IDC_BUTTON_CLRTRAILINGTEXT,button,1342242827 +Control25=IDC_STYLES,button,1342177287 +Control26=IDC_COLORS,button,1342177287 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,button,1342177287 +Control34=IDC_STATIC,button,1342177287 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,button,1342177287 +Control37=IDC_STATIC,static,1342308352 +Control38=IDC_STATIC,static,1342308352 +Control39=IDC_STATIC,button,1342177287 +Control40=IDC_STATIC_CALFONT,static,1342312960 +Control41=IDC_STATIC,static,1342308352 +Control42=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.cpp new file mode 100644 index 0000000..5f7e621 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.cpp @@ -0,0 +1,101 @@ +// DateTimePicker.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "DateTimePicker.h" +#include "DateTimePickerDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerApp + +BEGIN_MESSAGE_MAP(CDateTimePickerApp, CWinApp) + //{{AFX_MSG_MAP(CDateTimePickerApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerApp construction + +CDateTimePickerApp::CDateTimePickerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CDateTimePickerApp object + +CDateTimePickerApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerApp initialization + +BOOL CDateTimePickerApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CDateTimePickerDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CDateTimePickerApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsp new file mode 100644 index 0000000..1e4bfb7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsp @@ -0,0 +1,292 @@ +# Microsoft Developer Studio Project File - Name="DateTimePicker" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DateTimePicker - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DateTimePicker.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DateTimePicker.mak" CFG="DateTimePicker - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DateTimePicker - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DateTimePicker - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DateTimePicker - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "DateTimePicker - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "DateTimePicker - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DateTimePicker - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"DateTimePicker.exe" + +!ELSEIF "$(CFG)" == "DateTimePicker - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"DateTimePicker.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "DateTimePicker - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"DateTimePicker.exe" + +!ELSEIF "$(CFG)" == "DateTimePicker - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DateTime" +# PROP BASE Intermediate_Dir "DateTime" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"DateTimePicker.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"DateTimePicker.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "DateTimePicker - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "DateTim0" +# PROP BASE Intermediate_Dir "DateTim0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"DateTimePicker.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"DateTimePicker.exe" + +!ENDIF + +# Begin Target + +# Name "DateTimePicker - Win32 Release" +# Name "DateTimePicker - Win32 Debug" +# Name "DateTimePicker - Win32 Release_Shared" +# Name "DateTimePicker - Win32 Unicode_Debug" +# Name "DateTimePicker - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDateTimeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMonthCalCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\DateTimePicker.cpp +# End Source File +# Begin Source File + +SOURCE=.\DateTimePicker.rc +# End Source File +# Begin Source File + +SOURCE=.\DateTimePickerDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\DateTimePicker.h +# End Source File +# Begin Source File + +SOURCE=.\DateTimePickerDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDateTimeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMonthCalCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\DateTimePicker.ico +# End Source File +# Begin Source File + +SOURCE=.\res\DateTimePicker.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\DateTimePicker.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsw new file mode 100644 index 0000000..483c6c1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DateTimePicker"=".\DateTimePicker.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Ultimate ToolBox/Working/samples/gui/DateTimePicker", WEHCAAAA + c:\documents and settings\nish\my documents\work\ultimate toolbox\working\samples\gui\datetimepicker + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.h new file mode 100644 index 0000000..28b4081 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.h @@ -0,0 +1,50 @@ +// DateTimePicker.h : main header file for the DateTimePicker application +// + +#if !defined(AFX_DATETIMEPICKER_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_DATETIMEPICKER_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerApp: +// See DateTimePicker.cpp for the implementation of this class +// + +class CDateTimePickerApp : public CWinApp +{ +public: + CDateTimePickerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDateTimePickerApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CDateTimePickerApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DATETIMEPICKER_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.rc new file mode 100644 index 0000000..63017bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.rc @@ -0,0 +1,250 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DATETIMEPICKER_DIALOG DIALOGEX 0, 0, 339, 281 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "DateTimePicker" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "",IDC_DATETIMEPICKER,21,19,122,15,SS_SUNKEN + CONTROL "DTS_UPDOWN",IDC_CHECK_UPDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,68,68,10 + CONTROL "DTS_SHOWNONE",IDC_CHECK_SHOWNONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,83,78,10 + CONTROL "DTS_APPCANPARSE",IDC_CHECK_CANPARSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,97,87,10 + CONTROL "DTS_RIGHTALIGN",IDC_CHECK_RIGHTALIGN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,111,79,10 + CONTROL "DTS_TIMEFORMAT",IDC_RADIO_TIMEFORMAT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,149,82,10 + CONTROL "DTS_SHORTDATEFORMAT",IDC_RADIO_SHORTDATEFORMAT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,163,109,10 + CONTROL "DTS_LONGDATEFORMAT",IDC_RADIO_LONGDATEFORMAT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,177,104,10 + COMBOBOX IDC_COMBO_DATEFORMAT,60,218,97,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_TIMEFORMAT,60,241,97,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "MCS_NOTODAY",IDC_CHECK_NOTODAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,28,71,10 + CONTROL "MCS_NOTODAYCIRCLE",IDC_CHECK_NOTODAYCIRCLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,42,96,10 + CONTROL "MCS_WEEKNUMBERS",IDC_CHECK_WEEKNUMBERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,56,93,10 + COMBOBOX IDC_COMBO_DIMENSION,173,93,70,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_FIRSTDAY,253,93,70,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_SCROLLRATE,253,111,42,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_SCROLLRATE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,295,112,9,11 + PUSHBUTTON "Font ...",IDC_BUTTON_CALFONT,174,129,39,13 + CONTROL "\nSpecifies background color displayed between months",IDC_BUTTON_CLRBK, + "Button",BS_OWNERDRAW | WS_TABSTOP,181,172,61,16 + CONTROL "\nSpecifies background color displayed text within a month",IDC_BUTTON_CLRTEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,255,172,61,16 + CONTROL "\nSpecifies background color displayed within months",IDC_BUTTON_CLRMONTHBK, + "Button",BS_OWNERDRAW | BS_LEFT | WS_TABSTOP,181,206,61,16 + CONTROL "\nSpecifies background color displayed text within calendar's title",IDC_BUTTON_CLRTITLETEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,255,206,61,16 + CONTROL "\nSpecifies background color displayed in the calendar's title",IDC_BUTTON_CLRTITLEBK, + "Button",BS_OWNERDRAW | BS_LEFT | WS_TABSTOP,181,240,61,16 + CONTROL "\nSpecifies background color to display header and trailed-day text",IDC_BUTTON_CLRTRAILINGTEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,255,240,61,16 + GROUPBOX "Styles",IDC_STYLES,7,56,150,72 + GROUPBOX "Colors for calendar control",IDC_COLORS,174,149,149,115 + LTEXT "Background",IDC_STATIC,181,161,40,8 + LTEXT "Month Background",IDC_STATIC,181,195,62,8 + LTEXT "Text",IDC_STATIC,256,161,15,8 + LTEXT "Title Background",IDC_STATIC,181,230,55,8 + LTEXT "Title Text",IDC_STATIC,256,196,30,8 + LTEXT "Trailing Text",IDC_STATIC,256,230,40,8 + GROUPBOX "Date time picker control",IDC_STATIC,7,4,150,43 + GROUPBOX "Format",IDC_STATIC,7,137,150,56 + LTEXT "Display",IDC_STATIC,173,81,24,8 + GROUPBOX "Popup calendar control",IDC_STATIC,165,4,166,267 + LTEXT "First day of week",IDC_STATIC,254,81,54,8 + LTEXT "Scroll rate (in months)",IDC_STATIC,174,113,68,8 + GROUPBOX "Calendar Styles",IDC_STATIC,173,15,149,58 + LTEXT "Static",IDC_STATIC_CALFONT,227,129,95,12,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Date Format",IDC_STATIC,10,221,40,8 + LTEXT "Time Format",IDC_STATIC,10,244,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 "040904B0" + BEGIN + VALUE "FileDescription", "DateTimePicker MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "DateTimePicker" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "DateTimePicker.EXE" + VALUE "ProductName", "DateTimePicker Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DATETIMEPICKER_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 332 + TOPMARGIN, 7 + BOTTOMMARGIN, 274 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About DateTimePicker..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Date Time Picker Demo" + ID_DESCRIPTION_FILE "DateTimePickerInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#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 + "#include ""UTSampleAbout.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\DateTimePicker.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\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\\DateTimePicker.ico" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\DateTimePicker.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.vcproj new file mode 100644 index 0000000..d8765a0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePicker.vcproj @@ -0,0 +1,1220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.cpp new file mode 100644 index 0000000..e102c33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.cpp @@ -0,0 +1,594 @@ +// DateTimePickerDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "DateTimePicker.h" +#include "DateTimePickerDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerDlg dialog + +CDateTimePickerDlg::CDateTimePickerDlg(CWnd* pParent /*=NULL*/) + : CDialog(CDateTimePickerDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CDateTimePickerDlg) + m_nFirstDay = -1; + m_nDimension = -1; + m_nScrollRate = 0; + m_bCanParse = FALSE; + m_bShowNone = FALSE; + m_bUpDown = FALSE; + m_nFormat = -1; + m_bRightAlign = FALSE; + m_bNotoday = FALSE; + m_bNotodaycircle = FALSE; + m_bWeeknumbers = FALSE; + m_sMonthCalFontName = _T(""); + m_nDateFormat = -1; + m_nTimeFormat = -1; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_clrTrailingText=RGB(0,0,0); + m_clrTitleText=RGB(0,0,0); + m_clrTitleBk=RGB(0,0,0); + m_clrText=RGB(0,0,0); + m_clrMonthBk=RGB(0,0,0); + m_clrBk=RGB(0,0,0); +} + +void CDateTimePickerDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDateTimePickerDlg) + DDX_Control(pDX, IDC_COMBO_TIMEFORMAT, m_cmbTimeFormat); + DDX_Control(pDX, IDC_COMBO_DATEFORMAT, m_cmbDateFormat); + DDX_Control(pDX, IDC_STATIC_CALFONT, m_ctlMonthCalFontName); + DDX_Control(pDX, IDC_COMBO_FIRSTDAY, m_cmbFirstDay); + DDX_Control(pDX, IDC_COMBO_DIMENSION, m_cmbDimension); + DDX_Control(pDX, IDC_BUTTON_CLRTRAILINGTEXT, m_btnClrTrailingText); + DDX_Control(pDX, IDC_BUTTON_CLRTITLETEXT, m_btnClrTitleText); + DDX_Control(pDX, IDC_BUTTON_CLRTITLEBK, m_btnClrTitleBk); + DDX_Control(pDX, IDC_BUTTON_CLRTEXT, m_btnClrText); + DDX_Control(pDX, IDC_BUTTON_CLRMONTHBK, m_btnClrMonthBk); + DDX_Control(pDX, IDC_BUTTON_CLRBK, m_btnClrBk); + DDX_CBIndex(pDX, IDC_COMBO_FIRSTDAY, m_nFirstDay); + DDX_CBIndex(pDX, IDC_COMBO_DIMENSION, m_nDimension); + DDX_Text(pDX, IDC_EDIT_SCROLLRATE, m_nScrollRate); + DDX_Check(pDX, IDC_CHECK_CANPARSE, m_bCanParse); + DDX_Check(pDX, IDC_CHECK_SHOWNONE, m_bShowNone); + DDX_Check(pDX, IDC_CHECK_UPDOWN, m_bUpDown); + DDX_Radio(pDX, IDC_RADIO_TIMEFORMAT, m_nFormat); + DDX_Check(pDX, IDC_CHECK_RIGHTALIGN, m_bRightAlign); + DDX_Check(pDX, IDC_CHECK_NOTODAY, m_bNotoday); + DDX_Check(pDX, IDC_CHECK_NOTODAYCIRCLE, m_bNotodaycircle); + DDX_Check(pDX, IDC_CHECK_WEEKNUMBERS, m_bWeeknumbers); + DDX_Text(pDX, IDC_STATIC_CALFONT, m_sMonthCalFontName); + DDX_CBIndex(pDX, IDC_COMBO_DATEFORMAT, m_nDateFormat); + DDX_CBIndex(pDX, IDC_COMBO_TIMEFORMAT, m_nTimeFormat); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTRAILINGTEXT, m_clrTrailingText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTITLETEXT, m_clrTitleText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTITLEBK, m_clrTitleBk); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTEXT, m_clrText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRMONTHBK, m_clrMonthBk); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRBK, m_clrBk); +} + +BEGIN_MESSAGE_MAP(CDateTimePickerDlg, CDialog) + //{{AFX_MSG_MAP(CDateTimePickerDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CHECK_CANPARSE, OnCheckCanparse) + ON_BN_CLICKED(IDC_CHECK_SHOWNONE, OnCheckShownone) + ON_BN_CLICKED(IDC_CHECK_UPDOWN, OnCheckUpdown) + ON_BN_CLICKED(IDC_RADIO_LONGDATEFORMAT, OnRadioFormat) + ON_BN_CLICKED(IDC_CHECK_RIGHTALIGN, OnCheckRightalign) + ON_BN_CLICKED(IDC_BUTTON_CALFONT, OnButtonCalfont) + ON_CBN_SELCHANGE(IDC_COMBO_DATEFORMAT, OnSelchangeComboDateformat) + ON_BN_CLICKED(IDC_RADIO_SHORTDATEFORMAT, OnRadioFormat) + ON_BN_CLICKED(IDC_RADIO_TIMEFORMAT, OnRadioFormat) + ON_CBN_SELCHANGE(IDC_COMBO_TIMEFORMAT, OnSelchangeComboTimeformat) + //}}AFX_MSG_MAP + ON_NOTIFY(DTN_DROPDOWN ,IDC_DATETIMEPICKER, OnDTDropDown) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerDlg message handlers + +BOOL CDateTimePickerDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // populate combo boxes + // + m_cmbDimension.AddString(_T("One month")); + m_cmbDimension.AddString(_T("2x1 months")); + m_cmbDimension.AddString(_T("1x2 months")); + m_cmbDimension.AddString(_T("2x2 months")); + + m_nDimension=0; + + + m_cmbFirstDay.AddString(_T("Monday")); + m_cmbFirstDay.AddString(_T("Tuesday")); + m_cmbFirstDay.AddString(_T("Wednesday")); + m_cmbFirstDay.AddString(_T("Thursday")); + m_cmbFirstDay.AddString(_T("Friday")); + m_cmbFirstDay.AddString(_T("Saturday")); + m_cmbFirstDay.AddString(_T("Sunday")); + + m_nFirstDay=6; + + m_cmbDateFormat.AddString(_T("Default")); + m_cmbDateFormat.AddString(_T("ddd''d' 'MMM' 'yy")); + m_cmbDateFormat.AddString(_T("dddd' 'dd' 'MMMM' 'yyy")); + m_cmbDateFormat.AddString(_T("MM'/'dd'/'yyy' 'hh':'mm' 'tt")); + + m_nDateFormat=0; + + m_cmbTimeFormat.AddString(_T("Default")); + m_cmbTimeFormat.AddString(_T("h':'m' 't")); + m_cmbTimeFormat.AddString(_T("HH':'mm")); + m_cmbTimeFormat.AddString(_T("hh':'mm' 'tt' 'MM'/'dd'/'yyy")); + + m_nTimeFormat=0; + ///////////////////////////// + + // month calendar settings + // + m_nScrollRate=1; + m_bNotoday = FALSE; + m_bNotodaycircle = FALSE; + m_bWeeknumbers = FALSE; + ///////////////////////////// + + // enable tooltips for color picker buttons + // + m_btnClrTrailingText.SetToolTip(TRUE); + m_btnClrTitleText.SetToolTip(TRUE); + m_btnClrTitleBk.SetToolTip(TRUE); + m_btnClrText.SetToolTip(TRUE); + m_btnClrMonthBk.SetToolTip(TRUE); + m_btnClrBk.SetToolTip(TRUE); + ///////////////////////////// + + // create date time picker control + // + CWnd *pFrame=GetDlgItem(IDC_DATETIMEPICKER); + CRect rcWnd; + pFrame->GetWindowRect(rcWnd); + DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_TABSTOP; + pFrame->DestroyWindow(); //pFrame was just a placeholder anyway. + ScreenToClient(rcWnd); + VERIFY(m_ctlDateTimePicker.Create(dwStyle,rcWnd,this,IDC_DATETIMEPICKER)); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CDateTimePickerDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CDateTimePickerDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CDateTimePickerDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CDateTimePickerDlg::GetVars() +{ + DWORD dwStyle=m_ctlDateTimePicker.GetStyle(); + + m_bCanParse=(dwStyle&DTS_APPCANPARSE)!=0 ? TRUE : FALSE; + m_bShowNone=(dwStyle&DTS_SHOWNONE)!=0 ? TRUE : FALSE; + m_bUpDown=(dwStyle&DTS_UPDOWN)!=0 ? TRUE : FALSE; + m_bRightAlign=(dwStyle&DTS_RIGHTALIGN)!=0 ? TRUE : FALSE; + + if((dwStyle&DTS_TIMEFORMAT)!=0) + m_nFormat=0; + else if((dwStyle&DTS_SHORTDATEFORMAT)!=0) + m_nFormat=1; + else if((dwStyle&DTS_LONGDATEFORMAT)!=0) + m_nFormat=2; + else + m_nFormat=1; + + m_clrTrailingText=m_ctlDateTimePicker.GetMonthCalColor(MCSC_TRAILINGTEXT); + m_clrTitleText=m_ctlDateTimePicker.GetMonthCalColor(MCSC_TITLETEXT); + m_clrTitleBk=m_ctlDateTimePicker.GetMonthCalColor(MCSC_TITLEBK); + m_clrText=m_ctlDateTimePicker.GetMonthCalColor(MCSC_TEXT); + m_clrMonthBk=m_ctlDateTimePicker.GetMonthCalColor(MCSC_MONTHBK); + m_clrBk=m_ctlDateTimePicker.GetMonthCalColor(MCSC_BACKGROUND); + + // font + // + CFont* pFont=m_ctlDateTimePicker.GetMonthCalFont(); + if(pFont==NULL) + pFont=m_ctlDateTimePicker.GetFont(); + VERIFY(pFont->GetLogFont(&m_lfMonthCal)); + + m_sMonthCalFontName.Format(_T("%d pt, %s"), + (ConvertLogUnitToPoint(m_lfMonthCal.lfHeight)+5)/10, + m_lfMonthCal.lfFaceName); + m_ctlMonthCalFontName.SetTextLogFont(&m_lfMonthCal); + m_ctlMonthCalFontName.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT)); + ///////////////////////////// + + VERIFY(UpdateData(FALSE)); +} + + +void CDateTimePickerDlg::SetMonthCalColors() +{ + if(!UpdateData(TRUE)) + return; + + m_ctlDateTimePicker.SetMonthCalColor(MCSC_TRAILINGTEXT,m_clrTrailingText); + m_ctlDateTimePicker.SetMonthCalColor(MCSC_TITLETEXT,m_clrTitleText); + m_ctlDateTimePicker.SetMonthCalColor(MCSC_TITLEBK,m_clrTitleBk); + m_ctlDateTimePicker.SetMonthCalColor(MCSC_TEXT,m_clrText); + m_ctlDateTimePicker.SetMonthCalColor(MCSC_MONTHBK,m_clrMonthBk); + m_ctlDateTimePicker.SetMonthCalColor(MCSC_BACKGROUND,m_clrBk); +} + + +void CDateTimePickerDlg::OnCheckCanparse() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_bCanParse) + RecreateDateTimePicker(DTS_APPCANPARSE,0); + else + RecreateDateTimePicker(0,DTS_APPCANPARSE); + +} + +void CDateTimePickerDlg::OnCheckShownone() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_bShowNone) + RecreateDateTimePicker(DTS_SHOWNONE,0); + else + RecreateDateTimePicker(0,DTS_SHOWNONE); +} + +void CDateTimePickerDlg::OnCheckUpdown() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_bUpDown) + RecreateDateTimePicker(DTS_UPDOWN,0); + else + RecreateDateTimePicker(0,DTS_UPDOWN); +} + +void CDateTimePickerDlg::OnCheckRightalign() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_bRightAlign) + m_ctlDateTimePicker.ModifyStyle(0,DTS_RIGHTALIGN,SWP_NOSIZE); + else + m_ctlDateTimePicker.ModifyStyle(DTS_RIGHTALIGN,0); +} + +void CDateTimePickerDlg::OnRadioFormat() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + DWORD dwAddStyle=0; + DWORD dwRemoveStyle=0; + + switch(m_nFormat) + { + case 0: + dwAddStyle=DTS_TIMEFORMAT; + dwRemoveStyle=DTS_SHORTDATEFORMAT|DTS_LONGDATEFORMAT; + break; + case 1: + dwAddStyle=DTS_SHORTDATEFORMAT; + dwRemoveStyle=DTS_TIMEFORMAT|DTS_LONGDATEFORMAT; + break; + case 2: + dwAddStyle=DTS_LONGDATEFORMAT; + dwRemoveStyle=DTS_SHORTDATEFORMAT|DTS_TIMEFORMAT; + break; + } + + //remove previous format style + m_ctlDateTimePicker.ModifyStyle(dwRemoveStyle,0); + //set this style + m_ctlDateTimePicker.ModifyStyle(0,dwAddStyle,SWP_NOSIZE); + + if(m_nFormat!=0) + SetDateFormat(); + else + SetTimeFormat(); +} + +BOOL CDateTimePickerDlg::RecreateDateTimePicker(DWORD dwAddStyle, DWORD dwRemoveStyle) +{ + CRect rc; + m_ctlDateTimePicker.GetWindowRect(rc); + long lStyle = ::GetWindowLong(m_ctlDateTimePicker.m_hWnd,GWL_STYLE); + lStyle |= dwAddStyle; + lStyle &= ~dwRemoveStyle; + m_ctlDateTimePicker.DestroyWindow(); + ScreenToClient(rc); + + if(m_ctlDateTimePicker.Create(lStyle,rc,this,IDC_DATETIMEPICKER)) + { + if(m_nFormat!=0) + SetDateFormat(); + else + SetTimeFormat(); + return TRUE; + } + else + return FALSE; +} + +void CDateTimePickerDlg::OnDTDropDown(NMHDR *pHdr, LRESULT *pRes) +{ + UNREFERENCED_PARAMETER(pHdr); + + VERIFY(UpdateData(TRUE)); + + SetMonthCalColors(); + + static CFont font; + if((HFONT)font!=NULL) + font.DeleteObject(); + VERIFY(font.CreateFontIndirect(&m_lfMonthCal)); + m_ctlDateTimePicker.SetMonthCalFont(&font,FALSE); + + COXMonthCalCtrl* pCtlMonthCal=m_ctlDateTimePicker.GetMonthCalCtrl(); + ASSERT(pCtlMonthCal); + + if(m_bNotoday) + pCtlMonthCal->ModifyStyle(0,MCS_NOTODAY); + else + pCtlMonthCal->ModifyStyle(MCS_NOTODAY,0); +#if (_WIN32_IE >= 0x0400) + if(m_bNotodaycircle) + pCtlMonthCal->ModifyStyle(0,MCS_NOTODAYCIRCLE); + else + pCtlMonthCal->ModifyStyle(MCS_NOTODAYCIRCLE,0); +#endif + if(m_bWeeknumbers) + pCtlMonthCal->ModifyStyle(0,MCS_WEEKNUMBERS); + else + pCtlMonthCal->ModifyStyle(MCS_WEEKNUMBERS,0); + + pCtlMonthCal->SetMonthDelta(m_nScrollRate); + pCtlMonthCal->SetFirstDayOfWeek(m_nFirstDay); + + switch(m_nDimension) + { + case 0: + pCtlMonthCal->SetCtrlDimension(1,1); + break; + case 1: + pCtlMonthCal->SetCtrlDimension(2,1); + break; + case 2: + pCtlMonthCal->SetCtrlDimension(1,2); + break; + case 3: + pCtlMonthCal->SetCtrlDimension(2,2); + break; + default: + ASSERT(FALSE); + } + + pCtlMonthCal->EnableToolTips(TRUE); + + *pRes=0; +} + + + +void CDateTimePickerDlg::OnButtonCalfont() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + // Use font common dialog + CFontDialog fontDlg(&m_lfMonthCal); + if(fontDlg.DoModal()==IDOK) + { + fontDlg.GetCurrentFont(&m_lfMonthCal); + m_sMonthCalFontName.Format(_T("%d pt, %s"),(fontDlg.GetSize()+5)/10, + m_lfMonthCal.lfFaceName); + m_ctlMonthCalFontName.SetTextLogFont(&m_lfMonthCal); + UpdateData(FALSE); + } +} + + +void CDateTimePickerDlg::OnSelchangeComboDateformat() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_nFormat!=0) + SetDateFormat(); +} + +void CDateTimePickerDlg::OnSelchangeComboTimeformat() +{ + // TODO: Add your control notification handler code here + + VERIFY(UpdateData(TRUE)); + + if(m_nFormat==0) + SetTimeFormat(); +} + +void CDateTimePickerDlg::SetDateFormat() +{ + if(m_nDateFormat==0) + m_ctlDateTimePicker.SetFormat(NULL); + else + { + CString sFormat; + m_cmbDateFormat.GetLBText(m_nDateFormat,sFormat); + m_ctlDateTimePicker.SetFormat(sFormat); + } +} + +void CDateTimePickerDlg::SetTimeFormat() +{ + if(m_nTimeFormat==0) + m_ctlDateTimePicker.SetFormat(NULL); + else + { + CString sFormat; + m_cmbTimeFormat.GetLBText(m_nTimeFormat,sFormat); + m_ctlDateTimePicker.SetFormat(sFormat); + } +} + +int CDateTimePickerDlg::ConvertPointToLogUnit(const int nPointSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + // convert nPointSize to logical units based on pDC + POINT pt; + pt.y=::GetDeviceCaps(hDC,LOGPIXELSY)*nPointSize; + pt.y/=720; // 72 points/inch, 10 decipoints/point + ::DPtoLP(hDC,&pt,1); + POINT ptOrg = {0,0}; + ::DPtoLP(hDC,&ptOrg,1); + + if(pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return -abs(pt.y-ptOrg.y); +} + +int CDateTimePickerDlg::ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + POINT ptOrg={0,0}; + ::DPtoLP(hDC,&ptOrg,1); + POINT pt={0,0}; + + pt.y=abs(nLogUnitSize)+ptOrg.y; + ::LPtoDP(hDC,&pt,1); + pt.y*=720; // 72 points/inch, 10 decipoints/point + + int nPointSize=(pt.y)/(::GetDeviceCaps(hDC,LOGPIXELSY)); + + if (pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return nPointSize; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.h new file mode 100644 index 0000000..fd506ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerDlg.h @@ -0,0 +1,106 @@ +// DateTimePickerDlg.h : header file +// + +#if !defined(AFX_DATETIMEPICKERDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_DATETIMEPICKERDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDateTimeCtrl.h" +#include "OXColorPickerButton.h" +#include "OXStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CDateTimePickerDlg dialog + +class CDateTimePickerDlg : public CDialog +{ +// Construction +public: + CDateTimePickerDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CDateTimePickerDlg) + enum { IDD = IDD_DATETIMEPICKER_DIALOG }; + CComboBox m_cmbTimeFormat; + CComboBox m_cmbDateFormat; + COXStatic m_ctlMonthCalFontName; + CComboBox m_cmbFirstDay; + CComboBox m_cmbDimension; + COXColorPickerButton m_btnClrTrailingText; + COXColorPickerButton m_btnClrTitleText; + COXColorPickerButton m_btnClrTitleBk; + COXColorPickerButton m_btnClrText; + COXColorPickerButton m_btnClrMonthBk; + COXColorPickerButton m_btnClrBk; + int m_nFirstDay; + int m_nDimension; + int m_nScrollRate; + BOOL m_bCanParse; + BOOL m_bShowNone; + BOOL m_bUpDown; + int m_nFormat; + BOOL m_bRightAlign; + BOOL m_bNotoday; + BOOL m_bNotodaycircle; + BOOL m_bWeeknumbers; + CString m_sMonthCalFontName; + int m_nDateFormat; + int m_nTimeFormat; + //}}AFX_DATA + COLORREF m_clrTrailingText; + COLORREF m_clrTitleText; + COLORREF m_clrTitleBk; + COLORREF m_clrText; + COLORREF m_clrMonthBk; + COLORREF m_clrBk; + + LOGFONT m_lfMonthCal; + LOGFONT m_lfDateTimePicker; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDateTimePickerDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + COXDateTimeCtrl m_ctlDateTimePicker; + + void GetVars(); + void SetMonthCalColors(); + BOOL RecreateDateTimePicker(DWORD dwAddStyle, DWORD dwRemoveStyle); + void SetDateFormat(); + void SetTimeFormat(); + + int ConvertPointToLogUnit(const int nPointSize, CDC* pDC=NULL); + int ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC=NULL); + + // Generated message map functions + //{{AFX_MSG(CDateTimePickerDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCheckCanparse(); + afx_msg void OnCheckShownone(); + afx_msg void OnCheckUpdown(); + afx_msg void OnRadioFormat(); + afx_msg void OnCheckRightalign(); + afx_msg void OnButtonCalfont(); + afx_msg void OnSelchangeComboDateformat(); + afx_msg void OnSelchangeComboTimeformat(); + //}}AFX_MSG + afx_msg void OnDTDropDown(NMHDR *pHdr, LRESULT *pRes); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DATETIMEPICKERDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerInfo.rtf new file mode 100644 index 0000000..7dead68 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/DateTimePickerInfo.rtf @@ -0,0 +1,61 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f40\froman\fcharset238\fprq2 Times New Roman CE;}{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\f50\fswiss\fcharset238\fprq2 Arial CE;}{\f51\fswiss\fcharset204\fprq2 Arial Cyr;}{\f53\fswiss\fcharset161\fprq2 Arial Greek;}{\f54\fswiss\fcharset162\fprq2 Arial Tur;}{\f55\fswiss\fcharset177\fprq2 Arial (Hebrew);} +{\f56\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f57\fswiss\fcharset186\fprq2 Arial Baltic;}{\f58\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2495164\rsid5183391} +{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr11\min53}{\revtim\yr2005\mo1\dy17\hr11\min54}{\version2}{\edmins1}{\nofpages2}{\nofwords397}{\nofchars2265}{\*\company Dundas India} +{\nofcharsws2657}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot2495164 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid2495164 COXDateTimeCtrl}{\b\fs48\insrsid2495164 +\par }{\b\fs16\insrsid2495164 Copyright \'a9 }{\b\fs16\insrsid2495164 The Code Project}{\b\fs16\insrsid2495164 1997 1998, All Rights Reserved +\par }{\insrsid2495164 +\par A COXDateTimeCtrl object encapsulates the functionality of a date and time picker control. The date and time picker control (DTP control) provides a simple interface to excha +nge date and time information with a user. This interface contains fields, each of which displays a part of the date and time information stored in the control. The user can change the information stored in the control by changing the content of the strin +g in a given field. The user can move from field to field using the mouse or the keyboard. +\par +\par }{\b\i\insrsid2495164 Using COXDateTimeCtrl}{\insrsid2495164 +\par +\par The date and time picker control (COXDateTimeCtrl) implements an intuitive and recognizable method of entering or selecting a specific date. T +he main interface of the control is similar in functionality to a combo box. However, if the user expands the control, a month calendar control appears (by default), allowing the user to specify a particular date. When a date is chosen, the month calendar + control automatically disappears. +\par +\par }{\b\i\insrsid2495164 Note}{\insrsid2495164 To use both the CDateTimePicker and COXMonthCalCtrl classes in your project, you must include OXDateTimeCtrl.h +\par +\par }{\b\i\insrsid2495164 Creating the Date and Time Picker Control}{\insrsid2495164 +\par +\par How the date and time picker control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window. +\par +\par }{\b\i\insrsid2495164 To use COXDateTimeCtrl directly in a dialog box }{\insrsid2495164 +\par +\par Visual C++ v6.0: +\par In the dialog editor, add a Date and Time + Picker Control to your dialog template resource. Specify its control ID. Specify any styles required, using the Properties dialog box of the date and time picker control. Use ClassWizard to map handler functions in the dialog class for any date time pick +er control notification messages you need to handle. In OnInitDialog, set any additional styles for the COXDateTimeCtrl object. +\par +\par Visual C++ v5.0: +\par In the dialog editor, add a Static Control to your dialog template resource (it will be a placeholder for the DTP control). Specify its control ID. In OnInitDialog, you can use next code to replace Static Control on our DTP control: +\par +\par }{\i\f1\fs20\insrsid2495164 \tab CWnd *pFrame= +\par \tab \tab GetDlgItem(IDC_DATETIMEPICKER); +\par \tab CRect rcWnd; +\par \tab pFrame>GetWindowRect(rcWnd); +\par \tab pFrame>DestroyWindow(); +\par \tab ScreenToClient(rcWnd); +\par \tab m_ctlDateTimePicker. +\par \tab \tab Create(WS_CHILD|WS_VISIBLE|WS_TABSTOP, +\par \tab \tab rcWnd,this, IDC_DATETIMEPICKER);\tab \tab +\par }{\b\i\insrsid2495164 +\par To use COXDateTimeCtrl in a nondialog window :}{\insrsid2495164 +\par +\par Declare the control in the view or window class. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function (if you're subclassing the control). Set the styles for the control +. +\par +\par +\par }{\fs20\lang4105\langfe1033\langnp4105\insrsid2495164 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.cpp new file mode 100644 index 0000000..8519d33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MonthCalendar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.h new file mode 100644 index 0000000..3d217cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.rc2 new file mode 100644 index 0000000..e68a1bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/res/DateTimePicker.rc2 @@ -0,0 +1,13 @@ +// +// DATETIMEPICKER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/resource.h new file mode 100644 index 0000000..94ef512 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DateTimePicker/resource.h @@ -0,0 +1,48 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by DateTimePicker.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_DATETIMEPICKER_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_DATETIMEPICKER 1000 +#define IDC_STYLES 1002 +#define IDC_CHECK_UPDOWN 1003 +#define IDC_CHECK_SHOWNONE 1004 +#define IDC_CHECK_CANPARSE 1005 +#define IDC_CHECK_RIGHTALIGN 1006 +#define IDC_COLORS 1009 +#define IDC_BUTTON_CLRBK 1010 +#define IDC_BUTTON_CLRMONTHBK 1011 +#define IDC_COMBO_DIMENSION 1015 +#define IDC_BUTTON_CLRTITLEBK 1016 +#define IDC_BUTTON_CLRTEXT 1017 +#define IDC_BUTTON_CLRTITLETEXT 1018 +#define IDC_BUTTON_CLRTRAILINGTEXT 1019 +#define IDC_COMBO_FIRSTDAY 1020 +#define IDC_COMBO_DATEFORMAT 1021 +#define IDC_COMBO_TIMEFORMAT 1022 +#define IDC_RADIO_TIMEFORMAT 1025 +#define IDC_RADIO_SHORTDATEFORMAT 1026 +#define IDC_RADIO_LONGDATEFORMAT 1027 +#define IDC_EDIT_SCROLLRATE 1028 +#define IDC_SPIN_SCROLLRATE 1029 +#define IDC_CHECK_NOTODAY 1030 +#define IDC_CHECK_NOTODAYCIRCLE 1031 +#define IDC_CHECK_WEEKNUMBERS 1032 +#define IDC_CHECK_INFOTIP 1033 +#define IDC_BUTTON_CALFONT 1034 +#define IDC_STATIC_CALFONT 1035 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1036 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.cpp new file mode 100644 index 0000000..e0035a2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "DockProp.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockOropInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockOropInfo.rtf new file mode 100644 index 0000000..3757a9c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockOropInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.cpp new file mode 100644 index 0000000..966edb5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.cpp @@ -0,0 +1,135 @@ +// DockProp.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "DockProp.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "DockPropDoc.h" +#include "DockPropView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDockPropApp + +BEGIN_MESSAGE_MAP(CDockPropApp, CWinApp) + //{{AFX_MSG_MAP(CDockPropApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CDockPropApp construction + +CDockPropApp::CDockPropApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CDockPropApp object + +CDockPropApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CDockPropApp initialization + +BOOL CDockPropApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + LoadStdProfileSettings(); // 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_DOCKPRTYPE, + RUNTIME_CLASS(CDockPropDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CDockPropView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CDockPropApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CDockPropApp commands + +int CDockPropApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsp new file mode 100644 index 0000000..51d0154 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsp @@ -0,0 +1,445 @@ +# Microsoft Developer Studio Project File - Name="DockProp" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DockProp - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DockProp.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DockProp.mak" CFG="DockProp - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DockProp - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DockProp - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DockProp - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "DockProp - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "DockProp - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DockProp - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"DockProp.exe" + +!ELSEIF "$(CFG)" == "DockProp - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"DockProp.exe" + +!ELSEIF "$(CFG)" == "DockProp - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "DockProp" +# PROP BASE Intermediate_Dir "DockProp" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"DockProp.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"DockProp.exe" + +!ELSEIF "$(CFG)" == "DockProp - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DockPro0" +# PROP BASE Intermediate_Dir "DockPro0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"DockProp.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"DockProp.exe" + +!ELSEIF "$(CFG)" == "DockProp - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "DockPro1" +# PROP BASE Intermediate_Dir "DockPro1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"DockProp.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"DockProp.exe" + +!ENDIF + +# Begin Target + +# Name "DockProp - Win32 Release" +# Name "DockProp - Win32 Debug" +# Name "DockProp - Win32 Release_Shared" +# Name "DockProp - Win32 Unicode_Debug" +# Name "DockProp - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDckPPg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDckPSh.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDlgBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\DockProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\DockProp.rc +# End Source File +# Begin Source File + +SOURCE=.\DockPropDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\DockPropView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MeasPage.cpp +# End Source File +# Begin Source File + +SOURCE=.\MeasSht.cpp +# End Source File +# Begin Source File + +SOURCE=.\SctPage.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\DockProp.h +# End Source File +# Begin Source File + +SOURCE=.\DockPropDoc.h +# End Source File +# Begin Source File + +SOURCE=.\DockPropView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\measpage.h +# End Source File +# Begin Source File + +SOURCE=.\MeasSht.h +# End Source File +# Begin Source File + +SOURCE=.\SctPage.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\DockProp.ico +# End Source File +# Begin Source File + +SOURCE=.\res\DockProp.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\DockPropDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\DockProp.exe.manifest +# End Source File +# End Target +# End Project +# Section OLE Controls +# {A8C3B720-0B5A-101B-B22E-00AA0037B2FC} +# End Section +# Section DockProp : {F4392540-0CFE-101B-B22E-00AA0037B2FC} +# 2:5:Class:CGridCtrl +# 2:10:HeaderFile:gridctrl.h +# 2:8:ImplFile:gridctrl.cpp +# End Section +# Section DockProp : {A8C3B720-0B5A-101B-B22E-00AA0037B2FC} +# 0:12:GridCtrl.cpp:C:\octoclss\SAMPLES\DockProp\GridCtrl.cpp +# 0:9:Picture.h:C:\octoclss\SAMPLES\DockProp\Picture.h +# 0:8:Font.cpp:C:\octoclss\SAMPLES\DockProp\Font.cpp +# 0:6:Font.h:C:\octoclss\SAMPLES\DockProp\Font.h +# 0:10:GridCtrl.h:C:\octoclss\SAMPLES\DockProp\GridCtrl.h +# 0:11:Picture.cpp:C:\octoclss\SAMPLES\DockProp\Picture.cpp +# 2:21:DefaultSinkHeaderFile:gridctrl.h +# 2:16:DefaultSinkClass:CGridCtrl +# End Section +# Section DockProp : {BEF6E003-A874-101A-8BBA-00AA00300CAB} +# 2:5:Class:COleFont +# 2:10:HeaderFile:font.h +# 2:8:ImplFile:font.cpp +# End Section +# Section DockProp : {7BF80981-BF32-101A-8BBB-00AA00300CAB} +# 2:5:Class:CPicture +# 2:10:HeaderFile:picture.h +# 2:8:ImplFile:picture.cpp +# End Section diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsw new file mode 100644 index 0000000..d6f5f79 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DockProp"=".\DockProp.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/DockProp", HKHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.h new file mode 100644 index 0000000..a44ef66 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.h @@ -0,0 +1,39 @@ +// DockProp.h : main header file for the DOCKPROP application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CDockPropApp: +// See DockProp.cpp for the implementation of this class +// + +class CDockPropApp : public CWinApp +{ +public: + CDockPropApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDockPropApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CDockPropApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.rc new file mode 100644 index 0000000..cc28845 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.rc @@ -0,0 +1,451 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\DockProp.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" + "#include ""OXFrameWndDock.rc""\r\n" + "#endif\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\\DockProp.ico" +IDR_DOCKPRTYPE ICON "res\\DockPropDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "Property Sheet", ID_PROPERTYSHEETBAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About DockProp...", ID_APP_ABOUT + END +END + +IDR_DOCKPRTYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "Property Sheet", ID_PROPERTYSHEETBAR + 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 DockProp...", 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_DOCKPROP_FORM DIALOG 0, 0, 185, 93 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT1,16,18,20,13,ES_AUTOHSCROLL + PUSHBUTTON "Set Active",IDC_BUTTON1,43,17,51,14 + EDITTEXT IDC_EDIT2,16,36,19,13,ES_AUTOHSCROLL + PUSHBUTTON "Delete Page",IDC_BUTTON2,44,36,51,14 + PUSHBUTTON "Add Page",IDC_BUTTON3,44,57,51,14 +END + +IDD_SECTION DIALOG 0, 0, 160, 79 +STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CAPTION +CAPTION "Section" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "X",IDC_X,"Button",BS_AUTORADIOBUTTON | WS_GROUP,15,14,26,12 + CONTROL "Y",IDC_Y,"Button",BS_AUTORADIOBUTTON,15,33,26,12 + CONTROL "Z",IDC_Z,"Button",BS_AUTORADIOBUTTON,15,52,26,12 + CONTROL "Slider1",IDC_SLIDER,"msctls_trackbar32",TBS_TOP | WS_GROUP | WS_TABSTOP,50,1,109,22 + EDITTEXT IDC_CUTVALUE,52,29,57,12,ES_AUTOHSCROLL + CONTROL "View Section Only",IDC_VIEW_SECTION_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,47,76,8 + CONTROL "Section Cut",IDC_SECTION_CUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,64,54,8 + PUSHBUTTON "Rotate",IDC_ROTATE_VIEW,112,60,43,14 + GROUPBOX "Section",IDC_STATIC,7,0,37,74 + LTEXT "Inches",IDC_UNITS,118,33,23,8 +END + +IDD_MEASURE DIALOG 0, 0, 160, 78 +STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CAPTION +CAPTION "Measurement" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Spin1",IDC_SPINP2P,"msctls_updown32",UDS_ARROWKEYS | UDS_HORZ,13,15,22,10 + CONTROL "Show Section",IDC_SHOW_SECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,51,56,10 + CONTROL "Snap to section",IDC_SNAP_SECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,28,63,10 + LTEXT "Point index",IDC_STATIC,41,15,36,8 + GROUPBOX "Fine point selection",IDC_STATIC,10,2,139,42 +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 "040904B0" + BEGIN + VALUE "FileDescription", "DOCKPROP MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "DOCKPROP" + VALUE "LegalCopyright", "Copyright © 1996" + VALUE "OriginalFilename", "DOCKPROP.EXE" + VALUE "ProductName", "DOCKPROP Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DOCKPROP_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 86 + END + + IDD_SECTION, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 155 + BOTTOMMARGIN, 74 + END + + IDD_MEASURE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 153 + BOTTOMMARGIN, 73 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "DockProp" + IDR_DOCKPRTYPE "\nDockPr\nDockPr\n\n\nDockProp.Document\nDockPr Document" + IDS_MEASURE "Measurement" + IDS_SECTION "Sections" + ID_DESCRIPTION_FILE "dockOropInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "DockProp" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\DockProp.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXFrameWndDock.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.sln new file mode 100644 index 0000000..7b52870 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DockProp", "DockProp.vcproj", "{4478DBB5-40DD-4FE8-B236-9B7663BB531A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Debug|Win32.Build.0 = Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release|Win32.ActiveCfg = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Release|Win32.Build.0 = Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {4478DBB5-40DD-4FE8-B236-9B7663BB531A}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.vcproj new file mode 100644 index 0000000..dff3cc4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockProp.vcproj @@ -0,0 +1,2475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.cpp new file mode 100644 index 0000000..9ee1d35 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.cpp @@ -0,0 +1,82 @@ +// DockPropDoc.cpp : implementation of the CDockPropDoc class +// + +#include "stdafx.h" +#include "DockProp.h" + +#include "DockPropDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDockPropDoc + +IMPLEMENT_DYNCREATE(CDockPropDoc, CDocument) + +BEGIN_MESSAGE_MAP(CDockPropDoc, CDocument) + //{{AFX_MSG_MAP(CDockPropDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDockPropDoc construction/destruction + +CDockPropDoc::CDockPropDoc() +{ + // TODO: add one-time construction code here + +} + +CDockPropDoc::~CDockPropDoc() +{ +} + +BOOL CDockPropDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CDockPropDoc serialization + +void CDockPropDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CDockPropDoc diagnostics + +#ifdef _DEBUG +void CDockPropDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CDockPropDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CDockPropDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.h new file mode 100644 index 0000000..4b77fdc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropDoc.h @@ -0,0 +1,44 @@ +// DockPropDoc.h : interface of the CDockPropDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CDockPropDoc : public CDocument +{ +protected: // create from serialization only + CDockPropDoc(); + DECLARE_DYNCREATE(CDockPropDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDockPropDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDockPropDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CDockPropDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropInfo.rtf new file mode 100644 index 0000000..3757a9c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.cpp new file mode 100644 index 0000000..3f1af92 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.cpp @@ -0,0 +1,146 @@ +// DockPropView.cpp : implementation of the CDockPropView class +// + +#include "stdafx.h" +#include "DockProp.h" + +#include "DockPropDoc.h" +#include "DockPropView.h" +#include "mainfrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDockPropView + +IMPLEMENT_DYNCREATE(CDockPropView, CFormView) + +BEGIN_MESSAGE_MAP(CDockPropView, CFormView) + //{{AFX_MSG_MAP(CDockPropView) + ON_BN_CLICKED(IDC_BUTTON1, OnButton1) + ON_BN_CLICKED(IDC_BUTTON2, OnButton2) + ON_BN_CLICKED(IDC_BUTTON3, OnButton3) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDockPropView construction/destruction + +CDockPropView::CDockPropView() + : CFormView(CDockPropView::IDD) +{ + //{{AFX_DATA_INIT(CDockPropView) + m_nSetActive = 0; + m_nDelPage = 0; + //}}AFX_DATA_INIT + // TODO: add construction code here + +} + +CDockPropView::~CDockPropView() +{ +} + +void CDockPropView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDockPropView) + DDX_Text(pDX, IDC_EDIT1, m_nSetActive); + DDX_Text(pDX, IDC_EDIT2, m_nDelPage); + //}}AFX_DATA_MAP +} + +BOOL CDockPropView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFormView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CDockPropView printing + +BOOL CDockPropView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CDockPropView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CDockPropView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +void CDockPropView::OnPrint(CDC* pDC, CPrintInfo*) +{ + // TODO: add code to print the controls + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CDockPropView diagnostics + +#ifdef _DEBUG +void CDockPropView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CDockPropView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CDockPropDoc* CDockPropView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDockPropDoc))); + return (CDockPropDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CDockPropView message handlers + +void CDockPropView::OnButton1() +{ + if (UpdateData(TRUE)) + ((CMainFrame*)AfxGetMainWnd())->m_wndMeasureBar.SetActivePage(m_nSetActive); + +} + +void CDockPropView::OnButton2() +{ + if (UpdateData(TRUE)) + ((CMainFrame*)AfxGetMainWnd())->m_wndMeasureBar.RemovePage(m_nDelPage); + +} + +void CDockPropView::OnButton3() +{ + ((CMainFrame*)AfxGetMainWnd())->m_wndMeasureBar.AddOnePage(); + ((CMainFrame*)AfxGetMainWnd())-> + m_wndMeasureBar.SetActivePage(((CMainFrame*)AfxGetMainWnd())-> + m_wndMeasureBar.GetPageCount()-1); +} + +void CDockPropView::OnInitialUpdate() +{ + CFormView::OnInitialUpdate(); + + ResizeParentToFit(FALSE); + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.h new file mode 100644 index 0000000..7cdf2bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/DockPropView.h @@ -0,0 +1,64 @@ +// DockPropView.h : interface of the CDockPropView class +// +///////////////////////////////////////////////////////////////////////////// + +class CDockPropView : public CFormView +{ +protected: // create from serialization only + CDockPropView(); + DECLARE_DYNCREATE(CDockPropView) + +public: + //{{AFX_DATA(CDockPropView) + enum { IDD = IDD_DOCKPROP_FORM }; + int m_nSetActive; + int m_nDelPage; + //}}AFX_DATA + +// Attributes +public: + CDockPropDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDockPropView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnPrint(CDC* pDC, CPrintInfo*); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDockPropView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CDockPropView) + afx_msg void OnButton1(); + afx_msg void OnButton2(); + afx_msg void OnButton3(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in DockPropView.cpp +inline CDockPropDoc* CDockPropView::GetDocument() + { return (CDockPropDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.cpp new file mode 100644 index 0000000..d9d5eef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.cpp @@ -0,0 +1,105 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "resource.h" +#include "DockProp.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, COXMDIFrameWndSizeDock) + +BEGIN_MESSAGE_MAP(CMainFrame, COXMDIFrameWndSizeDock) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP + // standard on/off control bar handlers for View menu. + ON_UPDATE_COMMAND_UI(ID_PROPERTYSHEETBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_PROPERTYSHEETBAR, OnBarCheck) +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() +: m_wndMeasureBar() +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXMDIFrameWndSizeDock::OnCreate(lpCreateStruct) == -1) + return -1; + + 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 + } + + if (!m_wndMeasureBar.Create(this, CBRS_RIGHT, + WS_CHILD | WS_VISIBLE | TCS_TABS | TCS_SINGLELINE | TCS_RAGGEDRIGHT, + ID_PROPERTYSHEETBAR)) + { + TRACE0("Failed to create Dialogbar\n"); + return -1; // fail to create + } + + EnableDocking(CBRS_ALIGN_ANY); + // TODO: Delete these three lines if you don't want the measurebar to + // be dockable + m_wndMeasureBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndMeasureBar); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return COXMDIFrameWndSizeDock::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + COXMDIFrameWndSizeDock::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + COXMDIFrameWndSizeDock::Dump(dc); +} + +#endif //_DEBUG + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.h new file mode 100644 index 0000000..f2fb9df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MainFrm.h @@ -0,0 +1,46 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#include "meassht.h" +#include "OXFrameWndDock.h" + +class CMainFrame : public COXMDIFrameWndSizeDock +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + CMeasureSheet m_wndMeasureBar; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasPage.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasPage.cpp new file mode 100644 index 0000000..d5be967 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasPage.cpp @@ -0,0 +1,69 @@ +// MeasurePage.cpp : implementation file +// + +#include "stdafx.h" +#include "MeasPage.h" +#include "resource.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +extern long ISU; + +///////////////////////////////////////////////////////////////////////////// +// CMeasurePage dialog + +BEGIN_MESSAGE_MAP(CMeasurePage, COXDockPropertyPage) + //{{AFX_MSG_MAP(CMeasurePage) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +CMeasurePage::CMeasurePage(BOOL bDynamic /* =FALSE */) + : COXDockPropertyPage(IDS_MEASURE, bDynamic) +{ + m_nID = CMeasurePage::IDD; + //{{AFX_DATA_INIT(CMeasurePage) + m_bShowSection = TRUE; + m_bSnapSection = FALSE; + //}}AFX_DATA_INIT +} + + +void CMeasurePage::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMeasurePage) + DDX_Control(pDX, IDC_SNAP_SECTION, m_snapSection); + DDX_Control(pDX, IDC_SHOW_SECTION, m_showSection); + DDX_Control(pDX, IDC_SPINP2P, m_spinP2P); + DDX_Check(pDX, IDC_SHOW_SECTION, m_bShowSection); + DDX_Check(pDX, IDC_SNAP_SECTION, m_bSnapSection); + //}}AFX_DATA_MAP +} + +BOOL CMeasurePage::OnInitDialog() +{ + if (COXDockPropertyPage::OnInitDialog()==FALSE) + return FALSE; + + return TRUE; // return TRUE unless you set the focus to a control +} + + +///////////////////////////////////////////////////////////////////////////// +// CMeasurePage message handlers + +BOOL CMeasurePage::OnSetActive( ) +{ + return COXDockPropertyPage::OnSetActive();; +} + +BOOL CMeasurePage::OnKillActive() +{ + return COXDockPropertyPage::OnKillActive();; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.cpp new file mode 100644 index 0000000..6612c96 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.cpp @@ -0,0 +1,44 @@ +// ========================================================================== +// Class Implementation : CMeasureSheet +// ========================================================================== + +// Source file : MeasSht.cpp + +//=================== Dundas Software =================================== +// +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" // standard MFC include +#include "MeasSht.h" // class specification +#include "resource.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMeasureSheet + +BEGIN_MESSAGE_MAP(CMeasureSheet, COXDockPropertySheet) + //{{AFX_MSG_MAP(CMeasureSheet) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +CMeasureSheet::CMeasureSheet() : + COXDockPropertySheet(_T("Measure Tools")), + m_measurePage(), + m_sectionPage() + { + AddPage(&m_measurePage); + AddPage(&m_sectionPage); + } + + +void CMeasureSheet::AddOnePage() + { + CMeasurePage* pNewMeasurePage = new CMeasurePage(TRUE); + AddPage(pNewMeasurePage, TRUE); + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.h new file mode 100644 index 0000000..7ff848e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/MeasSht.h @@ -0,0 +1,81 @@ +// ========================================================================== +// Class Specification : CMeasureSheet +// ========================================================================== + +// Header file : MeasSht.h + + +//=================== Dundas Software =================================== +// +// ////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXDockPropertySheet + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class combines the functionality of a tabbed property sheet and a +// dockable dialog bar + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __MEASSHT_H__ +#define __MEASSHT_H__ + +#include "OXDckPSh.h" +#include "measpage.h" +#include "sctpage.h" + +class CMeasureSheet : public COXDockPropertySheet +{ +// Data Members + +public: + CMeasurePage m_measurePage; + CSectionPage m_sectionPage; + + //{{AFX_DATA(CMeasureSheet) + //}}AFX_DATA + +protected: + +private: + +// Member Functions +public: + CMeasureSheet(); +// BOOL Create(CWnd* pParentWnd, UINT nStyle); + void AddOnePage(); + +protected: + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMeasureSheet) + //}}AFX_VIRTUAL + + // Generated message map functions + //{{AFX_MSG(CMeasureSheet) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + + +}; + +#endif //__MEASSHT_H__ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.cpp new file mode 100644 index 0000000..2976629 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.cpp @@ -0,0 +1,78 @@ +// SlcPage.cpp : implementation file +// + +#include "stdafx.h" +#include "SctPage.h" + +#define SECTION_APPLY_TIMER_ID 15 +#define SECTION_APPLY_TIME 800 + + +extern long ISU; + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// CSlicePage dialog + + +CSectionPage::CSectionPage() : + COXDockPropertyPage(IDS_SECTION) +{ + m_nID = CSectionPage::IDD; + //{{AFX_DATA_INIT(CSectionPage) + m_fPosValue = 1.0f; + m_nSection = 0; + //}}AFX_DATA_INIT +} + + +void CSectionPage::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSectionPage) + DDX_Control(pDX, IDC_SLIDER, m_slider); + DDX_Text(pDX, IDC_CUTVALUE, m_fPosValue); + DDX_Radio(pDX, IDC_X, m_nSection); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CSectionPage, CDialog) + //{{AFX_MSG_MAP(CSectionPage) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSlicePage message handlers + +BOOL CSectionPage::OnInitDialog() +{ + COXDockPropertyPage::OnInitDialog(); + + m_slider.ClearTics(); + m_slider.SetRange(0,100); + m_slider.SetLineSize(1); + m_slider.SetPageSize(10); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + + +BOOL CSectionPage::OnSetActive( ) +{ + return COXDockPropertyPage::OnSetActive(); + +} + +BOOL CSectionPage::OnKillActive( ) +{ + return COXDockPropertyPage::OnKillActive();; + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.h new file mode 100644 index 0000000..313653a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SctPage.h @@ -0,0 +1,118 @@ +// SctPage.h : header file +// + +#ifndef __SCTPAGE_H_ +#define __SCTPAGE_H_ + +#include "OXDckPPg.h" +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// SSectionParms struct + +struct SSectionParms +{ + long lXMin; + long lYMin; + long lZMin; + + long lXMax; + long lYMax; + long lZMax; + + long lXPosValue; + long lYPosValue; + long lZPosValue; + + enum EHint + { + hAll, + hPosition, + hSection + }; + + enum ESection + { + sX, + sY, + sZ + } eSection; + + SSectionParms() : + eSection(sX), + lXMin(0), + lYMin(0), + lZMin(0), + lXMax(0), + lYMax(0), + lZMax(0), + lXPosValue(0), + lYPosValue(0), + lZPosValue(0) + {} + void operator=(const SSectionParms& parms) { + eSection = parms.eSection; + lXMin = parms.lXMin; + lYMin = parms.lYMin; + lZMin = parms.lZMin; + lXMax = parms.lXMax; + lYMax = parms.lYMax; + lZMax = parms.lZMax; + lXPosValue = parms.lXPosValue; + lYPosValue = parms.lYPosValue; + lZPosValue = parms.lZPosValue;} +}; + +///////////////////////////////////////////////////////////////////////////// +// CSlicePage dialog + +class CSectionPage : public COXDockPropertyPage +{ +// Data Members +public: + +protected: + SSectionParms m_parms; + + //{{AFX_DATA(CSectionPage) + enum { IDD = IDD_SECTION }; + CSliderCtrl m_slider; + float m_fPosValue; + int m_nSection; + //}}AFX_DATA + + +private: + +// Member Functions +public: + CSectionPage(); + virtual BOOL OnSetActive( ); + virtual BOOL OnKillActive( ); + + void SetParms(const SSectionParms& parms, SSectionParms::EHint eHint = SSectionParms::hAll); + void GetParms(SSectionParms& parms, SSectionParms::EHint eHint = SSectionParms::hAll); + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSectionPage) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +protected: + // Generated message map functions + //{{AFX_MSG(CSectionPage) + afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); + afx_msg void OnChangeCutvalue(); + virtual BOOL OnInitDialog(); + afx_msg void OnSliceApply(); + afx_msg void OnSectionSelect(); + afx_msg void OnTimer( UINT ); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + +}; + +#endif // __SLCPAGE_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.cpp new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.cpp @@ -0,0 +1,43 @@ +// SectBar.cpp : implementation file +// + +#include "stdafx.h" +#include "dockprop.h" +#include "SectBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSectBar dialog + + +CSectBar::CSectBar(CWnd* pParent /*=NULL*/) + : CDialogBar() +{ + //{{AFX_DATA_INIT(CSectBar) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CSectBar::DoDataExchange(CDataExchange* pDX) +{ + CDialogBar::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSectBar) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CSectBar, CDialogBar) + //{{AFX_MSG_MAP(CSectBar) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSectBar message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.h new file mode 100644 index 0000000..ab24b17 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/SectBar.h @@ -0,0 +1,35 @@ +// SectBar.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CSectBar dialog + +class CSectBar : public CDialogBar +{ +// Construction +public: + CSectBar(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSectBar) + enum { IDD = IDD_SECTDLG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSectBar) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CSectBar) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.cpp new file mode 100644 index 0000000..a651f57 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// DockProp.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.h new file mode 100644 index 0000000..cb58e9f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/StdAfx.h @@ -0,0 +1,13 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC support for Windows 95 Common Controls +#include // MFC support for Windows 95 Common Controls + +#include + +#include "OXAdvancedAssert.h" \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/measpage.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/measpage.h new file mode 100644 index 0000000..e5e8c67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/measpage.h @@ -0,0 +1,89 @@ +// MeasurePage.h : header file +// + +#ifndef __MEASPAGE_H_ +#define __MEASPAGE_H_ + +#include "OXDckPPg.h" +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// SMeasureParms struct + +struct SMeasureParms +{ + BOOL bShowSection; + BOOL bSnapSection; + enum EMeasureType + { + mtNothing = 0, + mtP2P, + mtLine, + mtArc, + mtAngle + } eMeasureType; + + enum EHint + { + hAll + }; + + SMeasureParms() : + bShowSection(FALSE), + bSnapSection(FALSE), + eMeasureType(mtNothing) + {} +}; + +///////////////////////////////////////////////////////////////////////////// +// CMeasurePage dialog + +class CMeasurePage : public COXDockPropertyPage +{ +// Data Members +public: + +protected: +// CMeasureBar m_toolBar; + //{{AFX_DATA(CMeasurePage) + enum { IDD = IDD_MEASURE }; + CButton m_snapSection; + CButton m_showSection; + CSpinButtonCtrl m_spinP2P; + BOOL m_bShowSection; + BOOL m_bSnapSection; + //}}AFX_DATA + +private: + +//Member Functions +public: + CMeasurePage(BOOL bDynamic = FALSE); + virtual BOOL OnSetActive(); + virtual BOOL OnKillActive(); + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMeasurePage) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnInitDialog(); + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CMeasurePage) + afx_msg void OnP2P(); + afx_msg void OnAngle(); + afx_msg void OnArc(); + afx_msg void OnLine(); + afx_msg void OnShowSection(); + afx_msg void OnSnapSection(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: +}; + +#endif // __MEASPAGE_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.rc2 new file mode 100644 index 0000000..529dd58 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockProp.rc2 @@ -0,0 +1,13 @@ +// +// DOCKPROP.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockPropDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockPropDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/DockPropDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/resource.h new file mode 100644 index 0000000..1f7b4f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockProp/resource.h @@ -0,0 +1,44 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by DockProp.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_DOCKPROP_FORM 101 +#define IDR_MAINFRAME 128 +#define IDR_DOCKPRTYPE 129 +#define IDS_MEASURE 130 +#define IDS_SECTION 131 +#define ID_DESCRIPTION_FILE 132 +#define IDD_SECTION 140 +#define IDD_MEASURE 141 +#define IDC_X 1000 +#define IDC_EDIT1 1000 +#define IDC_Y 1001 +#define IDC_BUTTON1 1001 +#define IDC_Z 1002 +#define IDC_EDIT2 1002 +#define IDC_BUTTON2 1003 +#define IDC_BUTTON3 1004 +#define IDC_GRID1 1006 +#define IDC_SLIDER 1013 +#define IDC_CUTVALUE 1015 +#define IDC_SPINP2P 1020 +#define IDC_SHOW_SECTION 1024 +#define IDC_SNAP_SECTION 1025 +#define IDC_UNITS 1055 +#define IDC_VIEW_SECTION_ONLY 1057 +#define IDC_SECTION_CUT 1058 +#define IDC_ROTATE_VIEW 1059 +#define ID_PROPERTYSHEETBAR 0xe880 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32776 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.CPP new file mode 100644 index 0000000..ed847c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.CPP @@ -0,0 +1,82 @@ +// docktdoc.cpp : implementation of the CDocktestDoc class +// +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" + +#include "docktdoc.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDocktestDoc + +IMPLEMENT_DYNCREATE(CDocktestDoc, CDocument) + +BEGIN_MESSAGE_MAP(CDocktestDoc, CDocument) + //{{AFX_MSG_MAP(CDocktestDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDocktestDoc construction/destruction + +CDocktestDoc::CDocktestDoc() +{ + // TODO: add one-time construction code here + +} + +CDocktestDoc::~CDocktestDoc() +{ +} + +BOOL CDocktestDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestDoc serialization + +void CDocktestDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestDoc diagnostics + +#ifdef _DEBUG +void CDocktestDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CDocktestDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CDocktestDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.H new file mode 100644 index 0000000..33864a5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTDOC.H @@ -0,0 +1,44 @@ +// docktdoc.h : interface of the CDocktestDoc class +// +// Docktest demo of Dockable Views functionality + +class CDocktestDoc : public CDocument +{ +protected: // create from serialization only + CDocktestDoc(); + DECLARE_DYNCREATE(CDocktestDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDocktestDoc) + public: + virtual BOOL OnNewDocument(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDocktestDoc(); + virtual void Serialize(CArchive& ar); // overridden for document i/o +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CDocktestDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.CLW b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.CLW new file mode 100644 index 0000000..d0b4101 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.CLW @@ -0,0 +1,201 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMainFrame +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "docktest.h" +LastPage=0 + +ClassCount=8 +Class1=CDockChildWnd +Class2=CDocktestDoc +Class3=CDocktestApp +Class4=CAboutDlg +Class5=CDocktestView +Class6=CLogoDlg +Class7=CMainFrame +Class8=CMyListBoxBar + +ResourceCount=6 +Resource1=IDD_ABOUTBOX (English (U.K.)) +Resource2=IDR_DOCKTETYPE (English (U.K.)) +Resource3=IDD_DIALOGBAR (English (U.K.)) +Resource4=IDR_MAINFRAME (English (U.K.)) +Resource5=IDD_DIALOGBAR2 (English (U.K.)) +Resource6=IDD_DIALOGBAR3 (English (U.K.)) + +[CLS:CDockChildWnd] +Type=0 +BaseClass=COXMDIChildWndSizeDock +HeaderFile=DOCKCHIL.H +ImplementationFile=DOCKCHIL.CPP +Filter=M +VirtualFilter=mfWC +LastObject=CDockChildWnd + +[CLS:CDocktestDoc] +Type=0 +BaseClass=CDocument +HeaderFile=DOCKTDOC.H +ImplementationFile=DOCKTDOC.CPP + +[CLS:CDocktestApp] +Type=0 +BaseClass=CWinApp +HeaderFile=DOCKTEST.H +ImplementationFile=DOCKTEST.CPP +Filter=N +VirtualFilter=AC +LastObject=CDocktestApp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=DOCKTEST.CPP +ImplementationFile=DOCKTEST.CPP +LastObject=ID_LISTBOXBAR + +[CLS:CDocktestView] +Type=0 +BaseClass=CView +HeaderFile=DOCKTVW.H +ImplementationFile=DOCKTVW.CPP + +[CLS:CLogoDlg] +Type=0 +BaseClass=COXSizeDialogBar +HeaderFile=LogoDlg.h +ImplementationFile=LogoDlg.cpp +LastObject=CLogoDlg + +[CLS:CMainFrame] +Type=0 +BaseClass=MainFrameParent +HeaderFile=MAINFRM.H +ImplementationFile=MAINFRM.CPP +LastObject=CMainFrame +Filter=W +VirtualFilter=fWC + +[CLS:CMyListBoxBar] +Type=0 +BaseClass=COXSizeControlBar +HeaderFile=MYSIZEBA.H +ImplementationFile=MYSIZEBA.CPP + +[DLG:IDD_DIALOGBAR3] +Type=1 +Class=CLogoDlg + +[DLG:IDD_DIALOGBAR (English (U.K.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,button,1342177287 +Control2=IDC_BUTTON1,button,1342242816 +Control3=IDC_COMBO1,combobox,1344340226 +Control4=IDC_STATIC,static,1342177283 + +[DLG:IDD_DIALOGBAR2 (English (U.K.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_EDIT1,edit,1350631552 +Control2=IDC_BUTTON1,button,1342242816 +Control3=IDC_STATIC,static,1342177283 +Control4=IDC_STATIC,button,1342177287 + +[DLG:IDD_DIALOGBAR3 (English (U.K.))] +Type=1 +Class=? +ControlCount=5 +Control1=IDC_OXBUTTON,button,1342243595 +Control2=IDC_EDIT1,edit,1350631552 +Control3=IDC_BUTTON1,button,1342242816 +Control4=IDC_STATIC,static,1342177283 +Control5=IDC_STATIC,button,1342177287 + +[MNU:IDR_DOCKTETYPE (English (U.K.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_STATUS_BAR +Command16=ID_SIZEDLGBAR +Command17=ID_LOGOBAR +Command18=ID_FIXEDDLGBAR +Command19=ID_LISTBOXBAR +Command20=ID_VIEW_TILEDOCKBARS +Command21=ID_ArrangeTopLeft +Command22=ID_ArrangeTopRight +Command23=ID_ArrangeBottomLeft +Command24=ID_ArrangeBottomRight +Command25=ID_WINDOW_NEW +Command26=ID_WINDOW_CASCADE +Command27=ID_WINDOW_TILE_HORZ +Command28=ID_WINDOW_ARRANGE +Command29=ID_APP_ABOUT +CommandCount=29 + +[MNU:IDR_MAINFRAME (English (U.K.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_STATUS_BAR +Command7=ID_SIZEDLGBAR +Command8=ID_FIXEDDLGBAR +Command9=ID_LISTBOXBAR +Command10=ID_VIEW_TILEDOCKBARS +Command11=ID_ArrangeTopLeft +Command12=ID_ArrangeTopRight +Command13=ID_ArrangeBottomLeft +Command14=ID_ArrangeBottomRight +Command15=ID_APP_ABOUT +CommandCount=15 + +[ACL:IDR_MAINFRAME (English (U.K.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.K.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342308352 +Control2=IDOK,button,1342373889 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.H new file mode 100644 index 0000000..9e466a7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTEST.H @@ -0,0 +1,39 @@ +// docktest.h : main header file for the DOCKTEST application +// +// Docktest demo of Dockable Views functionality + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CDocktestApp: +// See docktest.cpp for the implementation of this class +// + +class CDocktestApp : public CWinApp +{ +public: + CDocktestApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDocktestApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CDocktestApp) + afx_msg void OnAppAbout(); + afx_msg void OnFileNew(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.CPP new file mode 100644 index 0000000..fc5072d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.CPP @@ -0,0 +1,104 @@ +// docktvw.cpp : implementation of the CDocktestView class +// +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" + +#include "docktdoc.h" +#include "docktvw.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView + +IMPLEMENT_DYNCREATE(CDocktestView, CView) + +BEGIN_MESSAGE_MAP(CDocktestView, CView) + //{{AFX_MSG_MAP(CDocktestView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView construction/destruction + +CDocktestView::CDocktestView() +{ + // TODO: add construction code here + +} + +CDocktestView::~CDocktestView() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView drawing + +void CDocktestView::OnDraw(CDC* pDC) +{ + CDocktestDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + CRect rectClient, rect; + CString sMsg; +// int nNewLines, i; + + sMsg = _T("Do you like the current Visual C++ IDE ?\nTry to move everything around and see for yourself\nNote the toolbar in this MDIChild Frame"); + + GetClientRect(&rectClient); +// CSize szText = pDC->GetTextExtent(message); + pDC->DrawText(sMsg, rectClient, DT_CENTER | DT_VCENTER); +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView printing + +BOOL CDocktestView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CDocktestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CDocktestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView diagnostics + +#ifdef _DEBUG +void CDocktestView::AssertValid() const +{ + CView::AssertValid(); +} + +void CDocktestView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CDocktestDoc* CDocktestView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDocktestDoc))); + return (CDocktestDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CDocktestView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.H new file mode 100644 index 0000000..729f6d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/DOCKTVW.H @@ -0,0 +1,54 @@ +// docktvw.h : interface of the CDocktestView class +// +// Docktest demo of Dockable Views functionality +///////////////////////////////////////////////////////////////////////////// + +class CDocktestView : public CView +{ +protected: // create from serialization only + CDocktestView(); + DECLARE_DYNCREATE(CDocktestView) + +// Attributes +public: + CDocktestDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDocktestView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDocktestView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CDocktestView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in docktvw.cpp +inline CDocktestDoc* CDocktestView::GetDocument() + { return (CDocktestDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.cpp new file mode 100644 index 0000000..0f0a263 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.cpp @@ -0,0 +1,160 @@ +// dockchil.cpp : implementation file +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" +#include "mysizeba.h" + +#include "dockchil.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDockChildWnd + +IMPLEMENT_DYNCREATE(CDockChildWnd, COXMDIChildWndSizeDock) + +CDockChildWnd::CDockChildWnd() +{ + nListBarID=2222; +} + +CDockChildWnd::~CDockChildWnd() +{ +} + + +BEGIN_MESSAGE_MAP(CDockChildWnd, COXMDIChildWndSizeDock) + //{{AFX_MSG_MAP(CDockChildWnd) + ON_WM_CREATE() + ON_WM_DESTROY() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CDockChildWnd message handlers +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE allbuttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +int CDockChildWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXMDIChildWndSizeDock::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndChildStatusBar.Create(this) || + !m_wndChildStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) || + !m_wndToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT))) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + m_wndToolBar.SetBitmapIds(allbuttons, sizeof(allbuttons)/sizeof(UINT)); + + EnableDocking(CBRS_ALIGN_ANY); + + VERIFY(CreateListBar(&m_SizeListBar)); + VERIFY(CreateListBar(&m_SizeListBarAdd1)); + VERIFY(CreateListBar(&m_SizeListBarAdd2)); + VERIFY(CreateListBar(&m_SizeListBarAdd3)); + VERIFY(CreateListBar(&m_SizeListBarAdd4)); + + LoadSizeBarState(_T("ChildDocktestBars")); + + return 0; +} + + + +BOOL CDockChildWnd::PreCreateWindow(CREATESTRUCT& cs) +{ + //cs.style&=~WS_SYSMENU; + + return COXMDIChildWndSizeDock::PreCreateWindow(cs); +} + +BOOL CDockChildWnd::CreateListBar(CMyListBoxBar* pBar) +{ + // This is a list box that is added dynamically. You can have almost any + // number of these... + nListBarID++; + if (!pBar->Create(this,_T("ListBar"),nListBarID)) + { + TRACE(_T("Failed to create list box bar\n")); + return FALSE; + } + + pBar->SetBarStyle(pBar->GetBarStyle() | + SZBARF_STDMOUSECLICKS/* | SZBARF_ALLOW_MDI_FLOAT*/); + + pBar->EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(pBar, AFX_IDW_DOCKBAR_BOTTOM); + + return TRUE; +} + +void CDockChildWnd::ActivateFrame(int nCmdShow) +{ + // TODO: Add your specialized code here and/or call the base class + + COXMDIChildWndSizeDock::ActivateFrame(nCmdShow); + +// LoadSizeBarState(_T("ChildDocktestBars")); + +} + +void CDockChildWnd::OnDestroy() +{ + SaveSizeBarState(_T("ChildDocktestBars")); + + COXMDIChildWndSizeDock::OnDestroy(); + + // TODO: Add your message handler code here + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.h new file mode 100644 index 0000000..01ebb59 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Dockchil.h @@ -0,0 +1,60 @@ +// dockchil.h : header file +// +// Docktest demo of Dockable Views functionality + +///////////////////////////////////////////////////////////////////////////// +// CDockChildWnd frame + +#include "OXFrameWndDock.h" +//#include "OXSizeToolBar.h" +#include "OXCoolToolBar.h" + +class CDockChildWnd : public COXMDIChildWndSizeDock +{ + DECLARE_DYNCREATE(CDockChildWnd) +protected: + CDockChildWnd(); // protected constructor used by dynamic creation + +// Attributes +public: +// CToolBar m_wndToolBar; +// COXSizeToolBar m_wndToolBar; + COXCoolToolBar m_wndToolBar; + CStatusBar m_wndChildStatusBar; + CMyListBoxBar m_SizeListBar; + CMyListBoxBar m_SizeListBarAdd1; + CMyListBoxBar m_SizeListBarAdd2; + CMyListBoxBar m_SizeListBarAdd3; + CMyListBoxBar m_SizeListBarAdd4; + +protected: + int nListBarID; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDockChildWnd) + public: + virtual void ActivateFrame(int nCmdShow = -1); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CDockChildWnd(); + + BOOL CreateListBar(CMyListBoxBar* pBar); + + // Generated message map functions + //{{AFX_MSG(CDockChildWnd) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnDestroy(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.RC b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.RC new file mode 100644 index 0000000..56ae94e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.RC @@ -0,0 +1,469 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP2 BITMAP "res//bmp00001.bmp" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "RES//toolbar.bmp" +IDB_BITMAP1 BITMAP "RES//BUTTON.bmp" +BITMAPBUTU BITMAP "res//bitmap3.bmp" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#include ""res/docktest.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "\r\n" + "#include ""OxDockCtrlBars.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXFrameWndDock.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "\r\n" + "#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" + "#include ""afxres.rc"" \t// Standard components\r\n" + "#include ""afxprint.rc""\t// printing/print preview resources\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//docktest.ico" +IDR_DOCKTETYPE ICON "RES//docktdoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "Sizing Dialog Bar", ID_SIZEDLGBAR + MENUITEM "Dialog Bar", ID_FIXEDDLGBAR + MENUITEM "List Box Bar", ID_LISTBOXBAR + MENUITEM SEPARATOR + MENUITEM "Tile dockbars", ID_VIEW_TILEDOCKBARS + POPUP "Arrange Floating" + BEGIN + MENUITEM "Top Left", ID_ArrangeTopLeft + MENUITEM "Top Right", ID_ArrangeTopRight + MENUITEM "Bottom Left", ID_ArrangeBottomLeft + MENUITEM "Bottom Right", ID_ArrangeBottomRight + END + END + POPUP "&Help" + BEGIN + MENUITEM "&About docktest...", ID_APP_ABOUT + END +END + +IDR_DOCKTETYPE 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 "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "Sizing Dialog Bar", ID_SIZEDLGBAR + MENUITEM "Sizing Logo Bar", ID_LOGOBAR + MENUITEM "Dialog Bar", ID_FIXEDDLGBAR + MENUITEM "List Box Bar", ID_LISTBOXBAR + MENUITEM SEPARATOR + MENUITEM "Tile dockbars", ID_VIEW_TILEDOCKBARS + POPUP "Arrange Floating" + BEGIN + MENUITEM "Top Left", ID_ArrangeTopLeft + MENUITEM "Top Right", ID_ArrangeTopRight + MENUITEM "Bottom Left", ID_ArrangeBottomLeft + MENUITEM "Bottom Right", ID_ArrangeBottomRight + END + 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 docktest...", 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_DIALOGBAR DIALOGEX 0, 0, 175, 58 +STYLE DS_SETFONT | WS_CHILD | WS_CAPTION +CAPTION "Dialog Bar" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + GROUPBOX "None of this will resize",IDC_STATIC,5,5,165,50 + PUSHBUTTON "Button",IDC_BUTTON1,90,35,65,14 + COMBOBOX IDC_COMBO1,10,15,120,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + ICON IDR_DOCKTETYPE,IDC_STATIC,145,10,20,20 +END + +IDD_DIALOGBAR2 DIALOG 0, 0, 165, 47 +STYLE DS_SETFONT | WS_CHILD | WS_CAPTION +CAPTION "Autosize Dialog Bar" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT1,10,10,110,12,ES_AUTOHSCROLL + PUSHBUTTON "Button1",IDC_BUTTON1,10,25,49,14 + ICON IDR_DOCKTETYPE,IDC_STATIC,130,10,20,20 + GROUPBOX "Hey, this resizes !",IDC_STATIC,5,0,155,45 +END + +IDD_DIALOGBAR3 DIALOG 0, 0, 161, 50 +STYLE DS_SETFONT | WS_CHILD | WS_CAPTION +CAPTION "Logobar" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "\nThis is a OXBitmapButton",IDC_OXBUTTON,"Button",BS_OWNERDRAW | BS_CENTER | WS_TABSTOP,68,30,29,8 + EDITTEXT IDC_EDIT1,8,10,110,12,ES_AUTOHSCROLL + PUSHBUTTON "Button1",IDC_BUTTON1,8,25,49,14 + ICON IDR_DOCKTETYPE,IDC_STATIC,122,10,21,20 + GROUPBOX "Hey, this resizes !",IDC_STATIC,3,0,154,45 +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 "040904b0" + BEGIN + VALUE "FileDescription", "Dockable Views sample Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "DOCKTEST" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd. (Portions Copyright © 1996 MicroFocus) " + VALUE "OriginalFilename", "DOCKTEST.EXE" + VALUE "ProductName", "DOCKTEST Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOGBAR3, DIALOG + BEGIN + RIGHTMARGIN, 160 + BOTTOMMARGIN, 49 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Dockable views in Ultimate ToolBox library" + IDR_DOCKTETYPE "\nDock\nDock\n\n\nDocktest.Document\nDock Document" + ID_DESCRIPTION_FILE "Docktestinfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Dockable views in the Ultimate Toolbox" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE +BEGIN + ID_ADD_TOOLBAR "Adds a new toolbar" + ID_ADD_SIZEABLECONTROLBAR "Adds a new sizeable control bar" + ID_VIEW_TILEDOCKBARS "Tiles the dockbars" + ID_ADD_SIZEABLELISTBOX "Adds a control bar with a list box inside it" +END + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#include "res/docktest.rc2" // non-Microsoft Visual C++ edited resources + +#include "OxDockCtrlBars.rc" +#include "OXBitmapButton.rc" +#include "OXCoolToolBar.rc" +#include "OXFrameWndDock.rc" +#include "OXMenuBar.rc" + +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.cpp new file mode 100644 index 0000000..533ff71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.cpp @@ -0,0 +1,141 @@ +// docktest.cpp : Defines the class behaviors for the application. +// +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "utsampleabout.h" +#include "docktest.h" + +#include "mainfrm.h" +#include "docktdoc.h" +#include "docktvw.h" +#include "dockchil.h" + +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDocktestApp + +BEGIN_MESSAGE_MAP(CDocktestApp, CWinApp) + //{{AFX_MSG_MAP(CDocktestApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + // Standard print setup command + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDocktestApp construction + +CDocktestApp::CDocktestApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CDocktestApp object + +CDocktestApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CDocktestApp initialization + +BOOL CDocktestApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 + Enable3dControls(); +#endif + SetRegistryKey(_T("DockTest")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + LoadStdProfileSettings(); // 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_DOCKTETYPE, + RUNTIME_CLASS(CDocktestDoc), + RUNTIME_CLASS(CDockChildWnd), // standard MDI child frame + RUNTIME_CLASS(CDocktestView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + // Since we allow floating control bars MDI child windows, and these can only be created once + // we have a main window, we need to restore the bar size state here. (not on CMainFrame::OnCreate()) + pMainFrame->LoadSizeBarState(_T("DocktestBars")); + pMainFrame->RecalcLayout(); + + return TRUE; +} + +// App command to run the dialog +void CDocktestApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CDocktestApp commands + +void CDocktestApp::OnFileNew() +{ + static BOOL bFirstTime=TRUE; + if(!bFirstTime) + CWinApp::OnFileNew(); + bFirstTime=FALSE; +} + + +int CDocktestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsp new file mode 100644 index 0000000..63525ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsp @@ -0,0 +1,482 @@ +# Microsoft Developer Studio Project File - Name="Docktest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Docktest - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Docktest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Docktest.mak" CFG="Docktest - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Docktest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Docktest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Docktest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Docktest - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Docktest - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Docktest - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\WinDebug" +# PROP BASE Intermediate_Dir ".\WinDebug" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# ADD BASE CPP /nologo /MD /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Docktest.exe" +# SUBTRACT LINK32 /pdb:none /map + +!ELSEIF "$(CFG)" == "Docktest - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\WinRel" +# PROP BASE Intermediate_Dir ".\WinRel" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /map /machine:I386 /out:"Docktest.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "Docktest - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Docktest" +# PROP BASE Intermediate_Dir "Docktest" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /map /machine:I386 /out:"Docktest.exe" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /map /machine:I386 /out:"Docktest.exe" +# SUBTRACT LINK32 /pdb:none /nodefaultlib + +!ELSEIF "$(CFG)" == "Docktest - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Docktes0" +# PROP BASE Intermediate_Dir "Docktes0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /D "_VERBOSE_TRACE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Docktest.exe" +# SUBTRACT BASE LINK32 /pdb:none /map +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Docktest.exe" +# SUBTRACT LINK32 /pdb:none /map + +!ELSEIF "$(CFG)" == "Docktest - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Docktes1" +# PROP BASE Intermediate_Dir "Docktes1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /map /machine:I386 /out:"Docktest.exe" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /map /machine:I386 /out:"Docktest.exe" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "Docktest - Win32 Debug" +# Name "Docktest - Win32 Release" +# Name "Docktest - Win32 Release_Shared" +# Name "Docktest - Win32 Unicode_Debug" +# Name "Docktest - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXChildFrameState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDocTemplateSpy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeDlgBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterColRowState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWorkspaceState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\dockchil.cpp +# End Source File +# Begin Source File + +SOURCE=.\DOCKTDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\docktest.cpp +# End Source File +# Begin Source File + +SOURCE=.\DOCKTEST.RC +# End Source File +# Begin Source File + +SOURCE=.\DOCKTVW.CPP +# End Source File +# Begin Source File + +SOURCE=.\LogoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\mysizeba.cpp +# End Source File +# Begin Source File + +SOURCE=.\STDAFX.CPP +# ADD BASE CPP /Yc"stdafx.h" +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TabViewBar.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\DOCKCHIL.H +# End Source File +# Begin Source File + +SOURCE=.\DOCKTDOC.H +# End Source File +# Begin Source File + +SOURCE=.\DOCKTEST.H +# End Source File +# Begin Source File + +SOURCE=.\DOCKTVW.H +# End Source File +# Begin Source File + +SOURCE=.\logodlg.h +# End Source File +# Begin Source File + +SOURCE=.\MAINFRM.H +# End Source File +# Begin Source File + +SOURCE=.\MYSIZEBA.H +# End Source File +# Begin Source File + +SOURCE=.\Stdafx.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewBar.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\RES\\bitmap3.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\bitmap3.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\\Button.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\BUTTON.BMP +# End Source File +# Begin Source File + +SOURCE=.\RES\\Docktdoc.ico +# End Source File +# Begin Source File + +SOURCE=.\RES\DOCKTDOC.ICO +# End Source File +# Begin Source File + +SOURCE=.\RES\\Docktest.ico +# End Source File +# Begin Source File + +SOURCE=.\RES\DOCKTEST.ICO +# End Source File +# Begin Source File + +SOURCE=.\RES\DOCKTEST.RC2 +# End Source File +# Begin Source File + +SOURCE=.\RES\Logo16.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\TOOLBAR.BMP +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Docktest.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsw new file mode 100644 index 0000000..07fb175 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Docktest"=".\Docktest.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/DockView", PLHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.sln new file mode 100644 index 0000000..3836aaf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Docktest", "Docktest.vcproj", "{6B354278-51B6-4AC9-97B7-D715C6DB9D07}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Debug|Win32.Build.0 = Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release|Win32.ActiveCfg = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Release|Win32.Build.0 = Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {6B354278-51B6-4AC9-97B7-D715C6DB9D07}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj new file mode 100644 index 0000000..c3de9c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj @@ -0,0 +1,2765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj.vspscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj.vspscc new file mode 100644 index 0000000..6cb031b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktest.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktestinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktestinfo.rtf new file mode 100644 index 0000000..a8abde5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Docktestinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.cpp new file mode 100644 index 0000000..9f88c2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.cpp @@ -0,0 +1,101 @@ +// LogoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "docktest.h" +#include "LogoDlg.h" +#include "OxFrameWndDock.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg dialog + + +CLogoDlg::CLogoDlg(CWnd* pParent /*=NULL*/) + : COXSizeDialogBar() +{ + //{{AFX_DATA_INIT(CLogoDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + UNREFERENCED_PARAMETER(pParent); +} + + +void CLogoDlg::DoDataExchange(CDataExchange* pDX) +{ + COXSizeDialogBar::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CLogoDlg) + DDX_Control(pDX, IDC_OXBUTTON, m_LogoButton); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CLogoDlg, COXSizeDialogBar) + //{{AFX_MSG_MAP(CLogoDlg) + ON_WM_CREATE() + ON_BN_CLICKED(IDC_OXBUTTON, OnOxbutton) + ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg message handlers + +BOOL CLogoDlg::Create(CWnd* pParentWnd, UINT nIDTemplate, + UINT nStyle, UINT nID) + { + if (!COXSizeDialogBar::Create(pParentWnd, MAKEINTRESOURCE(nIDTemplate), nStyle, nID)) + return FALSE; + + return TRUE; + } + +int CLogoDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXSizeDialogBar::OnCreate(lpCreateStruct) == -1) + return -1; + + return 0; +} + +BOOL CLogoDlg::OnInitDialog() +{ + COXSizeDialogBar::OnInitDialog(); + + UpdateData(FALSE); + + m_LogoButton.LoadBitmap(IDB_BITMAP2); + m_LogoButton.SetTrackLook(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + + +void CLogoDlg::OnOxbutton() +{ + // TODO: Add your control notification handler code here + CPtrArray arrViewBars; + CWnd* pWnd=AfxGetMainWnd()->GetWindow(GW_CHILD); + while (pWnd != NULL) + { + if(pWnd->IsKindOf(RUNTIME_CLASS(COXSizeViewBar)) && + !((COXSizeViewBar*)pWnd)->IsFloating()) + { + arrViewBars.Add(pWnd->GetSafeHwnd()); + ((COXSizeViewBar*)pWnd)->m_pDockContext->ToggleDocking(); + } + pWnd=pWnd->GetNextWindow(); + } + ((CMDIFrameWnd*)AfxGetMainWnd())->RecalcLayout(); +} + +void CLogoDlg::OnBnClickedButton1() +{ + // TODO: Add your control notification handler code here +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.h new file mode 100644 index 0000000..1546ab4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/LogoDlg.h @@ -0,0 +1,43 @@ +// LogoDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CLogoDlg dialog + +#include "OXSizeDlgBar.h" +#include "OXBitMapButton.h" + +class CLogoDlg : public COXSizeDialogBar +{ +// Construction +public: + CLogoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CLogoDlg) + enum { IDD = IDD_DIALOGBAR3 }; + COXBitmapButton m_LogoButton; + //}}AFX_DATA + + BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLogoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CLogoDlg) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + virtual BOOL OnInitDialog(); + afx_msg void OnOxbutton(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +public: + afx_msg void OnBnClickedButton1(); +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.CPP new file mode 100644 index 0000000..cc20005 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.CPP @@ -0,0 +1,258 @@ +// mainfrm.cpp : implementation of the CMainFrame class +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" +#include "mainfrm.h" + +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, MainFrameParent) + +BEGIN_MESSAGE_MAP(CMainFrame, MainFrameParent) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_TILEDOCKBARS, OnViewTiledockbars) + ON_COMMAND(ID_ArrangeBottomLeft, OnArrangeBottomLeft) + ON_COMMAND(ID_ArrangeBottomRight, OnArrangeBottomRight) + ON_COMMAND(ID_ArrangeTopLeft, OnArrangeTopLeft) + ON_COMMAND(ID_ArrangeTopRight, OnArrangeTopRight) + ON_WM_CLOSE() + //}}AFX_MSG_MAP + + // standard on/off control bar handlers for View menu. + ON_UPDATE_COMMAND_UI(ID_SIZEDLGBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_SIZEDLGBAR, OnBarCheck) + + ON_UPDATE_COMMAND_UI(ID_FIXEDDLGBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_FIXEDDLGBAR, OnBarCheck) + + ON_UPDATE_COMMAND_UI(ID_LISTBOXBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_LISTBOXBAR, OnBarCheck) + + ON_UPDATE_COMMAND_UI(ID_TABVIEWBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_TABVIEWBAR, OnBarCheck) + + ON_UPDATE_COMMAND_UI(ID_LOGOBAR, OnUpdateControlBarMenu) + ON_COMMAND_EX(ID_LOGOBAR, OnBarCheck) + + //************************************************************************************ + // This command handler is a example how to make your controls NOT TO BE DISABLED when + // on a CDialogbar or COXSizeDlgBar + ON_COMMAND(IDC_OXBUTTON, OnHandleButton) + // + //************************************************************************************ + +END_MESSAGE_MAP() + +// This command handler is a example how to make your controls NOT TO BE DISABLED when +// on a CDialogbar or COXSizeDlgBar +void CMainFrame::OnHandleButton() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// arrays of IDs used to initialize control bars + +// toolbar buttons - IDs are command buttons +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE allbuttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + + +CMainFrame::CMainFrame() : + COXMenuBarFrame(CBRS_ALIGN_ANY, + RUNTIME_CLASS(COXSizableMiniDockFrameWnd)) +{ + m_BarCount = 0; +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) + { + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + 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 + } + + EnableDocking(CBRS_ALIGN_ANY); + + // This is a sizeable dialog bar.. that includes gadget resizing + m_SizeDlgBar.SetSizeDockStyle(SZBARF_STDMOUSECLICKS | + SZBARF_DLGAUTOSIZE | SZBARF_ALLOW_MDI_FLOAT); + if (!m_SizeDlgBar.Create(this, IDD_DIALOGBAR2, CBRS_RIGHT, ID_FIXEDDLGBAR)) + { + TRACE0("Failed to create dialog bar\n"); + return -1; + } + m_SizeDlgBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_SizeDlgBar); + + // This is a sizeable dialog bar... + if (!m_DlgBar.Create(this, IDD_DIALOGBAR, CBRS_RIGHT, ID_SIZEDLGBAR)) + { + TRACE0("Failed to create dialog bar\n"); + return -1; + } + m_DlgBar.EnableDocking(CBRS_ALIGN_ANY); + + // Following code will dock our sizeable control bar on the same row as + // the sizeable control that hasn't gadget resizing - a lot of people have asked how to do this. + CRect rcDlg1, rcDlg2; + m_SizeDlgBar.GetWindowRect(&rcDlg1); + m_DlgBar.GetWindowRect(&rcDlg2); + rcDlg2.BottomRight() = rcDlg2.TopLeft() + rcDlg1.Size(); + rcDlg2.bottom -= 40; + + DockControlBar(&m_DlgBar, AFX_IDW_DOCKBAR_RIGHT, &rcDlg2); + + // This is a list box that is added dynamically. You can have almost any number of these... + if (!m_SizeListBar.Create(this)) + { + TRACE0("Failed to create list box bar\n"); + return -1; + } + + m_SizeListBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_SizeListBar, AFX_IDW_DOCKBAR_BOTTOM); + + // This is a sizeable logo bar.. that includes gadget resizing + // This is a TabView Bar that is added dynamically. You can have almost any + // number of these... + if (!m_TabViewBar.Create(this)) + { + TRACE0("Failed to create TabView Bar\n"); + return -1; + } + + m_TabViewBar.EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_TabViewBar, AFX_IDW_DOCKBAR_BOTTOM); + + RecalcLayout(); + + TileDockedBars(CBRS_ALIGN_RIGHT); // this makes the bars the same size + + m_bAutoMenuEnable=TRUE; + + VERIFY(m_MTIClientWnd.Attach(this)); + + return 0; + } + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::OnViewTiledockbars() +{ + TileDockedBars(); + RecalcLayout(); +} + + +void CMainFrame::OnArrangeBottomLeft() +{ + ArrangeFloatingBars(CBRS_ARRANGE_BOTTOMLEFT); +} + + +void CMainFrame::OnArrangeBottomRight() +{ + ArrangeFloatingBars(CBRS_ARRANGE_BOTTOMRIGHT); +} + + +void CMainFrame::OnArrangeTopLeft() +{ + ArrangeFloatingBars(CBRS_ARRANGE_TOPLEFT); +} + + +void CMainFrame::OnArrangeTopRight() +{ + ArrangeFloatingBars(CBRS_ARRANGE_TOPRIGHT); +} + + + + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + // DestroyDynamicBars(); + SaveSizeBarState(_T("DocktestBars")); + COXWorkspaceState workspaceState; + if (!workspaceState.StoreToRegistry()) + { + TRACE0("CMainFrame::OnClose : Failed to save workspace to registry, continuing\n"); + } + MainFrameParent::OnClose(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.H new file mode 100644 index 0000000..1d56873 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/MAINFRM.H @@ -0,0 +1,73 @@ +// mainfrm.h : interface of the CMainFrame class +// Docktest demo of Dockable Views functionality +// +///////////////////////////////////////////////////////////////////////////// + +#include "mysizeba.h" +#include "TabViewBar.h" +#include "OXFrameWndDock.h" +#include "OXSizeToolBar.h" +#include "OXSizeDlgBar.h" +#include "OXSizeDockBar.h" +#include "logodlg.h" +#include "OXTabClientWnd.h" +#include "OXMenuBar.h" + +#define MainFrameParent COXMDIFrameWndSizeDock + +class CMainFrame : public COXMenuBarFrame +//class CMainFrame : public MainFrameParent +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + virtual void OnHandleButton(); + +protected: // control bar embedded members + CStatusBar m_wndStatusBar; + COXSizeDialogBar m_DlgBar; + COXSizeDialogBar m_SizeDlgBar; + CLogoDlg m_LogoBar; + CMyListBoxBar m_SizeListBar; + CTabViewBar m_TabViewBar; + + int m_BarCount; + + // MTI client window + COXTabClientWnd m_MTIClientWnd; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnViewTiledockbars(); + afx_msg void OnArrangeBottomLeft(); + afx_msg void OnArrangeBottomRight(); + afx_msg void OnArrangeTopLeft(); + afx_msg void OnArrangeTopRight(); + afx_msg void OnClose(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.cpp new file mode 100644 index 0000000..7454869 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.cpp @@ -0,0 +1,193 @@ +// mysizeba.cpp : implementation file +// +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" +#include "mysizeba.h" +#include "UTBStrOp.h" + +#define ID_PopupMessage 2000 + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyListBoxBar +// +// This is a sizeable contorl bar that has a list box and a button on it. +// It is designed to be created dynamically ie you can have more than one +// of them. + +IMPLEMENT_DYNAMIC(CMyListBoxBar, COXSizeControlBar); + +CMyListBoxBar::CMyListBoxBar() + : COXSizeControlBar( SZBARF_STDMOUSECLICKS/* | SZBARF_ALLOW_MDI_FLOAT*/) +{ +} + +CMyListBoxBar::~CMyListBoxBar() +{ +} + + + +BEGIN_MESSAGE_MAP(CMyListBoxBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CMyListBoxBar) + ON_WM_CREATE() + ON_COMMAND(ID_PopupMessage, PopupMessage) + ON_WM_RBUTTONUP() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CMyListBoxBar message handlers + + +//------------------------------------------------------------------- +void CMyListBoxBar::OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags) +// respond to this event as we need to override it +//------------------------------------------------------------------- +{ + UNREFERENCED_PARAMETER(bFloating); + UNREFERENCED_PARAMETER(flags); + UNREFERENCED_PARAMETER(cx); + UNREFERENCED_PARAMETER(cy); + + CRect rect; + GetClientRect(rect); + + // shrink rectangle if we're docked + if (IsProbablyFloating()) + rect.InflateRect(-2, -2); // shrink for border when floating + else + rect.InflateRect(-4, -4); + + // position the button at the top right of the window + CRect ButtonRect; + m_Button.GetWindowRect(&ButtonRect); + rect.right -= ButtonRect.Width(); + m_Button.SetWindowPos(NULL, rect.right, rect.top, 0, 0, + SWP_NOZORDER | SWP_NOSIZE); + + // fill the rest of the window with the list box.. + rect.right -= 4; // leave a bit of space. + m_ListBox.MoveWindow(&rect); + +} + + +//------------------------------------------------------------------- +int CMyListBoxBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +//------------------------------------------------------------------- +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + CRect rect; + GetClientRect(&rect); + + + // Register a class for the list box without CS_VREDRAW, CS_HREDRAW + WNDCLASS wc; + VERIFY(GetClassInfo(AfxGetInstanceHandle(), _T("LISTBOX"), &wc)); + wc.style &= ~(CS_VREDRAW | CS_HREDRAW); + wc.lpszClassName = _T("_MF_LISTBOX"); + VERIFY(AfxRegisterClass(&wc)); + + // create a list box to fill the client area with. Use CreateEx to add the + // WS_EX_CLIENTEDGE style. + if (!m_ListBox.CreateEx(WS_EX_CLIENTEDGE, + _T("_MF_LISTBOX"), + NULL, + WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL + | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, + rect.left, + rect.top, + rect.Width(), + rect.Height(), + GetSafeHwnd(), + 0, + NULL)) + { + TRACE0("Failed to create list box\n"); + return -1; + } + + m_ListBox.SetHorizontalExtent(200); + + // add some strings to the list box - makes it a bit more interesting + for (int i = 0; i < 10; i++) + { + TCHAR msg[100]; + UTBStr::stprintf(msg, 100, _T("Line %d"), i); + m_ListBox.AddString(msg); + } + + CRect ButtonRect(0, 0, 32, 32); // dimensions of the button + if (!m_Button.Create(_T("Test"), BS_OWNERDRAW | WS_CHILD | WS_VISIBLE, + ButtonRect, this, ID_PopupMessage)) + { + TRACE0("Failed to create push button\n"); + return -1; + } + + if (!m_Button.LoadBitmaps(_T("BITMAPBUTU"))) + { + TRACE0("Failed to load bitmap for button\n"); + return -1; + } + + return 0; +} + + +void CMyListBoxBar::PopupMessage() +// command handler for the bitmap button. The point of this is to illustrate that +// unlike c +{ + int nSel = m_ListBox.GetCurSel(); + CString strMsg; + if (nSel == -1) + strMsg = _T("Nothing in the list box is selected"); + else + strMsg.Format(_T("Listbox item %d was selected"), nSel); + AfxMessageBox(strMsg); +} + +void CMyListBoxBar::OnRButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + // disable docking. + COXSizeControlBar::OnRButtonUp(nFlags, point); + + +} + + +BOOL CMyListBoxBar::PreCreateWindow(CREATESTRUCT& cs) +{ + return COXSizeControlBar::PreCreateWindow(cs); +} + + +BOOL CMyListBoxBar::Create(CWnd * pParentWnd, const CString& sTitle/*=_T("size bar")*/, + const UINT nID/*=ID_LISTBOXBAR*/) +{ + // register a window class for the control bar + static CString strWndClass; + if (strWndClass.IsEmpty()) + { + strWndClass = AfxRegisterWndClass(CS_DBLCLKS); + } + + return COXSizeControlBar::Create(strWndClass, sTitle, + WS_VISIBLE | WS_CHILD | CBRS_BOTTOM | WS_CLIPCHILDREN, + CFrameWnd::rectDefault, pParentWnd, nID); +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.h new file mode 100644 index 0000000..85ce2af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/Mysizeba.h @@ -0,0 +1,47 @@ +// mysizeba.h : header file +// +// Docktest demo of Dockable Views functionality +// CMyListBoxBar window + +#include "OXSizeCtrlBar.h" + +class CMyListBoxBar : public COXSizeControlBar +{ +// Construction +public: + BOOL Create(CWnd * pParentWnd, const CString& sTitle = _T("ListBox"), + const UINT nID=ID_LISTBOXBAR); + DECLARE_DYNAMIC(CMyListBoxBar); + + CMyListBoxBar(); + +// Attributes +public: + CListBox m_ListBox; + CBitmapButton m_Button; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyListBoxBar) + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + protected: + virtual void OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags); + +// Implementation +public: + virtual ~CMyListBoxBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CMyListBoxBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void PopupMessage(); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.CPP new file mode 100644 index 0000000..8e6e73f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.CPP @@ -0,0 +1,7 @@ +// stdafx.cpp : source file that includes just the standard includes +// docktest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.H new file mode 100644 index 0000000..f58e949 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/STDAFX.H @@ -0,0 +1,21 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// +// Docktest demo of Dockable Views functionality + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Win'95 common control +#include // MFC OLE extensions + +// some extended styles that come in handy occasionally. +#ifndef WS_EX_CONTEXTHELP +#define WS_EX_CONTEXTHELP 0x0400L +#endif + +#ifndef WS_EX_CLIENTEDGE +#define WS_EX_CLIENTEDGE 0x0200L +#endif + +#include "OXAdvancedAssert.h" \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.cpp new file mode 100644 index 0000000..93af6eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.cpp @@ -0,0 +1,162 @@ +// TabViewBar.cpp : implementation file +// +// Docktest demo of Dockable Views functionality + +#include "stdafx.h" +#include "docktest.h" +#include "TabViewBar.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewBar +// + +IMPLEMENT_DYNAMIC(CTabViewBar, COXSizeControlBar); + +CTabViewBar::CTabViewBar() + : COXSizeControlBar( SZBARF_STDMOUSECLICKS | SZBARF_ALLOW_MDI_FLOAT) +{ +} + +CTabViewBar::~CTabViewBar() +{ +} + + + +BEGIN_MESSAGE_MAP(CTabViewBar, COXSizeControlBar) + //{{AFX_MSG_MAP(CTabViewBar) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CTabViewBar message handlers + + +//------------------------------------------------------------------- +void CTabViewBar::OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags) +// respond to this event as we need to override it +//------------------------------------------------------------------- +{ + UNREFERENCED_PARAMETER(bFloating); + UNREFERENCED_PARAMETER(flags); + UNREFERENCED_PARAMETER(cx); + UNREFERENCED_PARAMETER(cy); + + CRect rect; + GetClientRect(rect); + +// rect.DeflateRect(2,2); + + m_TabViewContainer.MoveWindow(&rect); +} + + +//------------------------------------------------------------------- +int CTabViewBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +//------------------------------------------------------------------- +{ + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + CRect rect; + GetClientRect(&rect); + + if(!m_TabViewContainer.Create(this,rect)) + return -1; + + // edit control + if(!edit.Create(WS_CHILD|ES_MULTILINE|ES_AUTOHSCROLL| + ES_AUTOVSCROLL|WS_HSCROLL|WS_VSCROLL,CRect(0,0,0,0), + &m_TabViewContainer,1)) + return -1; + m_TabViewContainer.AddPage(&edit,_T("Edit")); + + // list box + if(!listBox.Create(WS_CHILD|WS_HSCROLL|WS_VSCROLL, + CRect(0,0,0,0),&m_TabViewContainer,2)) + return -1; + + int nIndex=0; + for(nIndex=0; nIndex<20; nIndex++) + { + CString string; + string.Format(_T("List box test string number %d"),nIndex); + listBox.AddString(string); + } + m_TabViewContainer.AddPage(&listBox,_T("ListBox")); + + // list control + if(!listCtrl.Create(WS_CHILD|LVS_REPORT, + CRect(0,0,0,0),&m_TabViewContainer,3)) + return -1; + if((listCtrl.GetStyle()&LVS_TYPEMASK)==LVS_REPORT) + { + LV_COLUMN lvc; + lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; + lvc.fmt=LVCFMT_LEFT; + lvc.iSubItem=0; + lvc.cx=200; + lvc.pszText=_T("Column1"); + listCtrl.InsertColumn(0,&lvc); + } + for(nIndex=0; nIndex<20; nIndex++) + { + CString string; + string.Format(_T("List control test string number %d"),nIndex); + VERIFY(listCtrl.InsertItem(nIndex,string)!=-1); + } + m_TabViewContainer.AddPage(&listCtrl,_T("List")); + + // tree control + if(!treeCtrl.Create(WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, + CRect(0,0,0,0),&m_TabViewContainer,4)) + return -1; + HTREEITEM htiRoot=treeCtrl.InsertItem(_T("RootItem")); + for(nIndex=0; nIndex<20; nIndex++) + { + CString string; + string.Format(_T("Tree control test string number %d"),nIndex); + VERIFY(treeCtrl.InsertItem(string,htiRoot)!=NULL); + } + m_TabViewContainer.AddPage(&treeCtrl,_T("Tree")); + + // rich edit control + + m_TabViewContainer.SetActivePageIndex(0); + + + return 0; +} + + +BOOL CTabViewBar::PreCreateWindow(CREATESTRUCT& cs) +{ + return COXSizeControlBar::PreCreateWindow(cs); +} + + +BOOL CTabViewBar::Create(CWnd * pParentWnd, + const CString& sTitle/*=_T("TabViewBar")*/, + const UINT nID/*=ID_TABVIEWBAR*/) +{ + // register a window class for the control bar + static CString strWndClass; + if (strWndClass.IsEmpty()) + { + strWndClass = AfxRegisterWndClass(CS_DBLCLKS); + } + + return COXSizeControlBar::Create(strWndClass, sTitle, + WS_VISIBLE | WS_CHILD | CBRS_BOTTOM | WS_CLIPCHILDREN, + CFrameWnd::rectDefault, pParentWnd, nID); +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.h new file mode 100644 index 0000000..5f3e972 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/TabViewBar.h @@ -0,0 +1,52 @@ +// mysizeba.h : header file +// +// Docktest demo of Dockable Views functionality +// CTabViewBar window + +#include "OXSizeCtrlBar.h" +#include "OXTabView.h" + + +class CTabViewBar : public COXSizeControlBar +{ +// Construction +public: + BOOL Create(CWnd * pParentWnd, const CString& sTitle = _T("TabViews"), + const UINT nID=ID_TABVIEWBAR); + DECLARE_DYNAMIC(CTabViewBar); + + CTabViewBar(); + +// Attributes +public: + COXTabViewContainer m_TabViewContainer; + + COXTabViewPage edit; + COXTabViewPage listBox; + COXTabViewPage listCtrl; + COXTabViewPage treeCtrl; + COXTabViewPage richEditCtrl; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewBar) + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + protected: + virtual void OnSizedOrDocked(int cx, int cy, BOOL bFloating, int flags); + +// Implementation +public: + virtual ~CTabViewBar(); + + // Generated message map functions +protected: + //{{AFX_MSG(CTabViewBar) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/BUTTON.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/BUTTON.bmp new file mode 100644 index 0000000..ae3302a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/BUTTON.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/DOCKTEST.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/DOCKTEST.RC2 new file mode 100644 index 0000000..11035d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/DOCKTEST.RC2 @@ -0,0 +1,13 @@ +// +// DOCKTEST.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/Logo16.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/Logo16.bmp new file mode 100644 index 0000000..5352011 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/Logo16.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bitmap3.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bitmap3.bmp new file mode 100644 index 0000000..2f86d65 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bitmap3.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bmp00001.bmp new file mode 100644 index 0000000..565670f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktdoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktdoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktdoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktest.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/docktest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/toolbar.bmp new file mode 100644 index 0000000..0556e00 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/resource.h new file mode 100644 index 0000000..8d91c86 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/DockView/resource.h @@ -0,0 +1,47 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Docktest.RC +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_DOCKTETYPE 129 +#define IDD_DIALOGBAR 130 +#define ID_DESCRIPTION_FILE 130 +#define IDD_VIDEOCLIP 132 +#define IDB_BITMAP1 134 +#define IDD_DIALOGBAR2 136 +#define IDD_DIALOGBAR3 137 +#define IDB_BITMAP2 137 +#define IDC_BUTTON1 1000 +#define IDC_BUTTON2 1001 +#define IDC_USER1 1002 +#define IDC_GROUP 1003 +#define IDC_COMBO1 1004 +#define IDC_EDIT1 1005 +#define IDC_OXBUTTON 1007 +#define ID_ADD_TOOLBAR 32771 +#define ID_ADD_SIZEABLECONTROLBAR 32772 +#define ID_VIEW_TILEDOCKBARS 32773 +#define ID_ADD_SIZEABLELISTBOX 32774 +#define ID_ArrangeTopLeft 32775 +#define ID_ArrangeTopRight 32776 +#define ID_ArrangeBottomLeft 32777 +#define ID_ArrangeBottomRight 32778 +#define ID_VideoClip 32779 +#define ID_LOGOBAR 32781 +#define ID_SIZEDLGBAR 0xe880 +#define ID_FIXEDDLGBAR 0xe881 +#define ID_TABVIEWBAR 0xe882 +#define ID_LISTBOXBAR 0xe883 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 141 +#define _APS_NEXT_COMMAND_VALUE 32782 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.clw new file mode 100644 index 0000000..f80c6ac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.clw @@ -0,0 +1,51 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CEditList1App +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "EditList1.h" + +ClassCount=2 +Class1=CEditList1App +Class2=CEditList1Dlg + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDD_EDITLIST1_DIALOG (English (U.S.)) +Resource3=IDD_EDITLIST1_DIALOG + +[CLS:CEditList1App] +Type=0 +HeaderFile=EditList1.h +ImplementationFile=EditList1.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CEditList1App + +[CLS:CEditList1Dlg] +Type=0 +HeaderFile=EditList1Dlg.h +ImplementationFile=EditList1Dlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CEditList1Dlg + +[DLG:IDD_EDITLIST1_DIALOG] +Type=1 +Class=CEditList1Dlg +ControlCount=3 +Control1=IDC_CONTEXT_LIST,SysListView32,1350648833 +Control2=IDOK,button,1342242816 +Control3=IDCANCEL,button,1342242816 + +[DLG:IDD_EDITLIST1_DIALOG (English (U.S.))] +Type=1 +ControlCount=3 +Control1=IDC_CONTEXT_LIST,SysListView32,1350648833 +Control2=IDOK,button,1342242816 +Control3=IDCANCEL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.cpp new file mode 100644 index 0000000..119c108 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.cpp @@ -0,0 +1,89 @@ +// EditList1.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "EditList1.h" +#include "EditList1Dlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEditList1App + +BEGIN_MESSAGE_MAP(CEditList1App, CWinApp) + //{{AFX_MSG_MAP(CEditList1App) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEditList1App construction + +CEditList1App::CEditList1App() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CEditList1App object + +CEditList1App theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CEditList1App initialization + +BOOL CEditList1App::InitInstance() +{ + 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CEditList1Dlg dlg; + m_pMainWnd = &dlg; + int 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; +} + +int CEditList1App::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsp new file mode 100644 index 0000000..2fc49aa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsp @@ -0,0 +1,285 @@ +# Microsoft Developer Studio Project File - Name="EditList1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=EditList1 - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "EditList1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "EditList1.mak" CFG="EditList1 - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "EditList1 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "EditList1 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "EditList1 - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "EditList1 - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "EditList1 - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "EditList1 - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"EditList1.exe" + +!ELSEIF "$(CFG)" == "EditList1 - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"EditList1.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "EditList1 - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "EditList" +# PROP BASE Intermediate_Dir "EditList" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"EditList1.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"EditList1.exe" + +!ELSEIF "$(CFG)" == "EditList1 - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "EditLis0" +# PROP BASE Intermediate_Dir "EditLis0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"EditList1.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"EditList1.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "EditList1 - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "EditLis1" +# PROP BASE Intermediate_Dir "EditLis1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"EditList1.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"EditList1.exe" + +!ENDIF + +# Begin Target + +# Name "EditList1 - Win32 Release" +# Name "EditList1 - Win32 Debug" +# Name "EditList1 - Win32 Release_Shared" +# Name "EditList1 - Win32 Unicode_Debug" +# Name "EditList1 - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXEditList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\oxgridedit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGridHdr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGridList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\EditList1.cpp +# End Source File +# Begin Source File + +SOURCE=.\EditList1.rc +# End Source File +# Begin Source File + +SOURCE=.\EditList1Dlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\EditList1.h +# End Source File +# Begin Source File + +SOURCE=.\EditList1Dlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXEditList.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\EditList1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\EditList1.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\EditList1.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsw new file mode 100644 index 0000000..c0a5116 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "EditList1"=".\EditList1.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/EditList1", BOHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.h new file mode 100644 index 0000000..67b2341 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.h @@ -0,0 +1,50 @@ +// EditList1.h : main header file for the EDITLIST1 application +// + +#if !defined(AFX_EDITLIST1_H__6A3783BC_8679_11D1_A4E2_0020359647BF__INCLUDED_) +#define AFX_EDITLIST1_H__6A3783BC_8679_11D1_A4E2_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CEditList1App: +// See EditList1.cpp for the implementation of this class +// + +class CEditList1App : public CWinApp +{ +public: + CEditList1App(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEditList1App) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CEditList1App) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EDITLIST1_H__6A3783BC_8679_11D1_A4E2_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.rc new file mode 100644 index 0000000..64384f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.rc @@ -0,0 +1,198 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#include ""oxeditlist.rc""\r\n" + "#include ""OXGridList.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\EditList1.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\EditList1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_EDITLIST1_DIALOG DIALOGEX 0, 0, 144, 172 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "EditList Class Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List2",IDC_CONTEXT_LIST,"SysListView32",LVS_REPORT | LVS_OWNERDRAWFIXED | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,6,21,131,121,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + PUSHBUTTON "OK",IDOK,6,150,56,15 + PUSHBUTTON "Cancel",IDCANCEL,81,150,56,15 +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 "040904B0" + BEGIN + VALUE "FileDescription", "EditList1 MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "EditList1" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "EditList1.EXE" + VALUE "ProductName", "EditList1 Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_EDITLIST1_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 137 + TOPMARGIN, 7 + BOTTOMMARGIN, 165 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IMAGELIST BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About EditList1..." + ID_DESCRIPTION_FILE "editlist1info.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "EditListDemo" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#include "oxeditlist.rc" +#include "OXGridList.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\EditList1.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.vcproj new file mode 100644 index 0000000..0f78216 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1.vcproj @@ -0,0 +1,1125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.cpp new file mode 100644 index 0000000..1094cce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.cpp @@ -0,0 +1,186 @@ +// EditList1Dlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "EditList1.h" +#include "EditList1Dlg.h" +#include // for WM_KICKIDLE + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEditList1Dlg dialog +CEditList1Dlg::CEditList1Dlg(CWnd* pParent /*=NULL*/) + : CDialog(CEditList1Dlg::IDD, pParent), + m_EditListCtrl(COXEditList::TBPHorizontalTopLeft, + FALSE /* bAllowDuplicates */, TRUE /* bOrderedList */) +{ + //{{AFX_DATA_INIT(CEditList1Dlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CEditList1Dlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CEditList1Dlg) + DDX_Control(pDX, IDC_CONTEXT_LIST, m_EditListCtrl); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CEditList1Dlg, CDialog) + //{{AFX_MSG_MAP(CEditList1Dlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEditList1Dlg message handlers + +BOOL CEditList1Dlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + VERIFY(m_ContextImageSmall.Create(IDB_IMAGELIST,16,0,RGB(255,0,255))); + m_ContextImageSmall.SetBkColor(GetSysColor(COLOR_WINDOW)); + // ... Associate the image lists with the context list + m_EditListCtrl.SetImageList(&m_ContextImageSmall, LVSIL_SMALL); + + // Add the necessary rows + TCHAR sBuffer[20]; + // Insert the item + for (int j = 0; j < 10 ; j++) + { + wsprintf(sBuffer, _T("ListItem %i"), j + 1); + m_EditListCtrl.InsertItem(j, sBuffer, 1); + } + + m_EditListCtrl.SetFlatToolbar( TRUE ); + // ... Set focus to the control + m_EditListCtrl.SetFocus(); + + + return FALSE; // return TRUE unless you set the focus to a control +} + +void CEditList1Dlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CEditList1Dlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CEditList1Dlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +BOOL CEditList1Dlg::OnCommand(WPARAM wParam, LPARAM lParam) +{ + if ((wParam == IDOK) && (::GetFocus() == m_EditListCtrl.m_hWnd)) + { + // User pressed ENTER while the list of contexts has focus + // Normally this would activate the default button (IDOK) + // We change this into editing the current item of the context list + ASSERT(CWnd::GetFocus() == &m_EditListCtrl); + m_EditListCtrl.EditNewItem(); + + // We processed the message ourselves and will not pass on to base class implementation + return TRUE; + } + + return CDialog::OnCommand(wParam, lParam); +} + +LRESULT CEditList1Dlg::OnKickIdle(WPARAM wParam, LPARAM lParam) + { + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + ASSERT(wParam == MSGF_DIALOGBOX); + BOOL bContinueIdle = TRUE; + + // Update our controls +// ConditionalDisable(); + + // Update the context list + m_EditListCtrl.OnIdle(); + + return bContinueIdle; + } + +void CEditList1Dlg::OnOK() +{ + // TODO: Add extra validation here + + CDialog::OnOK(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.h new file mode 100644 index 0000000..204e89c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/EditList1Dlg.h @@ -0,0 +1,58 @@ +// EditList1Dlg.h : header file +// + +#if !defined(AFX_EDITLIST1DLG_H__6A3783BE_8679_11D1_A4E2_0020359647BF__INCLUDED_) +#define AFX_EDITLIST1DLG_H__6A3783BE_8679_11D1_A4E2_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +#include "OXEditList.h" +///////////////////////////////////////////////////////////////////////////// +// CEditList1Dlg dialog + +class CEditList1Dlg : public CDialog +{ +// Construction +public: + CEditList1Dlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CEditList1Dlg) + enum { IDD = IDD_EDITLIST1_DIALOG }; + COXEditList m_EditListCtrl; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEditList1Dlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); + //}}AFX_VIRTUAL + + CString m_EditListCont; + + CImageList m_ContextImageSmall; +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CEditList1Dlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EDITLIST1DLG_H__6A3783BE_8679_11D1_A4E2_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/ReadMe.txt new file mode 100644 index 0000000..9a6bf71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : EditList1 +======================================================================== + + +AppWizard has created this EditList1 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 EditList1 application. + +EditList1.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CEditList1App application class. + +EditList1.cpp + This is the main application source file that contains the application + class CEditList1App. + +EditList1.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 + Developer Studio. + +res\EditList1.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file EditList1.rc. + +res\EditList1.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +EditList1.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +EditList1Dlg.h, EditList1Dlg.cpp - the dialog + These files contain your CEditList1Dlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in EditList1.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named EditList1.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.cpp new file mode 100644 index 0000000..bc9de51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// EditList1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.h new file mode 100644 index 0000000..46d35ed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__6A3783C0_8679_11D1_A4E2_0020359647BF__INCLUDED_) +#define AFX_STDAFX_H__6A3783C0_8679_11D1_A4E2_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__6A3783C0_8679_11D1_A4E2_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/editlist1info.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/editlist1info.rtf new file mode 100644 index 0000000..16d863a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/editlist1info.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.rc2 new file mode 100644 index 0000000..ca53d8e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/EditList1.rc2 @@ -0,0 +1,13 @@ +// +// EDITLIST1.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/bitmap1.bmp new file mode 100644 index 0000000..8e38568 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/resource.h new file mode 100644 index 0000000..2084c5b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/EditList1/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by EditList1.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_EDITLIST1_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDB_IMAGELIST 129 +#define IDC_CONTEXT_LIST 1002 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.clw new file mode 100644 index 0000000..c4a5f52 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.clw @@ -0,0 +1,127 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CExtTreeDemoDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "exttreedemo.h" +LastPage=0 + +ClassCount=6 +Class1=CExtTreeDemoApp +Class2=CExtTreeDemoDlg +Class3=COXTreeCombo +Class4=COXTreeCtrl +Class5=COXTreeEdit +Class6=COXTreeHeader + +ResourceCount=2 +Resource1=IDD_EXTTREEDEMO_DIALOG (English (U.S.)) +Resource2=IDD_EXTTREEDEMO_DIALOG + +[CLS:CExtTreeDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ExtTreeDemo.h +ImplementationFile=ExtTreeDemo.cpp +LastObject=CExtTreeDemoApp +Filter=N +VirtualFilter=AC + +[CLS:CExtTreeDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ExtTreeDemoDlg.h +ImplementationFile=ExtTreeDemoDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=CExtTreeDemoDlg + +[CLS:COXTreeCombo] +Type=0 +BaseClass=CComboBox +HeaderFile=OXTreeCombo.h +ImplementationFile=OXTreeCombo.cpp + +[CLS:COXTreeCtrl] +Type=0 +HeaderFile=\Ultimate ToolBox\include\oxtreectrl.h +ImplementationFile=\Ultimate ToolBox\source\oxtreectrl.cpp +BaseClass=CListCtrl +LastObject=COXTreeCtrl +Filter=W +VirtualFilter=FWC + +[CLS:COXTreeEdit] +Type=0 +BaseClass=CEdit +HeaderFile=OXTreeEdit.h +ImplementationFile=OXTreeEdit.cpp + +[CLS:COXTreeHeader] +Type=0 +HeaderFile=\Ultimate ToolBox\include\oxtreeheader.h +ImplementationFile=\Ultimate ToolBox\source\oxtreeheader.cpp +BaseClass=CHeaderCtrl +Filter=W +VirtualFilter=JWC +LastObject=COXTreeHeader + +[DLG:IDD_EXTTREEDEMO_DIALOG] +Type=1 +Class=CExtTreeDemoDlg +ControlCount=24 +Control1=IDC_LIST2,SysListView32,1350649345 +Control2=IDC_TVS_HASLINES,button,1342242819 +Control3=IDC_TVS_HASBUTTONS,button,1342242819 +Control4=IDC_TVS_HASLINESATROOT,button,1342242819 +Control5=IDC_TVS_EDITLABELS,button,1342242819 +Control6=IDC_TVS_SHOWSELALWAYS,button,1342242819 +Control7=IDC_TVOXS_MULTISEL,button,1342242819 +Control8=IDC_TVOXS_NOSCROLL,button,1342242819 +Control9=IDC_TVOXS_COLUMNHDR,button,1342242819 +Control10=IDC_TVOXS_NOSORTHEADER,button,1342242819 +Control11=IDC_TVOXS_HGRID,button,1342242819 +Control12=IDC_TVOXS_VGRID,button,1342242819 +Control13=IDC_TVOXS_FLGRID,button,1342242819 +Control14=IDC_TVOXS_ROWSEL,button,1342242819 +Control15=IDC_TVOXS_PICKANYWHERE,button,1342242819 +Control16=IDC_TVOXS_ITEMTIPS,button,1342242819 +Control17=IDC_ADD_TO_FOCUS,button,1342242816 +Control18=IDC_SET_FONT,button,1342242816 +Control19=IDC_HIDE,button,1342242816 +Control20=IDC_UNHIDE_ALL,button,1342242816 +Control21=IDC_TOGGLE_DISABLE,button,1342242816 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 +Control24=IDC_DELETE_SELECTED,button,1342242816 + +[DLG:IDD_EXTTREEDEMO_DIALOG (English (U.S.))] +Type=1 +Class=CExtTreeDemoDlg +ControlCount=23 +Control1=IDC_LIST2,SysListView32,1350632449 +Control2=IDC_TVS_HASLINES,button,1342242819 +Control3=IDC_TVS_HASBUTTONS,button,1342242819 +Control4=IDC_TVS_HASLINESATROOT,button,1342242819 +Control5=IDC_TVS_EDITLABELS,button,1342242819 +Control6=IDC_TVS_SHOWSELALWAYS,button,1342242819 +Control7=IDC_TVOXS_MULTISEL,button,1342242819 +Control8=IDC_TVOXS_NOSCROLL,button,1342242819 +Control9=IDC_TVOXS_COLUMNHDR,button,1342242819 +Control10=IDC_TVOXS_NOSORTHEADER,button,1342242819 +Control11=IDC_TVOXS_HGRID,button,1342242819 +Control12=IDC_TVOXS_VGRID,button,1342242819 +Control13=IDC_TVOXS_FLGRID,button,1342242819 +Control14=IDC_TVOXS_ROWSEL,button,1342242819 +Control15=IDC_TVOXS_PICKANYWHERE,button,1342242819 +Control16=IDC_TVOXS_ITEMTIPS,button,1342242819 +Control17=IDC_ADD_TO_FOCUS,button,1342242816 +Control18=IDC_SET_FONT,button,1342242816 +Control19=IDC_HIDE,button,1342242816 +Control20=IDC_UNHIDE_ALL,button,1342242816 +Control21=IDC_TOGGLE_DISABLE,button,1342242816 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.cpp new file mode 100644 index 0000000..7553ea1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.cpp @@ -0,0 +1,91 @@ +// ExtTreeDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ExtTreeDemo.h" +#include "ExtTreeDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoApp + +BEGIN_MESSAGE_MAP(CExtTreeDemoApp, CWinApp) + //{{AFX_MSG_MAP(CExtTreeDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoApp construction + +CExtTreeDemoApp::CExtTreeDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CExtTreeDemoApp object + +CExtTreeDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoApp initialization + +BOOL CExtTreeDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CExtTreeDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CExtTreeDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsp new file mode 100644 index 0000000..2df3c62 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsp @@ -0,0 +1,345 @@ +# Microsoft Developer Studio Project File - Name="ExtTreeDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ExtTreeDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ExtTreeDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ExtTreeDemo.mak" CFG="ExtTreeDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ExtTreeDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ExtTreeDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtTreeDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ExtTreeDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtTreeDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ExtTreeDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtTreeDemo.exe" + +!ELSEIF "$(CFG)" == "ExtTreeDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtTreeDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtTreeDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtTreeD" +# PROP BASE Intermediate_Dir "ExtTreeD" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtTreeDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtTreeDemo.exe" + +!ELSEIF "$(CFG)" == "ExtTreeDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ExtTree0" +# PROP BASE Intermediate_Dir "ExtTree0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtTreeDemo.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ExtTreeDemo.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtTreeDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtTree1" +# PROP BASE Intermediate_Dir "ExtTree1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtTreeDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ExtTreeDemo.exe" + +!ENDIF + +# Begin Target + +# Name "ExtTreeDemo - Win32 Release" +# Name "ExtTreeDemo - Win32 Debug" +# Name "ExtTreeDemo - Win32 Release_Shared" +# Name "ExtTreeDemo - Win32 Unicode_Debug" +# Name "ExtTreeDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtTreeDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtTreeDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\ExtTreeDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ExtTreeDemo.h +# End Source File +# Begin Source File + +SOURCE=.\ExtTreeDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTip.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTipWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCal.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCombo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeHeader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeItem.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap2.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ExtTreeDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ExtTreeDemo.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtTreeDemo.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsw new file mode 100644 index 0000000..67feb42 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ExtTreeDemo"=".\ExtTreeDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ExtTreeDemo", XRHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.h new file mode 100644 index 0000000..0871885 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.h @@ -0,0 +1,50 @@ +// ExtTreeDemo.h : main header file for the EXTTREEDEMO application +// + +#if !defined(AFX_EXTTREEDEMO_H__3049C3C6_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_EXTTREEDEMO_H__3049C3C6_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoApp: +// See ExtTreeDemo.cpp for the implementation of this class +// + +class CExtTreeDemoApp : public CWinApp +{ +public: + CExtTreeDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtTreeDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CExtTreeDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTTREEDEMO_H__3049C3C6_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.rc new file mode 100644 index 0000000..62ff5f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.rc @@ -0,0 +1,219 @@ +// 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 + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ExtTreeDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXCalendarPopup.rc""\r\n" + "#endif\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\\ExtTreeDemo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_EXTTREEDEMO_DIALOG DIALOGEX 0, 0, 395, 239 +STYLE DS_SETFONT | WS_CAPTION | WS_SYSMENU +CAPTION "ExtTreeDemo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List2",IDC_LIST2,"SysListView32",LVS_REPORT | LVS_EDITLABELS | LVS_OWNERDRAWFIXED | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,7,42,260,191,WS_EX_CLIENTEDGE + CONTROL "TVS_HASLINES",IDC_TVS_HASLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,285,16,77,10 + CONTROL "TVS_HASBUTTONS",IDC_TVS_HASBUTTONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,285,30,85,10 + CONTROL "TVS_HASLINESATROOT",IDC_TVS_HASLINESATROOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,285,45,100,10 + CONTROL "TVS_EDITLABELS",IDC_TVS_EDITLABELS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,285,60,100,10 + CONTROL "TVS_SHOWSELALWAYS",IDC_TVS_SHOWSELALWAYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,285,75,100,10 + CONTROL "TVOXS_MULTISEL",IDC_TVOXS_MULTISEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,103,100,10 + CONTROL "TVOXS_NOSCROLL",IDC_TVOXS_NOSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,116,100,10 + CONTROL "TVOXS_COLUMNHDR",IDC_TVOXS_COLUMNHDR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,130,100,10 + CONTROL "TVOXS_NOSORTHEADER",IDC_TVOXS_NOSORTHEADER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,143,100,10 + CONTROL "TVOXS_HGRID",IDC_TVOXS_HGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,156,100,10 + CONTROL "TVOXS_VGRID",IDC_TVOXS_VGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,169,100,10 + CONTROL "TVOXS_FLGRID",IDC_TVOXS_FLGRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,182,100,10 + CONTROL "TVOXS_ROWSEL",IDC_TVOXS_ROWSEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,195,100,10 + CONTROL "TVOXS_PICKANYWHERE",IDC_TVOXS_PICKANYWHERE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,208,100,10 + CONTROL "TVOXS_ITEMTIPS",IDC_TVOXS_ITEMTIPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,284,221,100,10 + PUSHBUTTON "Add Child to Focused",IDC_ADD_TO_FOCUS,7,6,80,14 + PUSHBUTTON "Set Font To Selected",IDC_SET_FONT,97,6,80,14 + PUSHBUTTON "Hide Selected items!",IDC_HIDE,7,23,80,14 + PUSHBUTTON "UnHide All Items",IDC_UNHIDE_ALL,97,23,80,14 + PUSHBUTTON "Toggle Disable To Sel",IDC_TOGGLE_DISABLE,187,23,80,14 + GROUPBOX "Basic Tree control style",IDC_STATIC,274,4,115,84 + GROUPBOX "Extended Tree control style",IDC_STATIC,273,93,115,140 + PUSHBUTTON "Delete Selected Items",IDC_DELETE_SELECTED,187,6,80,14 +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 "040904B0" + BEGIN + VALUE "FileDescription", "ExtTreeDemo MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ExtTreeDemo" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "ExtTreeDemo.EXE" + VALUE "ProductName", "ExtTreeDemo Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_EXTTREEDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 388 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" +IDB_BITMAP2 BITMAP "res\\bitmap2.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ExtTreeDemo..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ExtTreeDemo" + ID_DESCRIPTION_FILE "ExtTreeDemoInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ExtTreeDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXCalendarPopup.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.vcproj new file mode 100644 index 0000000..48c5634 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemo.vcproj @@ -0,0 +1,1456 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.cpp new file mode 100644 index 0000000..24d7f7e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.cpp @@ -0,0 +1,792 @@ +// ExtTreeDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtTreeDemo.h" +#include "ExtTreeDemoDlg.h" + +#include "UTSampleAbout.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoDlg dialog + +CExtTreeDemoDlg::CExtTreeDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CExtTreeDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CExtTreeDemoDlg) + m_bShowColumnHdr = FALSE; + m_bMultiSel = FALSE; + m_bEditLabels = FALSE; + m_bHasButtons = FALSE; + m_bHasLines = FALSE; + m_bHasLinesAtRoot = FALSE; + m_bShowSelAlways = FALSE; + m_bHasHGrid = FALSE; + m_bHasVGrid = FALSE; + m_bRowSel = FALSE; + m_bFullLength = FALSE; + m_bPickAnywhere = FALSE; + m_bItemTips = FALSE; + m_bNoSortHeader = FALSE; + m_bNoScroll = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_pDragImage=NULL; + m_bDragging=FALSE; + m_hDropItem = NULL; +} + +CExtTreeDemoDlg::~CExtTreeDemoDlg() +{ + if(m_pDragImage) + { + delete m_pDragImage; + } +} + +void CExtTreeDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CExtTreeDemoDlg) + DDX_Control(pDX, IDC_LIST2, m_xlc); + DDX_Check(pDX, IDC_TVOXS_COLUMNHDR, m_bShowColumnHdr); + DDX_Check(pDX, IDC_TVOXS_MULTISEL, m_bMultiSel); + DDX_Check(pDX, IDC_TVS_EDITLABELS, m_bEditLabels); + DDX_Check(pDX, IDC_TVS_HASBUTTONS, m_bHasButtons); + DDX_Check(pDX, IDC_TVS_HASLINES, m_bHasLines); + DDX_Check(pDX, IDC_TVS_HASLINESATROOT, m_bHasLinesAtRoot); + DDX_Check(pDX, IDC_TVS_SHOWSELALWAYS, m_bShowSelAlways); + DDX_Check(pDX, IDC_TVOXS_HGRID, m_bHasHGrid); + DDX_Check(pDX, IDC_TVOXS_VGRID, m_bHasVGrid); + DDX_Check(pDX, IDC_TVOXS_ROWSEL, m_bRowSel); + DDX_Check(pDX, IDC_TVOXS_FLGRID, m_bFullLength); + DDX_Check(pDX, IDC_TVOXS_PICKANYWHERE, m_bPickAnywhere); + DDX_Check(pDX, IDC_TVOXS_ITEMTIPS, m_bItemTips); + DDX_Check(pDX, IDC_TVOXS_NOSORTHEADER, m_bNoSortHeader); + DDX_Check(pDX, IDC_TVOXS_NOSCROLL, m_bNoScroll); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CExtTreeDemoDlg, CDialog) + //{{AFX_MSG_MAP(CExtTreeDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_NOTIFY(TVN_GETDISPINFO, IDC_LIST2, OnGetdispinfoTree1) + ON_BN_CLICKED(IDC_TVOXS_COLUMNHDR, OnTvoxsColumnhdr) + ON_BN_CLICKED(IDC_TVOXS_MULTISEL, OnTvoxsMultisel) + ON_BN_CLICKED(IDC_TVS_EDITLABELS, OnTvsEditlabels) + ON_BN_CLICKED(IDC_TVS_HASBUTTONS, OnTvsHasbuttons) + ON_BN_CLICKED(IDC_TVS_HASLINES, OnTvsHaslines) + ON_BN_CLICKED(IDC_TVS_HASLINESATROOT, OnTvsHaslinesatroot) + ON_BN_CLICKED(IDC_TVS_SHOWSELALWAYS, OnTvsShowselalways) + ON_BN_CLICKED(IDC_HIDE, OnHide) + ON_BN_CLICKED(IDC_UNHIDE_ALL, OnUnhideAll) + ON_BN_CLICKED(IDC_ADD_TO_FOCUS, OnAddToFocus) + ON_BN_CLICKED(IDC_SET_FONT, OnSetFontToSel) + ON_BN_CLICKED(IDC_TOGGLE_DISABLE, OnToggleDisable) + ON_BN_CLICKED(IDC_TVOXS_VGRID, OnVgrid) + ON_BN_CLICKED(IDC_TVOXS_HGRID, OnHgrid) + ON_BN_CLICKED(IDC_TVOXS_ROWSEL, OnRowSel) + ON_BN_CLICKED(IDC_TVOXS_FLGRID, OnFullLength) + ON_BN_CLICKED(IDC_TVOXS_PICKANYWHERE, OnPickAnywhere) + ON_NOTIFY(LVN_BEGINDRAG, IDC_LIST2, OnBegindragList2) + ON_WM_MOUSEMOVE() + ON_WM_LBUTTONUP() + ON_NOTIFY(HDN_ITEMCLICK, IDC_LIST2, OnItemclickList2) + ON_BN_CLICKED(IDC_TVOXS_ITEMTIPS, OnTvoxsItemtips) + ON_BN_CLICKED(IDC_TVOXS_NOSCROLL, OnTvoxsNoscroll) + ON_BN_CLICKED(IDC_TVOXS_NOSORTHEADER, OnTvoxsNosortheader) + ON_NOTIFY(NM_RCLICK, IDC_LIST2, OnRclickList2) + ON_NOTIFY(TVN_ITEMEXPANDING, IDC_LIST2, OnItemExpandingTree1) + ON_BN_CLICKED(IDC_DELETE_SELECTED, OnDeleteSelected) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoDlg message handlers + +BOOL CExtTreeDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + + + m_il.Create(IDB_BITMAP1,16,1,RGB(255,255,255)); + m_il1.Create(IDB_BITMAP1,16,1,RGB(255,255,255)); + m_ils.Create(IDB_BITMAP2,13,1,RGB(255,255,255)); + + CStringArray saComboStr; + CStringArray saDates; + saDates.Add(_T("01/01/1998")); + saDates.Add(_T("31/12/1998")); + int i=0; + for(i=0;i < 10;i++) + { + CString s; + s.Format(_T("Option %d"),i+1); + saComboStr.Add(s); + } + + LV_COLUMN lvc; + memset(&lvc,0,sizeof(lvc)); + lvc.fmt = LVCFMT_LEFT; + lvc.cx = 100; + lvc.pszText = _T("Column"); + lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; + m_xlc.SetColumn(0,&lvc); + m_xlc.InsertColumn(1,_T("ComboBox"),LVCFMT_CENTER,100,1); + m_xlc.InsertColumn(2,_T("Dates"),LVCFMT_RIGHT,100,2); + m_xlc.SetImageList(&m_il1,TVSIL_NORMAL); + m_xlc.SetImageList(&m_ils,TVSIL_STATE); + for(i=0;i<10;i++) + { + CString sItem; + sItem.Format(_T("Item %d"),i); + HTREEITEM hti = m_xlc.InsertItem(sItem); + sItem.Format(_T("Column2 Item %d"),i); + m_xlc.SetSubItem(hti,1,OX_SUBITEM_TEXT|OX_SUBITEM_IMAGE,sItem,1); + m_xlc.SetItemColor(hti,RGB(255 - 10*i,0,0)); + m_xlc.SetItemColor(hti,RGB(0,255 - 10*i,0),1); + m_xlc.SetEditMode(hti,OXET_COMBO,saComboStr,1); + + m_xlc.SetSubItem(hti,2,OX_SUBITEM_TEXT,_T("None")); + m_xlc.SetEditMode(hti,OXET_CALENDAR,saDates,2); + TV_ITEM tvi; + memset(&tvi,0,sizeof(tvi)); + tvi.cChildren=1; + tvi.mask=TVIF_CHILDREN | TVIF_HANDLE; + tvi.hItem = hti; + if(!i) + { + tvi.mask |= TVIF_TEXT; + tvi.pszText = LPSTR_TEXTCALLBACK; + m_xlc.SetItem(&tvi); + } + else if(i == 1) + { + tvi.mask |= TVIF_STATE; + tvi.stateMask = TVIS_STATEIMAGEMASK; + tvi.state = INDEXTOSTATEIMAGEMASK(2); + m_xlc.SetItem(&tvi); + } + else if(i == 2) + { + LOGFONT lf; + CFont f,*pF = GetFont(); + if(pF->GetLogFont(&lf)) + { + lf.lfItalic = TRUE; + f.CreateFontIndirect(&lf); + m_xlc.SetItemFont(hti,&f); + } + m_xlc.SetItem(&tvi); + } + else + m_xlc.SetItem(&tvi); + + m_xlc.SetItemImage(hti,0,1); + + } + + m_xlc.ModifyExStyle(0,TVOXS_COLUMNHDR); + m_xlc.ModifyExStyle(0,TVOXS_MULTISEL); + m_xlc.ModifyStyle(0,TVS_EDITLABELS); + m_xlc.ModifyStyle(0,TVS_HASBUTTONS); + m_xlc.ModifyStyle(0,TVS_HASLINES); + m_xlc.ModifyStyle(0,TVS_LINESATROOT); + m_xlc.ModifyStyle(0,TVS_SHOWSELALWAYS); + m_xlc.ModifyExStyle(0,TVOXS_VGRID); + m_xlc.ModifyExStyle(0,TVOXS_HGRID); + m_xlc.ModifyExStyle(0,TVOXS_FLGRID); + m_xlc.ModifyExStyle(0,TVOXS_ROWSEL); + m_xlc.ModifyExStyle(0,TVOXS_PICKANYWHERE); + m_xlc.ModifyExStyle(0,TVOXS_ITEMTIPS); + + m_bHasLines = m_xlc.HasLines() > 0 ? TRUE : FALSE; + m_bHasButtons = m_xlc.HasButtons() > 0 ? TRUE : FALSE; + m_bHasLinesAtRoot = m_xlc.HasLinesAtRoot() > 0 ? TRUE : FALSE; + DWORD dwStyle = m_xlc.GetStyle(); + m_bEditLabels = (dwStyle & TVS_EDITLABELS) > 0 ? TRUE : FALSE; + m_bShowSelAlways = (dwStyle & TVS_SHOWSELALWAYS) > 0 ? TRUE : FALSE; + DWORD dwStyleEx = m_xlc.GetExStyle(); + m_bShowColumnHdr = (dwStyleEx & TVOXS_COLUMNHDR) > 0 ? TRUE : FALSE; + m_bMultiSel = (dwStyleEx & TVOXS_MULTISEL) > 0 ? TRUE : FALSE; + m_bHasHGrid = (dwStyleEx & TVOXS_HGRID) > 0 ? TRUE : FALSE; + m_bHasVGrid = (dwStyleEx & TVOXS_VGRID) > 0 ? TRUE : FALSE; + m_bFullLength = (dwStyleEx & TVOXS_FLGRID) > 0 ? TRUE : FALSE; + m_bRowSel = (dwStyleEx & TVOXS_ROWSEL) > 0 ? TRUE : FALSE; + m_bPickAnywhere = (dwStyleEx & TVOXS_PICKANYWHERE) > 0 ? TRUE : FALSE; + m_bItemTips = (dwStyleEx & TVOXS_ITEMTIPS) > 0 ? TRUE : FALSE; + m_bNoScroll = (dwStyleEx & TVOXS_NOSCROLL) > 0 ? TRUE : FALSE; + m_bNoSortHeader = (dwStyleEx & TVOXS_NOSORTHEADER) > 0 ? TRUE : FALSE; + + m_xlc.ShowWindow(SW_SHOW); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CExtTreeDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CExtTreeDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CExtTreeDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + + +void CExtTreeDemoDlg::OnGetdispinfoTree1(NMHDR* pNMHDR, LRESULT* pResult) +{ + TV_DISPINFO* pTVDI = (TV_DISPINFO*)pNMHDR; + TV_ITEM *tvi = &(pTVDI->item); + static int hit=0; + if(tvi->mask & TVIF_TEXT) + { + TCHAR t[20]; + UTBStr::stprintf(t, 20, _T("Hit %d"),hit++); + ASSERT(tvi->pszText); + ASSERT(tvi->pszText != LPSTR_TEXTCALLBACK); + + UTBStr::tcsncpy(tvi->pszText, tvi->cchTextMax, t,tvi->cchTextMax); + } + + *pResult = 1; +} + +void CExtTreeDemoDlg::OnTvoxsColumnhdr() +{ + UpdateData(); + if(m_bShowColumnHdr) + m_xlc.ModifyExStyle(0,TVOXS_COLUMNHDR,SWP_DRAWFRAME); + else + m_xlc.ModifyExStyle(TVOXS_COLUMNHDR,0,SWP_DRAWFRAME); + +} + +void CExtTreeDemoDlg::OnTvoxsMultisel() +{ + UpdateData(); + if(m_bMultiSel) + m_xlc.ModifyExStyle(0,TVOXS_MULTISEL); + else + m_xlc.ModifyExStyle(TVOXS_MULTISEL,0); +} + +void CExtTreeDemoDlg::OnTvsEditlabels() +{ + UpdateData(); + if(m_bEditLabels) + m_xlc.ModifyStyle(0,TVS_EDITLABELS); + else + m_xlc.ModifyStyle(TVS_EDITLABELS,0); + +} + +void CExtTreeDemoDlg::OnTvsHasbuttons() +{ + UpdateData(); + if(m_bHasButtons) + m_xlc.ModifyStyle(0,TVS_HASBUTTONS); + else + m_xlc.ModifyStyle(TVS_HASBUTTONS,0); + +} + +void CExtTreeDemoDlg::OnTvsHaslines() +{ + UpdateData(); + if(m_bHasLines) + m_xlc.ModifyStyle(0,TVS_HASLINES); + else + m_xlc.ModifyStyle(TVS_HASLINES,0); + +} + +void CExtTreeDemoDlg::OnTvsHaslinesatroot() +{ + UpdateData(); + if(m_bHasLinesAtRoot) + m_xlc.ModifyStyle(0,TVS_LINESATROOT); + else + m_xlc.ModifyStyle(TVS_LINESATROOT,0); + +} + +void CExtTreeDemoDlg::OnTvsShowselalways() +{ + UpdateData(); + if(m_bShowSelAlways) + m_xlc.ModifyStyle(0,TVS_SHOWSELALWAYS); + else + m_xlc.ModifyStyle(TVS_SHOWSELALWAYS,0); + +} + +void CExtTreeDemoDlg::OnHide() +{ + HTREEITEM hItem = m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + HTREEITEM hItem1 = hItem; + hItem = m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + m_xlc.HideItem(hItem1); + } +} + +void CExtTreeDemoDlg::OnUnhideAll() +{ + HTREEITEM hItem = m_xlc.GetFirstHiddenItem(); + while(hItem) + { + HTREEITEM hItem1 = hItem; + hItem = m_xlc.GetNextHiddenItem(hItem); + m_xlc.HideItem(hItem1,FALSE); + } +} + +void CExtTreeDemoDlg::OnAddToFocus() +{ + static int hit=0; + HTREEITEM hItem = m_xlc.GetSelectedItem(); + hItem= hItem==NULL ? m_xlc.GetRootItem() : hItem; + if(hItem) + { + CString s; + s.Format(_T("New Item %d"),++hit); + hItem=m_xlc.InsertItem(s,hItem,TVI_SORT); + ASSERT(hItem!=NULL); + m_xlc.SelectItem(hItem); + m_xlc.EnsureVisible(hItem); + m_xlc.EditLabel(hItem); + } +} + +void CExtTreeDemoDlg::OnSetFontToSel() +{ + CFontDialog fnt_dlg; + if(fnt_dlg.DoModal() != IDOK) + return; + LOGFONT lf; + fnt_dlg.GetCurrentFont(&lf); + CFont f; + f.CreateFontIndirect(&lf); + HTREEITEM hItem = m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + m_xlc.SetItemFont(hItem,&f,0); + m_xlc.SetItemFont(hItem,&f,1); + m_xlc.SetItemFont(hItem,&f,2); + m_xlc.SetItemColor(hItem,fnt_dlg.m_cf.rgbColors); + m_xlc.SetItemColor(hItem,fnt_dlg.m_cf.rgbColors,1); + m_xlc.SetItemColor(hItem,fnt_dlg.m_cf.rgbColors,2); + hItem = m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + } + + UINT nHeight=m_xlc.GetItemHeight(); + lf.lfHeight=(lf.lfHeight>0 ? lf.lfHeight : -lf.lfHeight)+6; + if(lf.lfHeight>(int)nHeight) + { + m_xlc.SetItemHeight(lf.lfHeight); + } +} + +void CExtTreeDemoDlg::OnToggleDisable() +{ + HTREEITEM hItem = m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + m_xlc.DisableItem(hItem,!m_xlc.IsItemDisabled(hItem)); + hItem = m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + } +} + +void CExtTreeDemoDlg::OnVgrid() +{ + UpdateData(); + DWORD dwStyleAdd = m_bHasVGrid ? TVOXS_VGRID : 0; + DWORD dwStyleRemove = m_bHasVGrid ? 0 : TVOXS_VGRID; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + +void CExtTreeDemoDlg::OnHgrid() +{ + UpdateData(); + DWORD dwStyleAdd = m_bHasHGrid ? TVOXS_HGRID : 0; + DWORD dwStyleRemove = m_bHasHGrid ? 0 : TVOXS_HGRID; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + +void CExtTreeDemoDlg::OnFullLength() +{ + UpdateData(); + DWORD dwStyleAdd = m_bFullLength ? TVOXS_FLGRID : 0; + DWORD dwStyleRemove = m_bFullLength ? 0 : TVOXS_FLGRID; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + +void CExtTreeDemoDlg::OnRowSel() +{ + UpdateData(); + DWORD dwStyleAdd = m_bRowSel ? TVOXS_ROWSEL : 0; + DWORD dwStyleRemove = m_bRowSel ? 0 : TVOXS_ROWSEL; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + +void CExtTreeDemoDlg::OnPickAnywhere() +{ + UpdateData(); + DWORD dwStyleAdd = m_bPickAnywhere ? TVOXS_PICKANYWHERE : 0; + DWORD dwStyleRemove = m_bPickAnywhere ? 0 : TVOXS_PICKANYWHERE; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + +void CExtTreeDemoDlg::OnBegindragList2(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + + if(m_pDragImage) + { + delete m_pDragImage; + } + + HTREEITEM hDragItem = m_xlc.GetSelectedItem(); + ASSERT (hDragItem); + m_pDragImage = m_xlc.CreateDragImage (hDragItem); + ASSERT (m_pDragImage); + + // changes the cursor to the drag image (DragMove() is still required in + // OnMouseMove()) + VERIFY (m_pDragImage->BeginDrag (0, CPoint (8, 8))); + VERIFY (m_pDragImage->DragEnter (GetDesktopWindow (), pNMListView->ptAction)); + + // set dragging flag + m_bDragging = TRUE; + m_hDropItem = NULL; + + // capture all mouse messages + SetCapture (); + + *pResult = 0; +} + +void CExtTreeDemoDlg::OnMouseMove(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if (m_bDragging) + { + CPoint pt (point); + ClientToScreen (&pt); + + // move the drag image + VERIFY (m_pDragImage->DragMove (pt)); + + BOOL bDraw=FALSE; + + // get the CWnd pointer of the window that is under the mouse cursor + CWnd* pDropWnd = WindowFromPoint (pt); + ASSERT (pDropWnd); + // if we drag outside current window + if (pDropWnd != &m_xlc) + { + // turn off drag hilite for tree control + if (m_hDropItem) + { + if(!bDraw) + { + // unlock window updates + VERIFY (m_pDragImage->DragShowNolock(FALSE)); + bDraw=TRUE; + } + m_xlc.SelectDropTarget (NULL); + m_hDropItem = NULL; + } + } + + // convert from screen coordinates to drop target client coordinates + pDropWnd->ScreenToClient (&pt); + + // if window is CTreeCtrl + if (pDropWnd == &m_xlc) + { + UINT uFlags; + // get the item that is below cursor + int nIndex=m_xlc.HitTest(pt, &uFlags); + if(nIndex>=0) + { + m_hDropItem = m_xlc.GetItemFromIndex(nIndex); + HTREEITEM hOldDropItem=m_xlc.GetNextItem(m_xlc.GetRootItem(), + TVGN_DROPHILITE); + if(hOldDropItem!=m_hDropItem) + { + if(!bDraw) + { + // unlock window updates + VERIFY (m_pDragImage->DragShowNolock(FALSE)); + bDraw=TRUE; + } + // highlight it + m_xlc.SelectDropTarget(m_hDropItem); + } + } + } + + if(bDraw) + { + // lock window updates + VERIFY (m_pDragImage->DragShowNolock (TRUE)); + } + } + + CDialog::OnMouseMove(nFlags, point); +} + +void CExtTreeDemoDlg::OnLButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if (m_bDragging) + { + // end dragging + VERIFY (m_pDragImage->DragLeave (GetDesktopWindow ())); + m_pDragImage->EndDrag (); + // stop intercepting all mouse messages + VERIFY (::ReleaseCapture ()); + m_bDragging = FALSE; + + CPoint pt (point); + ClientToScreen (&pt); + // m_dropPoint = pt; + + // get the CWnd pointer of the window that is under the mouse cursor + CWnd* pDropWnd = WindowFromPoint (pt); + ASSERT (pDropWnd); + + // if window is CTreeCtrl + if (pDropWnd == &m_xlc) + { + HTREEITEM htiDropTarget=m_xlc.GetDropHilightItem(); + ASSERT(m_hDropItem==htiDropTarget); + m_xlc.SelectDropTarget(NULL); + + // move selected items + if(htiDropTarget!=NULL && m_xlc.GetSelectedCount() >= 1) + { + HTREEITEM htiParent=m_xlc.GetParentItem(htiDropTarget); + + HTREEITEM hDragItem = m_xlc.GetNextItem(TVI_ROOT, TVGN_FIRSTSELECTED); + HTREEITEM hNextDragItem = m_xlc.GetNextItem(hDragItem, TVGN_NEXTSELECTED); + while(hDragItem) + { + if (::GetKeyState(VK_CONTROL) & 0x8000) + { + m_xlc.CopyItem(hDragItem,htiDropTarget); + htiDropTarget = hDragItem; + } + else + { + m_xlc.MoveItem(hDragItem,htiParent,htiDropTarget); + htiDropTarget = hDragItem; + } + + hDragItem = hNextDragItem; + hNextDragItem = m_xlc.GetNextItem(hNextDragItem, TVGN_NEXTSELECTED); + } + + } + + m_hDropItem = NULL; + } + } + + CDialog::OnLButtonUp(nFlags, point); +} + +void CExtTreeDemoDlg::OnItemclickList2(NMHDR* pNMHDR, LRESULT* pResult) +{ + HD_NOTIFY *phdn = (HD_NOTIFY *) pNMHDR; + // TODO: Add your control notification handler code here + int nCol=phdn->iItem; + m_xlc.SortChildren(NULL,nCol); + *pResult = 0; +} + +void CExtTreeDemoDlg::OnTvoxsItemtips() +{ + // TODO: Add your control notification handler code here + UpdateData(); + DWORD dwStyleAdd = m_bItemTips ? TVOXS_ITEMTIPS : 0; + DWORD dwStyleRemove = m_bItemTips ? 0 : TVOXS_ITEMTIPS; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + + +void CExtTreeDemoDlg::OnTvoxsNoscroll() +{ + // TODO: Add your control notification handler code here + UpdateData(); + DWORD dwStyleAdd = m_bNoScroll ? TVOXS_NOSCROLL : 0; + DWORD dwStyleRemove = m_bNoScroll ? 0 : TVOXS_NOSCROLL; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd,SWP_DRAWFRAME); +} + +void CExtTreeDemoDlg::OnTvoxsNosortheader() +{ + // TODO: Add your control notification handler code here + UpdateData(); + DWORD dwStyleAdd = m_bNoSortHeader ? TVOXS_NOSORTHEADER : 0; + DWORD dwStyleRemove = m_bNoSortHeader ? 0 : TVOXS_NOSORTHEADER; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd,SWP_DRAWFRAME); +} + + +void CExtTreeDemoDlg::OnRclickList2(NMHDR* pNMHDR, LRESULT* pResult) +{ + // TODO: Add your control notification handler code here + UNREFERENCED_PARAMETER(pNMHDR); + + static int hit=0; + HTREEITEM hItem = m_xlc.GetSelectedItem(); + if(hItem) + { + m_xlc.EditLabel(hItem); + } + + *pResult = 0; +} + +void CExtTreeDemoDlg::OnItemExpandingTree1(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + + *pResult = 0; + + pNMTreeView->itemNew.stateMask=TVIS_EXPANDEDONCE; + pNMTreeView->itemNew.mask=TVIF_STATE|TVIF_CHILDREN; + m_xlc.GetItem(&pNMTreeView->itemNew); + // If folder at least once was expanded then it was already populated + if((pNMTreeView->itemNew.state & TVIS_EXPANDEDONCE) || + pNMTreeView->itemNew.cChildren==0) + return; + + CStringArray saComboStr; + CStringArray saDates; + saDates.Add(_T("01/01/1998")); + saDates.Add(_T("31/12/1998")); + for(int i=0; i<10; i++) + { + CString s; + s.Format(_T("Option %d"),i+1); + saComboStr.Add(s); + } + + CString sParentItem=m_xlc.GetItemText(pNMTreeView->itemNew.hItem); + for(int j=500;j >= 0;j--) + { + CString sItem; + sItem.Format(_T("%s - Item %d"),sParentItem,j); + HTREEITEM h =m_xlc.InsertItem(sItem,pNMTreeView->itemNew.hItem); + if(!j) + { + CFont f; + f.CreatePointFont(-80,_T("Arial")); + m_xlc.SetItemFont(h,&f); + } + + sItem.Format(_T("Option %d"),j); + m_xlc.SetSubItem(h,1,OX_SUBITEM_TEXT,sItem); + m_xlc.SetEditMode(h,OXET_COMBO,saComboStr,1); + m_xlc.SetSubItem(h,2,OX_SUBITEM_TEXT,_T("None")); + m_xlc.SetEditMode(h,OXET_CALENDAR,saDates,2); + } + +} + +void CExtTreeDemoDlg::OnDeleteSelected() +{ + HTREEITEM hSelected; + while ((hSelected = m_xlc.GetSelectedItem()) != NULL) + m_xlc.DeleteItem(hSelected); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.h new file mode 100644 index 0000000..047d838 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoDlg.h @@ -0,0 +1,104 @@ +// ExtTreeDemoDlg.h : header file +// + +#if !defined(AFX_EXTTREEDEMODLG_H__3049C3C8_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_EXTTREEDEMODLG_H__3049C3C8_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXTreeCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CExtTreeDemoDlg dialog + +class CExtTreeDemoDlg : public CDialog +{ +// Construction +public: + CExtTreeDemoDlg(CWnd* pParent = NULL); // standard constructor + ~CExtTreeDemoDlg(); + +// Dialog Data + //{{AFX_DATA(CExtTreeDemoDlg) + enum { IDD = IDD_EXTTREEDEMO_DIALOG }; + COXTreeCtrl m_xlc; + BOOL m_bShowColumnHdr; + BOOL m_bMultiSel; + BOOL m_bEditLabels; + BOOL m_bHasButtons; + BOOL m_bHasLines; + BOOL m_bHasLinesAtRoot; + BOOL m_bShowSelAlways; + BOOL m_bHasHGrid; + BOOL m_bHasVGrid; + BOOL m_bRowSel; + BOOL m_bFullLength; + BOOL m_bPickAnywhere; + BOOL m_bItemTips; + BOOL m_bNoSortHeader; + BOOL m_bNoScroll; + //}}AFX_DATA + CImageList m_il1; + CImageList m_il; + CImageList m_ils; + CImageList* m_pDragImage; + BOOL m_bDragging; + HTREEITEM m_hDropItem; + +protected: + HTREEITEM m_hHidenItem; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtTreeDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CExtTreeDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnGetdispinfoTree1(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnTvoxsColumnhdr(); + afx_msg void OnTvoxsMultisel(); + afx_msg void OnTvsEditlabels(); + afx_msg void OnTvsHasbuttons(); + afx_msg void OnTvsHaslines(); + afx_msg void OnTvsHaslinesatroot(); + afx_msg void OnTvsShowselalways(); + afx_msg void OnHide(); + afx_msg void OnUnhideAll(); + afx_msg void OnAddToFocus(); + afx_msg void OnSetFontToSel(); + afx_msg void OnToggleDisable(); + afx_msg void OnVgrid(); + afx_msg void OnHgrid(); + afx_msg void OnRowSel(); + afx_msg void OnFullLength(); + afx_msg void OnPickAnywhere(); + afx_msg void OnBegindragList2(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnItemclickList2(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnTvoxsItemtips(); + afx_msg void OnTvoxsNoscroll(); + afx_msg void OnTvoxsNosortheader(); + afx_msg void OnRclickList2(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnItemExpandingTree1(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnDeleteSelected(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTTREEDEMODLG_H__3049C3C8_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoInfo.rtf new file mode 100644 index 0000000..afada5b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ExtTreeDemoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ReadMe.txt new file mode 100644 index 0000000..6fbf037 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ExtTreeDemo +======================================================================== + + +AppWizard has created this ExtTreeDemo 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 ExtTreeDemo application. + +ExtTreeDemo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CExtTreeDemoApp application class. + +ExtTreeDemo.cpp + This is the main application source file that contains the application + class CExtTreeDemoApp. + +ExtTreeDemo.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 + Developer Studio. + +res\ExtTreeDemo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ExtTreeDemo.rc. + +res\ExtTreeDemo.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ExtTreeDemo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ExtTreeDemoDlg.h, ExtTreeDemoDlg.cpp - the dialog + These files contain your CExtTreeDemoDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ExtTreeDemo.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ExtTreeDemo.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.cpp new file mode 100644 index 0000000..bd59471 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ExtTreeDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.h new file mode 100644 index 0000000..362d48c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3049C3CA_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__3049C3CA_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +// #define OX_TREECTRL_NOITEMTIPS + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3049C3CA_BCB8_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.rc2 new file mode 100644 index 0000000..2942139 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/ExtTreeDemo.rc2 @@ -0,0 +1,13 @@ +// +// EXTTREEDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap1.bmp new file mode 100644 index 0000000..7f1b162 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap2.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap2.bmp new file mode 100644 index 0000000..7a16f54 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/res/bitmap2.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/resource.h new file mode 100644 index 0000000..6ab7148 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtTreeDemo/resource.h @@ -0,0 +1,47 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ExtTreeDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_EXTTREEDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_BITMAP1 130 +#define IDB_BITMAP2 131 +#define IDC_TREE1 1001 +#define IDC_LIST2 1002 +#define IDC_TVS_HASLINES 1003 +#define IDC_TVS_HASBUTTONS 1004 +#define IDC_TVS_HASLINESATROOT 1005 +#define IDC_TVS_EDITLABELS 1006 +#define IDC_TVOXS_MULTISEL 1007 +#define IDC_TVOXS_COLUMNHDR 1008 +#define IDC_TVS_SHOWSELALWAYS 1009 +#define IDC_LIST1 1010 +#define IDC_TVOXS_HGRID 1010 +#define IDC_HIDE 1011 +#define IDC_UNHIDE_ALL 1012 +#define IDC_ADD_TO_FOCUS 1013 +#define IDC_SET_FONT 1014 +#define IDC_TOGGLE_DISABLE 1015 +#define IDC_TVOXS_VGRID 1016 +#define IDC_TVOXS_ROWSEL 1017 +#define IDC_TVOXS_FLGRID 1018 +#define IDC_TVOXS_PICKANYWHERE 1019 +#define IDC_TVOXS_ITEMTIPS 1020 +#define IDC_TVOXS_NOSCROLL 1021 +#define IDC_TVOXS_NOSORTHEADER 1022 +#define IDC_DELETE_SELECTED 1023 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1024 +#define _APS_NEXT_SYMED_VALUE 103 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.cpp new file mode 100644 index 0000000..2497c30 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.cpp @@ -0,0 +1,356 @@ +// CurrencyEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "CurrencyEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCurrencyEditDlg dialog + +CCurrencyEditDlg::CCurrencyEditDlg():CPropertyPage(CCurrencyEditDlg::IDD) +{ + //{{AFX_DATA_INIT(CCurrencyEditDlg) + m_bLeadingZero = FALSE; + m_bIndefiniteDecimalDigitCount = FALSE; + m_bNoDiditInGroup = FALSE; + m_sDecimalSeparator = _T(""); + m_sGroupSeparator = _T(""); + m_sNegativeValueFormat = _T(""); + m_nDecimalDigitCount = -1; + m_nFractionalDigitCount = -1; + m_nGroupLength = -1; + m_sMask = _T(""); + m_sCurrency = _T(""); + m_sPositiveValueFormat = _T(""); + //}}AFX_DATA_INIT +} + +void CCurrencyEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCurrencyEditDlg) + DDX_Control(pDX, IDC_COMBO_POSITIVE_VALUE_FORMAT, m_comboPositiveFormat); + DDX_Control(pDX, IDC_COMBO_CURRENCY_NAME, m_comboCurrencyName); + DDX_Control(pDX, IDC_COMBO_NEGATIVE_VALUE_FORMAT, m_comboNegativeFormat); + DDX_Control(pDX, IDC_COMBO_GROUP_SEPARATOR, m_comboGroupSeparator); + DDX_Control(pDX, IDC_COMBO_DECIMAL_SEPARATOR, m_comboDecimalSeparator); + DDX_Control(pDX, IDC_COMBO_MASK, m_comboMask); + DDX_Control(pDX, IDC_COMBO_GROUP_LENGTH, m_comboGroupLength); + DDX_Control(pDX, IDC_COMBO_DECIMAL_DIGIT_COUNT, m_comboDecimalCount); + DDX_Control(pDX, IDC_STATIC_NUMERIC_EDIT, m_sepNumericEdit); + DDX_Control(pDX, IDC_STATIC_NUMERIC_EDIT_SETTINGS, m_sepNumericEditSettings); + DDX_Control(pDX, IDC_STATIC_CONTROL_APPEARANCE, m_sepControlAppearance); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_btnTextColorNegative); + DDX_Control(pDX, IDC_BUTTON_FONT, m_btnFont); + DDX_Control(pDX, IDC_EDIT_TEST, m_edit); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR, m_btnTextColor); + DDX_Control(pDX, IDC_BUTTON_BACKCOLOR, m_btnBackColor); + DDX_Check(pDX, IDC_CHECK_LEADING_ZERO, m_bLeadingZero); + DDX_Check(pDX, IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, m_bIndefiniteDecimalDigitCount); + DDX_Check(pDX, IDC_CHECK_NO_GROUP, m_bNoDiditInGroup); + DDX_CBString(pDX, IDC_COMBO_DECIMAL_SEPARATOR, m_sDecimalSeparator); + DDV_MaxChars(pDX, m_sDecimalSeparator, 1); + DDX_CBString(pDX, IDC_COMBO_GROUP_SEPARATOR, m_sGroupSeparator); + DDV_MaxChars(pDX, m_sGroupSeparator, 1); + DDX_CBString(pDX, IDC_COMBO_NEGATIVE_VALUE_FORMAT, m_sNegativeValueFormat); + DDX_CBIndex(pDX, IDC_COMBO_DECIMAL_DIGIT_COUNT, m_nDecimalDigitCount); + DDX_CBIndex(pDX, IDC_COMBO_FRACTIONAL_DIGIT_COUNT, m_nFractionalDigitCount); + DDX_CBIndex(pDX, IDC_COMBO_GROUP_LENGTH, m_nGroupLength); + DDX_CBString(pDX, IDC_COMBO_MASK, m_sMask); + DDX_CBString(pDX, IDC_COMBO_CURRENCY_NAME, m_sCurrency); + DDX_CBString(pDX, IDC_COMBO_POSITIVE_VALUE_FORMAT, m_sPositiveValueFormat); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_BACKCOLOR, m_clrBack); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR, m_clrText); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_clrTextNegative); + DDX_FontPickerFont(pDX, IDC_BUTTON_FONT, &m_font); +} + +BEGIN_MESSAGE_MAP(CCurrencyEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CCurrencyEditDlg) + ON_BN_CLICKED(IDC_BUTTON_BACKCOLOR, OnButtonBackcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR, OnButtonTextcolor) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR_NEGATIVE, OnButtonTextcolorNegative) + ON_BN_CLICKED(IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, OnCheckDecimalDigitCountIndefinite) + ON_BN_CLICKED(IDC_CHECK_NO_GROUP, OnCheckNoGroup) + ON_CBN_EDITCHANGE(IDC_COMBO_MASK, OnEditchangeComboMask) + ON_CBN_SELCHANGE(IDC_COMBO_MASK, OnSelchangeComboMask) + ON_BN_CLICKED(IDC_CHECK_LEADING_ZERO, OnCheckLeadingZero) + ON_CBN_SELCHANGE(IDC_COMBO_DECIMAL_DIGIT_COUNT, OnSelchangeComboDecimalDigitCount) + ON_CBN_EDITCHANGE(IDC_COMBO_DECIMAL_SEPARATOR, OnEditchangeComboDecimalSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_DECIMAL_SEPARATOR, OnSelchangeComboDecimalSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_FRACTIONAL_DIGIT_COUNT, OnSelchangeComboFractionalDigitCount) + ON_CBN_SELCHANGE(IDC_COMBO_GROUP_LENGTH, OnSelchangeComboGroupLength) + ON_CBN_EDITCHANGE(IDC_COMBO_GROUP_SEPARATOR, OnEditchangeComboGroupSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_GROUP_SEPARATOR, OnSelchangeComboGroupSeparator) + ON_CBN_EDITCHANGE(IDC_COMBO_NEGATIVE_VALUE_FORMAT, OnEditchangeComboNegativeValueFormat) + ON_CBN_SELCHANGE(IDC_COMBO_NEGATIVE_VALUE_FORMAT, OnSelchangeComboNegativeValueFormat) + ON_CBN_EDITCHANGE(IDC_COMBO_CURRENCY_NAME, OnEditchangeComboCurrencyName) + ON_CBN_SELCHANGE(IDC_COMBO_CURRENCY_NAME, OnSelchangeComboCurrencyName) + ON_CBN_EDITCHANGE(IDC_COMBO_POSITIVE_VALUE_FORMAT, OnEditchangeComboPositiveValueFormat) + ON_CBN_SELCHANGE(IDC_COMBO_POSITIVE_VALUE_FORMAT, OnSelchangeComboPositiveValueFormat) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCurrencyEditDlg message handlers + +BOOL CCurrencyEditDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_clrBack=m_edit.GetBkColor(); + m_clrText=m_edit.GetTextColor(); + m_clrTextNegative=m_edit.GetNegativeTextColor(); + + m_edit.SetToolTipText(_T("EditControl")); + m_sMask=m_edit.GetMask(); + m_bLeadingZero=m_edit.GetShowLeadingZero(); + m_nDecimalDigitCount=m_edit.GetDecimalDigitCount(); + m_bIndefiniteDecimalDigitCount=(m_nDecimalDigitCount==-1 ? TRUE : FALSE); + m_comboDecimalCount.EnableWindow(!m_bIndefiniteDecimalDigitCount); + m_sDecimalSeparator=m_edit.GetDecimalSeparator(); + m_nFractionalDigitCount=m_edit.GetFractionalDigitCount(); + m_nGroupLength=m_edit.GetGroupLength(); + m_bNoDiditInGroup=(m_nGroupLength==0 ? TRUE : FALSE); + m_comboGroupLength.EnableWindow(!m_bNoDiditInGroup); + m_nGroupLength--; + m_sGroupSeparator=m_edit.GetGroupSeparator(); + m_sNegativeValueFormat=m_edit.GetNegativeFormat(); + m_sPositiveValueFormat=m_edit.GetPositiveFormat(); + m_sCurrency=m_edit.GetCurrencyName(); + + m_btnBackColor.SetToolTip(TRUE); + m_btnTextColor.SetToolTip(TRUE); + m_btnTextColorNegative.SetToolTip(TRUE); + + m_btnFont.SetBuddy(IDC_STATIC_FONT); + LOGFONT lf; + CFont* pFont=m_edit.GetFont(); + if(pFont==NULL) + { + CClientDC dc(&m_edit); + pFont=dc.GetCurrentFont(); + } + ASSERT(pFont!=NULL); + VERIFY(pFont->GetLogFont(&lf)); + VERIFY(m_font.CreateFontIndirect(&lf)); + + // separators + COLORREF clr=::GetSysColor(COLOR_BTNTEXT); + m_sepNumericEdit.SetTextColor(clr); + m_sepNumericEditSettings.SetTextColor(clr); + m_sepControlAppearance.SetTextColor(clr); + + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CCurrencyEditDlg::OnButtonBackcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetBkColor(m_clrBack); +} + +void CCurrencyEditDlg::OnButtonTextcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetTextColor(m_clrText); +} + +void CCurrencyEditDlg::OnButtonTextcolorNegative() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetNegativeTextColor(m_clrTextNegative); +} + +void CCurrencyEditDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_edit.SetFont(&m_font); +} + +void CCurrencyEditDlg::OnCheckDecimalDigitCountIndefinite() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_comboDecimalCount.EnableWindow(!m_bIndefiniteDecimalDigitCount); + if(m_bIndefiniteDecimalDigitCount) + m_edit.SetDecimalDigitCount(-1); + else + m_edit.SetDecimalDigitCount(m_nDecimalDigitCount); +} + +void CCurrencyEditDlg::OnCheckNoGroup() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_comboGroupLength.EnableWindow(!m_bNoDiditInGroup); + if(m_bNoDiditInGroup) + m_edit.SetGroupLength(0); + else + m_edit.SetGroupLength(m_nGroupLength+1); +} + +void CCurrencyEditDlg::OnEditchangeComboMask() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + + +void CCurrencyEditDlg::OnSelchangeComboMask() +{ + // TODO: Add your control notification handler code here + + m_comboMask.GetLBText(m_comboMask.GetCurSel(),m_sMask); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + +void CCurrencyEditDlg::OnCheckLeadingZero() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetShowLeadingZero(m_bLeadingZero); +} + +void CCurrencyEditDlg::OnSelchangeComboDecimalDigitCount() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetDecimalDigitCount(m_nDecimalDigitCount); +} + +void CCurrencyEditDlg::OnEditchangeComboDecimalSeparator() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetDecimalSeparator(m_sDecimalSeparator[0]); +} + +void CCurrencyEditDlg::OnSelchangeComboDecimalSeparator() +{ + // TODO: Add your control notification handler code here + + m_comboDecimalSeparator.GetLBText(m_comboDecimalSeparator.GetCurSel(), + m_sDecimalSeparator); + m_edit.SetDecimalSeparator(m_sDecimalSeparator[0]); +} + +void CCurrencyEditDlg::OnSelchangeComboFractionalDigitCount() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetFractionalDigitCount(m_nFractionalDigitCount); +} + +void CCurrencyEditDlg::OnSelchangeComboGroupLength() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetGroupLength(m_nGroupLength+1); +} + +void CCurrencyEditDlg::OnEditchangeComboGroupSeparator() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetGroupSeparator(m_sGroupSeparator[0]); +} + +void CCurrencyEditDlg::OnSelchangeComboGroupSeparator() +{ + // TODO: Add your control notification handler code here + + m_comboGroupSeparator.GetLBText(m_comboGroupSeparator.GetCurSel(), + m_sGroupSeparator); + m_edit.SetGroupSeparator(m_sGroupSeparator[0]); +} + +void CCurrencyEditDlg::OnEditchangeComboNegativeValueFormat() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetNegativeFormat(m_sNegativeValueFormat); +} + +void CCurrencyEditDlg::OnSelchangeComboNegativeValueFormat() +{ + // TODO: Add your control notification handler code here + + m_comboNegativeFormat.GetLBText(m_comboNegativeFormat.GetCurSel(), + m_sNegativeValueFormat); + m_edit.SetNegativeFormat(m_sNegativeValueFormat); +} + +void CCurrencyEditDlg::OnEditchangeComboCurrencyName() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetCurrencyName(m_sCurrency); +} + +void CCurrencyEditDlg::OnSelchangeComboCurrencyName() +{ + // TODO: Add your control notification handler code here + + m_comboCurrencyName.GetLBText(m_comboCurrencyName.GetCurSel(),m_sCurrency); + m_edit.SetCurrencyName(m_sCurrency); +} + +void CCurrencyEditDlg::OnEditchangeComboPositiveValueFormat() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetPositiveFormat(m_sPositiveValueFormat); +} + +void CCurrencyEditDlg::OnSelchangeComboPositiveValueFormat() +{ + // TODO: Add your control notification handler code here + + m_comboPositiveFormat.GetLBText(m_comboPositiveFormat.GetCurSel(), + m_sPositiveValueFormat); + m_edit.SetPositiveFormat(m_sPositiveValueFormat); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.h new file mode 100644 index 0000000..bf5279d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/CurrencyEditDlg.h @@ -0,0 +1,103 @@ +// CurrencyEditDlg.h : header file +// + +#if !defined(AFX_CurrencyEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) +#define AFX_CurrencyEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXEdit.h" +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CCurrencyEditDlg dialog + +class CCurrencyEditDlg : public CPropertyPage +{ +// Construction +public: + CCurrencyEditDlg(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCurrencyEditDlg) + enum { IDD = IDD_CURRENCYEDIT_DIALOG }; + CComboBox m_comboPositiveFormat; + CComboBox m_comboCurrencyName; + CComboBox m_comboNegativeFormat; + CComboBox m_comboGroupSeparator; + CComboBox m_comboDecimalSeparator; + CComboBox m_comboMask; + CComboBox m_comboGroupLength; + CComboBox m_comboDecimalCount; + COXSeparator m_sepNumericEdit; + COXSeparator m_sepNumericEditSettings; + COXSeparator m_sepControlAppearance; + COXColorPickerButton m_btnTextColorNegative; + COXFontPickerButton m_btnFont; + COXCurrencyEdit m_edit; + COXColorPickerButton m_btnTextColor; + COXColorPickerButton m_btnBackColor; + BOOL m_bLeadingZero; + BOOL m_bIndefiniteDecimalDigitCount; + BOOL m_bNoDiditInGroup; + CString m_sDecimalSeparator; + CString m_sGroupSeparator; + CString m_sNegativeValueFormat; + int m_nDecimalDigitCount; + int m_nFractionalDigitCount; + int m_nGroupLength; + CString m_sMask; + CString m_sCurrency; + CString m_sPositiveValueFormat; + //}}AFX_DATA + COLORREF m_clrBack; + COLORREF m_clrText; + COLORREF m_clrTextNegative; + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCurrencyEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCurrencyEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBackcolor(); + afx_msg void OnButtonTextcolor(); + afx_msg void OnButtonFont(); + afx_msg void OnButtonTextcolorNegative(); + afx_msg void OnCheckDecimalDigitCountIndefinite(); + afx_msg void OnCheckNoGroup(); + afx_msg void OnEditchangeComboMask(); + afx_msg void OnSelchangeComboMask(); + afx_msg void OnCheckLeadingZero(); + afx_msg void OnSelchangeComboDecimalDigitCount(); + afx_msg void OnEditchangeComboDecimalSeparator(); + afx_msg void OnSelchangeComboDecimalSeparator(); + afx_msg void OnSelchangeComboFractionalDigitCount(); + afx_msg void OnSelchangeComboGroupLength(); + afx_msg void OnEditchangeComboGroupSeparator(); + afx_msg void OnSelchangeComboGroupSeparator(); + afx_msg void OnEditchangeComboNegativeValueFormat(); + afx_msg void OnSelchangeComboNegativeValueFormat(); + afx_msg void OnEditchangeComboCurrencyName(); + afx_msg void OnSelchangeComboCurrencyName(); + afx_msg void OnEditchangeComboPositiveValueFormat(); + afx_msg void OnSelchangeComboPositiveValueFormat(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CurrencyEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.cpp new file mode 100644 index 0000000..e78448b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.cpp @@ -0,0 +1,115 @@ +// DropEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "extendededitcontrols.h" +#include "DropEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +IMPLEMENT_DYNAMIC(CMenuEdit, COXEdit) + +BEGIN_MESSAGE_MAP(CMenuEdit, COXEdit) + //{{AFX_MSG_MAP(CMenuEdit) + //}}AFX_MSG_MAP + ON_COMMAND_RANGE(1,10,OnMenuSelect) +END_MESSAGE_MAP() + +void CMenuEdit::OnMenuSelect(UINT nID) +{ + CString sItem; + m_menu.GetMenuString(nID,sItem,MF_BYCOMMAND); + CString sText; + sText.Format(_T("<%s> has been picked"),sItem); + + SetWindowText(sText); +} + + +///////////////////////////////////////////////////////////////////////////// +// CDropEditDlg property page + +IMPLEMENT_DYNCREATE(CDropEditDlg, CPropertyPage) + +CDropEditDlg::CDropEditDlg() : CPropertyPage(CDropEditDlg::IDD) +{ + //{{AFX_DATA_INIT(CDropEditDlg) + m_bLeftAligned = FALSE; + //}}AFX_DATA_INIT +} + +CDropEditDlg::~CDropEditDlg() +{ +} + +void CDropEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDropEditDlg) + DDX_Control(pDX, IDC_EDIT_CALCULATOR, m_editCalculator); + DDX_Control(pDX, IDC_STATIC_CALCULATOR, m_sepCalculator); + DDX_Control(pDX, IDC_STATIC_MENU_EDIT, m_sepMenu); + DDX_Control(pDX, IDC_EDIT_MENU, m_editMenu); + DDX_Control(pDX, IDC_STATIC_BROWSECOLOR_EDIT, m_sepBrowseColor); + DDX_Control(pDX, IDC_EDIT_BROWSECOLOR, m_editBrowseColor); + DDX_Control(pDX, IDC_STATIC_BROWSEFILE_EDIT, m_sepBrowseFile); + DDX_Control(pDX, IDC_EDIT_BROWSEFILE, m_editBrowseFile); + DDX_Control(pDX, IDC_STATIC_BROWSE32_EDIT, m_sepBrowseDir32); + DDX_Control(pDX, IDC_EDIT_BROWSE32, m_editBrowseDir32); + DDX_Control(pDX, IDC_EDIT_BROWSE16, m_editBrowseDir16); + DDX_Control(pDX, IDC_STATIC_BROWSE16_EDIT, m_sepBrowseDir16); + DDX_Check(pDX, IDC_CHECK_LEFTALIGNED, m_bLeftAligned); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CDropEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CDropEditDlg) + ON_BN_CLICKED(IDC_CHECK_LEFTALIGNED, OnCheckLeftaligned) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDropEditDlg message handlers + +BOOL CDropEditDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + COLORREF clr=::GetSysColor(COLOR_BTNTEXT); + m_sepBrowseDir16.SetTextColor(clr); + m_sepBrowseDir32.SetTextColor(clr); + m_sepBrowseFile.SetTextColor(clr); + m_sepBrowseColor.SetTextColor(clr); + m_sepCalculator.SetTextColor(clr); + m_sepMenu.SetTextColor(clr); + + m_editBrowseDir16.SetMask(_T("Pick directory: #")); + m_editBrowseDir16.SetBkColor(RGB(0,0,255)); + m_editBrowseDir16.SetTextColor(::GetSysColor(COLOR_WINDOW)); + + m_editMenu.SetWindowText(_T("Pick the item")); + m_editBrowseColor.SetWindowText(_T("Pick the color")); + + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CDropEditDlg::OnCheckLeftaligned() +{ + // TODO: Add your control notification handler code here + UpdateData(); + int nAlignment=(m_bLeftAligned ? OXDROPEDIT_BUTTONLEFT : OXDROPEDIT_BUTTONRIGHT); + m_editBrowseColor.SetButtonAlignment(nAlignment); + m_editBrowseDir16.SetButtonAlignment(nAlignment); + m_editBrowseDir32.SetButtonAlignment(nAlignment); + m_editBrowseFile.SetButtonAlignment(nAlignment); + m_editMenu.SetButtonAlignment(nAlignment); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.h new file mode 100644 index 0000000..d627b36 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/DropEditDlg.h @@ -0,0 +1,107 @@ +#if !defined(AFX_DROPEDITDLG_H__7C884D29_CFE1_11D2_A7D5_525400DAF3CE__INCLUDED_) +#define AFX_DROPEDITDLG_H__7C884D29_CFE1_11D2_A7D5_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// DropEditDlg.h : header file +// + +#include "OXSeparator.h" +#include "OXBrowseDirEdit.h" +#include "OXBrowseColorEdit.h" +#include "OXCalculatorEdit.h" + + +class CMenuEdit: public COXDropEdit +{ +DECLARE_DYNAMIC(CMenuEdit) + +// Data members ------------------------------------------------------------- +public: + +protected: + CMenu m_menu; + +private: + +// Member functions --------------------------------------------------------- +public: + CMenuEdit() { + VERIFY(m_menu.CreatePopupMenu()); + for(int nIndex=1; nIndex<=10; nIndex++) + { + CString sMenuText; + sMenuText.Format(_T("Item %d"),nIndex); + m_menu.AppendMenu(MF_STRING,nIndex,sMenuText); + } + AssociateMenu(&m_menu); + }; + virtual ~CMenuEdit() {}; + +// Overrides + //{{AFX_VIRTUAL(COXPhysicalEdit) + //}}AFX_VIRTUAL + +protected: + // Generated message map functions + //{{AFX_MSG(COXPhysicalEdit) + //}}AFX_MSG + afx_msg void OnMenuSelect(UINT nID); + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// +// CDropEditDlg dialog + +class CDropEditDlg : public CPropertyPage +{ + DECLARE_DYNCREATE(CDropEditDlg) + +// Construction +public: + CDropEditDlg(); + ~CDropEditDlg(); + +// Dialog Data + //{{AFX_DATA(CDropEditDlg) + enum { IDD = IDD_DROPEDIT_DIALOG }; + COXCalculatorEdit m_editCalculator; + COXSeparator m_sepCalculator; + COXSeparator m_sepMenu; + CMenuEdit m_editMenu; + COXSeparator m_sepBrowseColor; + COXBrowseColorEdit m_editBrowseColor; + COXSeparator m_sepBrowseFile; + COXBrowseFileEdit m_editBrowseFile; + COXSeparator m_sepBrowseDir32; + COXBrowseDirEdit m_editBrowseDir32; + COXBrowseDirEdit16 m_editBrowseDir16; + COXSeparator m_sepBrowseDir16; + BOOL m_bLeftAligned; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CDropEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CDropEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnCheckLeftaligned(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DROPEDITDLG_H__7C884D29_CFE1_11D2_A7D5_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsInfo.rtf new file mode 100644 index 0000000..32709ab --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsInfo.rtf @@ -0,0 +1,217 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;} +{\f40\froman\fcharset238\fprq2 Times New Roman CE;}{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable{\list\listtemplateid-800916992 +\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}}{\listname ;}\listid-2}}{\*\listoverridetable{\listoverride\listid-2\listoverridecount1{\lfolevel +\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelold\levelspace0\levelindent360{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 }}\ls1}}{\*\rsidtbl \rsid5183391\rsid15008649}{\*\generator Microso +ft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr12\min21}{\revtim\yr2005\mo1\dy17\hr12\min21}{\version2}{\edmins0}{\nofpages6}{\nofwords1502}{\nofchars8564}{\*\company Dundas India}{\nofcharsws10046} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot15008649 \fet0 +\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid15008649 COXEdit Description}{\b\fs48\insrsid15008649 +\par }{\b\fs16\insrsid15008649 Copyright \'a9 }{\b\fs16\insrsid15008649 The Code Project}{\b\fs16\insrsid15008649 1997-1999, All Rights Reserved +\par }{\insrsid15008649 +\par COXEdit is CEdit derived class that extends the functionality of standard edit control. +\par +\par COXEdit allows you to easily set}{\insrsid15008649 /}{\insrsid15008649 change the following control's features: +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ql \fi-360\li720\ri0\nowidctlpar{\*\pn \pnlvlblt\ilvl0\ls1\pnrnot0\pnf3\pnindent360 {\pntxtb \'b7}}\faauto\ls1\rin0\lin720\itap0\pararsid15008649 {\insrsid15008649 text color +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}background color +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}tooltip text +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}mask that defines literals (uneditable symbols) +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par It's really easy to use COXEdit class. You just work with it as with standard CEdit class plus you can call the following functions in order to exploit new features: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid15008649 SetTextColor}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 GetTextColor}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 SetBkColor}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 GetBkColor}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 SetToolTipText}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 GetToolTipText}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 SetMask}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 GetMask}{\insrsid15008649 () +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 Refer to the }{\ul\cf2\insrsid15008649 class function reference}{\insrsid15008649 for details on all public functions. +\par +\par The most interesting new feature is the ability to set mask of literals to the control. Mask should be specified as "}{\b\cf2\insrsid15008649 LeftLiterals}{\b\cf6\insrsid15008649 #}{\b\cf2\insrsid15008649 RightLiterals}{\insrsid15008649 " where '}{ +\cf6\insrsid15008649 #}{\insrsid15008649 ' stands for editable contents (input data) and '}{\cf2\insrsid15008649 LeftLiterals}{\insrsid15008649 ' defines the uneditable text that will be displayed to the left from editable text and '}{ +\cf2\insrsid15008649 RightLiterals}{\insrsid15008649 ' defines the text that will be displayed to the right from editable text. E.g. you can define mask as "Phone: #". +\par +\par }{\ul\cf6\insrsid15008649 NOTE}{\insrsid15008649 . If you have to use '#' symbol as literal then you have to use '##' instead. +\par +\par In order to retrieve only the data that was typed in you can use the following function: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid15008649 GetInputData}{\insrsid15008649 () +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par Also COXEdit control internally provides support for two different edit modes: insert (the default) and overtype ones. When user presses '}{\b\insrsid15008649 Ins}{\insrsid15008649 ' key the editing +\par modes are switched. Programmatically you can change edit mode using }{\ul\cf2\insrsid15008649 SetInsertMode}{\insrsid15008649 () function. in order to retrieve the flag that specifies current edit mode you can use }{\ul\cf2\insrsid15008649 GetInsertMode}{ +\insrsid15008649 () function. +\par +\par In our library we provide a number of special derivation of COXEdit control: COXNumericEdit, COXCurrencyEdit, COXPhysicalEdit controls (angle, length, temperature and time edit controls). +\par +\par +\par +\par +\par }{\b\fs48\cf2\insrsid15008649 COXNumericEdit }{\b\fs48\insrsid15008649 +\par }{\b\fs16\insrsid15008649 Copyright \'a9 }{\b\fs16\insrsid15008649 The Code Project}{\b\fs16\insrsid15008649 1997 1999, All Rights Reserved +\par }{\insrsid15008649 +\par COXNumericEdit is }{\ul\cf2\insrsid15008649 COXEdit}{\insrsid15008649 + derived class that was designed specifically to support editing of numeric data. While all COXEdit features are available in COXNumericEdit class there are a lot of additional features introduced in this class t +hat primarily have to do with the numeric data editing and displaying rules. +\par The following features are available: +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ql \fi-360\li720\ri0\nowidctlpar{\*\pn \pnlvlblt\ilvl0\ls1\pnrnot0\pnf3\pnindent360 {\pntxtb \'b7}}\faauto\ls1\rin0\lin720\itap0\pararsid15008649 {\insrsid15008649 +max number of decimal digits that might be typed in (indefinite number is one of the options) +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}symbol that represent decimal separator +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}number of fractional digits displayed (value of zero means there is no fractional part) +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}number of decimal digits divided in groups +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}symbol that represent group separator +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}flag that specifies if leading zero must be displayed or not +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}text color for negative value +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}format of numeric data for positive value +\par {\pntext\pard\plain\f3 \loch\af3\dbch\af0\hich\f3 \'b7\tab}format of numeric data for negative value +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par Initially COXNumericEdit control retrieves default locale data for above described settings, but all of them can be changed at runtime using public functions defined in COXNumericEdit class (refer to }{\ul\cf2\insrsid15008649 class function reference}{ +\insrsid15008649 for details). +\par +\par We would like to mention that format for positive and negative values must be defined as "}{\b\cf2\insrsid15008649 Literals}{\b\cf6\insrsid15008649 1.1}{\b\cf2\insrsid15008649 Literals}{\insrsid15008649 ", where "}{\cf6\insrsid15008649 1.1}{ +\insrsid15008649 " stands for numeric value and "}{\cf2\insrsid15008649 Literals}{\insrsid15008649 " could consist of any symbol(s). E.g. if format "(1.1)" had been specified for negative value then value -5.26 would have been displayed as "(5.26)" +\par +\par +\par +\par }{\b\fs48\cf2\insrsid15008649 COXCurrencyEdit}{\b\fs48\insrsid15008649 +\par }{\b\fs16\insrsid15008649 Copyright \'a9 }{\b\fs16\insrsid15008649 The Code Project}{\b\fs16\insrsid15008649 1997 1999, All Rights Reserved +\par }{\insrsid15008649 +\par COXCurrencyEdit is }{\ul\cf2\insrsid15008649 COXNumericEdit}{\insrsid15008649 derived class that was designed specifically to support editing of currency data. Currency is numeric data but it is also +\par required to display currency name in the control. So COXCurrencyEdit class merely add following two functions in which you can set or retrieve currency name +\par }\pard \ql \li360\ri0\nowidctlpar\faauto\rin0\lin360\itap0 {\ul\cf2\insrsid15008649 SetCurrencyName}{\insrsid15008649 () +\par }{\ul\cf2\insrsid15008649 GetCurrencyName}{\insrsid15008649 () +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 By default we use default locale to get currency name. +\par +\par We have to note that format for positive and negative values for COXCurrencyEdit must include the placeholder for currency name as one of the literals. We use '}{\b\cf6\insrsid15008649 $}{\insrsid15008649 +' symbol as universal currency placeholder. E.g. if format "}{\b\insrsid15008649 1.1$}{\insrsid15008649 " had been specified for positive value using }{\ul\cf2\insrsid15008649 SetPositiveFormat}{\insrsid15008649 +() function then value 5.26 would have been displayed as "5.26$" +\par +\par +\par +\par }{\fs20\insrsid15008649 +\par }{\b\fs48\cf2\insrsid15008649 COXDropEdit}{\b\fs48\insrsid15008649 +\par }{\b\fs16\insrsid15008649 Copyright \'a9 }{\b\fs16\insrsid15008649 The Code Project}{\b\fs16\insrsid15008649 1997 1999, All Rights Reserved +\par }{\insrsid15008649 +\par }{\b\insrsid15008649 COXDropEdit}{\insrsid15008649 is the }{\b\cf1\insrsid15008649 template}{\insrsid15008649 class that provides the functionality of adding dr +opdown button to any edit control. Dropdown button is displayed on the right or left side of the edit box and takes all height of the control window. The width of the dropdown button can be set programmatically (by default we use the width of the current +width of the scroll bar). +\par +\par The dropdown button is clickable and combination of 'pressed down' and 'unpressed' events would generate 'dropdown' event that can be handled by a programmer. By default, COXDropEdit class allows you to display associated menu (s +ee below how to associate a menu with COXDropEdit). +\par At any time you can hide or show the dropdown button. Internally, the dropdown button resides in the }{\b\insrsid15008649 non-client area}{\insrsid15008649 so this class can be safely used with most of customized edit controls. E.g. you can us +e it with our extended controls (}{\ul\cf2\insrsid15008649 COXEdit}{\insrsid15008649 , }{\ul\cf2\insrsid15008649 COXNumericEdit}{\insrsid15008649 , }{\ul\cf2\insrsid15008649 COXCurrencyEdit}{\insrsid15008649 , }{\ul\cf2\insrsid15008649 COXMaskedEdit}{ +\insrsid15008649 ) without any problems. In fact, we've updated our }{\ul\cf2\insrsid15008649 COXPhysicalEdit}{\insrsid15008649 + class to be derived from COXDropEdit in order to provide the functionality of changing the base unit by clicking on the dropdown button and choosing the unit from the popup menu. +\par +\par A programmer would normally use COXDropEdit class in order to derive from i +t. Let's go through the steps of creating a simple edit control that will display popup menu as a result of clicking on the dropdown button and after a user choose an item in the menu the text in the edit box will be updated correspondingly. +\par +\par 1)\~\~\~ Derive your own class from COXDropEdit using any existing edit class as the base one: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\i\insrsid15008649 class CMenuEdit: public COXDropEdit +\par }{\insrsid15008649 +\par In this case we declare the class that would use standard CEdit as the base class +\par +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 2)\~\~\~ Declare the following protected virtual function in the class that will be called every time the dropdown button is clicked: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid15008649 virtual void OnDropButton(); +\par }{\insrsid15008649 +\par In our case we would use the default implementation of this function as long as we are going to dis +play the menu (this functionality provided by COXDropEdit by default). But, generally, you can put here any functionality you please: e.g display popup window or dialog. +\par +\par }{\i\insrsid15008649 void CMenuEdit::OnDropButton() +\par \{ +\par \~\~\~ COXDropEdit::OnDropButton(); +\par \}}{\insrsid15008649 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par 3)\~\~\~ Declare the following protected member for the popup menu that will be displayed when the dropdown button is clicked: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid15008649 CMenu m_menu; +\par }{\insrsid15008649 +\par In order to associate a menu with COXDropEdit object you have to call the following COXDropEdit function: +\par +\par }{\ul\cf2\insrsid15008649 AssociateMenu(); +\par }{\insrsid15008649 +\par and the pointer to the associated menu can be retrieved using this function: +\par +\par }{\ul\cf2\insrsid15008649 GetAssociatedMenu();}{\insrsid15008649 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par 4)\~\~\~ So we need to create popup menu and associate it with the object. We suggest you can do that in the following COXDropEdit protected virtual function that should be overridden in CMenuEdit class: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid15008649 virtual BOOL Initialize(); +\par }{\insrsid15008649 +\par This function is called }{\ul\insrsid15008649 right after creation or subclassing of existed control}{\insrsid15008649 +. Primarily it was designed in order to provide a programmer with the functionality that can be used in order to safely initialize the control. This function }{\b\insrsid15008649 must}{\insrsid15008649 + return TRUE if the control has been successfully initialized or FALSE otherwise. In your implementation you }{\b\insrsid15008649 must}{\insrsid15008649 call the parent implementation first of all. +\par +\par }{\i\insrsid15008649 BOOL CMenuEdit::Initialize() +\par \{ +\par \~\~\~ if(!COXDropEdit::Initialize()) +\par \~\~\~\~\~\~\~ return FALSE; +\par +\par \~\~\~ if(!m_menu.CreatePopupMenu()) +\par \~\~\~\~\~\~\~ return FALSE; +\par \~\~\~ for(int nIndex=1; nIndex<=10; nIndex++) +\par \~\~\~ \{ +\par \~\~\~\~\~\~\~ CString sMenuText; +\par \~\~\~\~\~\~\~ sMenuText.Format(_T("Item %d"),nIndex); +\par \~\~\~\~\~\~\~ m_menu.AppendMenu(MF_STRING,nIndex,sMenuText); +\par \~\~\~ \} +\par \~\~\~ AssociateMenu(&m_menu); +\par +\par \~\~\~ return TRUE; +\par \}}{\insrsid15008649 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par 5)\~\~\~ In our case we display popup menu as a result of dropdown event. In order to handle the process of choosing the menu item we have to provide }{\b\insrsid15008649 WM_COMMAND}{\insrsid15008649 handler for the class using }{\b\insrsid15008649 +ON_COMMAND_RANGE()}{\insrsid15008649 or }{\b\insrsid15008649 ON_COMMAND()}{\insrsid15008649 macro. In our case our actions are not going to depend on the chosen item so we would define our handler as follows: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid15008649 afx_msg void OnMenuSelect(UINT nID); +\par . . . . . . . . . . . . . . . . . . +\par BEGIN_MESSAGE_MAP(CMenuEdit, CEdit) +\par \~\~\~ //\{\{AFX_MSG_MAP(CMenuEdit) +\par \~\~\~ //\}\}AFX_MSG_MAP +\par \~\~\~ ON_COMMAND_RANGE(1,10,OnMenuSelect) +\par END_MESSAGE_MAP() +\par . . . . . . . . . . . . . . . . . . +\par void CMenuEdit::OnMenuSelect(UINT nID) +\par \{ +\par \~\~\~ CString sItem; +\par \~\~\~ m_menu.GetMenuString(nID,sItem,MF_BYCOMMAND); +\par \~\~\~ CString sText; +\par \~\~\~ sText.Format(_T("<%s> has been picked"),sItem); +\par +\par \~\~\~ SetWindowText(sText); +\par \}}{\insrsid15008649 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par 6)\~\~\~ Basically we went through all the major steps that should be taken in order to implement COXDropEdit derived object. Below you will find information about some useful COXDropEdit functions that you might want to use in your applications: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\insrsid15008649 -\~\~\~ the following two protected virtual functions can be overridden in order to customize the appearance of the dropdown button: +\par +\par }{\b\insrsid15008649 virtual CRect DrawButtonFrame(CDC* pDC, CRect rect, BOOL bPressed); +\par virtual void DrawButtonImage(CDC* pDC, CRect rect, BOOL bPressed);}{\insrsid15008649 +\par +\par -\~\~\~ the following functions can be used in order to set/retrieve the width of the dropdown button: +\par +\par }{\ul\cf2\insrsid15008649 SetButtonWidth(); +\par GetButtonWidth();}{\insrsid15008649 +\par +\par -\~\~\~ these functions can be used in order to show/hide the dropdown button and to retrieve the flag that specifies the visibility of the dropdown button: +\par +\par }{\ul\cf2\insrsid15008649 void ShowButton(); +\par BOOL IsButtonVisible();}{\insrsid15008649 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid15008649 +\par As we mentioned before we use COXDropEdit derivation with our COXPhysicalEdit class. Also we designed and implemented a number of COXDropEdit derived classes with predefined functionality. These classes are: }{\ul\cf2\insrsid15008649 COXBrowseColorEdit}{ +\insrsid15008649 (edit control with color picker using our }{\ul\cf2\insrsid15008649 COXColorPickerCtrl}{\insrsid15008649 ), }{\ul\cf2\insrsid15008649 COXBrowseDirEdit}{\insrsid15008649 (edit control with Directory Picker using our }{ +\ul\cf2\insrsid15008649 COXFolderPicker}{\insrsid15008649 ), }{\ul\cf2\insrsid15008649 COXBrowseDirEdit16}{\insrsid15008649 (edit control with Directory Picker using our }{\ul\cf2\insrsid15008649 COXDirectoryDialog}{\insrsid15008649 ), }{ +\ul\cf2\insrsid15008649 COXBrowseFileEdit}{\insrsid15008649 (edit control with File Picker using standard }{\b\insrsid15008649 CFileDialog}{\insrsid15008649 ). +\par \~ +\par }{\fs20\insrsid15008649 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.cpp new file mode 100644 index 0000000..f99b304 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.cpp @@ -0,0 +1,121 @@ +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "EditExtensionsSht.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEditExtensionsSheet + +IMPLEMENT_DYNAMIC(CEditExtensionsSheet, CPropertySheet) + +CEditExtensionsSheet::CEditExtensionsSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) + :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + AddControlPages(); + + // TODO :: Add the pages for the rest of the controls here. +} + +CEditExtensionsSheet::CEditExtensionsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) + :CPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + AddControlPages(); +} + +CEditExtensionsSheet::~CEditExtensionsSheet() +{ +} + +void CEditExtensionsSheet::AddControlPages() +{ + // Add icon and remove "Apply" button + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_psh.dwFlags |= PSP_USEHICON; + m_psh.dwFlags|=PSH_NOAPPLYNOW; + m_psh.hIcon = m_hIcon; + + // add property pages + AddPage(&m_extendedEditPage); + AddPage(&m_numericEditPage); + AddPage(&m_currencyEditPage); + AddPage(&m_physicalEditPage); + AddPage(&m_maskedEditPage); + AddPage(&m_dropEditPage); +} + +BEGIN_MESSAGE_MAP(CEditExtensionsSheet, CPropertySheet) + //{{AFX_MSG_MAP(CEditExtensionsSheet) + ON_WM_QUERYDRAGICON() + ON_WM_SYSCOMMAND() + //}}AFX_MSG_MAP + ON_BN_CLICKED(IDHELP, OnAppAbout) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEditExtensionsSheet message handlers + +BOOL CEditExtensionsSheet::OnInitDialog() +{ + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + SetIcon(m_hIcon, TRUE); + SetIcon(m_hIcon, FALSE); + + // rename standard Help button + CWnd* pButtonCancel=GetDlgItem(IDHELP); + pButtonCancel->SetWindowText(_T("About...")); + +// SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); + + return CPropertySheet::OnInitDialog(); +} + +HCURSOR CEditExtensionsSheet::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CEditExtensionsSheet::OnSysCommand(UINT nID, LPARAM lParam) +{ + // TODO: Add your message handler code here and/or call default + + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnAppAbout(); + } + else + { + CPropertySheet::OnSysCommand(nID, lParam); + } +} + +void CEditExtensionsSheet::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.h new file mode 100644 index 0000000..f5a5fa5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/EditExtensionsSht.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// CEditExtensionsSheet + +#include "ExtendedEditDlg.h" +#include "NumericEditDlg.h" +#include "CurrencyEditDlg.h" +#include "PhysicalEditDlg.h" +#include "MaskedEditDlg.h" +#include "DropEditDlg.h" + +class CEditExtensionsSheet : public CPropertySheet +{ + DECLARE_DYNAMIC(CEditExtensionsSheet) + +// Construction +public: + CEditExtensionsSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); + CEditExtensionsSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); + +protected: + void AddControlPages(void); + +// Attributes +public: + + CExtendedEditDlg m_extendedEditPage; + CNumericEditDlg m_numericEditPage; + CCurrencyEditDlg m_currencyEditPage; + CPhysicalEditDlg m_physicalEditPage; + CMaskedEditDlg m_maskedEditPage; + CDropEditDlg m_dropEditPage; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEditExtensionsSheet) + //}}AFX_VIRTUAL + afx_msg void OnAppAbout(); + +// Implementation +public: + virtual ~CEditExtensionsSheet(); + virtual BOOL OnInitDialog(); + + // Generated message map functions +protected: + + HICON m_hIcon; + + //{{AFX_MSG(CEditExtensionsSheet) + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.cpp new file mode 100644 index 0000000..a006731 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.cpp @@ -0,0 +1,86 @@ +// ExtendedEditControls.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "EditExtensionsSht.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditControlsApp + +BEGIN_MESSAGE_MAP(CExtendedEditControlsApp, CWinApp) + //{{AFX_MSG_MAP(CExtendedEditControlsApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditControlsApp construction + +CExtendedEditControlsApp::CExtendedEditControlsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CExtendedEditControlsApp object + +CExtendedEditControlsApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditControlsApp initialization + +BOOL CExtendedEditControlsApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CEditExtensionsSheet sheet(_T("Edit control extensions")); + m_pMainWnd = &sheet; + sheet.DoModal(); + return FALSE; +} + +int CExtendedEditControlsApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsp new file mode 100644 index 0000000..fc2cfcf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsp @@ -0,0 +1,569 @@ +# Microsoft Developer Studio Project File - Name="ExtendedEditControls" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ExtendedEditControls - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ExtendedEditControls.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ExtendedEditControls.mak" CFG="ExtendedEditControls - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ExtendedEditControls - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedEditControls - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedEditControls - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedEditControls - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedEditControls - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ExtendedEditControls - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedEditControls.exe" + +!ELSEIF "$(CFG)" == "ExtendedEditControls - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtendedEditControls.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtendedEditControls - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtendedEditControls___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "ExtendedEditControls___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedEditControls.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedEditControls.exe" + +!ELSEIF "$(CFG)" == "ExtendedEditControls - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ExtendedEditControls___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "ExtendedEditControls___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtendedEditControls.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ExtendedEditControls.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtendedEditControls - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtendedEditControls___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "ExtendedEditControls___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedEditControls.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ExtendedEditControls.exe" + +!ENDIF + +# Begin Target + +# Name "ExtendedEditControls - Win32 Release" +# Name "ExtendedEditControls - Win32 Debug" +# Name "ExtendedEditControls - Win32 Release_Shared" +# Name "ExtendedEditControls - Win32 Unicode_Debug" +# Name "ExtendedEditControls - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBrowseColorEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBrowseDirEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalculatorCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalculatorEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDirDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFolderPickerDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMaskedEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPhysicalEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPhysicalEditEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellFolderTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShellNamespaceNavigator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\Source\Copytree.cpp +# End Source File +# Begin Source File + +SOURCE=.\CurrencyEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Dir.cpp +# End Source File +# Begin Source File + +SOURCE=.\DropEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Dstrlist.cpp +# End Source File +# Begin Source File + +SOURCE=.\EditExtensionsSht.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtendedEditControls.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtendedEditControls.rc +# End Source File +# Begin Source File + +SOURCE=.\ExtendedEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\File.cpp +# End Source File +# Begin Source File + +SOURCE=.\MaskedEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\NumericEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Path.cpp +# End Source File +# Begin Source File + +SOURCE=.\PhysicalEditDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Xstring.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CurrencyEditDlg.h +# End Source File +# Begin Source File + +SOURCE=.\DropEditDlg.h +# End Source File +# Begin Source File + +SOURCE=.\EditExtensionsSht.h +# End Source File +# Begin Source File + +SOURCE=.\ExtendedEditControls.h +# End Source File +# Begin Source File + +SOURCE=.\ExtendedEditDlg.h +# End Source File +# Begin Source File + +SOURCE=.\MaskedEditDlg.h +# End Source File +# Begin Source File + +SOURCE=.\NumericEditDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBrowseColorEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBrowseDirEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDirDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDropEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFolderPickerDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMaskedEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPhysicalEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPhysicalEditEx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPopupBarCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=.\PhysicalEditDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ExtendedEditControls.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ExtendedEditControls.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedEditControls.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsw new file mode 100644 index 0000000..9486be3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ExtendedEditControls"=".\ExtendedEditControls.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Ultimate ToolBox/Working/samples/gui/ExtendedEditControls", SIHCAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.h new file mode 100644 index 0000000..6131f47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.h @@ -0,0 +1,50 @@ +// ExtendedEditControls.h : main header file for the EXTENDEDEDITCONTROLS application +// + +#if !defined(AFX_EXTENDEDEDITCONTROLS_H__A1558738_B094_11D2_A7B0_525400DAF3CE__INCLUDED_) +#define AFX_EXTENDEDEDITCONTROLS_H__A1558738_B094_11D2_A7B0_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditControlsApp: +// See ExtendedEditControls.cpp for the implementation of this class +// + +class CExtendedEditControlsApp : public CWinApp +{ +public: + CExtendedEditControlsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedEditControlsApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CExtendedEditControlsApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDEDITCONTROLS_H__A1558738_B094_11D2_A7B0_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.rc new file mode 100644 index 0000000..2a315df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.rc @@ -0,0 +1,711 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ExtendedEditControls.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc"" \r\n" + "#include ""OXPhysicalEditEx.rc"" // For extended physical edit controls\r\n" + "#include ""oxdirdlg.rc""\r\n" + "#include ""OXFolderPickerDlg.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#include ""OXBrowseDirEdit.rc""\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXShellFolderTree.rc""\r\n" + "#include ""OXCalculatorCtrl.rc""\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\\ExtendedEditControls.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "ExtendedEditControls MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ExtendedEditControls" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "ExtendedEditControls.EXE" + VALUE "ProductName", "ExtendedEditControls Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_NUMERICEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END + + IDD_CURRENCYEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END + + IDD_EXTENDEDEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END + + IDD_PHYSICALEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END + + IDD_MASKEDEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END + + IDD_DROPEDIT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 341 + TOPMARGIN, 7 + BOTTOMMARGIN, 174 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_NUMERICEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "NumericEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_TEST,7,19,154,12,ES_AUTOHSCROLL | ES_WANTRETURN + CONTROL "\nChoose background color",IDC_BUTTON_BACKCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,59,59,16 + CONTROL "\nChoose text color",IDC_BUTTON_TEXTCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,80,59,16 + CONTROL "\nChoose text color for negative value",IDC_BUTTON_TEXTCOLOR_NEGATIVE, + "Button",BS_OWNERDRAW | WS_TABSTOP,83,101,59,16 + PUSHBUTTON "Font...",IDC_BUTTON_FONT,7,126,32,15 + COMBOBOX IDC_COMBO_MASK,44,151,117,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_DECIMAL_DIGIT_COUNT,260,18,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Indefinite",IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,297,19,45,10 + COMBOBOX IDC_COMBO_DECIMAL_SEPARATOR,260,38,30,45,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_FRACTIONAL_DIGIT_COUNT,260,55,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_GROUP_SEPARATOR,260,75,30,49,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_GROUP_LENGTH,260,92,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "No group",IDC_CHECK_NO_GROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,296,94,45,10 + COMBOBOX IDC_COMBO_NEGATIVE_VALUE_FORMAT,260,112,81,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + CONTROL "Display leading zero",IDC_CHECK_LEADING_ZERO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,133,79,10 + LTEXT "Background",IDC_STATIC,7,63,40,8 + LTEXT "Text (positive value)",IDC_STATIC,7,84,64,8 + LTEXT "",IDC_STATIC_FONT,44,127,117,13,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Decimal digit count",IDC_STATIC,187,21,61,8 + LTEXT "Negative value format",IDC_STATIC,187,114,70,8 + LTEXT "Decimal separator",IDC_STATIC,187,41,58,8 + LTEXT "Group separator",IDC_STATIC,187,78,58,8 + LTEXT "Text (negative value)",IDC_STATIC,7,105,68,8 + LTEXT "Control appearance",IDC_STATIC_CONTROL_APPEARANCE,7,47,154,9,SS_SUNKEN + LTEXT "Edit mask",IDC_STATIC,8,154,32,8 + LTEXT "Numeric edit control",IDC_STATIC_NUMERIC_EDIT,7,7,154,10,SS_SUNKEN + LTEXT "Numeric edit control settings",IDC_STATIC_NUMERIC_EDIT_SETTINGS,187,7,154,10,SS_SUNKEN + LTEXT "Fractional digit count",IDC_STATIC,187,58,66,8 + LTEXT "Digits in group",IDC_STATIC,187,94,46,8 + LTEXT "",IDC_STATIC_BOTTOM,187,153,154,8,SS_SUNKEN +END + +IDD_CURRENCYEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "CurrencyEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_TEST,7,19,154,12,ES_AUTOHSCROLL | ES_WANTRETURN + CONTROL "\nChoose background color",IDC_BUTTON_BACKCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,59,59,16 + CONTROL "\nChoose text color",IDC_BUTTON_TEXTCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,80,59,16 + CONTROL "\nChoose text color for negative value",IDC_BUTTON_TEXTCOLOR_NEGATIVE, + "Button",BS_OWNERDRAW | WS_TABSTOP,83,101,59,16 + LTEXT "",IDC_STATIC_FONT,44,127,117,13,SS_CENTERIMAGE | SS_SUNKEN + PUSHBUTTON "Font...",IDC_BUTTON_FONT,7,126,32,15 + COMBOBOX IDC_COMBO_MASK,44,152,117,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_DECIMAL_DIGIT_COUNT,260,18,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Indefinite",IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,297,19,45,10 + COMBOBOX IDC_COMBO_DECIMAL_SEPARATOR,260,35,30,45,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_FRACTIONAL_DIGIT_COUNT,260,52,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_GROUP_SEPARATOR,260,69,30,49,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_GROUP_LENGTH,260,86,30,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "No group",IDC_CHECK_NO_GROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,296,88,45,10 + COMBOBOX IDC_COMBO_POSITIVE_VALUE_FORMAT,260,104,81,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_NEGATIVE_VALUE_FORMAT,260,121,81,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_CURRENCY_NAME,260,138,81,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + CONTROL "Display leading zero",IDC_CHECK_LEADING_ZERO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,155,79,10 + LTEXT "Background",IDC_STATIC,7,63,40,8 + LTEXT "Text (positive value)",IDC_STATIC,7,84,64,8 + LTEXT "Decimal digit count",IDC_STATIC,187,21,61,8 + LTEXT "Negative value format",IDC_STATIC,187,124,70,8 + LTEXT "Decimal separator",IDC_STATIC,187,38,58,8 + LTEXT "Group separator",IDC_STATIC,187,72,58,8 + LTEXT "Text (negative value)",IDC_STATIC,7,105,68,8 + LTEXT "Control appearance",IDC_STATIC_CONTROL_APPEARANCE,7,47,154,9,SS_SUNKEN + LTEXT "Edit mask",IDC_STATIC,8,154,32,8 + LTEXT "Currency edit control",IDC_STATIC_NUMERIC_EDIT,7,7,154,10,SS_SUNKEN + LTEXT "Currency edit control settings",IDC_STATIC_NUMERIC_EDIT_SETTINGS,187,7,154,10,SS_SUNKEN + LTEXT "Fractional digit count",IDC_STATIC,187,55,66,8 + LTEXT "Digits in group",IDC_STATIC,187,88,46,8 + LTEXT "Positive value format",IDC_STATIC,187,107,66,8 + LTEXT "Currency name",IDC_STATIC,187,141,48,8 +END + +IDD_EXTENDEDEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "ExtendedEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_TEST,7,19,202,37,ES_MULTILINE | WS_VSCROLL + CONTROL "\nChoose background color",IDC_BUTTON_BACKCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,55,78,59,16 + CONTROL "\nChoose text color",IDC_BUTTON_TEXTCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,55,99,59,16 + PUSHBUTTON "Font...",IDC_BUTTON_FONT,151,78,32,15 + COMBOBOX IDC_COMBO_MASK,188,103,153,119,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + LTEXT "Background",IDC_STATIC,7,82,40,8 + LTEXT "Text",IDC_STATIC,7,103,15,8 + LTEXT "",IDC_STATIC_FONT,188,79,153,13,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Control appearance",IDC_STATIC_CONTROL_APPEARANCE,7,66,334,9,SS_SUNKEN + LTEXT "Edit mask",IDC_STATIC,152,106,32,8 + LTEXT "Extended edit control",IDC_STATIC_NUMERIC_EDIT,7,7,334,10,SS_SUNKEN + LTEXT "",IDC_STATIC_BOTTOM,7,142,334,8,SS_SUNKEN + LTEXT "Tooltip text",IDC_STATIC,7,126,36,8 + EDITTEXT IDC_EDIT_TOOLTIP,53,124,288,12,ES_AUTOHSCROLL +END + +IDD_PHYSICALEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "PhysicalEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_LENGTH,7,18,152,12,ES_AUTOHSCROLL + EDITTEXT IDC_TIME,7,37,152,12,ES_AUTOHSCROLL + EDITTEXT IDC_TEMPERATURE,7,56,152,12,ES_AUTOHSCROLL + EDITTEXT IDC_ANGLE,7,75,152,12,ES_AUTOHSCROLL + CTEXT "Value",IDC_STATIC_VALUE,7,7,217,8,SS_CENTERIMAGE | SS_SUNKEN + CONTROL "\nChoose background color",IDC_BUTTON_BACKCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,107,59,16 + CONTROL "\nChoose text color",IDC_BUTTON_TEXTCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,83,128,59,16 + PUSHBUTTON "Font...",IDC_BUTTON_FONT,151,108,32,15 + LTEXT "Background",IDC_STATIC,7,111,40,8 + LTEXT "",IDC_STATIC_FONT,188,109,153,13,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Control appearance",IDC_STATIC_CONTROL_APPEARANCE,7,97,334,9,SS_SUNKEN + LTEXT "",IDC_STATIC_BOTTOM,7,166,334,8,SS_SUNKEN + LTEXT "Text (positive value)",IDC_STATIC,7,133,64,8 + CONTROL "\nChoose text color for negative value",IDC_BUTTON_TEXTCOLOR_NEGATIVE, + "Button",BS_OWNERDRAW | WS_TABSTOP,83,148,59,16 + LTEXT "Text (negative value)",IDC_STATIC,7,152,68,8 + CONTROL "Show unit name",IDC_CHECK_SHOW_UNIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,128,67,10 + CONTROL "Show dropdown button",IDC_CHECK_SHOW_DROPDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,141,89,10 + CONTROL "Display dropdown button on the left",IDC_CHECK_LEFTALIGNED, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,154,127,10 +END + +IDD_MASKEDEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "MaskedEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_TEST,47,23,234,14,ES_AUTOHSCROLL + COMBOBOX IDC_COMBO_MASKS,47,49,234,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_PROMPT,47,75,40,14,ES_AUTOHSCROLL + CONTROL "AutoTab mode",IDC_CHECK_AUTOTAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,141,79,63,10 + PUSHBUTTON "Empty",IDC_BUTTON_EMPTY,291,105,50,14 + LTEXT "Test:",IDC_STATIC,13,25,29,8 + LTEXT "Masks:",IDC_STATIC,13,51,29,8 + LTEXT "Prompt:",IDC_STATIC,13,78,29,8 + LTEXT "",IDC_STATIC_BOTTOM,7,108,276,8,SS_SUNKEN +END + +IDD_DROPEDIT_DIALOG DIALOGEX 0, 0, 348, 181 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "DropEdit" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Browse for folder edit control (16-bit)",IDC_STATIC_BROWSE16_EDIT,7,7,160,10,SS_SUNKEN + EDITTEXT IDC_EDIT_BROWSE16,7,20,160,12,ES_AUTOHSCROLL + LTEXT "Browse for folder edit control (32-bit)",IDC_STATIC_BROWSE32_EDIT,7,40,160,10,SS_SUNKEN + EDITTEXT IDC_EDIT_BROWSE32,7,53,160,12,ES_AUTOHSCROLL + LTEXT "Browse for file edit control ",IDC_STATIC_BROWSEFILE_EDIT,7,74,160,10,SS_SUNKEN + EDITTEXT IDC_EDIT_BROWSEFILE,7,88,160,12,ES_AUTOHSCROLL + LTEXT "Browse for color edit control ",IDC_STATIC_BROWSECOLOR_EDIT,7,110,112,10,SS_SUNKEN + EDITTEXT IDC_EDIT_BROWSECOLOR,7,124,112,12 + LTEXT "Edit control with menu",IDC_STATIC_MENU_EDIT,7,148,114,10,SS_SUNKEN + EDITTEXT IDC_EDIT_MENU,7,162,114,12 + CONTROL "Display dropdown button on the left",IDC_CHECK_LEFTALIGNED, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,164,127,10 + LTEXT "Calculator edit",IDC_STATIC_CALCULATOR,181,7,160,10,SS_SUNKEN + EDITTEXT IDC_EDIT_CALCULATOR,181,20,160,12,ES_AUTOHSCROLL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_NUMERICEDIT_DIALOG DLGINIT +BEGIN + IDC_COMBO_MASK, 0x403, 2, 0 +0x0023, + IDC_COMBO_MASK, 0x403, 12, 0 +0x654c, 0x676e, 0x6874, 0x203a, 0x2023, 0x006d, + IDC_COMBO_MASK, 0x403, 12, 0 +0x6548, 0x6769, 0x7468, 0x203a, 0x2023, 0x0022, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0030, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0031, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0032, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0033, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0034, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0035, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0036, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0037, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0038, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0039, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x002e, + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x007c, + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x002f, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0030, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0031, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0032, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0033, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0034, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0035, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0036, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0037, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0038, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0039, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x002c, + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x007c, + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x002f, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0031, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0032, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0033, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0034, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0035, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0036, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0037, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0038, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0039, + IDC_COMBO_GROUP_LENGTH, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x3128, 0x312e, 0x0029, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 5, 0 +0x312d, 0x312e, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x202d, 0x2e31, 0x0031, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 5, 0 +0x2e31, 0x2d31, "\000" + 0 +END + +IDD_CURRENCYEDIT_DIALOG DLGINIT +BEGIN + IDC_COMBO_MASK, 0x403, 2, 0 +0x0023, + IDC_COMBO_MASK, 0x403, 17, 0 +0x6f54, 0x6174, 0x3a6c, 0x2320, 0x2820, 0x7267, 0x736f, 0x2973, "\000" + IDC_COMBO_MASK, 0x403, 10, 0 +0x6843, 0x6e61, 0x6567, 0x203a, 0x0023, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 1, 0 +"\000" + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0031, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0032, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0033, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0034, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0035, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0036, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0037, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0038, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 2, 0 +0x0039, + IDC_COMBO_DECIMAL_DIGIT_COUNT, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x002e, + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x007c, + IDC_COMBO_DECIMAL_SEPARATOR, 0x403, 2, 0 +0x002f, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0030, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0031, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0032, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0033, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0034, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0035, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0036, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0037, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0038, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 2, 0 +0x0039, + IDC_COMBO_FRACTIONAL_DIGIT_COUNT, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x002c, + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x007c, + IDC_COMBO_GROUP_SEPARATOR, 0x403, 2, 0 +0x002f, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0031, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0032, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0033, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0034, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0035, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0036, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0037, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0038, + IDC_COMBO_GROUP_LENGTH, 0x403, 2, 0 +0x0039, + IDC_COMBO_GROUP_LENGTH, 0x403, 3, 0 +0x3031, "\000" + IDC_COMBO_POSITIVE_VALUE_FORMAT, 0x403, 5, 0 +0x3124, 0x312e, "\000" + IDC_COMBO_POSITIVE_VALUE_FORMAT, 0x403, 5, 0 +0x2e31, 0x2431, "\000" + IDC_COMBO_POSITIVE_VALUE_FORMAT, 0x403, 6, 0 +0x2024, 0x2e31, 0x0031, + IDC_COMBO_POSITIVE_VALUE_FORMAT, 0x403, 6, 0 +0x2e31, 0x2031, 0x0024, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x2428, 0x2e31, 0x2931, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x242d, 0x2e31, 0x0031, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x2d24, 0x2e31, 0x0031, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x3124, 0x312e, 0x002d, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x3128, 0x312e, 0x2924, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x312d, 0x312e, 0x0024, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x2e31, 0x2d31, 0x0024, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 6, 0 +0x2e31, 0x2431, 0x002d, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x312d, 0x312e, 0x2420, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x242d, 0x3120, 0x312e, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x2e31, 0x2031, 0x2d24, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x2024, 0x2e31, 0x2d31, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x2024, 0x312d, 0x312e, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 7, 0 +0x2e31, 0x2d31, 0x2420, "\000" + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 8, 0 +0x2428, 0x3120, 0x312e, 0x0029, + IDC_COMBO_NEGATIVE_VALUE_FORMAT, 0x403, 8, 0 +0x3128, 0x312e, 0x2420, 0x0029, + IDC_COMBO_CURRENCY_NAME, 0x403, 2, 0 +0x0024, + 0 +END + +IDD_EXTENDEDEDIT_DIALOG DLGINIT +BEGIN + IDC_COMBO_MASK, 0x403, 2, 0 +0x0023, + IDC_COMBO_MASK, 0x403, 12, 0 +0x654c, 0x676e, 0x6874, 0x203a, 0x2023, 0x006d, + IDC_COMBO_MASK, 0x403, 12, 0 +0x6548, 0x6769, 0x7468, 0x203a, 0x2023, 0x0022, + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDD_DIALOG_CALCULATOR ACCELERATORS +BEGIN + "!", IDC_BUTTON_FACTORIAL, ASCII, NOINVERT + "%", IDC_BUTTON_MOD, ASCII, NOINVERT + "*", IDC_BUTTON_MULTIPLY, ASCII, NOINVERT + "+", IDC_BUTTON_ADD, ASCII, NOINVERT + "-", IDC_BUTTON_SUBTRACT, ASCII, NOINVERT + ".", IDC_BUTTON_DELIMITER, ASCII, NOINVERT + "/", IDC_BUTTON_DIVIDE, ASCII, NOINVERT + "0", IDC_BUTTON_0, ASCII, NOINVERT + "1", IDC_BUTTON_1, ASCII, NOINVERT + "2", IDC_BUTTON_2, ASCII, NOINVERT + "3", IDC_BUTTON_3, ASCII, NOINVERT + "4", IDC_BUTTON_4, ASCII, NOINVERT + "5", IDC_BUTTON_5, ASCII, NOINVERT + "6", IDC_BUTTON_6, ASCII, NOINVERT + "7", IDC_BUTTON_7, ASCII, NOINVERT + "8", IDC_BUTTON_8, ASCII, NOINVERT + "9", IDC_BUTTON_9, ASCII, NOINVERT + "=", IDC_BUTTON_EQUAL, ASCII, NOINVERT + "@", IDC_BUTTON_SQRT, ASCII, NOINVERT + "A", IDC_BUTTON_A, ASCII, NOINVERT + "B", IDC_BUTTON_B, ASCII, NOINVERT + "C", IDC_BUTTON_C, ASCII, NOINVERT + "D", IDC_BUTTON_D, ASCII, NOINVERT + "E", IDC_BUTTON_E, ASCII, NOINVERT + "F", IDC_BUTTON_F, ASCII, NOINVERT + "H", IDC_BUTTON_COTAN, ASCII, NOINVERT + "L", IDC_BUTTON_LOGARITHM, ASCII, NOINVERT + "N", IDC_BUTTON_NATURAL_LOGARITHM, ASCII, NOINVERT + "O", IDC_BUTTON_COS, ASCII, NOINVERT + "P", IDC_BUTTON_PI, ASCII, NOINVERT + "R", IDC_BUTTON_RECIPROCAL, ASCII, NOINVERT + "S", IDC_BUTTON_SIN, ASCII, NOINVERT + "T", IDC_BUTTON_TAN, ASCII, NOINVERT + VK_BACK, IDC_BUTTON_BACK, VIRTKEY, NOINVERT + VK_DELETE, IDC_BUTTON_CLEARNUMBER, VIRTKEY, NOINVERT + VK_ESCAPE, IDC_BUTTON_CLEAR, VIRTKEY, NOINVERT + VK_F9, IDC_BUTTON_CHANGESIGN, VIRTKEY, NOINVERT + 94, IDC_BUTTON_POWER, ASCII, NOINVERT + "a", IDC_BUTTON_A, ASCII, NOINVERT + "b", IDC_BUTTON_B, ASCII, NOINVERT + "c", IDC_BUTTON_C, ASCII, NOINVERT + "d", IDC_BUTTON_D, ASCII, NOINVERT + "e", IDC_BUTTON_E, ASCII, NOINVERT + "f", IDC_BUTTON_F, ASCII, NOINVERT + "h", IDC_BUTTON_COTAN, ASCII, NOINVERT + "l", IDC_BUTTON_LOGARITHM, ASCII, NOINVERT + "n", IDC_BUTTON_NATURAL_LOGARITHM, ASCII, NOINVERT + "o", IDC_BUTTON_COS, ASCII, NOINVERT + "p", IDC_BUTTON_PI, ASCII, NOINVERT + "r", IDC_BUTTON_RECIPROCAL, ASCII, NOINVERT + "s", IDC_BUTTON_SIN, ASCII, NOINVERT + "t", IDC_BUTTON_TAN, ASCII, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ExtendedEditControls..." + ID_DESCRIPTION_FILE "EditExtensionsInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Extended Edit controls" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ExtendedEditControls.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#include "OXPhysicalEditEx.rc" // For extended physical edit controls +#include "oxdirdlg.rc" +#include "OXFolderPickerDlg.rc" +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#include "OXBrowseDirEdit.rc" +#include "OXHistoryCombo.rc" +#include "OXShellFolderTree.rc" +#include "OXCalculatorCtrl.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.vcproj new file mode 100644 index 0000000..a6e663b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditControls.vcproj @@ -0,0 +1,3710 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.cpp new file mode 100644 index 0000000..f622584 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.cpp @@ -0,0 +1,158 @@ +// ExtendedEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "ExtendedEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditDlg dialog + +CExtendedEditDlg::CExtendedEditDlg():CPropertyPage(CExtendedEditDlg::IDD) +{ + //{{AFX_DATA_INIT(CExtendedEditDlg) + m_sMask = _T(""); + m_sTooltipText = _T(""); + //}}AFX_DATA_INIT +} + +void CExtendedEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CExtendedEditDlg) + DDX_Control(pDX, IDC_STATIC_BOTTOM, m_sepBottom); + DDX_Control(pDX, IDC_COMBO_MASK, m_comboMask); + DDX_Control(pDX, IDC_STATIC_NUMERIC_EDIT, m_sepNumericEdit); + DDX_Control(pDX, IDC_STATIC_CONTROL_APPEARANCE, m_sepControlAppearance); + DDX_Control(pDX, IDC_BUTTON_FONT, m_btnFont); + DDX_Control(pDX, IDC_EDIT_TEST, m_edit); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR, m_btnTextColor); + DDX_Control(pDX, IDC_BUTTON_BACKCOLOR, m_btnBackColor); + DDX_CBString(pDX, IDC_COMBO_MASK, m_sMask); + DDX_Text(pDX, IDC_EDIT_TOOLTIP, m_sTooltipText); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_BACKCOLOR, m_clrBack); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR, m_clrText); + DDX_FontPickerFont(pDX, IDC_BUTTON_FONT, &m_font); +} + +BEGIN_MESSAGE_MAP(CExtendedEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CExtendedEditDlg) + ON_BN_CLICKED(IDC_BUTTON_BACKCOLOR, OnButtonBackcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR, OnButtonTextcolor) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_CBN_SELCHANGE(IDC_COMBO_MASK, OnSelchangeComboMask) + ON_CBN_EDITCHANGE(IDC_COMBO_MASK, OnEditchangeComboMask) + ON_EN_CHANGE(IDC_EDIT_TOOLTIP, OnChangeEditTooltip) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditDlg message handlers + +BOOL CExtendedEditDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_clrBack=m_edit.GetBkColor(); + m_clrText=m_edit.GetTextColor(); + + m_edit.SetToolTipText(_T("EditControl")); + m_sMask=m_edit.GetMask(); + m_sTooltipText=m_edit.GetToolTipText(); + + m_btnBackColor.SetToolTip(TRUE); + m_btnTextColor.SetToolTip(TRUE); + + m_btnFont.SetBuddy(IDC_STATIC_FONT); + LOGFONT lf; + CFont* pFont=m_edit.GetFont(); + if(pFont==NULL) + { + CClientDC dc(&m_edit); + pFont=dc.GetCurrentFont(); + } + ASSERT(pFont!=NULL); + VERIFY(pFont->GetLogFont(&lf)); + VERIFY(m_font.CreateFontIndirect(&lf)); + + // separators + COLORREF clr=::GetSysColor(COLOR_BTNTEXT); + m_sepNumericEdit.SetTextColor(clr); + m_sepControlAppearance.SetTextColor(clr); + + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CExtendedEditDlg::OnButtonBackcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetBkColor(m_clrBack); +} + +void CExtendedEditDlg::OnButtonTextcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetTextColor(m_clrText); +} + +void CExtendedEditDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_edit.SetFont(&m_font); +} + +void CExtendedEditDlg::OnEditchangeComboMask() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + + +void CExtendedEditDlg::OnSelchangeComboMask() +{ + // TODO: Add your control notification handler code here + + m_comboMask.GetLBText(m_comboMask.GetCurSel(),m_sMask); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + + +void CExtendedEditDlg::OnChangeEditTooltip() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CPropertyPage::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + UpdateData(); + m_edit.SetToolTipText(m_sTooltipText); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.h new file mode 100644 index 0000000..e4fa1d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ExtendedEditDlg.h @@ -0,0 +1,68 @@ +// ExtendedEditDlg.h : header file +// + +#if !defined(AFX_ExtendedEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) +#define AFX_ExtendedEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXEdit.h" +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CExtendedEditDlg dialog + +class CExtendedEditDlg : public CPropertyPage +{ +// Construction +public: + CExtendedEditDlg(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CExtendedEditDlg) + enum { IDD = IDD_EXTENDEDEDIT_DIALOG }; + COXSeparator m_sepBottom; + CComboBox m_comboMask; + COXSeparator m_sepNumericEdit; + COXSeparator m_sepControlAppearance; + COXFontPickerButton m_btnFont; + COXEdit m_edit; + COXColorPickerButton m_btnTextColor; + COXColorPickerButton m_btnBackColor; + CString m_sMask; + CString m_sTooltipText; + //}}AFX_DATA + COLORREF m_clrBack; + COLORREF m_clrText; + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CExtendedEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBackcolor(); + afx_msg void OnButtonTextcolor(); + afx_msg void OnButtonFont(); + afx_msg void OnSelchangeComboMask(); + afx_msg void OnEditchangeComboMask(); + afx_msg void OnChangeEditTooltip(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ExtendedEditDlg_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.cpp new file mode 100644 index 0000000..dbf3959 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.cpp @@ -0,0 +1,147 @@ +// MaskedEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "MaskedEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__ ; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditDlg dialog + +CMaskedEditDlg::CMaskedEditDlg() : CPropertyPage(CMaskedEditDlg::IDD)/*, m_editMasked()*/ +{ + //{{AFX_DATA_INIT(CMaskedEditDlg) + m_csPromptChar = _T(""); + m_bAutoTab = FALSE; + //}}AFX_DATA_INIT +} + +void CMaskedEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX) ; + //{{AFX_DATA_MAP(CMaskedEditDlg) + DDX_Control(pDX, IDC_STATIC_BOTTOM, m_sepBottom); + DDX_Control (pDX, IDC_EDIT_TEST , m_editMasked ) ; + DDX_Control (pDX, IDC_COMBO_MASKS, m_comboMasks ) ; + DDX_Text (pDX, IDC_EDIT_PROMPT, m_csPromptChar) ; + DDV_MaxChars(pDX, m_csPromptChar, 1) ; + DDX_Check(pDX, IDC_CHECK_AUTOTAB, m_bAutoTab); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CMaskedEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CMaskedEditDlg) + ON_CBN_SELENDOK (IDC_COMBO_MASKS, OnSelendokMasks ) + ON_CBN_EDITCHANGE(IDC_COMBO_MASKS, OnEditchangeMasks) + ON_EN_CHANGE(IDC_EDIT_PROMPT, OnChangeEditPrompt) + ON_BN_CLICKED(IDC_BUTTON_EMPTY, OnButtonEmpty) + ON_BN_CLICKED(IDC_CHECK_AUTOTAB, OnCheckAutotab) + //}}AFX_MSG_MAP + ON_NOTIFY(OXMEN_VALIDATE,IDC_EDIT_TEST,OnValidateEditTest) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditDlg message handlers + +BOOL CMaskedEditDlg::OnInitDialog() +{ + m_csPromptChar = m_editMasked.GetPromptSymbol() ; + m_bAutoTab=m_editMasked.GetAutoTab(); + + CPropertyPage::OnInitDialog() ; + + m_comboMasks.AddString ( _T("Digit Test: ###-####") ) ; + m_comboMasks.AddString ( _T("Decimal Test: ###.###.###.###") ) ; + m_comboMasks.AddString ( _T("Thousands Test: ##,###.##") ) ; + m_comboMasks.AddString ( _T("Time Test: ##:##") ) ; + m_comboMasks.AddString ( _T("Date Test: ##/##/####") ) ; + // Since the "C" programming language also uses the '\' as an escape character, + // you must use two in sequence to equal one switch for masking purposes. + m_comboMasks.AddString ( _T("\\Alphanumeric Test: AAAAAAAAAA\\, AAAAAAAA") ) ; + m_comboMasks.AddString ( _T("\\Alphabetic Test: ????????????????") ) ; + m_comboMasks.AddString ( _T("Uppercase Test: >>>>>>> ????????") ) ; + m_comboMasks.AddString ( _T("Lowercase Test: <<<<<<< ????????") ) ; + m_comboMasks.AddString ( _T("Phone:(###)###-#### Ext:####") ) ; + m_comboMasks.AddString ( _T("AAA-#######") ) ; + m_comboMasks.AddString ( _T("&####-##-## ##\\:##\\:##") ) ; + m_comboMasks.SetCurSel ( 0 ) ; + OnSelendokMasks() ; + return TRUE ; +} + +void CMaskedEditDlg::OnSelendokMasks() +{ + TRACE(_T("CMaskedEditDlg::OnSelendokMasks()\n")); + + int nSelected = m_comboMasks.GetCurSel() ; + if ( nSelected >= 0 ) + { + CString csNewMask ; + m_comboMasks.GetLBText ( nSelected, csNewMask ) ; + m_editMasked.SetMask ( csNewMask ) ; + } +} + +void CMaskedEditDlg::OnEditchangeMasks() +{ + TRACE(_T("CMaskedEditDlg::OnEditchangeMasks()\n")); + + CString csNewMask ; + m_comboMasks.GetWindowText ( csNewMask ) ; + m_editMasked.SetMask ( csNewMask ) ; +} + +void CMaskedEditDlg::OnChangeEditPrompt() +{ + TRACE(_T("CMaskedEditDlg::OnChangeEditPrompt()\n")); + + UpdateData ( TRUE ) ; + if ( m_csPromptChar.GetLength() == 1 ) + m_editMasked.SetPromptSymbol ( m_csPromptChar[0] ) ; +} + +void CMaskedEditDlg::OnButtonEmpty() +{ + // TODO: Add your control notification handler code here + m_editMasked.EmptyData(TRUE); + UpdateData ( FALSE ) ; +} + +void CMaskedEditDlg::OnCheckAutotab() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_editMasked.SetAutoTab(m_bAutoTab); +} + +void CMaskedEditDlg::OnValidateEditTest(NMHDR * pNotifyStruct, LRESULT * result) +{ + LPMENMHDR pMENotifyStruct = (LPMENMHDR)pNotifyStruct; + + UpdateData(); + + CString sText=m_editMasked.GetInputData(); + + // just as an example: if user typed "345" then typed information is invalid, + // cursor will be set before first found "345" symbol + int nPos=sText.Find(_T("345")); + if(nPos!=-1) + { + pMENotifyStruct->bValid=FALSE; + pMENotifyStruct->nPosition=m_editMasked.LPtoRP(nPos); + } + else + { + pMENotifyStruct->bValid=TRUE; + pMENotifyStruct->bDefaultValidation=TRUE; + } + + *result=0; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.h new file mode 100644 index 0000000..22a8f09 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/MaskedEditDlg.h @@ -0,0 +1,55 @@ +// MaskedEditDlg.h : header file +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MaskedEditDlg_h__ +#define __MaskedEditDlg_h__ + + +#include "OXMaskedEdit.h" // COXMaskedEdit +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditDlg dialog + +class CMaskedEditDlg : public CPropertyPage +{ +// Construction +public: + CMaskedEditDlg() ; + + // Dialog Data +protected: + //{{AFX_DATA(CMaskedEditDlg) + enum { IDD = IDD_MASKEDEDIT_DIALOG }; + COXSeparator m_sepBottom; + COXMaskedEdit m_editMasked; + CComboBox m_comboMasks; + CString m_csPromptChar; + BOOL m_bAutoTab; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMaskedEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX) ; + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CMaskedEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSelendokMasks(); + afx_msg void OnEditchangeMasks(); + afx_msg void OnChangeEditPrompt(); + afx_msg void OnButtonEmpty(); + afx_msg void OnCheckAutotab(); + //}}AFX_MSG + afx_msg void OnValidateEditTest(NMHDR * pNotifyStruct, LRESULT * result); + DECLARE_MESSAGE_MAP() +}; + +#endif // __MaskedEditDlg_h__ +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.cpp new file mode 100644 index 0000000..67b833a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.cpp @@ -0,0 +1,313 @@ +// NumericEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "NumericEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNumericEditDlg dialog + +CNumericEditDlg::CNumericEditDlg():CPropertyPage(CNumericEditDlg::IDD) +{ + //{{AFX_DATA_INIT(CNumericEditDlg) + m_bLeadingZero = FALSE; + m_bIndefiniteDecimalDigitCount = FALSE; + m_bNoDiditInGroup = FALSE; + m_sDecimalSeparator = _T(""); + m_sGroupSeparator = _T(""); + m_sNegativeValueFormat = _T(""); + m_nDecimalDigitCount = -1; + m_nFractionalDigitCount = -1; + m_nGroupLength = -1; + m_sMask = _T(""); + //}}AFX_DATA_INIT +} + +void CNumericEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CNumericEditDlg) + DDX_Control(pDX, IDC_STATIC_BOTTOM, m_sepBottom); + DDX_Control(pDX, IDC_COMBO_NEGATIVE_VALUE_FORMAT, m_comboNegativeFormat); + DDX_Control(pDX, IDC_COMBO_GROUP_SEPARATOR, m_comboGroupSeparator); + DDX_Control(pDX, IDC_COMBO_DECIMAL_SEPARATOR, m_comboDecimalSeparator); + DDX_Control(pDX, IDC_COMBO_MASK, m_comboMask); + DDX_Control(pDX, IDC_COMBO_GROUP_LENGTH, m_comboGroupLength); + DDX_Control(pDX, IDC_COMBO_DECIMAL_DIGIT_COUNT, m_comboDecimalCount); + DDX_Control(pDX, IDC_STATIC_NUMERIC_EDIT, m_sepNumericEdit); + DDX_Control(pDX, IDC_STATIC_NUMERIC_EDIT_SETTINGS, m_sepNumericEditSettings); + DDX_Control(pDX, IDC_STATIC_CONTROL_APPEARANCE, m_sepControlAppearance); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_btnTextColorNegative); + DDX_Control(pDX, IDC_BUTTON_FONT, m_btnFont); + DDX_Control(pDX, IDC_EDIT_TEST, m_edit); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR, m_btnTextColor); + DDX_Control(pDX, IDC_BUTTON_BACKCOLOR, m_btnBackColor); + DDX_Check(pDX, IDC_CHECK_LEADING_ZERO, m_bLeadingZero); + DDX_Check(pDX, IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, m_bIndefiniteDecimalDigitCount); + DDX_Check(pDX, IDC_CHECK_NO_GROUP, m_bNoDiditInGroup); + DDX_CBString(pDX, IDC_COMBO_DECIMAL_SEPARATOR, m_sDecimalSeparator); + DDV_MaxChars(pDX, m_sDecimalSeparator, 1); + DDX_CBString(pDX, IDC_COMBO_GROUP_SEPARATOR, m_sGroupSeparator); + DDV_MaxChars(pDX, m_sGroupSeparator, 1); + DDX_CBString(pDX, IDC_COMBO_NEGATIVE_VALUE_FORMAT, m_sNegativeValueFormat); + DDX_CBIndex(pDX, IDC_COMBO_DECIMAL_DIGIT_COUNT, m_nDecimalDigitCount); + DDX_CBIndex(pDX, IDC_COMBO_FRACTIONAL_DIGIT_COUNT, m_nFractionalDigitCount); + DDX_CBIndex(pDX, IDC_COMBO_GROUP_LENGTH, m_nGroupLength); + DDX_CBString(pDX, IDC_COMBO_MASK, m_sMask); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_BACKCOLOR, m_clrBack); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR, m_clrText); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_clrTextNegative); + DDX_FontPickerFont(pDX, IDC_BUTTON_FONT, &m_font); +} + +BEGIN_MESSAGE_MAP(CNumericEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CNumericEditDlg) + ON_BN_CLICKED(IDC_BUTTON_BACKCOLOR, OnButtonBackcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR, OnButtonTextcolor) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR_NEGATIVE, OnButtonTextcolorNegative) + ON_BN_CLICKED(IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE, OnCheckDecimalDigitCountIndefinite) + ON_BN_CLICKED(IDC_CHECK_NO_GROUP, OnCheckNoGroup) + ON_CBN_EDITCHANGE(IDC_COMBO_MASK, OnEditchangeComboMask) + ON_CBN_SELCHANGE(IDC_COMBO_MASK, OnSelchangeComboMask) + ON_BN_CLICKED(IDC_CHECK_LEADING_ZERO, OnCheckLeadingZero) + ON_CBN_SELCHANGE(IDC_COMBO_DECIMAL_DIGIT_COUNT, OnSelchangeComboDecimalDigitCount) + ON_CBN_EDITCHANGE(IDC_COMBO_DECIMAL_SEPARATOR, OnEditchangeComboDecimalSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_DECIMAL_SEPARATOR, OnSelchangeComboDecimalSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_FRACTIONAL_DIGIT_COUNT, OnSelchangeComboFractionalDigitCount) + ON_CBN_SELCHANGE(IDC_COMBO_GROUP_LENGTH, OnSelchangeComboGroupLength) + ON_CBN_EDITCHANGE(IDC_COMBO_GROUP_SEPARATOR, OnEditchangeComboGroupSeparator) + ON_CBN_SELCHANGE(IDC_COMBO_GROUP_SEPARATOR, OnSelchangeComboGroupSeparator) + ON_CBN_EDITCHANGE(IDC_COMBO_NEGATIVE_VALUE_FORMAT, OnEditchangeComboNegativeValueFormat) + ON_CBN_SELCHANGE(IDC_COMBO_NEGATIVE_VALUE_FORMAT, OnSelchangeComboNegativeValueFormat) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNumericEditDlg message handlers + +BOOL CNumericEditDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + m_clrBack=m_edit.GetBkColor(); + m_clrText=m_edit.GetTextColor(); + m_clrTextNegative=m_edit.GetNegativeTextColor(); + + m_edit.SetToolTipText(_T("EditControl")); +// VERIFY(m_edit.SetMask(_T("Length: # m"))); +// VERIFY(m_edit.SetInputData(_T("234.567"))); + m_sMask=m_edit.GetMask(); + m_bLeadingZero=m_edit.GetShowLeadingZero(); + m_nDecimalDigitCount=m_edit.GetDecimalDigitCount(); + m_bIndefiniteDecimalDigitCount=(m_nDecimalDigitCount==-1 ? TRUE : FALSE); + m_comboDecimalCount.EnableWindow(!m_bIndefiniteDecimalDigitCount); + m_sDecimalSeparator=m_edit.GetDecimalSeparator(); + m_nFractionalDigitCount=m_edit.GetFractionalDigitCount(); + m_nGroupLength=m_edit.GetGroupLength(); + m_bNoDiditInGroup=(m_nGroupLength==0 ? TRUE : FALSE); + m_comboGroupLength.EnableWindow(!m_bNoDiditInGroup); + m_nGroupLength--; + m_sGroupSeparator=m_edit.GetGroupSeparator(); + m_sNegativeValueFormat=m_edit.GetNegativeFormat(); + + m_btnBackColor.SetToolTip(TRUE); + m_btnTextColor.SetToolTip(TRUE); + m_btnTextColorNegative.SetToolTip(TRUE); + + m_btnFont.SetBuddy(IDC_STATIC_FONT); + LOGFONT lf; + CFont* pFont=m_edit.GetFont(); + if(pFont==NULL) + { + CClientDC dc(&m_edit); + pFont=dc.GetCurrentFont(); + } + ASSERT(pFont!=NULL); + VERIFY(pFont->GetLogFont(&lf)); + VERIFY(m_font.CreateFontIndirect(&lf)); + + // separators + COLORREF clr=::GetSysColor(COLOR_BTNTEXT); + m_sepNumericEdit.SetTextColor(clr); + m_sepNumericEditSettings.SetTextColor(clr); + m_sepControlAppearance.SetTextColor(clr); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CNumericEditDlg::OnButtonBackcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetBkColor(m_clrBack); +} + +void CNumericEditDlg::OnButtonTextcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetTextColor(m_clrText); +} + +void CNumericEditDlg::OnButtonTextcolorNegative() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetNegativeTextColor(m_clrTextNegative); +} + +void CNumericEditDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_edit.SetFont(&m_font); +} + +void CNumericEditDlg::OnCheckDecimalDigitCountIndefinite() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_comboDecimalCount.EnableWindow(!m_bIndefiniteDecimalDigitCount); + if(m_bIndefiniteDecimalDigitCount) + m_edit.SetDecimalDigitCount(-1); + else + m_edit.SetDecimalDigitCount(m_nDecimalDigitCount); +} + +void CNumericEditDlg::OnCheckNoGroup() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_comboGroupLength.EnableWindow(!m_bNoDiditInGroup); + if(m_bNoDiditInGroup) + m_edit.SetGroupLength(0); + else + m_edit.SetGroupLength(m_nGroupLength+1); +} + +void CNumericEditDlg::OnEditchangeComboMask() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + + +void CNumericEditDlg::OnSelchangeComboMask() +{ + // TODO: Add your control notification handler code here + + m_comboMask.GetLBText(m_comboMask.GetCurSel(),m_sMask); + if(!m_edit.SetMask(m_sMask)) + { + AfxMessageBox(_T("Invalid mask has been specified.\nMake sure you use '#' symbol in your mask!")); + m_sMask=m_edit.GetMask(); + UpdateData(FALSE); + } +} + +void CNumericEditDlg::OnCheckLeadingZero() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetShowLeadingZero(m_bLeadingZero); +} + +void CNumericEditDlg::OnSelchangeComboDecimalDigitCount() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetDecimalDigitCount(m_nDecimalDigitCount); +} + +void CNumericEditDlg::OnEditchangeComboDecimalSeparator() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetDecimalSeparator(m_sDecimalSeparator[0]); +} + +void CNumericEditDlg::OnSelchangeComboDecimalSeparator() +{ + // TODO: Add your control notification handler code here + + m_comboDecimalSeparator.GetLBText(m_comboDecimalSeparator.GetCurSel(), + m_sDecimalSeparator); + m_edit.SetDecimalSeparator(m_sDecimalSeparator[0]); +} + +void CNumericEditDlg::OnSelchangeComboFractionalDigitCount() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetFractionalDigitCount(m_nFractionalDigitCount); +} + +void CNumericEditDlg::OnSelchangeComboGroupLength() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetGroupLength(m_nGroupLength+1); +} + +void CNumericEditDlg::OnEditchangeComboGroupSeparator() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetGroupSeparator(m_sGroupSeparator[0]); +} + +void CNumericEditDlg::OnSelchangeComboGroupSeparator() +{ + // TODO: Add your control notification handler code here + + m_comboGroupSeparator.GetLBText(m_comboGroupSeparator.GetCurSel(), + m_sGroupSeparator); + m_edit.SetGroupSeparator(m_sGroupSeparator[0]); +} + +void CNumericEditDlg::OnEditchangeComboNegativeValueFormat() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_edit.SetNegativeFormat(m_sNegativeValueFormat); +} + +void CNumericEditDlg::OnSelchangeComboNegativeValueFormat() +{ + // TODO: Add your control notification handler code here + + m_comboNegativeFormat.GetLBText(m_comboNegativeFormat.GetCurSel(), + m_sNegativeValueFormat); + m_edit.SetNegativeFormat(m_sNegativeValueFormat); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.h new file mode 100644 index 0000000..3cf0a17 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/NumericEditDlg.h @@ -0,0 +1,96 @@ +// NumericEditDlg.h : header file +// + +#if !defined(AFX_NUMERICEDITDLG_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) +#define AFX_NUMERICEDITDLG_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXEdit.h" +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CNumericEditDlg dialog + +class CNumericEditDlg : public CPropertyPage +{ +// Construction +public: + CNumericEditDlg(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CNumericEditDlg) + enum { IDD = IDD_NUMERICEDIT_DIALOG }; + COXSeparator m_sepBottom; + CComboBox m_comboNegativeFormat; + CComboBox m_comboGroupSeparator; + CComboBox m_comboDecimalSeparator; + CComboBox m_comboMask; + CComboBox m_comboGroupLength; + CComboBox m_comboDecimalCount; + COXSeparator m_sepNumericEdit; + COXSeparator m_sepNumericEditSettings; + COXSeparator m_sepControlAppearance; + COXColorPickerButton m_btnTextColorNegative; + COXFontPickerButton m_btnFont; + COXNumericEdit m_edit; + COXColorPickerButton m_btnTextColor; + COXColorPickerButton m_btnBackColor; + BOOL m_bLeadingZero; + BOOL m_bIndefiniteDecimalDigitCount; + BOOL m_bNoDiditInGroup; + CString m_sDecimalSeparator; + CString m_sGroupSeparator; + CString m_sNegativeValueFormat; + int m_nDecimalDigitCount; + int m_nFractionalDigitCount; + int m_nGroupLength; + CString m_sMask; + //}}AFX_DATA + COLORREF m_clrBack; + COLORREF m_clrText; + COLORREF m_clrTextNegative; + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNumericEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CNumericEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBackcolor(); + afx_msg void OnButtonTextcolor(); + afx_msg void OnButtonFont(); + afx_msg void OnButtonTextcolorNegative(); + afx_msg void OnCheckDecimalDigitCountIndefinite(); + afx_msg void OnCheckNoGroup(); + afx_msg void OnEditchangeComboMask(); + afx_msg void OnSelchangeComboMask(); + afx_msg void OnCheckLeadingZero(); + afx_msg void OnSelchangeComboDecimalDigitCount(); + afx_msg void OnEditchangeComboDecimalSeparator(); + afx_msg void OnSelchangeComboDecimalSeparator(); + afx_msg void OnSelchangeComboFractionalDigitCount(); + afx_msg void OnSelchangeComboGroupLength(); + afx_msg void OnEditchangeComboGroupSeparator(); + afx_msg void OnSelchangeComboGroupSeparator(); + afx_msg void OnEditchangeComboNegativeValueFormat(); + afx_msg void OnSelchangeComboNegativeValueFormat(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_NUMERICEDITDLG_H__368B4776_AA35_11D2_A7AA_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.cpp new file mode 100644 index 0000000..3a2b88d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.cpp @@ -0,0 +1,197 @@ +// PhysicalEditDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedEditControls.h" +#include "PhysicalEditDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalEditDlg dialog + +CPhysicalEditDlg::CPhysicalEditDlg():CPropertyPage(CPhysicalEditDlg::IDD) +{ + //{{AFX_DATA_INIT(CPhysicalEditDlg) + m_bShowUnit = FALSE; + m_bShowDropdownButton = TRUE; + m_bDropdownLeftAligned = FALSE; + //}}AFX_DATA_INIT + m_dConvAngle = 0.0; + m_dConvLength = 0.0; + m_dConvTemp = 0.0; + m_dConvTime = 0.0; +} + +void CPhysicalEditDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPhysicalEditDlg) + DDX_Control(pDX, IDC_STATIC_VALUE, m_sepValue); + DDX_Control(pDX, IDC_STATIC_BOTTOM, m_sepBottom); + DDX_Control(pDX, IDC_STATIC_CONTROL_APPEARANCE, m_sepControlAppearance); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_btnTextColorNegative); + DDX_Control(pDX, IDC_BUTTON_FONT, m_btnFont); + DDX_Control(pDX, IDC_BUTTON_TEXTCOLOR, m_btnTextColor); + DDX_Control(pDX, IDC_BUTTON_BACKCOLOR, m_btnBackColor); + DDX_Control(pDX, IDC_TEMPERATURE, m_wndTemp); + DDX_Control(pDX, IDC_TIME, m_wndTime); + DDX_Control(pDX, IDC_LENGTH, m_wndLength); + DDX_Control(pDX, IDC_ANGLE, m_wndAngle); + DDX_Check(pDX, IDC_CHECK_SHOW_UNIT, m_bShowUnit); + DDX_Check(pDX, IDC_CHECK_SHOW_DROPDOWN, m_bShowDropdownButton); + DDX_Check(pDX, IDC_CHECK_LEFTALIGNED, m_bDropdownLeftAligned); + //}}AFX_DATA_MAP + // We only want to retrieve data from the control (not put new data in it) + DDX_ColorPicker(pDX, IDC_BUTTON_BACKCOLOR, m_clrBack); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR, m_clrText); + DDX_ColorPicker(pDX, IDC_BUTTON_TEXTCOLOR_NEGATIVE, m_clrTextNegative); + DDX_FontPickerFont(pDX, IDC_BUTTON_FONT, &m_font); +} + +BEGIN_MESSAGE_MAP(CPhysicalEditDlg, CPropertyPage) + //{{AFX_MSG_MAP(CPhysicalEditDlg) + ON_BN_CLICKED(IDC_BUTTON_BACKCOLOR, OnButtonBackcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR, OnButtonTextcolor) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_BN_CLICKED(IDC_BUTTON_TEXTCOLOR_NEGATIVE, OnButtonTextcolorNegative) + ON_BN_CLICKED(IDC_CHECK_SHOW_UNIT, OnCheckShowUnit) + ON_BN_CLICKED(IDC_CHECK_SHOW_DROPDOWN, OnCheckShowDropdown) + ON_BN_CLICKED(IDC_CHECK_LEFTALIGNED, OnCheckLeftaligned) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalEditDlg message handlers + +BOOL CPhysicalEditDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + m_wndTemp.SetMask(_T("Temperature: #")); + m_wndTemp.SetTextColor(RGB(0,0,255)); + m_wndTemp.SetNegativeFormat(_T("-1.1")); + m_wndTemp.SetPositiveFormat(_T("+1.1")); + + m_wndTime.SetMask(_T("Time: #")); + m_wndTime.SetTextColor(RGB(0,0,255)); + + m_wndLength.SetMask(_T("Length: #")); + m_wndLength.SetTextColor(RGB(0,0,255)); + + m_wndAngle.SetMask(_T("Angle: #")); + m_wndAngle.SetTextColor(RGB(0,0,255)); + + m_btnBackColor.SetToolTip(TRUE); + m_btnTextColor.SetToolTip(TRUE); + m_btnTextColorNegative.SetToolTip(TRUE); + + m_clrBack=m_wndLength.GetBkColor(); + m_clrText=m_wndLength.GetTextColor(); + m_clrTextNegative=m_wndLength.GetNegativeTextColor(); + m_bShowUnit=m_wndLength.GetShowUnit(); + + m_btnFont.SetBuddy(IDC_STATIC_FONT); + LOGFONT lf; + CFont* pFont=m_wndLength.GetFont(); + if(pFont==NULL) + { + CClientDC dc(&m_wndLength); + pFont=dc.GetCurrentFont(); + } + ASSERT(pFont!=NULL); + VERIFY(pFont->GetLogFont(&lf)); + VERIFY(m_font.CreateFontIndirect(&lf)); + + // separators + COLORREF clr=::GetSysColor(COLOR_BTNTEXT); + m_sepControlAppearance.SetTextColor(clr); + m_sepValue.SetTextColor(clr); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CPhysicalEditDlg::OnButtonBackcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_wndTemp.SetBkColor(m_clrBack); + m_wndTime.SetBkColor(m_clrBack); + m_wndLength.SetBkColor(m_clrBack); + m_wndAngle.SetBkColor(m_clrBack); +} + +void CPhysicalEditDlg::OnButtonTextcolor() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_wndTemp.SetTextColor(m_clrText); + m_wndTime.SetTextColor(m_clrText); + m_wndLength.SetTextColor(m_clrText); + m_wndAngle.SetTextColor(m_clrText); +} + +void CPhysicalEditDlg::OnButtonTextcolorNegative() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_wndTemp.SetNegativeTextColor(m_clrTextNegative); + m_wndTime.SetNegativeTextColor(m_clrTextNegative); + m_wndLength.SetNegativeTextColor(m_clrTextNegative); + m_wndAngle.SetNegativeTextColor(m_clrTextNegative); +} + +void CPhysicalEditDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_wndTemp.SetFont(&m_font); + m_wndTime.SetFont(&m_font); + m_wndLength.SetFont(&m_font); + m_wndAngle.SetFont(&m_font); +} + + +void CPhysicalEditDlg::OnCheckShowUnit() +{ + // TODO: Add your control notification handler code here + + UpdateData(); + m_wndTemp.ShowUnit(m_bShowUnit); + m_wndTime.ShowUnit(m_bShowUnit); + m_wndLength.ShowUnit(m_bShowUnit); + m_wndAngle.ShowUnit(m_bShowUnit); +} + +void CPhysicalEditDlg::OnCheckShowDropdown() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_wndTemp.ShowButton(m_bShowDropdownButton); + m_wndTime.ShowButton(m_bShowDropdownButton); + m_wndLength.ShowButton(m_bShowDropdownButton); + m_wndAngle.ShowButton(m_bShowDropdownButton); +} + +void CPhysicalEditDlg::OnCheckLeftaligned() +{ + // TODO: Add your control notification handler code here + UpdateData(); + int nAlignment=(m_bDropdownLeftAligned ? OXDROPEDIT_BUTTONLEFT : + OXDROPEDIT_BUTTONRIGHT); + m_wndTemp.SetButtonAlignment(nAlignment); + m_wndTime.SetButtonAlignment(nAlignment); + m_wndLength.SetButtonAlignment(nAlignment); + m_wndAngle.SetButtonAlignment(nAlignment); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.h new file mode 100644 index 0000000..805f7b5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/PhysicalEditDlg.h @@ -0,0 +1,66 @@ +// PhysicalEditDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalEditDlg dialog + +#include "OXPhysicalEditEx.h" +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" +#include "OXSeparator.h" + +class CPhysicalEditDlg : public CPropertyPage +{ +// Construction +public: + CPhysicalEditDlg(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CPhysicalEditDlg) + enum { IDD = IDD_PHYSICALEDIT_DIALOG }; + COXSeparator m_sepValue; + COXSeparator m_sepBottom; + COXSeparator m_sepControlAppearance; + COXColorPickerButton m_btnTextColorNegative; + COXFontPickerButton m_btnFont; + COXColorPickerButton m_btnTextColor; + COXColorPickerButton m_btnBackColor; + COXTempEdit m_wndTemp; + COXTimeEdit m_wndTime; + COXLengthEdit m_wndLength; + COXAngleEdit m_wndAngle; + BOOL m_bShowUnit; + BOOL m_bShowDropdownButton; + BOOL m_bDropdownLeftAligned; + //}}AFX_DATA + double m_dConvAngle; + double m_dConvLength; + double m_dConvTemp; + double m_dConvTime; + COLORREF m_clrBack; + COLORREF m_clrText; + COLORREF m_clrTextNegative; + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPhysicalEditDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CPhysicalEditDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBackcolor(); + afx_msg void OnButtonTextcolor(); + afx_msg void OnButtonFont(); + afx_msg void OnButtonTextcolorNegative(); + afx_msg void OnCheckShowUnit(); + afx_msg void OnCheckShowDropdown(); + afx_msg void OnCheckLeftaligned(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ReadMe.txt new file mode 100644 index 0000000..c625cd9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ExtendedEditControls +======================================================================== + + +AppWizard has created this ExtendedEditControls 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 ExtendedEditControls application. + +ExtendedEditControls.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ExtendedEditControls.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CExtendedEditControlsApp application class. + +ExtendedEditControls.cpp + This is the main application source file that contains the application + class CExtendedEditControlsApp. + +ExtendedEditControls.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++. + +ExtendedEditControls.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ExtendedEditControls.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ExtendedEditControls.rc. + +res\ExtendedEditControls.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ExtendedEditControlsDlg.h, ExtendedEditControlsDlg.cpp - the dialog + These files contain your CExtendedEditControlsDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ExtendedEditControls.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ExtendedEditControls.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.cpp new file mode 100644 index 0000000..bd9f148 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ExtendedEditControls.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.h new file mode 100644 index 0000000..5b0a3bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/StdAfx.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A155873C_B094_11D2_A7B0_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__A155873C_B094_11D2_A7B0_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes +#if _MFC_VER > 0x0421 +#include // MFC support for Internet Explorer 4 Common Controls +#endif // _MFC_VER > 0x0421 +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A155873C_B094_11D2_A7B0_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.rc2 new file mode 100644 index 0000000..2b369fe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/res/ExtendedEditControls.rc2 @@ -0,0 +1,13 @@ +// +// EXTENDEDEDITCONTROLS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/resource.h new file mode 100644 index 0000000..5f34aed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedEditControls/resource.h @@ -0,0 +1,124 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ExtendedEditControls.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_EXTENDEDEDITCONTROLS_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDD_NUMERICEDIT_DIALOG 129 +#define IDD_CURRENCYEDIT_DIALOG 130 +#define IDD_EXTENDEDEDIT_DIALOG 131 +#define IDD_PHYSICALEDIT_DIALOG 132 +#define IDD_MASKEDEDIT_DIALOG 133 +#define IDD_DROPEDIT_DIALOG 134 +#define IDD_DIALOG_CALCULATOR 135 +#define IDC_EDIT_TEST 1000 +#define IDC_LENGTH 1000 +#define IDC_BUTTON_BACKCOLOR 1001 +#define IDC_BUTTON_TEXTCOLOR 1002 +#define IDC_BUTTON_FONT 1003 +#define IDC_STATIC_FONT 1004 +#define IDC_BUTTON_TEXTCOLOR_NEGATIVE 1005 +#define IDC_EDIT_TEST2 1005 +#define IDC_BUTTON_APPLY 1012 +#define IDC_CHECK_LEADING_ZERO 1014 +#define IDC_STATIC_CONTROL_APPEARANCE 1016 +#define IDC_STATIC_NUMERIC_EDIT 1018 +#define IDC_STATIC_NUMERIC_EDIT_SETTINGS 1019 +#define IDC_COMBO_DECIMAL_DIGIT_COUNT 1020 +#define IDC_CHECK_DECIMAL_DIGIT_COUNT_INDEFINITE 1021 +#define IDC_COMBO_FRACTIONAL_DIGIT_COUNT 1022 +#define IDC_COMBO_NEGATIVE_VALUE_FORMAT 1023 +#define IDC_COMBO_DECIMAL_SEPARATOR 1024 +#define IDC_COMBO_GROUP_SEPARATOR 1025 +#define IDC_COMBO_GROUP_LENGTH 1026 +#define IDC_CHECK_NO_GROUP 1027 +#define IDC_COMBO_MASK 1028 +#define IDC_STATIC_BOTTOM 1029 +#define IDC_COMBO_POSITIVE_VALUE_FORMAT 1029 +#define IDC_COMBO_CURRENCY_NAME 1030 +#define IDC_EDIT_TOOLTIP 1030 +#define IDC_TIME 1031 +#define IDC_TEMPERATURE 1032 +#define IDC_ANGLE 1034 +#define IDC_LENGTH_LIST 1035 +#define IDC_TIME_LIST 1036 +#define IDC_TEMPERATURE_LIST 1037 +#define IDC_ANGLE_LIST 1038 +#define IDC_CHECK_SHOW_UNIT 1039 +#define IDC_STATIC_CONVERT 1040 +#define IDC_STATIC_VALUE 1041 +#define IDC_COMBO_MASKS 1043 +#define IDC_BUTTON_EMPTY 1044 +#define IDC_EDIT_PROMPT 1045 +#define IDC_CHECK_AUTOTAB 1046 +#define IDC_STATIC_BROWSE16_EDIT 1048 +#define IDC_EDIT_BROWSE16 1049 +#define IDC_STATIC_BROWSE32_EDIT 1050 +#define IDC_BUTTON_CLEAR 1050 +#define IDC_EDIT_BROWSE32 1051 +#define IDC_BUTTON_CLEARNUMBER 1051 +#define IDC_STATIC_BROWSEFILE_EDIT 1052 +#define IDC_BUTTON_BACK 1052 +#define IDC_EDIT_BROWSEFILE 1053 +#define IDC_BUTTON_7 1053 +#define IDC_STATIC_BROWSECOLOR_EDIT 1054 +#define IDC_BUTTON_8 1054 +#define IDC_EDIT_BROWSECOLOR 1055 +#define IDC_BUTTON_9 1055 +#define IDC_STATIC_NUMERICWITHCALCULATOR_EDIT 1056 +#define IDC_BUTTON_4 1056 +#define IDC_STATIC_MENU_EDIT 1056 +#define IDC_EDIT_NUMERICWITHCALCULATOR 1057 +#define IDC_BUTTON_5 1057 +#define IDC_EDIT_MENU 1057 +#define IDC_BUTTON_6 1058 +#define IDC_STATIC_CALCULATOR 1058 +#define IDC_BUTTON_1 1059 +#define IDC_EDIT_CALCULATOR 1059 +#define IDC_BUTTON_2 1060 +#define IDC_BUTTON_3 1061 +#define IDC_BUTTON_DIVIDE 1062 +#define IDC_BUTTON_MULTIPLY 1063 +#define IDC_BUTTON_SUBTRACT 1064 +#define IDC_BUTTON_ADD 1065 +#define IDC_BUTTON_EQUAL 1066 +#define IDC_BUTTON_0 1067 +#define IDC_BUTTON_CHANGESIGN 1068 +#define IDC_BUTTON_DELIMITER 1069 +#define IDC_BUTTON_SQRT 1070 +#define IDC_BUTTON_MOD 1071 +#define IDC_BUTTON_RECIPROCAL 1072 +#define IDC_COMBO_NUMBER_SYSTEM 1073 +#define IDC_BUTTON_PI 1074 +#define IDC_BUTTON_COS 1075 +#define IDC_BUTTON_SIN 1076 +#define IDC_BUTTON_TAN 1077 +#define IDC_BUTTON_COTAN 1078 +#define IDC_CHECK_SCIENTIFIC 1079 +#define IDC_BUTTON_FACTORIAL 1080 +#define IDC_STATIC_DISPLAY 1081 +#define IDC_BUTTON_POWER 1082 +#define IDC_CHECK_LEFTALIGNED 1082 +#define IDC_BUTTON_NATURAL_LOGARITHM 1083 +#define IDC_CHECK_SHOW_DROPDOWN 1083 +#define IDC_BUTTON_LOGARITHM 1085 +#define IDC_BUTTON_A 1087 +#define IDC_BUTTON_B 1088 +#define IDC_BUTTON_C 1089 +#define IDC_BUTTON_D 1090 +#define IDC_BUTTON_E 1091 +#define IDC_BUTTON_F 1092 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 139 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1085 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.clw new file mode 100644 index 0000000..8428d8e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.clw @@ -0,0 +1,199 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CExtendedListBoxApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ExtendedListBox.h" +LastPage=0 + +ClassCount=4 +Class1=CExtendedListBoxApp +Class2=CExtendedListBoxDoc +Class3=CExtendedListBoxView +Class4=CMainFrame + +ResourceCount=9 +Resource1=IDR_MAINFRAME (English (U.S.)) +Resource2=IDR_MAINFRAME +Resource7=IDD_ABOUTBOX (English (U.S.)) +Resource8=IDD_EXTENDEDLISTBOX_FORM (English (U.S.)) +Resource9=IDD_EXTENDEDLISTBOX_FORM + +[CLS:CExtendedListBoxApp] +Type=0 +HeaderFile=ExtendedListBox.h +ImplementationFile=ExtendedListBox.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CExtendedListBoxApp + +[CLS:CExtendedListBoxDoc] +Type=0 +HeaderFile=ExtendedListBoxDoc.h +ImplementationFile=ExtendedListBoxDoc.cpp +Filter=N + +[CLS:CExtendedListBoxView] +Type=0 +HeaderFile=ExtendedListBoxView.h +ImplementationFile=ExtendedListBoxView.cpp +Filter=D +BaseClass=CFormView +VirtualFilter=VWC +LastObject=CExtendedListBoxView + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T + + + + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_PRINT +Command6=ID_FILE_PRINT_PREVIEW +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_VIEW_TOOLBAR +Command15=ID_VIEW_STATUS_BAR +Command16=ID_APP_ABOUT +CommandCount=16 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_EXTENDEDLISTBOX_FORM] +Type=1 +Class=CExtendedListBoxView +ControlCount=22 +Control1=IDC_LISTBOX_EX,listbox,1353777505 +Control2=IDC_BUTTON_LISTBOX_BK_COLOR,button,1342242827 +Control3=IDC_BUTTON_ITEM_BK_COLOR,button,1342242827 +Control4=IDC_EDIT_INDENT,edit,1350631552 +Control5=IDC_SPIN_INDENT,msctls_updown32,1342242998 +Control6=IDC_BUTTON_ITEM_FONT,button,1342242827 +Control7=IDC_FONT_LISTBOX,listbox,1353777505 +Control8=IDC_FONT_COMBO,combobox,1344340514 +Control9=IDC_EDIT_FONT_HEIGHT,edit,1350631552 +Control10=IDC_SPIN_FONT_HEIGHT,msctls_updown32,1342242998 +Control11=IDC_EDIT_MAXNUM_MRU_ITEMS,edit,1350631552 +Control12=IDC_SPIN_FONT_MAXNUM_MRU_ITEMS,msctls_updown32,1342242998 +Control13=IDC_SEPARATOR_LISTBOX,static,1342312448 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_CHECK_HIGHLIGHT_ONLY_TEXT,button,1342242819 +Control16=IDC_SEPARATOR_ITEM_PROPERTIES,static,1342312448 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC_ITEM_FONT,static,1342312960 +Control20=IDC_SEPARATOR_FONT_LIST_AND_COMBO,static,1342312960 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 + +[DLG:IDD_EXTENDEDLISTBOX_FORM (English (U.S.))] +Type=1 +ControlCount=0 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_PRINT +Command6=ID_FILE_PRINT_PREVIEW +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_VIEW_TOOLBAR +Command15=ID_VIEW_STATUS_BAR +Command16=ID_APP_ABOUT +CommandCount=16 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.cpp new file mode 100644 index 0000000..975e616 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.cpp @@ -0,0 +1,134 @@ +// ExtendedListBox.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ExtendedListBox.h" + +#include "MainFrm.h" +#include "ExtendedListBoxDoc.h" +#include "ExtendedListBoxView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxApp + +BEGIN_MESSAGE_MAP(CExtendedListBoxApp, CWinApp) + //{{AFX_MSG_MAP(CExtendedListBoxApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxApp construction + +CExtendedListBoxApp::CExtendedListBoxApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CExtendedListBoxApp object + +CExtendedListBoxApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxApp initialization + +BOOL CExtendedListBoxApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl\n")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CExtendedListBoxDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CExtendedListBoxView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + + +// App command to run the dialog +void CExtendedListBoxApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_ABOUTINFO,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxApp message handlers + + +int CExtendedListBoxApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsp new file mode 100644 index 0000000..85e5cea --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsp @@ -0,0 +1,432 @@ +# Microsoft Developer Studio Project File - Name="ExtendedListBox" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ExtendedListBox - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ExtendedListBox.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ExtendedListBox.mak" CFG="ExtendedListBox - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ExtendedListBox - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedListBox - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedListBox - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedListBox - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedListBox - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ExtendedListBox - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedListBox.exe" + +!ELSEIF "$(CFG)" == "ExtendedListBox - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtendedListBox.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtendedListBox - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtendedListBox___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "ExtendedListBox___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedListBox.exe" + +!ELSEIF "$(CFG)" == "ExtendedListBox - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ExtendedListBox___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "ExtendedListBox___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtendedListBox.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ExtendedListBox.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ExtendedListBox - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ExtendedListBox___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "ExtendedListBox___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ExtendedListBox.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ExtendedListBox.exe" + +!ENDIF + +# Begin Target + +# Name "ExtendedListBox - Win32 Release" +# Name "ExtendedListBox - Win32 Debug" +# Name "ExtendedListBox - Win32 Release_Shared" +# Name "ExtendedListBox - Win32 Unicode_Debug" +# Name "ExtendedListBox - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXListBoxEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedListBox.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtendedListBox.rc +# End Source File +# Begin Source File + +SOURCE=.\ExtendedListBoxDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtendedListBoxView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ExtendedListBox.h +# End Source File +# Begin Source File + +SOURCE=.\ExtendedListBoxDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ExtendedListBoxView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBaseSubclassedComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFontComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXListBoxEx.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ExtendedListBox.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ExtendedListBox.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ExtendedListBoxDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\il_listboxex.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedListBox.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsw new file mode 100644 index 0000000..5fc57c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ExtendedListBox"=".\ExtendedListBox.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ExtendedListBox", DQHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.exe.manifest new file mode 100644 index 0000000..21a9922 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.h new file mode 100644 index 0000000..e026736 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.h @@ -0,0 +1,50 @@ +// ExtendedListBox.h : main header file for the EXTENDEDLISTBOX application +// + +#if !defined(AFX_EXTENDEDLISTBOX_H__21FF47E5_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) +#define AFX_EXTENDEDLISTBOX_H__21FF47E5_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxApp: +// See ExtendedListBox.cpp for the implementation of this class +// + +class CExtendedListBoxApp : public CWinApp +{ +public: + CExtendedListBoxApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedListBoxApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CExtendedListBoxApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDLISTBOX_H__21FF47E5_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.rc new file mode 100644 index 0000000..5ae56c3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.rc @@ -0,0 +1,437 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\ExtendedListBox.ico" +IDR_EXTENDTYPE ICON "res\\ExtendedListBoxDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDB_IL_LISTBOXEX BITMAP "res\\il_listboxex.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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + 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 "&Help" + BEGIN + MENUITEM "&About ExtendedListBox...", 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_EXTENDEDLISTBOX_FORM DIALOGEX 0, 0, 320, 259 +STYLE DS_SETFONT | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LISTBOX IDC_LISTBOX_EX,7,23,154,114,LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + CONTROL "\nChoose list box background color",IDC_BUTTON_LISTBOX_BK_COLOR, + "Button",BS_OWNERDRAW | WS_TABSTOP,259,23,53,14 + CONTROL "\nChoose item's background color",IDC_BUTTON_ITEM_BK_COLOR, + "Button",BS_OWNERDRAW | WS_TABSTOP,260,65,53,14 + EDITTEXT IDC_EDIT_INDENT,260,86,40,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_INDENT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_TABSTOP,301,87,9,10 + CONTROL "Item's font and text color...\nChoose an item's font and text color",IDC_BUTTON_ITEM_FONT, + "Button",BS_OWNERDRAW | WS_TABSTOP,171,102,108,15 + LISTBOX IDC_FONT_LISTBOX,7,163,154,89,LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + COMBOBOX IDC_FONT_COMBO,171,163,142,211,CBS_DROPDOWN | CBS_OWNERDRAWVARIABLE | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_FONT_HEIGHT,260,216,40,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_FONT_HEIGHT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_TABSTOP,302,216,11,10 + EDITTEXT IDC_EDIT_MAXNUM_MRU_ITEMS,260,236,40,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_FONT_MAXNUM_MRU_ITEMS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_TABSTOP,302,236,11,10 + LTEXT "Extended list box control",IDC_SEPARATOR_LISTBOX,7,7,306,9,SS_SUNKEN,WS_EX_TRANSPARENT + LTEXT "Control's background color",IDC_STATIC,169,25,85,8 + CONTROL "Highlight only text for selected items",IDC_CHECK_HIGHLIGHT_ONLY_TEXT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,172,41,128,10 + LTEXT "",IDC_SEPARATOR_ITEM_PROPERTIES,171,55,142,8,SS_SUNKEN,WS_EX_TRANSPARENT + LTEXT "Item's background color",IDC_STATIC,170,68,76,8 + LTEXT "Indent from the left side",IDC_STATIC,170,88,74,8 + LTEXT "Static",IDC_STATIC_ITEM_FONT,171,120,142,16,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Font List Box and Font Picker Combo Box",IDC_SEPARATOR_FONT_LIST_AND_COMBO,7,148,306,9,SS_CENTERIMAGE | SS_SUNKEN,WS_EX_TRANSPARENT + LTEXT "Font height in the list box",IDC_STATIC,170,219,79,8 + LTEXT "Max number of MRU items in the combo box",IDC_STATIC,170,234,84,17 +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 "040904B0" + BEGIN + VALUE "FileDescription", "ExtendedListBox MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ExtendedListBox" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "ExtendedListBox.EXE" + VALUE "ProductName", "ExtendedListBox Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_EXTENDEDLISTBOX_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 252 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ExtendedListBox\n\nExtend\n\n\nExtendedListBox.Document\nExtend Document" + ID_DESCRIPTION_FILE "ExtendedListBoxInfo.rtf" + IDR_ABOUTINFO "Extended ListBox Demo" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "ExtendedListBox" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ExtendedListBox.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" + "#include ""OXListBoxEx.rc""\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ExtendedListBox.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXListBoxEx.rc" +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" +#include "OXCoolToolBar.rc" +#include "OXMenuBar.rc" +#include "OXPopupBarCtrl.rc" + +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.vcproj new file mode 100644 index 0000000..6c7e993 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBox.vcproj @@ -0,0 +1,2584 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.cpp new file mode 100644 index 0000000..3f847bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.cpp @@ -0,0 +1,84 @@ +// ExtendedListBoxDoc.cpp : implementation of the CExtendedListBoxDoc class +// + +#include "stdafx.h" +#include "ExtendedListBox.h" + +#include "ExtendedListBoxDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxDoc + +IMPLEMENT_DYNCREATE(CExtendedListBoxDoc, CDocument) + +BEGIN_MESSAGE_MAP(CExtendedListBoxDoc, CDocument) + //{{AFX_MSG_MAP(CExtendedListBoxDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxDoc construction/destruction + +CExtendedListBoxDoc::CExtendedListBoxDoc() +{ + // TODO: add one-time construction code here + +} + +CExtendedListBoxDoc::~CExtendedListBoxDoc() +{ +} + +BOOL CExtendedListBoxDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxDoc serialization + +void CExtendedListBoxDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxDoc diagnostics + +#ifdef _DEBUG +void CExtendedListBoxDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CExtendedListBoxDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.h new file mode 100644 index 0000000..c4120a2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxDoc.h @@ -0,0 +1,57 @@ +// ExtendedListBoxDoc.h : interface of the CExtendedListBoxDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_EXTENDEDLISTBOXDOC_H__21FF47EB_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) +#define AFX_EXTENDEDLISTBOXDOC_H__21FF47EB_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CExtendedListBoxDoc : public CDocument +{ +protected: // create from serialization only + CExtendedListBoxDoc(); + DECLARE_DYNCREATE(CExtendedListBoxDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedListBoxDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CExtendedListBoxDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CExtendedListBoxDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDLISTBOXDOC_H__21FF47EB_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxInfo.rtf new file mode 100644 index 0000000..10316d8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxInfo.rtf @@ -0,0 +1,88 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;} +{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5183391\rsid7801115} +{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr12\min32}{\revtim\yr2005\mo1\dy17\hr12\min32}{\version2}{\edmins0}{\nofpages3}{\nofwords734}{\nofchars4184}{\*\company Dundas India} +{\nofcharsws4909}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot7801115 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid7801115 COXListBoxEx Overview}{\b\fs48\insrsid7801115 +\par }{\b\fs15\insrsid7801115 Copyright \'a9 }{\b\fs15\insrsid7801115 The Code Project}{\b\fs15\insrsid7801115 1997-1999, All Rights Reserved +\par }{\insrsid7801115 +\par }{\b\insrsid7801115 COXListBoxEx}{\insrsid7801115 is }{\b\insrsid7801115 CListBox}{\insrsid7801115 derived class that provides a lot of additional functionality that might be at different circumstances. New features mostly have to do with +the way list box items are displayed. Using this class you can set }{\b\insrsid7801115 images}{\insrsid7801115 to be displayed altogether with text. You can easily assign any }{\b\insrsid7801115 font}{\insrsid7801115 , }{\b\insrsid7801115 text}{ +\insrsid7801115 and }{\b\insrsid7801115 background}{\insrsid7801115 color, }{\b\insrsid7801115 indention}{\insrsid7801115 from the left side for any item in a list box. Also you can assign a }{\b\insrsid7801115 tooltip}{\insrsid7801115 to any item so +\~whenever mouse is moved in the item rectangle the corresponding tooltip will be displayed. You can specify background color and tooltip for the\~ +\par list box control as well. +\par +\par COXListBoxEx class introduces new functionality that might be especially useful in combo box control (to use COXListBoxEx derived class as combo box dropdown list box). This functionality allows you to assign some items as }{\b\insrsid7801115 +Most Recent Used (MRU)}{\insrsid7801115 items. }{\b\insrsid7801115 MRU}{\insrsid7801115 items always reside at the top of the list and separated fro +m the rest of the items by separator (line is drawn between last MRU and first normal items). COXListBoxEx allows you to specify the maximum number of MRU items. And also it supports the functionality of saving and restoring MRU items to/from the registry +. +\par }{\b\insrsid7801115 +\par +\par Usage +\par +\par }{\insrsid7801115 +In order to use COXListBoxEx object in your application you have to create it using standard CListBox::Create function or subclass the existing control (e.g. using DDX/DDV technology). When creating control explicitly or defining it in dialog tem +plate you have to make sure that the following requirements are met: +\par +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\b\insrsid7801115 LBS_OWNERDRAWVARIABLE }{\insrsid7801115 style }{\b\ul\insrsid7801115 must}{\insrsid7801115 be specified +\par if control is supposed to display text then }{\b\insrsid7801115 LBS_HASSTRINGS}{\insrsid7801115 style }{\b\ul\insrsid7801115 must}{\insrsid7801115 be specified +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +After control was successfully created or subclassed you might want to populate it with items. The process of adding new items is exactly the same as for the standard CListBox control. We extended standard declaration of some functions in order to accommo +date new functionality. Use following functions in order to add or insert new item: +\par +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 int }{\ul\cf2\insrsid7801115 AddString}{\insrsid7801115 (LPCTSTR lpszItem, int nMask, OXLISTBOXITEM* pLBI); +\par int }{\ul\cf2\insrsid7801115 AddString}{\insrsid7801115 (LPCTSTR lpszItem, int nMask=0, CFont* pFont=NULL, COLORREF clrText=::GetSysColor(COLOR_WINDOW +TEXT), COLORREF clrBackground=::GetSysColor(COLOR_WINDOW), CString sTooltipText=_T(""), int nImageIndex=-1,\~ int nIndent=0); +\par int }{\ul\cf2\insrsid7801115 InsertString}{\insrsid7801115 (int nIndex, LPCTSTR lpszItem, int nMask, OXLISTBOXITEM* pLBI); +\par int }{\ul\cf2\insrsid7801115 InsertString}{\insrsid7801115 (int nIndex, LPCTSTR lpszItem, int +nMask=0, CFont* pFont=NULL, COLORREF clrText=::GetSysColor(COLOR_WINDOWTEXT), COLORREF clrBackground=::GetSysColor(COLOR_WINDOW), CString sTooltipText=_T(""), int nImageIndex=-1, int nIndent=0); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +\par As you can see you can specify all new item settings at the moment this item is added. +\par +\par +\par You can change any item property at runtime using the following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 BOOL }{\ul\cf2\insrsid7801115 SetItemInfo}{\insrsid7801115 (int nIndex, int nMask, OXLISTBOXITEM* pLBI); +\par virtual BOOL }{\ul\cf2\insrsid7801115 SetItemInfo}{\insrsid7801115 (int nIndex, int nMask=0, CFont* pFont=NULL, COLORREF clrText=::Ge +tSysColor(COLOR_WINDOWTEXT), COLORREF clrBackground=::GetSysColor(COLOR_WINDOW), CString sTooltipText=_T(""), int nImageIndex=-1, int nIndent=0); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemFont}{\insrsid7801115 (int nIndex, CFont* pFont); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemTextColor}{\insrsid7801115 (int nIndex, COLORREF clrText); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemBkColor}{\insrsid7801115 (int nIndex, COLORREF clrBackground); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemImageIndex}{\insrsid7801115 (int nIndex, int nImageIndex); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemIndent}{\insrsid7801115 (int nIndex, int nIndent); +\par BOOL }{\ul\cf2\insrsid7801115 SetItemTooltipText}{\insrsid7801115 (int nIndex, CString sTooltipText); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +\par You can retrieve any item property at runtime using the following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 OXLISTBOXITEM* }{\ul\cf2\insrsid7801115 GetItemInfo}{\insrsid7801115 (int nIndex) const; +\par CFont* }{\ul\cf2\insrsid7801115 GetItemFont}{\insrsid7801115 (int nIndex) const; +\par COLORREF }{\ul\cf2\insrsid7801115 GetItemTextColor}{\insrsid7801115 (int nIndex) const; +\par COLORREF }{\ul\cf2\insrsid7801115 GetItemBkColor}{\insrsid7801115 (int nIndex) const; +\par int }{\ul\cf2\insrsid7801115 GetItemImageIndex}{\insrsid7801115 (int nIndex) const; +\par int }{\ul\cf2\insrsid7801115 GetItemIndent}{\insrsid7801115 (int nIndex) const; +\par CString }{\ul\cf2\insrsid7801115 GetItemTooltipText}{\insrsid7801115 (int nIndex) const; +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +\par You can specify a background color of the control using: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 void }{\ul\cf2\insrsid7801115 SetBkColor}{\insrsid7801115 (COLORREF clrBackground); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +\par And tooltip for the control can be set using: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 BOOL }{\ul\cf2\insrsid7801115 SetItemTooltipText}{\insrsid7801115 (int nIndex, CString sTooltipText); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 +\par We already mentioned MRU items paradigm that is supported by COXListBoxEx class. Here is the list of functions that can be used in order to specify maximum number of MRU items, to move/remove items to/from the MRU section and to save and re +store the state of MRU items: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid7801115 int }{\ul\cf2\insrsid7801115 MRUAdd}{\insrsid7801115 (int nItemIndex) ; +\par int }{\ul\cf2\insrsid7801115 MRUMove}{\insrsid7801115 (int nMRUIndex, int nMRUIndexNew);\~ +\par virtual int }{\ul\cf2\insrsid7801115 MRUInsert}{\insrsid7801115 (int nItemIndex, int nMRUIndex, BOOL bForceToInsert=TRUE); +\par virtual int }{\ul\cf2\insrsid7801115 MRUDelete}{\insrsid7801115 (int nMRUIndex); +\par void }{\ul\cf2\insrsid7801115 SetSaveRestoreMRUState}{\insrsid7801115 (BOOL bSaveRestore); +\par BOOL }{\ul\cf2\insrsid7801115 GetSaveRestoreMRUState}{\insrsid7801115 () const; +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid7801115 \~ +\par Even greater level of customization can be achieved through deriving your own class from COXListBoxEx. This class has a big set of protected virtual functions that are responsible for implementing clas +s features. By overriding those functions you can provide your own logic in the control. Refer to }{\ul\cf2\insrsid7801115 class reference}{\insrsid7801115 for details.}{\fs20\insrsid7801115 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.cpp new file mode 100644 index 0000000..6c10e15 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.cpp @@ -0,0 +1,382 @@ +// ExtendedListBoxView.cpp : implementation of the CExtendedListBoxView class +// + +#include "stdafx.h" +#include "ExtendedListBox.h" + +#include "ExtendedListBoxDoc.h" +#include "ExtendedListBoxView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxView + +IMPLEMENT_DYNCREATE(CExtendedListBoxView, CFormView) + +BEGIN_MESSAGE_MAP(CExtendedListBoxView, CFormView) + //{{AFX_MSG_MAP(CExtendedListBoxView) + ON_LBN_SELCHANGE(IDC_LISTBOX_EX, OnSelchangeListboxEx) + ON_BN_CLICKED(IDC_BUTTON_ITEM_BK_COLOR, OnButtonItemBkColor) + ON_BN_CLICKED(IDC_BUTTON_ITEM_FONT, OnButtonItemFont) + ON_BN_CLICKED(IDC_BUTTON_LISTBOX_BK_COLOR, OnButtonListboxBkColor) + ON_BN_CLICKED(IDC_CHECK_HIGHLIGHT_ONLY_TEXT, OnCheckHighlightOnlyText) + ON_EN_CHANGE(IDC_EDIT_INDENT, OnChangeEditIndent) + ON_EN_CHANGE(IDC_EDIT_FONT_HEIGHT, OnChangeEditFontHeight) + ON_EN_CHANGE(IDC_EDIT_MAXNUM_MRU_ITEMS, OnChangeEditMaxnumMruItems) + ON_CBN_SELCHANGE(IDC_FONT_COMBO, OnSelchangeFontCombo) + ON_LBN_SELCHANGE(IDC_FONT_LISTBOX, OnSelchangeFontListbox) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxView construction/destruction + +CExtendedListBoxView::CExtendedListBoxView() + : CFormView(CExtendedListBoxView::IDD) +{ + //{{AFX_DATA_INIT(CExtendedListBoxView) + m_bHighlightOnlyText = FALSE; + m_nIndent = 0; + m_nFontHeight = 0; + m_nMaxNumMRUItems = 0; + //}}AFX_DATA_INIT + // TODO: add construction code here + +} + +CExtendedListBoxView::~CExtendedListBoxView() +{ + for(int nIndex=0; nIndex + GetMaxItemsBeforeSeparator(); + + UpdateData(FALSE); + + m_btnItemBkColor.SetToolTip(TRUE); + m_btnItemFont.SetToolTip(TRUE); + m_btnListBoxBkColor.SetToolTip(TRUE); + + m_btnItemFont.SetBuddy(IDC_STATIC_ITEM_FONT); + + // spin controls + m_spinIndent.SetRange(0,100); + m_spinFontHeight.SetRange(1,100); + m_spinMaxNumMRUItems.SetRange(0,50); + + + m_fontComboBox.SetSaveRestoreMRUState(TRUE); + + + // populate extended list box + // + + // set image list to be displayed + static CImageList imageList; + imageList.Create(IDB_IL_LISTBOXEX,32,0,RGB(192,192,192)); + m_listBoxEx.SetImageList(&imageList); + + // fonts for items + static CFont g_fontHeader; + VERIFY(g_fontHeader.CreatePointFont(200,_T("Arial"))); + static CFont g_fontFamily; + VERIFY(g_fontFamily.CreatePointFont(160,_T("Times New Roman"))); + + // hierarchial items + AddSimpsonsItem(_T("Simpsons"),0,0,RGB(0,0,0), + _T("Reside in Springfield, USA"),&g_fontHeader); + AddSimpsonsItem(_T("Homer"),1,20,RGB(0,0,255),_T("Still has hair"),&g_fontFamily); + AddSimpsonsItem(_T("Marge"),2,20,RGB(0,0,255),_T(""),&g_fontFamily); + AddSimpsonsItem(_T("Bart"),3,40,RGB(0,128,0),_T(""),&g_fontFamily); + AddSimpsonsItem(_T("Lisa"),4,40,RGB(0,128,0),_T(""),&g_fontFamily); + AddSimpsonsItem(_T("Maggie"),5,40,RGB(0,128,0),_T(""),&g_fontFamily); + AddSimpsonsItem(_T("GrandPa"),6,20,RGB(128,128,128),_T(""),&g_fontFamily); + + for(int nIndex=0; nIndexRecalcLayout(); + ResizeParentToFit(); +} + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxView printing + +BOOL CExtendedListBoxView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CExtendedListBoxView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CExtendedListBoxView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +void CExtendedListBoxView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/) +{ + // TODO: add customized printing code here + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxView diagnostics + +#ifdef _DEBUG +void CExtendedListBoxView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CExtendedListBoxView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CExtendedListBoxDoc* CExtendedListBoxView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExtendedListBoxDoc))); + return (CExtendedListBoxDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CExtendedListBoxView message handlers + +int CExtendedListBoxView::AddSimpsonsItem(LPCTSTR lpszText, + int nImageIndex, + int nIndent, + COLORREF clrText, + LPCTSTR lpszTooltipText, + CFont* pFont) +{ + int nIndex=m_listBoxEx.AddString(lpszText); + ASSERT(nIndex!=LB_ERR); + m_listBoxEx.SetItemImageIndex(nIndex,nImageIndex); + m_listBoxEx.SetItemIndent(nIndex,nIndent); + m_listBoxEx.SetItemTextColor(nIndex,clrText); + m_listBoxEx.SetItemTooltipText(nIndex,lpszTooltipText); + m_listBoxEx.SetItemFont(nIndex,pFont); + return nIndex; +} + +void CExtendedListBoxView::OnSelchangeListboxEx() +{ + // TODO: Add your control notification handler code here + if(!UpdateData(TRUE)) + return; + + int nIndex=m_listBoxEx.GetCurSel(); + ASSERT(nIndex!=LB_ERR); + m_nIndent=m_listBoxEx.GetItemIndent(nIndex);; + m_clrItemBack=m_listBoxEx.GetItemBkColor(nIndex); + m_clrItemText=m_listBoxEx.GetItemTextColor(nIndex); + CFont* pFont=m_listBoxEx.GetItemFont(nIndex); + ASSERT(pFont!=NULL); + LOGFONT lf; + VERIFY(pFont->GetLogFont(&lf)); + if((HFONT)m_fontItem!=NULL) + VERIFY(m_fontItem.DeleteObject()); + VERIFY(m_fontItem.CreateFontIndirect(&lf)); + + UpdateData(FALSE); +} + +void CExtendedListBoxView::OnButtonItemBkColor() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + int nIndex=m_listBoxEx.GetCurSel(); + VERIFY(m_listBoxEx.SetItemBkColor(nIndex,m_clrItemBack)); +} + +void CExtendedListBoxView::OnButtonItemFont() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + int nIndex=m_listBoxEx.GetCurSel(); + + CFont* pFont=m_arrFonts[nIndex]; + ASSERT(pFont!=NULL); + LOGFONT lf; + VERIFY(m_fontItem.GetLogFont(&lf)); + if(pFont->m_hObject!=NULL) + VERIFY(pFont->DeleteObject()); + VERIFY(pFont->CreateFontIndirect(&lf)); + + VERIFY(m_listBoxEx.SetItemFont(nIndex,pFont)); + VERIFY(m_listBoxEx.SetItemTextColor(nIndex,m_clrItemText)); +} + +void CExtendedListBoxView::OnButtonListboxBkColor() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + m_listBoxEx.SetBkColor(m_clrListBoxBack); + VERIFY(m_listBoxEx.SetItemBkColor(-1,m_clrListBoxBack)); +} + +void CExtendedListBoxView::OnCheckHighlightOnlyText() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + m_listBoxEx.SetHighlightOnlyText(m_bHighlightOnlyText); +} + +void CExtendedListBoxView::OnChangeEditIndent() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CFormView::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + if(!::IsWindow(m_listBoxEx.GetSafeHwnd())) + return; + + if(!UpdateData(TRUE)) + return; + + int nIndex=m_listBoxEx.GetCurSel(); + VERIFY(m_listBoxEx.SetItemIndent(nIndex,m_nIndent)); +} + +void CExtendedListBoxView::OnChangeEditFontHeight() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CFormView::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + + if(!::IsWindow(m_listBoxEx.GetSafeHwnd())) + return; + + if(!UpdateData(TRUE)) + return; + + m_fontListBox.SetFontHeight(m_nFontHeight); +} + +void CExtendedListBoxView::OnChangeEditMaxnumMruItems() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CFormView::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + + if(!::IsWindow(m_listBoxEx.GetSafeHwnd())) + return; + + if(!UpdateData(TRUE)) + return; + + ((COXFontListBox*)m_fontComboBox.GetListBoxCtrl())-> + SetMaxItemsBeforeSeparator(m_nMaxNumMRUItems); +} + +void CExtendedListBoxView::OnSelchangeFontCombo() +{ + // TODO: Add your control notification handler code here + CFont* pFont=m_fontComboBox.GetSelectedFont(); + if(pFont!=NULL) + { + m_fontListBox.SelectFont(pFont); + } +} + +void CExtendedListBoxView::OnSelchangeFontListbox() +{ + // TODO: Add your control notification handler code here + CFont* pFont=m_fontListBox.GetItemFont(m_fontListBox.GetCurSel()); + if(pFont!=NULL) + { + m_fontComboBox.SelectFont(pFont); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.h new file mode 100644 index 0000000..4db85c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ExtendedListBoxView.h @@ -0,0 +1,113 @@ +// ExtendedListBoxView.h : interface of the CExtendedListBoxView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_EXTENDEDLISTBOXVIEW_H__21FF47ED_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) +#define AFX_EXTENDEDLISTBOXVIEW_H__21FF47ED_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" +#include "OXSeparator.h" +#include "OXFontComboBox.h" + + +class CExtendedListBoxView : public CFormView +{ +protected: // create from serialization only + CExtendedListBoxView(); + DECLARE_DYNCREATE(CExtendedListBoxView) + +public: + //{{AFX_DATA(CExtendedListBoxView) + enum { IDD = IDD_EXTENDEDLISTBOX_FORM }; + CSpinButtonCtrl m_spinMaxNumMRUItems; + CSpinButtonCtrl m_spinFontHeight; + COXFontListBox m_fontListBox; + COXFontComboBox m_fontComboBox; + COXSeparator m_sepFontListAndCombo; + CSpinButtonCtrl m_spinIndent; + COXSeparator m_sepListBox; + COXSeparator m_sepItemProperties; + COXListBoxEx m_listBoxEx; + COXColorPickerButton m_btnListBoxBkColor; + COXFontPickerButton m_btnItemFont; + COXColorPickerButton m_btnItemBkColor; + BOOL m_bHighlightOnlyText; + UINT m_nIndent; + UINT m_nFontHeight; + UINT m_nMaxNumMRUItems; + //}}AFX_DATA + COLORREF m_clrListBoxBack; + COLORREF m_clrItemBack; + COLORREF m_clrItemText; + CFont m_fontItem; + +protected: + CArray m_arrFonts; + +// Attributes +public: + CExtendedListBoxDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedListBoxView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnInitialUpdate(); // called first time after construct + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CExtendedListBoxView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + int AddSimpsonsItem(LPCTSTR lpszText, int nImageIndex, int nIndent, + COLORREF clrText, LPCTSTR lpszTooltipText, CFont* pFont); + +// Generated message map functions +protected: + //{{AFX_MSG(CExtendedListBoxView) + afx_msg void OnSelchangeListboxEx(); + afx_msg void OnButtonItemBkColor(); + afx_msg void OnButtonItemFont(); + afx_msg void OnButtonListboxBkColor(); + afx_msg void OnCheckHighlightOnlyText(); + afx_msg void OnChangeEditIndent(); + afx_msg void OnChangeEditFontHeight(); + afx_msg void OnChangeEditMaxnumMruItems(); + afx_msg void OnSelchangeFontCombo(); + afx_msg void OnSelchangeFontListbox(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ExtendedListBoxView.cpp +inline CExtendedListBoxDoc* CExtendedListBoxView::GetDocument() + { return (CExtendedListBoxDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDLISTBOXVIEW_H__21FF47ED_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.cpp new file mode 100644 index 0000000..b68c9b7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.cpp @@ -0,0 +1,109 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "ExtendedListBox.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 (CFrameWnd::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 + } + m_wndToolBar.SetWindowText(_T("Toolbar")); + m_wndToolBar.UpdateSizes(); + + 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( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.h new file mode 100644 index 0000000..5a302d2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/MainFrm.h @@ -0,0 +1,61 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__21FF47E9_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) +#define AFX_MAINFRM_H__21FF47E9_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXMenuBar.h" + + +class CMainFrame : public COXMenuBarFrame +{ + +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__21FF47E9_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ReadMe.txt new file mode 100644 index 0000000..cf1aee6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/ReadMe.txt @@ -0,0 +1,105 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ExtendedListBox +======================================================================== + + +AppWizard has created this ExtendedListBox 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 ExtendedListBox application. + +ExtendedListBox.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ExtendedListBox.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CExtendedListBoxApp application class. + +ExtendedListBox.cpp + This is the main application source file that contains the application + class CExtendedListBoxApp. + +ExtendedListBox.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++. + +ExtendedListBox.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ExtendedListBox.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ExtendedListBox.rc. + +res\ExtendedListBox.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CFrameWnd and controls all SDI 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 ExtendedListBox.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +ExtendedListBoxDoc.h, ExtendedListBoxDoc.cpp - the document + These files contain your CExtendedListBoxDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CExtendedListBoxDoc::Serialize). + +ExtendedListBoxView.h, ExtendedListBoxView.cpp - the view of the document + These files contain your CExtendedListBoxView class. + CExtendedListBoxView objects are used to view CExtendedListBoxDoc objects. + + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ExtendedListBox.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.cpp new file mode 100644 index 0000000..3602ceb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ExtendedListBox.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.h new file mode 100644 index 0000000..8680239 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__21FF47E7_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) +#define AFX_STDAFX_H__21FF47E7_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__21FF47E7_4AC4_11D3_90BA_9FB68D1A0F05__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.rc2 new file mode 100644 index 0000000..43d62b9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBox.rc2 @@ -0,0 +1,13 @@ +// +// EXTENDEDLISTBOX.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBoxDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBoxDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/ExtendedListBoxDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/il_listboxex.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/il_listboxex.bmp new file mode 100644 index 0000000..f1b420d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/res/il_listboxex.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/resource.h new file mode 100644 index 0000000..cfdbc21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedListBox/resource.h @@ -0,0 +1,40 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ExtendedListBox.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_EXTENDEDLISTBOX_FORM 101 +#define IDR_MAINFRAME 128 +#define IDR_EXTENDTYPE 129 +#define ID_DESCRIPTION_FILE 129 +#define IDB_IL_LISTBOXEX 130 +#define IDR_ABOUTINFO 130 +#define IDC_LISTBOX_EX 1000 +#define IDC_BUTTON_LISTBOX_BK_COLOR 1001 +#define IDC_CHECK_HIGHLIGHT_ONLY_TEXT 1002 +#define IDC_SEPARATOR_ITEM_PROPERTIES 1003 +#define IDC_SEPARATOR_LISTBOX 1004 +#define IDC_BUTTON_ITEM_BK_COLOR 1005 +#define IDC_EDIT_INDENT 1007 +#define IDC_SPIN_INDENT 1008 +#define IDC_BUTTON_ITEM_FONT 1009 +#define IDC_STATIC_ITEM_FONT 1010 +#define IDC_SEPARATOR_FONT_LIST_AND_COMBO 1011 +#define IDC_FONT_LISTBOX 1012 +#define IDC_FONT_COMBO 1013 +#define IDC_EDIT_FONT_HEIGHT 1014 +#define IDC_SPIN_FONT_HEIGHT 1015 +#define IDC_EDIT_MAXNUM_MRU_ITEMS 1016 +#define IDC_SPIN_FONT_MAXNUM_MRU_ITEMS 1017 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.clw new file mode 100644 index 0000000..a57c232 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.clw @@ -0,0 +1,56 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CExtendedTreeControlDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "extendedtreecontrol.h" +LastPage=0 + +ClassCount=2 +Class1=CExtendedTreeControlApp +Class2=CExtendedTreeControlDlg + +ResourceCount=1 +Resource1=IDD_EXTENDEDTREECONTROL_DIALOG (English (U.S.)) + +[CLS:CExtendedTreeControlApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ExtendedTreeControl.h +ImplementationFile=ExtendedTreeControl.cpp +LastObject=IDC_BUTTON1 + +[CLS:CExtendedTreeControlDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ExtendedTreeControlDlg.h +ImplementationFile=ExtendedTreeControlDlg.cpp + +[DLG:IDD_EXTENDEDTREECONTROL_DIALOG] +Type=1 +Class=CExtendedTreeControlDlg + +[DLG:IDD_EXTENDEDTREECONTROL_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=17 +Control1=IDC_STATIC_BASIC_STYLES,static,1342312960 +Control2=IDC_STATIC_EXTENDED_STYLES,static,1342312960 +Control3=IDC_EXTENDED_TREE,SysListView32,1350632969 +Control4=IDC_SET_FONT,button,1342242816 +Control5=IDC_HIDE,button,1342242816 +Control6=IDC_UNHIDE_ALL,button,1342242816 +Control7=IDC_TOGGLE_DISABLE,button,1342242816 +Control8=IDC_TVS_HASLINES,button,1342242819 +Control9=IDC_TVS_HASBUTTONS,button,1342242819 +Control10=IDC_TVS_HASLINESATROOT,button,1342242819 +Control11=IDC_TVS_SHOWSELALWAYS,button,1342242819 +Control12=IDC_TVOXS_MULTISEL,button,1342242819 +Control13=IDC_TVOXS_GRID,button,1342242819 +Control14=IDC_TVOXS_ROWSEL,button,1342242819 +Control15=IDC_TVOXS_NOSORTHEADER,button,1342242819 +Control16=IDC_TVOXS_ITEMTIPS,button,1342242819 +Control17=IDC_BUTTON1,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.cpp new file mode 100644 index 0000000..3f53029 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.cpp @@ -0,0 +1,81 @@ +// ExtendedTreeControl.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ExtendedTreeControl.h" +#include "ExtendedTreeControlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlApp + +BEGIN_MESSAGE_MAP(CExtendedTreeControlApp, CWinApp) + //{{AFX_MSG_MAP(CExtendedTreeControlApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlApp construction + +CExtendedTreeControlApp::CExtendedTreeControlApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CExtendedTreeControlApp object + +CExtendedTreeControlApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlApp initialization + +BOOL CExtendedTreeControlApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CExtendedTreeControlDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsp new file mode 100644 index 0000000..42a10da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsp @@ -0,0 +1,249 @@ +# Microsoft Developer Studio Project File - Name="ExtendedTreeControl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ExtendedTreeControl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ExtendedTreeControl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ExtendedTreeControl.mak" CFG="ExtendedTreeControl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ExtendedTreeControl - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ExtendedTreeControl - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ExtendedTreeControl - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "ExtendedTreeControl - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ExtendedTreeControl.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ExtendedTreeControl - Win32 Release" +# Name "ExtendedTreeControl - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Ultimate ToolBox" + +# PROP Default_Filter "*.cpp" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedTreeControl.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtendedTreeControl.rc +# End Source File +# Begin Source File + +SOURCE=.\ExtendedTreeControlDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "Ultimate ToolBox Headers" + +# PROP Default_Filter "*.h" +# Begin Source File + +SOURCE=..\..\..\include\OXTreeCal.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXTreeEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXTreeHeader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\OXTreeItem.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedTreeControl.h +# End Source File +# Begin Source File + +SOURCE=.\ExtendedTreeControlDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ExtendedTreeControl.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ExtendedTreeControl.rc2 +# End Source File +# Begin Source File + +SOURCE=..\..\..\One\Two\DemoBrowser\Demos\Controls\ExtendedTree\il_tree.bmp +# End Source File +# Begin Source File + +SOURCE=.\il_tree.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ExtendedTreeControl.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsw new file mode 100644 index 0000000..5a7142d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ExtendedTreeControl"=".\ExtendedTreeControl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ExtendedTreeControl", DRHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.h new file mode 100644 index 0000000..547666a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.h @@ -0,0 +1,49 @@ +// ExtendedTreeControl.h : main header file for the EXTENDEDTREECONTROL application +// + +#if !defined(AFX_EXTENDEDTREECONTROL_H__822EFA65_010E_47D3_981F_CA97F5FE547D__INCLUDED_) +#define AFX_EXTENDEDTREECONTROL_H__822EFA65_010E_47D3_981F_CA97F5FE547D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlApp: +// See ExtendedTreeControl.cpp for the implementation of this class +// + +class CExtendedTreeControlApp : public CWinApp +{ +public: + CExtendedTreeControlApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedTreeControlApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CExtendedTreeControlApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDTREECONTROL_H__822EFA65_010E_47D3_981F_CA97F5FE547D__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.rc new file mode 100644 index 0000000..7d1092a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.rc @@ -0,0 +1,222 @@ +//Microsoft Developer Studio 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 MOVEABLE PURE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE MOVEABLE PURE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ExtendedTreeControl.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXMain.rc""\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 DISCARDABLE "res\\ExtendedTreeControl.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_EXTENDEDTREECONTROL_DIALOG DIALOGEX 0, 0, 365, 182 +STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_APPWINDOW +CAPTION "ExtendedTreeControl" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Basic Tree control styles",IDC_STATIC_BASIC_STYLES,7, + 101,118,11,SS_CENTERIMAGE | SS_SUNKEN,WS_EX_TRANSPARENT + LTEXT "Extended Tree control styles", + IDC_STATIC_EXTENDED_STYLES,142,101,128,11,SS_CENTERIMAGE | + SS_SUNKEN,WS_EX_TRANSPARENT + CONTROL "List2",IDC_EXTENDED_TREE,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_OWNERDRAWFIXED | + WS_BORDER | WS_TABSTOP,7,7,263,91,WS_EX_CLIENTEDGE + PUSHBUTTON "Set Font To Selected",IDC_SET_FONT,278,7,80,14 + PUSHBUTTON "Hide Selected items",IDC_HIDE,278,26,80,14 + PUSHBUTTON "UnHide All Items",IDC_UNHIDE_ALL,278,45,80,14 + PUSHBUTTON "Toggle Disable To Sel",IDC_TOGGLE_DISABLE,278,64,80,14 + CONTROL "Has lines",IDC_TVS_HASLINES,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,113,77,10 + CONTROL "Has buttons",IDC_TVS_HASBUTTONS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,126,85,10 + CONTROL "Has lines at root",IDC_TVS_HASLINESATROOT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,139,100,10 + CONTROL "Show selected always",IDC_TVS_SHOWSELALWAYS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,152,86,10 + CONTROL "Multiselection",IDC_TVOXS_MULTISEL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,142,113,100,10 + CONTROL "Display grid lines",IDC_TVOXS_GRID,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,142,126,100,10 + CONTROL "Full row selection",IDC_TVOXS_ROWSEL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,142,139,100,10 + CONTROL "No sorting in the header",IDC_TVOXS_NOSORTHEADER,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,142,152,100,10 + CONTROL "Display itemtips",IDC_TVOXS_ITEMTIPS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,142,165,100,10 + PUSHBUTTON "Button1",IDC_BUTTON1,283,88,50,14 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "ExtendedTreeControl MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ExtendedTreeControl\0" + VALUE "LegalCopyright", "Copyright (C) 2003\0" + VALUE "OriginalFilename", "ExtendedTreeControl.EXE\0" + VALUE "ProductName", "ExtendedTreeControl Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO MOVEABLE PURE +BEGIN + IDD_EXTENDEDTREECONTROL_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 358 + TOPMARGIN, 7 + BOTTOMMARGIN, 175 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IL_TREE BITMAP MOVEABLE PURE "il_tree.bmp" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ExtendedTreeControl.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXMain.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.vcproj new file mode 100644 index 0000000..02026b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControl.vcproj @@ -0,0 +1,710 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.cpp new file mode 100644 index 0000000..865bbc6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.cpp @@ -0,0 +1,674 @@ +// ExtendedTreeControlDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtendedTreeControl.h" +#include "ExtendedTreeControlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlDlg dialog + +CExtendedTreeControlDlg::CExtendedTreeControlDlg(CWnd* pParent /*=NULL*/) + : CDialog(CExtendedTreeControlDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CExtendedTreeControlDlg) + m_bMultiSel=FALSE; + m_bHasButtons=FALSE; + m_bHasLines=FALSE; + m_bHasLinesAtRoot=FALSE; + m_bShowSelAlways=FALSE; + m_bHasGrid=FALSE; + m_bRowSel=FALSE; + m_bItemTips=FALSE; + m_bNoSortHeader=FALSE; + //}}AFX_DATA_INIT + m_pDragImage=NULL; + m_bDragging=FALSE; + m_hDropItem=NULL; + + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CExtendedTreeControlDlg::~CExtendedTreeControlDlg() +{ + if (m_pDragImage) + delete m_pDragImage; +} + +void CExtendedTreeControlDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CExtendedTreeControlDlg) + DDX_Control(pDX, IDC_STATIC_EXTENDED_STYLES, m_sepExtendedStyle); + DDX_Control(pDX, IDC_STATIC_BASIC_STYLES, m_sepBasicStyles); + DDX_Control(pDX, IDC_EXTENDED_TREE, m_xlc); + DDX_Check(pDX, IDC_TVOXS_MULTISEL, m_bMultiSel); + DDX_Check(pDX, IDC_TVS_HASBUTTONS, m_bHasButtons); + DDX_Check(pDX, IDC_TVS_HASLINES, m_bHasLines); + DDX_Check(pDX, IDC_TVS_HASLINESATROOT, m_bHasLinesAtRoot); + DDX_Check(pDX, IDC_TVS_SHOWSELALWAYS, m_bShowSelAlways); + DDX_Check(pDX, IDC_TVOXS_GRID, m_bHasGrid); + DDX_Check(pDX, IDC_TVOXS_ROWSEL, m_bRowSel); + DDX_Check(pDX, IDC_TVOXS_ITEMTIPS, m_bItemTips); + DDX_Check(pDX, IDC_TVOXS_NOSORTHEADER, m_bNoSortHeader); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CExtendedTreeControlDlg, CDialog) + //{{AFX_MSG_MAP(CExtendedTreeControlDlg) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_TVOXS_MULTISEL, OnTvoxsMultisel) + ON_BN_CLICKED(IDC_TVS_HASBUTTONS, OnTvsHasbuttons) + ON_BN_CLICKED(IDC_TVS_HASLINES, OnTvsHaslines) + ON_BN_CLICKED(IDC_TVS_HASLINESATROOT, OnTvsHaslinesatroot) + ON_BN_CLICKED(IDC_TVS_SHOWSELALWAYS, OnTvsShowselalways) + ON_BN_CLICKED(IDC_HIDE, OnHide) + ON_BN_CLICKED(IDC_UNHIDE_ALL, OnUnhideAll) + ON_BN_CLICKED(IDC_SET_FONT, OnSetFontToSel) + ON_BN_CLICKED(IDC_TOGGLE_DISABLE, OnToggleDisable) + ON_BN_CLICKED(IDC_TVOXS_GRID, OnGrid) + ON_BN_CLICKED(IDC_TVOXS_ROWSEL, OnRowSel) + ON_NOTIFY(LVN_BEGINDRAG, IDC_EXTENDED_TREE, OnBegindragExtendedTree) + ON_WM_MOUSEMOVE() + ON_WM_LBUTTONUP() + ON_BN_CLICKED(IDC_TVOXS_ITEMTIPS, OnTvoxsItemtips) + ON_BN_CLICKED(IDC_TVOXS_NOSORTHEADER, OnTvoxsNosortheader) + ON_WM_DESTROY() + ON_WM_GETMINMAXINFO() + ON_BN_CLICKED(IDC_BUTTON1, OnDelete) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlDlg message handlers + +void CExtendedTreeControlDlg::InsertItems() +{ + CStringArray arrCity; + arrCity.Add(_T("Amsterdam")); + arrCity.Add(_T("Berlin")); + arrCity.Add(_T("Edingburg")); + arrCity.Add(_T("Madrid")); + arrCity.Add(_T("Mexico City")); + arrCity.Add(_T("Moscow")); + arrCity.Add(_T("Niece")); + arrCity.Add(_T("New York")); + arrCity.Add(_T("Rome")); + arrCity.Add(_T("Toronto")); + arrCity.Add(_T("Zurich")); + + CStringArray arrPosition; + arrPosition.Add(_T("CEO")); + arrPosition.Add(_T("Computer Programmer")); + arrPosition.Add(_T("Consultant")); + arrPosition.Add(_T("Engineer")); + arrPosition.Add(_T("Head Chef")); + arrPosition.Add(_T("Professional Athlete")); + arrPosition.Add(_T("Shipper")); + arrPosition.Add(_T("Singer")); + + CStringArray arrDate; + arrDate.Add(_T("01/01/1998")); + arrDate.Add(_T("31/12/2001")); + + TCHAR szItems[][50]={ + _T("Bob Jackson"),_T("Niece"),_T("Computer Programmer"), _T("(213)-456-7689"),_T("bobj@comp.net"),_T("09.12.1998"), + _T("Elizabeth Sizeberg"),_T("Berlin"),_T("Shipper"), _T("(343)-534-2653"),_T("elsize@berco.com"),_T("11.03.1998"), + _T("Janna Stevens"),_T("Zurich"),_T("Consultant"), _T("(312)-232-4467 ext. 2098"),_T("stevensj@hotmail.com"),_T("10.22.1998"), + _T("John McDonald"),_T("Toronto"),_T("CEO"), _T("(416)-568-3379"),_T("john.mcdonald@echo.com"),_T("07.30.1998"), + _T("Margaret Atwal"),_T("Madrid"),_T("Singer"), _T("(568)-803-3149"),_T("margo@jinglebells.com"),_T("09.02.1998"), + _T("Markus Brody"),_T("Mexico City"),_T("Engineer"), _T("(476)-671-0951"),_T("brody@techdome.net"),_T("03.21.1998"), + _T("Martha Lenton"),_T("Rome"),_T("Professional Athlete"), _T("(805)-609-9087"),_T("martha@sportnet.com"),_T("06.29.1998"), + _T("Mary Bolten"),_T("New York"),_T("Head Chef"), _T("(502)-403-0261"),_T("mlenton@cook.net"),_T("05.09.1998") + }; + + for(int nIndex=0; nIndex<8; nIndex++) + { + // Name + HTREEITEM hItem=m_xlc.InsertItem(szItems[nIndex*6]); + ASSERT(hItem!=NULL); + m_xlc.SetItemImage(hItem,0,0,0); + m_xlc.SetItemColor(hItem,RGB(0,0,255)); + // City + m_xlc.SetSubItem(hItem,1,OX_SUBITEM_TEXT,szItems[nIndex*6+1]); + m_xlc.SetEditMode(hItem,OXET_COMBO,arrCity,1); + m_xlc.SetItemColor(hItem,RGB(0,128,0),1); + // Position + m_xlc.SetSubItem(hItem,2,OX_SUBITEM_TEXT,szItems[nIndex*6+2]); + m_xlc.SetEditMode(hItem,OXET_COMBO,arrPosition,2); + m_xlc.SetItemColor(hItem,RGB(128,0,0),2); + + // Phone + HTREEITEM hSubItem=m_xlc.InsertItem(_T("Telephone:"),hItem); + ASSERT(hSubItem!=NULL); + m_xlc.SetItemImage(hSubItem,1,1,0); + m_xlc.SetSubItem(hSubItem,1,OX_SUBITEM_TEXT,szItems[nIndex*6+3]); + m_xlc.SetItemColor(hSubItem,RGB(0,128,0),1); + + // E-mail + hSubItem=m_xlc.InsertItem(_T("E-mail:"),hItem); + ASSERT(hSubItem!=NULL); + m_xlc.SetItemImage(hSubItem,2,2,0); + m_xlc.SetSubItem(hSubItem,1,OX_SUBITEM_TEXT,szItems[nIndex*6+4]); + m_xlc.SetItemColor(hSubItem,RGB(0,128,0),1); + + // Last contact + hSubItem=m_xlc.InsertItem(_T("Last contact:"),hItem); + ASSERT(hSubItem!=NULL); + m_xlc.SetItemImage(hSubItem,3,3,0); + m_xlc.SetSubItem(hSubItem,1,OX_SUBITEM_TEXT,szItems[nIndex*6+5]); + m_xlc.SetEditMode(hSubItem,OXET_CALENDAR,arrDate,1); + m_xlc.SetItemColor(hSubItem,RGB(0,128,0),1); + } +} + +BOOL CExtendedTreeControlDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + VERIFY(m_il.Create(IDB_IL_TREE,16,1,RGB(255,0,255))); + m_xlc.SetImageList(&m_il,TVSIL_NORMAL); + + // Setup columns + m_xlc.DeleteColumn(0); + m_xlc.InsertColumn(0,_T("Name"),LVCFMT_LEFT,150); + m_xlc.InsertColumn(1,_T("City"),LVCFMT_LEFT,100); + m_xlc.InsertColumn(2,_T("Title"),LVCFMT_LEFT,120); + ////////////////////////// + + + InsertItems(); + + m_xlc.ModifyExStyle(0,TVOXS_COLUMNHDR); + m_xlc.ModifyExStyle(0,TVOXS_MULTISEL); + m_xlc.ModifyStyle(0,TVS_EDITLABELS); + m_xlc.ModifyStyle(0,TVS_HASBUTTONS); + m_xlc.ModifyStyle(0,TVS_HASLINES); + m_xlc.ModifyStyle(0,TVS_LINESATROOT); + m_xlc.ModifyStyle(0,TVS_SHOWSELALWAYS); + m_xlc.ModifyExStyle(TVOXS_VGRID,0); + m_xlc.ModifyExStyle(TVOXS_HGRID,0); + m_xlc.ModifyExStyle(0,TVOXS_FLGRID); + m_xlc.ModifyExStyle(0,TVOXS_ROWSEL); + m_xlc.ModifyExStyle(0,TVOXS_PICKANYWHERE); + m_xlc.ModifyExStyle(0,TVOXS_ITEMTIPS); + + m_bHasLines=m_xlc.HasLines(); + m_bHasButtons=m_xlc.HasButtons(); + m_bHasLinesAtRoot=m_xlc.HasLinesAtRoot(); + m_bShowSelAlways=m_xlc.GetShowSelAlways(); + DWORD dwStyleEx=m_xlc.GetExStyle(); + m_bMultiSel=(dwStyleEx & TVOXS_MULTISEL)!=0; + m_bHasGrid=((dwStyleEx & TVOXS_HGRID)!=0 && (dwStyleEx & TVOXS_VGRID)!=0); + m_bRowSel=(dwStyleEx & TVOXS_ROWSEL)!=0; + m_bItemTips=(dwStyleEx & TVOXS_ITEMTIPS)!=0; + m_bNoSortHeader=(dwStyleEx & TVOXS_NOSORTHEADER)!=0; +/* + // separators + COLORREF clr=::GetSysColor(COLOR_WINDOW); + m_sepBasicStyles.SetTextColor(clr); + m_sepExtendedStyle.SetTextColor(clr); +*/ + // layout + // + m_LayoutManager.Attach(this); + m_LayoutManager.TieChild(&m_xlc, + OX_LMS_LEFT|OX_LMS_RIGHT|OX_LMS_TOP|OX_LMS_BOTTOM,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_SET_FONT,OX_LMS_RIGHT,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_HIDE,OX_LMS_RIGHT,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_UNHIDE_ALL,OX_LMS_RIGHT,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TOGGLE_DISABLE,OX_LMS_RIGHT,OX_LMT_SAME); + + m_LayoutManager.TieChild(IDC_STATIC_BASIC_STYLES,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_STATIC_EXTENDED_STYLES,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVS_HASLINES,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVS_HASBUTTONS,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVS_HASLINESATROOT,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVS_SHOWSELALWAYS,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVOXS_MULTISEL,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVOXS_NOSORTHEADER,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVOXS_GRID,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVOXS_ROWSEL,OX_LMS_BOTTOM,OX_LMT_SAME); + m_LayoutManager.TieChild(IDC_TVOXS_ITEMTIPS,OX_LMS_BOTTOM,OX_LMT_SAME); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CExtendedTreeControlDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CExtendedTreeControlDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CExtendedTreeControlDlg::OnTvoxsMultisel() +{ + UpdateData(); + if(m_bMultiSel) + { + m_xlc.ModifyExStyle(0,TVOXS_MULTISEL); + } + else + { + m_xlc.ModifyExStyle(TVOXS_MULTISEL,0); + } +} + +void CExtendedTreeControlDlg::OnTvsHasbuttons() +{ + UpdateData(); + if(m_bHasButtons) + { + m_xlc.ModifyStyle(0,TVS_HASBUTTONS); + } + else + { + m_xlc.ModifyStyle(TVS_HASBUTTONS,0); + } + +} + +void CExtendedTreeControlDlg::OnTvsHaslines() +{ + UpdateData(); + if(m_bHasLines) + { + m_xlc.ModifyStyle(0,TVS_HASLINES); + } + else + { + m_xlc.ModifyStyle(TVS_HASLINES,0); + } + +} + +void CExtendedTreeControlDlg::OnTvsHaslinesatroot() +{ + UpdateData(); + if(m_bHasLinesAtRoot) + { + m_xlc.ModifyStyle(0,TVS_LINESATROOT); + } + else + { + m_xlc.ModifyStyle(TVS_LINESATROOT,0); + } + +} + +void CExtendedTreeControlDlg::OnTvsShowselalways() +{ + UpdateData(); + if(m_bShowSelAlways) + { + m_xlc.ModifyStyle(0,TVS_SHOWSELALWAYS); + } + else + { + m_xlc.ModifyStyle(TVS_SHOWSELALWAYS,0); + } + +} + +void CExtendedTreeControlDlg::OnHide() +{ + HTREEITEM hItem=m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + HTREEITEM hItem1=hItem; + hItem=m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + m_xlc.HideItem(hItem1); + } +} + +void CExtendedTreeControlDlg::OnUnhideAll() +{ + HTREEITEM hItem=m_xlc.GetFirstHiddenItem(); + while(hItem) + { + HTREEITEM hItem1=hItem; + hItem=m_xlc.GetNextHiddenItem(hItem); + m_xlc.HideItem(hItem1,FALSE); + } +} + +void CExtendedTreeControlDlg::OnSetFontToSel() +{ + int nSelectedCount=m_xlc.GetSelectedCount(); + if(nSelectedCount==0) + { + return; + } + + // Use font common dialog + CFontDialog* pFontDlg; + if(nSelectedCount==1) + { + HTREEITEM hSelectedItem=m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + CFont* pFont=m_xlc.GetItemFont(hSelectedItem); + if(pFont==NULL) + { + pFont=m_xlc.GetFont(); + } + ASSERT(pFont!=NULL); + LOGFONT lf; + pFont->GetLogFont(&lf); + pFontDlg=new CFontDialog(&lf); + pFontDlg->m_cf.rgbColors=m_xlc.GetItemColor(hSelectedItem); + } + else + { + pFontDlg=new CFontDialog(); + } + ASSERT(pFontDlg!=NULL); + + if(pFontDlg->DoModal()==IDOK) + { + LOGFONT lf; + pFontDlg->GetCurrentFont(&lf); + CFont font; + VERIFY(font.CreateFontIndirect(&lf)); + HTREEITEM hItem=m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + m_xlc.SetItemFont(hItem,&font,0); + m_xlc.SetItemFont(hItem,&font,1); + m_xlc.SetItemFont(hItem,&font,2); + m_xlc.SetItemColor(hItem,pFontDlg->m_cf.rgbColors); + m_xlc.SetItemColor(hItem,pFontDlg->m_cf.rgbColors,1); + m_xlc.SetItemColor(hItem,pFontDlg->m_cf.rgbColors,2); + hItem=m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + } + + UINT nHeight=m_xlc.GetItemHeight(); + lf.lfHeight=(lf.lfHeight>0 ? lf.lfHeight : -lf.lfHeight)+6; + if(lf.lfHeight>(int)nHeight) + { + m_xlc.SetItemHeight(lf.lfHeight); + } + } + + delete pFontDlg; +} + +void CExtendedTreeControlDlg::OnToggleDisable() +{ + HTREEITEM hItem=m_xlc.GetNextItem(TVI_ROOT,TVGN_FIRSTSELECTED); + while(hItem) + { + m_xlc.DisableItem(hItem,!m_xlc.IsItemDisabled(hItem)); + hItem=m_xlc.GetNextItem(hItem,TVGN_NEXTSELECTED); + } +} + +void CExtendedTreeControlDlg::OnGrid() +{ + UpdateData(); + DWORD dwStyleAdd=m_bHasGrid ? TVOXS_VGRID|TVOXS_HGRID|TVOXS_FLGRID : 0; + DWORD dwStyleRemove=m_bHasGrid ? 0 : TVOXS_VGRID|TVOXS_HGRID|TVOXS_FLGRID; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + +void CExtendedTreeControlDlg::OnRowSel() +{ + UpdateData(); + DWORD dwStyleAdd=m_bRowSel ? TVOXS_ROWSEL : 0; + DWORD dwStyleRemove=m_bRowSel ? 0 : TVOXS_ROWSEL; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + +void CExtendedTreeControlDlg::OnBegindragExtendedTree(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_LISTVIEW* pNMListView=(NM_LISTVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + + if(m_pDragImage) + { + delete m_pDragImage; + } + + HTREEITEM hDragItem=m_xlc.GetSelectedItem(); + ASSERT (hDragItem); + m_pDragImage=m_xlc.CreateDragImage (hDragItem); + ASSERT (m_pDragImage); + + // changes the cursor to the drag image (DragMove() is still required in + // OnMouseMove()) + VERIFY (m_pDragImage->BeginDrag (0, CPoint (8, 8))); + VERIFY (m_pDragImage->DragEnter (GetDesktopWindow (), pNMListView->ptAction)); + + IMAGEINFO pImageInfo; + VERIFY(m_pDragImage->GetImageInfo(0,&pImageInfo)); + + // set dragging flag + m_bDragging=TRUE; + m_hDropItem=NULL; + + // capture all mouse messages + SetCapture(); + + *pResult=0; +} + +void CExtendedTreeControlDlg::OnMouseMove(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if (m_bDragging) + { + CPoint pt (point); + ClientToScreen (&pt); + + // move the drag image + VERIFY (m_pDragImage->DragMove (pt)); + + BOOL bDraw=FALSE; + + // get the CWnd pointer of the window that is under the mouse cursor + CWnd* pDropWnd=WindowFromPoint (pt); + ASSERT (pDropWnd); + // if we drag outside current window + if (pDropWnd != &m_xlc) + { + // turn off drag hilite for tree control + if (m_hDropItem) + { + if(!bDraw) + { + // unlock window updates + VERIFY (m_pDragImage->DragShowNolock(FALSE)); + bDraw=TRUE; + } + m_xlc.SelectDropTarget (NULL); + m_hDropItem=NULL; + } + } + + // convert from screen coordinates to drop target client coordinates + pDropWnd->ScreenToClient (&pt); + + // if window is CTreeCtrl + if (pDropWnd == &m_xlc) + { + UINT uFlags; + // get the item that is below cursor + int nIndex=m_xlc.HitTest(pt, &uFlags); + if(nIndex>=0) + { + m_hDropItem=m_xlc.GetItemFromIndex(nIndex); + HTREEITEM hOldDropItem=m_xlc.GetNextItem(m_xlc.GetRootItem(), + TVGN_DROPHILITE); + if(hOldDropItem!=m_hDropItem) + { + if(!bDraw) + { + // unlock window updates + VERIFY (m_pDragImage->DragShowNolock(FALSE)); + bDraw=TRUE; + } + // highlight it + m_xlc.SelectDropTarget(m_hDropItem); + } + } + } + + if(bDraw) + { + // lock window updates + VERIFY (m_pDragImage->DragShowNolock (TRUE)); + } + } + + CDialog::OnMouseMove(nFlags, point); +} + +void CExtendedTreeControlDlg::OnLButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if (m_bDragging) + { + // end dragging + VERIFY (m_pDragImage->DragLeave (GetDesktopWindow ())); + m_pDragImage->EndDrag (); + // stop intercepting all mouse messages + VERIFY (::ReleaseCapture ()); + m_bDragging=FALSE; + + CPoint pt (point); + ClientToScreen (&pt); + // m_dropPoint=pt; + + // get the CWnd pointer of the window that is under the mouse cursor + CWnd* pDropWnd=WindowFromPoint (pt); + ASSERT (pDropWnd); + + // if window is CTreeCtrl + if (pDropWnd == &m_xlc) + { + HTREEITEM htiDropTarget=m_xlc.GetDropHilightItem(); + ASSERT(m_hDropItem==htiDropTarget); + m_xlc.SelectDropTarget(NULL); + // move only if we selected only one item + if(htiDropTarget!=NULL) + { + if(m_xlc.GetSelectedCount()<2) + { + // the last selected item is the dragged one + HTREEITEM hDragItem=m_xlc.GetSelectedItem(); + ASSERT (hDragItem); + + HTREEITEM htiParent=m_xlc.GetParentItem(htiDropTarget); + if (::GetKeyState(VK_CONTROL) & 0x8000) + m_xlc.CopyItem(hDragItem,htiDropTarget); + else + m_xlc.MoveItem(hDragItem,htiParent,htiDropTarget); + } + else + { + if (::GetKeyState(VK_CONTROL) & 0x8000) + AfxMessageBox("Cannot copy more than 1 item at once!"); + else + AfxMessageBox("Cannot move more than 1 item at once!"); + } + } + + m_hDropItem=NULL; + } + } + + CDialog::OnLButtonUp(nFlags, point); +} + + +void CExtendedTreeControlDlg::OnTvoxsItemtips() +{ + // TODO: Add your control notification handler code here + UpdateData(); + DWORD dwStyleAdd=m_bItemTips ? TVOXS_ITEMTIPS : 0; + DWORD dwStyleRemove=m_bItemTips ? 0 : TVOXS_ITEMTIPS; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + + +void CExtendedTreeControlDlg::OnTvoxsNosortheader() +{ + // TODO: Add your control notification handler code here + UpdateData(); + DWORD dwStyleAdd=m_bNoSortHeader ? TVOXS_NOSORTHEADER : 0; + DWORD dwStyleRemove=m_bNoSortHeader ? 0 : TVOXS_NOSORTHEADER; + m_xlc.ModifyExStyle(dwStyleRemove,dwStyleAdd); +} + + +void CExtendedTreeControlDlg::OnDestroy() +{ + if (m_LayoutManager.IsAttached()) + m_LayoutManager.Detach(); + + CDialog::OnDestroy(); +} + +void CExtendedTreeControlDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) +{ + // TODO: Add your message handler code here and/or call default + lpMMI->ptMinTrackSize.x = 500; + lpMMI->ptMinTrackSize.y = 300; + + CDialog::OnGetMinMaxInfo(lpMMI); +} + +void CExtendedTreeControlDlg::OnDelete() +{ + m_xlc.DeleteAllItems(); + InsertItems(); +// m_xlc.DeleteItem(m_xlc.GetSelectedItem()); +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.h new file mode 100644 index 0000000..446de75 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ExtendedTreeControlDlg.h @@ -0,0 +1,91 @@ +// ExtendedTreeControlDlg.h : header file +// + +#if !defined(AFX_EXTENDEDTREECONTROLDLG_H__0B6AD6BE_901E_4D6C_9159_4DEABF9218AA__INCLUDED_) +#define AFX_EXTENDEDTREECONTROLDLG_H__0B6AD6BE_901E_4D6C_9159_4DEABF9218AA__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXTreeCtrl.h" +#include "OXSeparator.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CExtendedTreeControlDlg dialog + +class CExtendedTreeControlDlg : public CDialog +{ +// Construction +public: + CExtendedTreeControlDlg(CWnd* pParent = NULL); // standard constructor + virtual ~CExtendedTreeControlDlg(); // destructor + +// Dialog Data + //{{AFX_DATA(CExtendedTreeControlDlg) + enum { IDD = IDD_EXTENDEDTREECONTROL_DIALOG }; + COXSeparator m_sepExtendedStyle; + COXSeparator m_sepBasicStyles; + COXTreeCtrl m_xlc; + BOOL m_bMultiSel; + BOOL m_bHasButtons; + BOOL m_bHasLines; + BOOL m_bHasLinesAtRoot; + BOOL m_bShowSelAlways; + BOOL m_bHasGrid; + BOOL m_bRowSel; + BOOL m_bItemTips; + BOOL m_bNoSortHeader; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExtendedTreeControlDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + COXLayoutManager m_LayoutManager; + HICON m_hIcon; + HTREEITEM m_hHidenItem; + CImageList m_il; + CImageList* m_pDragImage; + BOOL m_bDragging; + HTREEITEM m_hDropItem; + + void InsertItems(); + + // Generated message map functions + //{{AFX_MSG(CExtendedTreeControlDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnTvoxsMultisel(); + afx_msg void OnTvsHasbuttons(); + afx_msg void OnTvsHaslines(); + afx_msg void OnTvsHaslinesatroot(); + afx_msg void OnTvsShowselalways(); + afx_msg void OnHide(); + afx_msg void OnUnhideAll(); + afx_msg void OnSetFontToSel(); + afx_msg void OnToggleDisable(); + afx_msg void OnGrid(); + afx_msg void OnRowSel(); + afx_msg void OnBegindragExtendedTree(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnTvoxsItemtips(); + afx_msg void OnTvoxsNosortheader(); + afx_msg void OnDestroy(); + afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); + afx_msg void OnDelete(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EXTENDEDTREECONTROLDLG_H__0B6AD6BE_901E_4D6C_9159_4DEABF9218AA__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ReadMe.txt new file mode 100644 index 0000000..d830cf8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ExtendedTreeControl +======================================================================== + + +AppWizard has created this ExtendedTreeControl 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 ExtendedTreeControl application. + +ExtendedTreeControl.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ExtendedTreeControl.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CExtendedTreeControlApp application class. + +ExtendedTreeControl.cpp + This is the main application source file that contains the application + class CExtendedTreeControlApp. + +ExtendedTreeControl.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++. + +ExtendedTreeControl.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ExtendedTreeControl.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ExtendedTreeControl.rc. + +res\ExtendedTreeControl.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ExtendedTreeControlDlg.h, ExtendedTreeControlDlg.cpp - the dialog + These files contain your CExtendedTreeControlDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ExtendedTreeControl.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ExtendedTreeControl.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.cpp new file mode 100644 index 0000000..7c9b29a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ExtendedTreeControl.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.h new file mode 100644 index 0000000..750b1ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__DAB873B6_7B61_4490_9BC0_1A577ADB7255__INCLUDED_) +#define AFX_STDAFX_H__DAB873B6_7B61_4490_9BC0_1A577ADB7255__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__DAB873B6_7B61_4490_9BC0_1A577ADB7255__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/il_tree.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/il_tree.bmp new file mode 100644 index 0000000..3386b68 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/il_tree.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.rc2 new file mode 100644 index 0000000..a1f0955 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/res/ExtendedTreeControl.rc2 @@ -0,0 +1,13 @@ +// +// EXTENDEDTREECONTROL.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/resource.h new file mode 100644 index 0000000..159a8b5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ExtendedTreeControl/resource.h @@ -0,0 +1,35 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ExtendedTreeControl.rc +// +#define IDD_EXTENDEDTREECONTROL_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDB_IL_TREE 154 +#define IDC_BUTTON1 1000 +#define IDC_EXTENDED_TREE 1002 +#define IDC_TVS_HASLINES 1003 +#define IDC_TVS_HASBUTTONS 1004 +#define IDC_TVS_HASLINESATROOT 1005 +#define IDC_TVOXS_MULTISEL 1007 +#define IDC_TVS_SHOWSELALWAYS 1009 +#define IDC_HIDE 1011 +#define IDC_UNHIDE_ALL 1012 +#define IDC_SET_FONT 1014 +#define IDC_TOGGLE_DISABLE 1015 +#define IDC_TVOXS_ROWSEL 1017 +#define IDC_TVOXS_GRID 1018 +#define IDC_TVOXS_ITEMTIPS 1020 +#define IDC_TVOXS_NOSORTHEADER 1022 +#define IDC_STATIC_BASIC_STYLES 1042 +#define IDC_STATIC_EXTENDED_STYLES 1043 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickerButtonInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickerButtonInfo.rtf new file mode 100644 index 0000000..bf56ce3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickerButtonInfo.rtf @@ -0,0 +1,69 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;} +{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f46\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5183391\rsid10243528} +{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr13\min24}{\revtim\yr2005\mo1\dy17\hr13\min24}{\version2}{\edmins0}{\nofpages2}{\nofwords489}{\nofchars2790}{\*\company Dundas India} +{\nofcharsws3273}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot10243528 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid10243528 COXFontPickerButton Overview}{\b\fs48\insrsid10243528 +\par }{\b\fs15\insrsid10243528 Copyright \'a9 }{\b\fs15\insrsid10243528 The Code Project}{\b\fs15\insrsid10243528 1997-1999, All Rights Reserved +\par }{\insrsid10243528 +\par }{\b\insrsid10243528 COXFontPickerButton}{\insrsid10243528 is }{\ul\cf2\insrsid10243528 COXBitmapButton}{\insrsid10243528 derived class that is designed to allow a user to choose font and text color. This control uses standard }{\b\insrsid10243528 +CFontDialog}{\insrsid10243528 to choose font and text color and uses }{\ul\cf2\insrsid10243528 COXStatic}{\insrsid10243528 control in order to display the chosen font and text color. And of course it allows you to use all power of }{ +\ul\cf2\insrsid10243528 COXBitmapButton}{\insrsid10243528 class such as displaying an }{\b\insrsid10243528 image}{\insrsid10243528 , specifying text }{\b\insrsid10243528 font}{\insrsid10243528 and }{\b\insrsid10243528 color}{\insrsid10243528 , }{ +\b\insrsid10243528 tooltip}{\insrsid10243528 and many more features available in this class. Also we provide }{\b\insrsid10243528 DDX}{\insrsid10243528 routines that allows you to associate }{\b\insrsid10243528 COLORREF}{\insrsid10243528 and }{ +\b\insrsid10243528 CFont}{\insrsid10243528 variables with the control and set/retrieve data in standard manner (the details will be provided below). +\par +\par \~ +\par }{\b\insrsid10243528 Usage +\par +\par I.\~\~\~}{\insrsid10243528 COXFontPickerButton in }{\b\insrsid10243528 dialog}{\insrsid10243528 or }{\b\insrsid10243528 form view +\par }{\insrsid10243528 +\par 1) In resource editor put a button control in a dialog template. Make sure that you specify owner drawn style for this button (}{\ul\cf2\insrsid10243528 COXBitmapButton}{\insrsid10243528 +\par requirement) +\par +\par 2) Put a static control next to the button. This static control will be later explicitly associated with the button and subclassed with COXStatic object. This control will be used in order to display chosen font and text color +\par +\par 3) In }{\b\insrsid10243528 OnInitDialog}{\insrsid10243528 () for CDialog-derived implementation and in }{\b\insrsid10243528 OnInitialUpdate}{\insrsid10243528 () f +or CFormView-derived implementation you must call the following function that will associate the static control with font picker button: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 BOOL }{\ul\cf2\insrsid10243528 SetBuddy}{\insrsid10243528 (UINT nBuddyWndID); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 4) You might want to associate }{\b\insrsid10243528 COLORREF}{\insrsid10243528 and/or }{\b\insrsid10243528 CFont}{\insrsid10243528 variable with the font picker bu +tton using the following }{\b\insrsid10243528 DDX}{\insrsid10243528 routines: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 void }{\ul\cf2\insrsid10243528 DDX_FontPickerFont}{\insrsid10243528 (CDataExchange *pDX, int nIDC, CFont* pFont); +\par void }{\ul\cf2\insrsid10243528 DDX_FontPickerColor}{\insrsid10243528 (CDataExchange *pDX, int nIDC, COLORREF& clr); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 In order to do that you have to add corresponding variables to your CDialog or CFormView derived class: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 CFont m_font; +\par COLORREF m_clrText; +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 and update your }{\b\insrsid10243528 DoDataExchange}{\insrsid10243528 () routine by adding the following lines of code: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 DDX_FontPickerFont(pDX, IDC_BUTTON_FONT, &m_font); +\par DDX_FontPickerColor(pDX, IDC_BUTTON_FONT, m_clrText); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 where IDC_BUTTON_FONT is presumed to be an ID of the font picker button. Using these DDX routines you can set/retrieve font and text color by simply calling }{\b\insrsid10243528 +UpdateData}{\insrsid10243528 () function. +\par \~ +\par +\par }{\b\insrsid10243528 II.}{\insrsid10243528 \~\~\~ COXFontPickerButton as a child control of any arbitrary window (}{\b\insrsid10243528 explicit creation}{\insrsid10243528 ) +\par +\par 1) Create the COXFontPickerButton control explicitly using }{\b\insrsid10243528 CButton::Create}{\insrsid10243528 () function. Make sure that you specify }{\b\insrsid10243528 BS_OWNERDRAW}{\insrsid10243528 + style for this button (COXBitmapButton requirement)\~ +\par +\par 2) Create the COXStatic control explicitely using }{\ul\cf2\insrsid10243528 COXStatic::Create}{\insrsid10243528 +() function. Before calling this function you need to calculate the rectangle for this control so it will be positioned nicely relatively to the COXFontPickerButton control +\par +\par 3) After both controls were successfully created you have to associate the COXStatic control with the COXFontPickerButton control using: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 BOOL }{\ul\cf2\insrsid10243528 SetBuddy}{\insrsid10243528 (COXStatic* pBuddy); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 4) After accomplishing three previous steps you've got fully functional font picker button control. User can click on the button and standard }{\b\insrsid10243528 CFontDialog}{ +\insrsid10243528 will appear where a user can chose the font and text color. The chosen font and text color can be retrieved using following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid10243528 CFont* }{\ul\cf2\insrsid10243528 GetBuddyFont}{\insrsid10243528 () const; +\par BOOL }{\ul\cf2\insrsid10243528 GetBuddyLogFont}{\insrsid10243528 (LOGFONT* pLF) const; +\par COLORREF }{\ul\cf2\insrsid10243528 GetBuddyTextColor}{\insrsid10243528 () const; +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid10243528 \~ +\par \~ +\par }{\fs20\insrsid10243528 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.clw new file mode 100644 index 0000000..4e2d42e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.clw @@ -0,0 +1,46 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CFontPickersApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "FontPickers.h" + +ClassCount=2 +Class1=CFontPickersApp +Class2=CFontPickersDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_FONTPICKERS_DIALOG + +[CLS:CFontPickersApp] +Type=0 +HeaderFile=FontPickers.h +ImplementationFile=FontPickers.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CFontPickersApp + +[CLS:CFontPickersDlg] +Type=0 +HeaderFile=FontPickersDlg.h +ImplementationFile=FontPickersDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=IDC_BUTTON_FONT_PICKER + +[DLG:IDD_FONTPICKERS_DIALOG] +Type=1 +Class=CFontPickersDlg +ControlCount=6 +Control1=IDOK,button,1342242817 +Control2=IDC_SEPARATOR_COMBO,static,1342312960 +Control3=IDC_COMBO_FONT_PICKER,combobox,1344340514 +Control4=IDC_SEPARATOR_BUTTON,static,1342312960 +Control5=IDC_BUTTON_FONT_PICKER,button,1342246667 +Control6=IDC_STATIC_FONT_PICKER,static,1342312960 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.cpp new file mode 100644 index 0000000..11fda19 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.cpp @@ -0,0 +1,93 @@ +// FontPickers.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "FontPickers.h" +#include "FontPickersDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersApp + +BEGIN_MESSAGE_MAP(CFontPickersApp, CWinApp) + //{{AFX_MSG_MAP(CFontPickersApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersApp construction + +CFontPickersApp::CFontPickersApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CFontPickersApp object + +CFontPickersApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersApp initialization + +BOOL CFontPickersApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl\n")); + } + + // 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. + + CFontPickersDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CFontPickersApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsp new file mode 100644 index 0000000..ce9e16f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsp @@ -0,0 +1,306 @@ +# Microsoft Developer Studio Project File - Name="FontPickers" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FontPickers - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FontPickers.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FontPickers.mak" CFG="FontPickers - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FontPickers - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FontPickers - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FontPickers - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "FontPickers - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "FontPickers - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FontPickers - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FontPickers.exe" + +!ELSEIF "$(CFG)" == "FontPickers - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FontPickers.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FontPickers - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FontPickers.exe" + +!ELSEIF "$(CFG)" == "FontPickers - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode_Debug" +# PROP BASE Intermediate_Dir "Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FontPickers.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FontPickers - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode_Release" +# PROP BASE Intermediate_Dir "Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"FontPickers.exe" + +!ENDIF + +# Begin Target + +# Name "FontPickers - Win32 Release" +# Name "FontPickers - Win32 Debug" +# Name "FontPickers - Win32 Release_Shared" +# Name "FontPickers - Win32 Unicode_Debug" +# Name "FontPickers - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXListBoxEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FontPickers.cpp +# End Source File +# Begin Source File + +SOURCE=.\FontPickers.rc +# End Source File +# Begin Source File + +SOURCE=.\FontPickersDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\FontPickers.h +# End Source File +# Begin Source File + +SOURCE=.\FontPickersDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFontComboBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFontPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\font.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\FontPickers.ico +# End Source File +# Begin Source File + +SOURCE=.\res\FontPickers.rc2 +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\RES\il_fonttype.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FontPickers.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsw new file mode 100644 index 0000000..2f26484 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FontPickers"=".\FontPickers.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/FontPickers", TSHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.h new file mode 100644 index 0000000..d3c7ba5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.h @@ -0,0 +1,50 @@ +// FontPickers.h : main header file for the FONTPICKERS application +// + +#if !defined(AFX_FONTPICKERS_H__74F10E75_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) +#define AFX_FONTPICKERS_H__74F10E75_563A_11D3_8B11_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersApp: +// See FontPickers.cpp for the implementation of this class +// + +class CFontPickersApp : public CWinApp +{ +public: + CFontPickersApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFontPickersApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CFontPickersApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FONTPICKERS_H__74F10E75_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.rc new file mode 100644 index 0000000..adaf4bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.rc @@ -0,0 +1,204 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\FontPickers.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXListBoxEx.rc""\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc""\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\\FontPickers.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_FONTPICKERS_DIALOG DIALOGEX 0, 0, 320, 146 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "FontPickers" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Close",IDOK,263,125,50,14 + LTEXT "Font Picker Combo Box",IDC_SEPARATOR_COMBO,7,7,306,10,SS_CENTERIMAGE | SS_SUNKEN + COMBOBOX IDC_COMBO_FONT_PICKER,7,26,162,202,CBS_DROPDOWN | CBS_OWNERDRAWVARIABLE | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + LTEXT "Font Picker Button",IDC_SEPARATOR_BUTTON,7,67,306,10,SS_CENTERIMAGE | SS_SUNKEN + CONTROL "Font...\nChoose font and text color ",IDC_BUTTON_FONT_PICKER, + "Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,7,85,46,17 + LTEXT "Static",IDC_STATIC_FONT_PICKER,59,85,244,16,SS_CENTERIMAGE | SS_SUNKEN +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 "040904B0" + BEGIN + VALUE "FileDescription", "FontPickers MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "FontPickers" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "FontPickers.EXE" + VALUE "ProductName", "FontPickers Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_FONTPICKERS_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 139 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_FONT BITMAP "res\\font.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About FontPickers..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Font Pickers" + ID_DESCRIPTION_FILE "FontPickerButtonInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\FontPickers.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXListBoxEx.rc" +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.sln new file mode 100644 index 0000000..bcc2220 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontPickers", "FontPickers.vcproj", "{D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Debug|Win32.Build.0 = Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release|Win32.ActiveCfg = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Release|Win32.Build.0 = Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {D2C3AECC-A887-4D24-8E36-3A8D15D84B5C}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.vcproj new file mode 100644 index 0000000..44a8b63 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickers.vcproj @@ -0,0 +1,1199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.cpp new file mode 100644 index 0000000..d175a52 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.cpp @@ -0,0 +1,142 @@ +// FontPickersDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "FontPickers.h" +#include "FontPickersDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersDlg dialog + +CFontPickersDlg::CFontPickersDlg(CWnd* pParent /*=NULL*/) + : CDialog(CFontPickersDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CFontPickersDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CFontPickersDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CFontPickersDlg) + DDX_Control(pDX, IDC_SEPARATOR_COMBO, m_sepCombo); + DDX_Control(pDX, IDC_SEPARATOR_BUTTON, m_sepButton); + DDX_Control(pDX, IDC_COMBO_FONT_PICKER, m_cmbFontPicker); + DDX_Control(pDX, IDC_BUTTON_FONT_PICKER, m_btnFontPicker); + //}}AFX_DATA_MAP + DDX_FontPickerFont(pDX, IDC_BUTTON_FONT_PICKER, &m_font); +} + +BEGIN_MESSAGE_MAP(CFontPickersDlg, CDialog) + //{{AFX_MSG_MAP(CFontPickersDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_FONT_PICKER, OnButtonFontPicker) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersDlg message handlers + +BOOL CFontPickersDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_btnFontPicker.LoadBitmap(IDB_FONT,FALSE,RGB(192,192,192)); + m_btnFontPicker.SetBuddy(IDC_STATIC_FONT_PICKER); + m_btnFontPicker.SetToolTip(TRUE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CFontPickersDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CFontPickersDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CFontPickersDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CFontPickersDlg::OnButtonFontPicker() +{ + // TODO: Add your control notification handler code here + UpdateData(TRUE); + m_cmbFontPicker.SelectFont(&m_font); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.h new file mode 100644 index 0000000..013fea7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/FontPickersDlg.h @@ -0,0 +1,59 @@ +// FontPickersDlg.h : header file +// + +#if !defined(AFX_FONTPICKERSDLG_H__74F10E77_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) +#define AFX_FONTPICKERSDLG_H__74F10E77_563A_11D3_8B11_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXFontPickerButton.h" +#include "OXSeparator.h" +#include "OXFontComboBox.h" + + +///////////////////////////////////////////////////////////////////////////// +// CFontPickersDlg dialog + +class CFontPickersDlg : public CDialog +{ +// Construction +public: + CFontPickersDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CFontPickersDlg) + enum { IDD = IDD_FONTPICKERS_DIALOG }; + COXSeparator m_sepCombo; + COXSeparator m_sepButton; + COXFontComboBox m_cmbFontPicker; + COXFontPickerButton m_btnFontPicker; + //}}AFX_DATA + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFontPickersDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CFontPickersDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonFontPicker(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FONTPICKERSDLG_H__74F10E77_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/ReadMe.txt new file mode 100644 index 0000000..db29ee3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : FontPickers +======================================================================== + + +AppWizard has created this FontPickers 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 FontPickers application. + +FontPickers.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +FontPickers.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CFontPickersApp application class. + +FontPickers.cpp + This is the main application source file that contains the application + class CFontPickersApp. + +FontPickers.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++. + +FontPickers.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\FontPickers.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file FontPickers.rc. + +res\FontPickers.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +FontPickersDlg.h, FontPickersDlg.cpp - the dialog + These files contain your CFontPickersDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in FontPickers.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named FontPickers.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.cpp new file mode 100644 index 0000000..a2640db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// FontPickers.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.h new file mode 100644 index 0000000..5d1dd40 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__74F10E79_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) +#define AFX_STDAFX_H__74F10E79_563A_11D3_8B11_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__74F10E79_563A_11D3_8B11_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.rc2 new file mode 100644 index 0000000..3cad77b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/FontPickers.rc2 @@ -0,0 +1,13 @@ +// +// FONTPICKERS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/bitmap1.bmp new file mode 100644 index 0000000..cf6aa43 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/font.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/font.bmp new file mode 100644 index 0000000..cf6aa43 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/res/font.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/resource.h new file mode 100644 index 0000000..3effcdb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FontPickers/resource.h @@ -0,0 +1,27 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by FontPickers.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_FONTPICKERS_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_FONT 130 +#define IDC_SEPARATOR_COMBO 1000 +#define IDC_COMBO_FONT_PICKER 1001 +#define IDC_SEPARATOR_BUTTON 1002 +#define IDC_BUTTON_FONT_PICKER 1003 +#define IDC_STATIC_FONT_PICKER 1004 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1005 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.cpp new file mode 100644 index 0000000..42ee5be --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "FullScreen.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.h new file mode 100644 index 0000000..c7a390c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__2690A072_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_CHILDFRM_H__2690A072_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__2690A072_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.cpp new file mode 100644 index 0000000..446663b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.cpp @@ -0,0 +1,188 @@ +// FullScreen.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "FullScreen.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "FullScreenDoc.h" +#include "FullScreenView.h" +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + + + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenApp + +BEGIN_MESSAGE_MAP(CFullScreenApp, CWinApp) + //{{AFX_MSG_MAP(CFullScreenApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenApp construction + +CFullScreenApp::CFullScreenApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CFullScreenApp object + +CFullScreenApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenApp initialization + +BOOL CFullScreenApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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_FULLSCTYPE, + RUNTIME_CLASS(CFullScreenDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CFullScreenView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CFullScreenApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenApp message handlers + + +int CFullScreenApp::ExitInstance() +{ + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsp new file mode 100644 index 0000000..fc6cc1f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsp @@ -0,0 +1,295 @@ +# Microsoft Developer Studio Project File - Name="FullScreen" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FullScreen - Win32 Debug_Unicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FullScreen.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FullScreen.mak" CFG="FullScreen - Win32 Debug_Unicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FullScreen - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FullScreen - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FullScreen - Win32 Debug_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "FullScreen - Win32 Release_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "FullScreen - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FullScreen - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FullScreen.exe" + +!ELSEIF "$(CFG)" == "FullScreen - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FullScreen.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FullScreen - Win32 Debug_Unicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FullScreen___Win32_Debug_Unicode" +# PROP BASE Intermediate_Dir "FullScreen___Win32_Debug_Unicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Unicode" +# PROP Intermediate_Dir "Debug_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FullScreen.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "FullScreen - Win32 Release_Unicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FullScreen___Win32_Release_Unicode" +# PROP BASE Intermediate_Dir "FullScreen___Win32_Release_Unicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Unicode" +# PROP Intermediate_Dir "Release_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"FullScreen.exe" + +!ELSEIF "$(CFG)" == "FullScreen - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FullScreen___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "FullScreen___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FullScreen.exe" + +!ENDIF + +# Begin Target + +# Name "FullScreen - Win32 Release" +# Name "FullScreen - Win32 Debug" +# Name "FullScreen - Win32 Debug_Unicode" +# Name "FullScreen - Win32 Release_Unicode" +# Name "FullScreen - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\FullScreen.cpp +# End Source File +# Begin Source File + +SOURCE=.\FullScreen.rc +# End Source File +# Begin Source File + +SOURCE=.\FullScreenDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\FullScreenView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFullScreenFrame.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\FullScreen.h +# End Source File +# Begin Source File + +SOURCE=.\FullScreenDoc.h +# End Source File +# Begin Source File + +SOURCE=.\FullScreenView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXFullScreenFrame.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\FullScreen.ico +# End Source File +# Begin Source File + +SOURCE=.\res\FullScreen.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\FullScreenDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FullScreen.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsw new file mode 100644 index 0000000..a2f9e70 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FullScreen"=".\FullScreen.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/FullScreen", OTHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.h new file mode 100644 index 0000000..db8991a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.h @@ -0,0 +1,50 @@ +// FullScreen.h : main header file for the FULLSCREEN application +// + +#if !defined(AFX_FULLSCREEN_H__2690A06C_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_FULLSCREEN_H__2690A06C_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenApp: +// See FullScreen.cpp for the implementation of this class +// + +class CFullScreenApp : public CWinApp +{ +public: + CFullScreenApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFullScreenApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CFullScreenApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FULLSCREEN_H__2690A06C_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.rc new file mode 100644 index 0000000..e017578 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.rc @@ -0,0 +1,431 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\FullScreen.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" + "#include ""UTSampleAbout.rc""\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\\FullScreen.ico" +IDR_FULLSCTYPE ICON "res\\FullScreenDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "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 FullScreen...", ID_APP_ABOUT + END +END + +IDR_FULLSCTYPE 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 + MENUITEM "Full Screen", ID_FULLSCREEN + POPUP "&Help" + BEGIN + MENUITEM "&About FullScreen...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About FullScreen" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "FullScreen Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2000",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,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 "040904B0" + BEGIN + VALUE "FileDescription", "FullScreen MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "FullScreen" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "FullScreen.EXE" + VALUE "ProductName", "FullScreen Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + 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 + IDR_MAINFRAME "FullScreen" + IDR_FULLSCTYPE "\nFullSc\nFullSc\n\n\nFullScreen.Document\nFullSc Document" + ID_DESCRIPTION_FILE "COXFullScreenFrame.rtf" + IDS_STRING_DESCRIPTION "To set fullscreen mode press F8.\r\nTo return from fullscreen mode press ESC\r\n" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "FullScreen" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\FullScreen.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "UTSampleAbout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.vcproj new file mode 100644 index 0000000..d245800 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreen.vcproj @@ -0,0 +1,1051 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.cpp new file mode 100644 index 0000000..2c129eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.cpp @@ -0,0 +1,84 @@ +// FullScreenDoc.cpp : implementation of the CFullScreenDoc class +// + +#include "stdafx.h" +#include "FullScreen.h" + +#include "FullScreenDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenDoc + +IMPLEMENT_DYNCREATE(CFullScreenDoc, CDocument) + +BEGIN_MESSAGE_MAP(CFullScreenDoc, CDocument) + //{{AFX_MSG_MAP(CFullScreenDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenDoc construction/destruction + +CFullScreenDoc::CFullScreenDoc() +{ + // TODO: add one-time construction code here + +} + +CFullScreenDoc::~CFullScreenDoc() +{ +} + +BOOL CFullScreenDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenDoc serialization + +void CFullScreenDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenDoc diagnostics + +#ifdef _DEBUG +void CFullScreenDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CFullScreenDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.h new file mode 100644 index 0000000..3ee81d0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenDoc.h @@ -0,0 +1,57 @@ +// FullScreenDoc.h : interface of the CFullScreenDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FULLSCREENDOC_H__2690A074_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_FULLSCREENDOC_H__2690A074_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CFullScreenDoc : public CDocument +{ +protected: // create from serialization only + CFullScreenDoc(); + DECLARE_DYNCREATE(CFullScreenDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFullScreenDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CFullScreenDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CFullScreenDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FULLSCREENDOC_H__2690A074_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.cpp new file mode 100644 index 0000000..0a875bd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.cpp @@ -0,0 +1,123 @@ +// FullScreenView.cpp : implementation of the CFullScreenView class +// + +#include "stdafx.h" +#include "FullScreen.h" + +#include "FullScreenDoc.h" +#include "FullScreenView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView + +IMPLEMENT_DYNCREATE(CFullScreenView, CEditView) + +BEGIN_MESSAGE_MAP(CFullScreenView, CEditView) + //{{AFX_MSG_MAP(CFullScreenView) + ON_WM_CREATE() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView construction/destruction + +CFullScreenView::CFullScreenView() +{ + // TODO: add construction code here + +} + +CFullScreenView::~CFullScreenView() +{ +} + +BOOL CFullScreenView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CEditView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView drawing + +void CFullScreenView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + CFullScreenDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView printing + +BOOL CFullScreenView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CFullScreenView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + CEditView::OnBeginPrinting(pDC,pInfo); +} + +void CFullScreenView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + CEditView::OnEndPrinting(pDC,pInfo); +} + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView diagnostics + +#ifdef _DEBUG +void CFullScreenView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CFullScreenView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CFullScreenDoc* CFullScreenView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFullScreenDoc))); + return (CFullScreenDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CFullScreenView message handlers + + +void CFullScreenView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) +{ + + CEditView::OnPrepareDC(pDC, pInfo); +} + +int CFullScreenView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CEditView::OnCreate(lpCreateStruct) == -1) + return -1; + + CString sDescription; + sDescription.LoadString(IDS_STRING_DESCRIPTION); + SetWindowText(sDescription); + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.h new file mode 100644 index 0000000..faff9bd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/FullScreenView.h @@ -0,0 +1,69 @@ +// FullScreenView.h : interface of the CFullScreenView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FULLSCREENVIEW_H__2690A076_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_FULLSCREENVIEW_H__2690A076_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#include "..\..\..\INCLUDE\OXFullScreenFrame.h" // Added by ClassView +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + + +class CFullScreenView : public CEditView +{ +protected: // create from serialization only + CFullScreenView(); + DECLARE_DYNCREATE(CFullScreenView) + +// Attributes +public: + CFullScreenDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFullScreenView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CFullScreenView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CFullScreenView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in FullScreenView.cpp +inline CFullScreenDoc* CFullScreenView::GetDocument() + { return (CFullScreenDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FULLSCREENVIEW_H__2690A076_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.cpp new file mode 100644 index 0000000..c5ae3d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.cpp @@ -0,0 +1,113 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "FullScreen.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, COXFullScreenFrame) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_FULLSCREEN, OnFullscreen) + //}}AFX_MSG_MAP +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 + + +void CMainFrame::OnFullscreen() +{ + BOOL bFullScreen=IsFullScreen()?FALSE:TRUE; + SetFullScreen(GetActiveFrame(),bFullScreen); + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.h new file mode 100644 index 0000000..c3a7690 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/MainFrm.h @@ -0,0 +1,57 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__2690A070_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_MAINFRM_H__2690A070_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#include "..\..\..\INCLUDE\OXFullScreenFrame.h" // Added by ClassView +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CMainFrame : public COXFullScreenFrame +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnFullscreen(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__2690A070_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.cpp new file mode 100644 index 0000000..e05533d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// FullScreen.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.h new file mode 100644 index 0000000..fbc017b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__2690A06E_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__2690A06E_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__2690A06E_0FC5_11D4_AD08_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.rc2 new file mode 100644 index 0000000..9d3f19b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreen.rc2 @@ -0,0 +1,13 @@ +// +// FULLSCREEN.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreenDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreenDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/FullScreenDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/toolbar1.bmp new file mode 100644 index 0000000..b45da68 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/resource.h new file mode 100644 index 0000000..420fea5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/FullScreen/resource.h @@ -0,0 +1,22 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by FullScreen.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_FULLSCTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDS_STRING_DESCRIPTION 140 +#define ID_FULLSCREEN 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_COMMAND_VALUE 32774 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.cpp new file mode 100644 index 0000000..a66183f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.cpp @@ -0,0 +1,81 @@ +// GridCdoc.cpp : implementation of the CGridCtrlDoc class +// + +#include "stdafx.h" +#include "GridCtrl.h" + +#include "GridCdoc.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlDoc + +IMPLEMENT_DYNCREATE(CGridCtrlDoc, CDocument) + +BEGIN_MESSAGE_MAP(CGridCtrlDoc, CDocument) + //{{AFX_MSG_MAP(CGridCtrlDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlDoc construction/destruction + +CGridCtrlDoc::CGridCtrlDoc() +{ + // TODO: add one-time construction code here + +} + +CGridCtrlDoc::~CGridCtrlDoc() +{ +} + +BOOL CGridCtrlDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlDoc serialization + +void CGridCtrlDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlDoc diagnostics + +#ifdef _DEBUG +void CGridCtrlDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CGridCtrlDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.h new file mode 100644 index 0000000..504e365 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCdoc.h @@ -0,0 +1,44 @@ +// GridCdoc.h : interface of the CGridCtrlDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CGridCtrlDoc : public CDocument +{ +protected: // create from serialization only + CGridCtrlDoc(); + DECLARE_DYNCREATE(CGridCtrlDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGridCtrlDoc) + public: + virtual BOOL OnNewDocument(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CGridCtrlDoc(); + virtual void Serialize(CArchive& ar); // overridden for document i/o +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CGridCtrlDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.clw new file mode 100644 index 0000000..0cf37e0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.clw @@ -0,0 +1,252 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=COXGridEdit +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "gridctrl.h" +LastPage=0 + +ClassCount=8 +Class1=COXGridEdit +Class2=COXGridHeader +Class3=COXGridList +Class4=CGridCtrlDoc +Class5=CGridCtrlApp +Class6=CAboutDlg +Class7=CGridCtrlView +Class8=CMainFrame + +ResourceCount=7 +Resource1=IDR_GRIDCTTYPE (English (U.S.)) +Resource2=IDR_MAINFRAME (English (U.S.)) +Resource3=IDD_ABOUTBOX (English (U.S.)) +Resource4=IDD_GRIDCTRL_FORM (Dutch (Belgium)) +Resource5=IDR_MAINFRAME +Resource6=IDR_GRIDCTTYPE +Resource7=IDD_ABOUTBOX + +[CLS:COXGridEdit] +Type=0 +BaseClass=CEdit +HeaderFile=\Ultimate ToolBox\Include\oxgridedit.h +ImplementationFile=\Ultimate ToolBox\Source\oxgridedit.cpp +LastObject=COXGridEdit + +[CLS:COXGridHeader] +Type=0 +BaseClass=CHeaderCtrl +HeaderFile=\Ultimate ToolBox\Include\OXGridHdr.h +ImplementationFile=\Ultimate ToolBox\Source\OXGridHdr.cpp + +[CLS:COXGridList] +Type=0 +BaseClass=CListCtrl +HeaderFile=\Ultimate ToolBox\Include\OXGridList.h +ImplementationFile=\Ultimate ToolBox\Source\OXGridList.cpp +LastObject=COXGridList + +[CLS:CGridCtrlDoc] +Type=0 +BaseClass=CDocument +HeaderFile=GridCdoc.h +ImplementationFile=GridCdoc.cpp + +[CLS:CGridCtrlApp] +Type=0 +BaseClass=CWinApp +HeaderFile=GridCtrl.h +ImplementationFile=GridCtrl.cpp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=GridCtrl.cpp +ImplementationFile=GridCtrl.cpp +LastObject=CAboutDlg + +[CLS:CGridCtrlView] +Type=0 +BaseClass=CFormView +HeaderFile=GridCvw.h +ImplementationFile=GridCvw.cpp +LastObject=CGridCtrlView + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=mainfrm.h +ImplementationFile=mainfrm.cpp +LastObject=CMainFrame + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=3 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308352 +Control3=IDOK,button,1342373889 + +[DLG:IDD_GRIDCTRL_FORM] +Type=1 +Class=CGridCtrlView + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_GRIDCTTYPE (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_WINDOW_ARRANGE +Command21=ID_APP_ABOUT +CommandCount=21 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=3 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308352 +Control3=IDOK,button,1342373889 + +[DLG:IDD_GRIDCTRL_FORM (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=32 +Control1=IDC_GENERIC1,SysListView32,1082328069 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_NUM_ROWS,edit,1350631552 +Control4=IDC_NUM_ROWS_SPIN,msctls_updown32,1342177334 +Control5=IDC_INSERT,button,1342242816 +Control6=IDC_CLEAR,button,1342242816 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_IMAGE_COLUMN,edit,1350633600 +Control9=IDC_IMAGE_COLUMN_SPIN,msctls_updown32,1342177334 +Control10=IDC_STATIC,button,1342177287 +Control11=IDC_MULCHECK,button,1342242819 +Control12=IDC_SHOW_SELECTION,button,1342242819 +Control13=IDC_EDITCHECK,button,1342242819 +Control14=IDC_AUTO_EDIT,button,1342242819 +Control15=IDC_CHECKABLE,button,1342242822 +Control16=IDC_SORTABLE,button,1342242819 +Control17=IDC_GRIDLINES,button,1342242819 +Control18=IDC_HORIZONTAL_GRID,button,1342242819 +Control19=IDC_VERTICAL_GRID,button,1342242819 +Control20=IDC_STATIC,button,1342177287 +Control21=IDC_TEXT_COLOR,button,1342308361 +Control22=IDC_TEXT_BK_COLOR,button,1342177289 +Control23=IDC_GRID_BK_COLOR,button,1342177289 +Control24=IDC_GRID_LINES_COLOR,button,1342177289 +Control25=IDC_COLOR_BUTTON,button,1342373888 +Control26=IDC_STATIC,button,1342177287 +Control27=IDC_SET_FONT,button,1342242816 +Control28=IDC_RESET_FONT,button,1342242816 +Control29=IDC_GRIDCOLRESIZE,button,1342242819 +Control30=IDC_RADIOLEFT,button,1342308361 +Control31=IDC_RADIOCENTER,button,1342177289 +Control32=IDC_RADIORIGHT,button,1342177289 + +[MNU:IDR_MAINFRAME] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_GRIDCTTYPE] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_WINDOW_ARRANGE +Command21=ID_APP_ABOUT +CommandCount=21 + +[ACL:IDR_MAINFRAME] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.cpp new file mode 100644 index 0000000..4091563 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.cpp @@ -0,0 +1,146 @@ +// GridCtrl.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "GridCtrl.h" + +#include "mainfrm.h" +#include "GridCdoc.h" +#include "GridCvw.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlApp + +BEGIN_MESSAGE_MAP(CGridCtrlApp, CWinApp) + //{{AFX_MSG_MAP(CGridCtrlApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlApp construction + +CGridCtrlApp::CGridCtrlApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CGridCtrlApp object + +CGridCtrlApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlApp initialization + +BOOL CGridCtrlApp::InitInstance() +{ + // 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. + + LoadStdProfileSettings(); // 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_GRIDCTTYPE, + RUNTIME_CLASS(CGridCtrlDoc), + RUNTIME_CLASS(CMDIChildWnd), // standard MDI child frame + RUNTIME_CLASS(CGridCtrlView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // create a new (empty) document + OnFileNew(); + + if (m_lpCmdLine[0] != '\0') + { + // TODO: add command line processing here + } + + // 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + +// Implementation +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //{{AFX_MSG(CAboutDlg) + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + ON_WM_SETCURSOR() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CGridCtrlApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlApp commands + +BOOL CAboutDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) +{ + // TODO: Add your message handler code here and/or call default + + return CDialog::OnSetCursor(pWnd, nHitTest, message); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsp new file mode 100644 index 0000000..9a4e9f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsp @@ -0,0 +1,320 @@ +# Microsoft Developer Studio Project File - Name="GridCtrl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=GridCtrl - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GridCtrl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GridCtrl.mak" CFG="GridCtrl - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GridCtrl - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "GridCtrl - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "GridCtrl - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "GridCtrl - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "GridCtrl - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GridCtrl - Win32 Debug" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\WinDebug" +# PROP BASE Intermediate_Dir ".\WinDebug" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD /c +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"GridCtrl.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GridCtrl - Win32 Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\WinRel" +# PROP BASE Intermediate_Dir ".\WinRel" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GridCtrl - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "GridCtrl" +# PROP BASE Intermediate_Dir "GridCtrl" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GridCtrl - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GridCtr0" +# PROP BASE Intermediate_Dir "GridCtr0" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /D "_UNICODE" /Fr /Yu"stdafx.h" /FD /c +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GridCtrl - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "GridCtr1" +# PROP BASE Intermediate_Dir "GridCtr1" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "GridCtrl - Win32 Debug" +# Name "GridCtrl - Win32 Release" +# Name "GridCtrl - Win32 Release_Shared" +# Name "GridCtrl - Win32 Unicode_Debug" +# Name "GridCtrl - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\oxgridedit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGridHdr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGridList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\GridCdoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\GridCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\GridCtrl.rc +# End Source File +# Begin Source File + +SOURCE=.\GridCvw.cpp +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD BASE CPP /Yc"stdafx.h" +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\GridCdoc.h +# End Source File +# Begin Source File + +SOURCE=.\GridCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\GridCvw.h +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\oxgridedit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXGridHdr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXGridList.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\GridCdoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\GridCtrl.ico +# End Source File +# Begin Source File + +SOURCE=.\res\GridCtrl.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\icon2.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon3.ico +# End Source File +# Begin Source File + +SOURCE=.\res\idr_main.ico +# End Source File +# Begin Source File + +SOURCE=.\RES\OXGridListImg.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\GridCtrl.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsw new file mode 100644 index 0000000..c41cba7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "GridCtrl"=".\GridCtrl.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/GridCtrl", PUHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.h new file mode 100644 index 0000000..8d9b78a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.h @@ -0,0 +1,38 @@ +// GridCtrl.h : main header file for the GRIDCTRL application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlApp: +// See GridCtrl.cpp for the implementation of this class +// + +class CGridCtrlApp : public CWinApp +{ +public: + CGridCtrlApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGridCtrlApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CGridCtrlApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.rc new file mode 100644 index 0000000..a5050d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.rc @@ -0,0 +1,446 @@ +// 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 + "#include ""res\\GridCtrl.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "\r\n" + "#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" + "#include ""afxres.rc"" \t// Standard components\r\n" + "#include ""afxprint.rc""\t// printing/print preview resources\r\n" + "#include ""OXGridList.rc""\t// Grid List resources\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\\GridCtrl.ico" +IDR_GRIDCTTYPE ICON "res\\GridCdoc.ico" +IDI_ICON1 ICON "res\\idr_main.ico" +IDI_ICON2 ICON "res\\icon2.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\toolbar.bmp" +IDB_IMAGELIST BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "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 GridCtrl...", ID_APP_ABOUT + END +END + +IDR_GRIDCTTYPE 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 GridCtrl...", 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 DIALOG 34, 22, 217, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About GridCtrl" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "Demonstration program GridList",IDC_STATIC,40,22,119,8 + DEFPUSHBUTTON "OK",IDOK,176,6,32,14,WS_GROUP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,4 + PRODUCTVERSION 1,0,0,4 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "GRIDCTRL MFC Application" + VALUE "FileVersion", "1, 0, 0, 4" + VALUE "InternalName", "GRIDCTRL" + VALUE "LegalCopyright", "Copyright © 1996 Periphere" + VALUE "OriginalFilename", "GRIDCTRL.EXE" + VALUE "ProductName", "GRIDCTRL Application" + VALUE "ProductVersion", "1, 0, 0, 4" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ListView" + IDR_GRIDCTTYPE "\nList\nList\n\n\nListViewl.Document\nListView Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "GridCtrl" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON3 ICON "res\\icon3.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_GRIDCTRL_FORM DIALOG 0, 0, 288, 250 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Generic1",IDC_GENERIC1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | NOT WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP,5,64,192,181 + LTEXT "Number of rows",IDC_STATIC,5,6,52,9 + EDITTEXT IDC_NUM_ROWS,60,5,32,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_NUM_ROWS_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,94,6,11,11 + PUSHBUTTON "Insert",IDC_INSERT,112,6,36,11 + PUSHBUTTON "Clear",IDC_CLEAR,154,6,36,11 + LTEXT "Image Column :",IDC_STATIC,5,25,52,9 + EDITTEXT IDC_IMAGE_COLUMN,60,23,30,12,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Spin2",IDC_IMAGE_COLUMN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,90,24,11,11 + GROUPBOX "Styles",IDC_STATIC,203,5,76,133 + CONTROL "Multiple Sel",IDC_MULCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,16,49,8 + CONTROL "Show Sel Always",IDC_SHOW_SELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,26,65,10 + CONTROL "Edit Labels",IDC_EDITCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,38,44,9 + CONTROL "Auto Edit",IDC_AUTO_EDIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,49,44,9 + CONTROL "Checkable",IDC_CHECKABLE,"Button",BS_AUTO3STATE | WS_TABSTOP,209,60,55,9 + CONTROL "Sortable",IDC_SORTABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,71,43,10 + CONTROL "Show Grid ",IDC_GRIDLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,83,54,9 + CONTROL "Horizontal",IDC_HORIZONTAL_GRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,94,46,10 + CONTROL "Vertical",IDC_VERTICAL_GRID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,106,39,10 + GROUPBOX "Color",IDC_STATIC,203,141,77,72 + CONTROL "Text Color",IDC_TEXT_COLOR,"Button",BS_AUTORADIOBUTTON | WS_GROUP,210,153,46,8 + CONTROL "Text Bk Color",IDC_TEXT_BK_COLOR,"Button",BS_AUTORADIOBUTTON,210,163,55,8 + CONTROL "Grid Bk Color",IDC_GRID_BK_COLOR,"Button",BS_AUTORADIOBUTTON,210,173,55,8 + CONTROL "Grid Lines",IDC_GRID_LINES_COLOR,"Button",BS_AUTORADIOBUTTON,210,183,46,10 + PUSHBUTTON "...",IDC_COLOR_BUTTON,228,195,17,14,WS_GROUP + GROUPBOX "Font",IDC_STATIC,203,214,77,30 + PUSHBUTTON "Set",IDC_SET_FONT,209,225,29,12 + PUSHBUTTON "Reset",IDC_RESET_FONT,243,225,29,12 + CONTROL "Resize Columns",IDC_GRIDCOLRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,119,64,9 + CONTROL "Align Left",IDC_RADIOLEFT,"Button",BS_AUTORADIOBUTTON | WS_GROUP,120,26,62,10 + CONTROL "Align Center",IDC_RADIOCENTER,"Button",BS_AUTORADIOBUTTON,120,36,62,10 + CONTROL "Align Right",IDC_RADIORIGHT,"Button",BS_AUTORADIOBUTTON,120,46,62,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_GRIDCTRL_FORM, DIALOG + BEGIN + LEFTMARGIN, 5 + TOPMARGIN, 5 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "res\GridCtrl.rc2" // non-Microsoft Visual C++ edited resources + +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXGridList.rc" // Grid List resources +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.sln new file mode 100644 index 0000000..fa652d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GridCtrl", "GridCtrl.vcproj", "{C0587A88-C07E-4545-874F-8436C64ECC03}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Debug|Win32.Build.0 = Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release|Win32.ActiveCfg = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Release|Win32.Build.0 = Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {C0587A88-C07E-4545-874F-8436C64ECC03}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.vcproj new file mode 100644 index 0000000..5d917e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCtrl.vcproj @@ -0,0 +1,1101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.cpp new file mode 100644 index 0000000..af875bb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.cpp @@ -0,0 +1,454 @@ +// GridCvw.cpp : implementation of the CGridCtrlView class +// + +#include "stdafx.h" +#include "GridCtrl.h" + +#include "GridCdoc.h" +#include "GridCvw.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +#define SMALL_BITMAP_WIDTH 16 +#define SMALL_BITMAP_HEIGHT 16 + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlView + +IMPLEMENT_DYNCREATE(CGridCtrlView, CFormView) + +BEGIN_MESSAGE_MAP(CGridCtrlView, CFormView) + //{{AFX_MSG_MAP(CGridCtrlView) + ON_BN_CLICKED(IDC_SET_FONT, OnSetFont) + ON_BN_CLICKED(IDC_RESET_FONT, OnResetFont) + ON_BN_CLICKED(IDC_COLOR_BUTTON, OnColorButton) + ON_BN_CLICKED(IDC_CLEAR, OnClear) + ON_BN_CLICKED(IDC_INSERT, OnInsert) + ON_BN_CLICKED(IDC_SORTABLE, OnSortable) + ON_BN_CLICKED(IDC_MULCHECK, OnMulcheck) + ON_BN_CLICKED(IDC_EDITCHECK, OnEditcheck) + ON_BN_CLICKED(IDC_GRIDLINES, OnGridLines) + ON_BN_CLICKED(IDC_CHECKABLE, OnCheckable) + ON_NOTIFY(LVN_ITEMCHANGED, IDC_GENERIC1, OnTraceNotification) + ON_BN_CLICKED(IDC_AUTO_EDIT, OnAutoEdit) + ON_BN_CLICKED(IDC_SHOW_SELECTION, OnShowSelection) + ON_EN_CHANGE(IDC_IMAGE_COLUMN, OnChangeImageColumn) + ON_BN_CLICKED(IDC_HORIZONTAL_GRID, OnHorizontalGrid) + ON_BN_CLICKED(IDC_VERTICAL_GRID, OnVerticalGrid) + ON_BN_CLICKED(IDC_GRIDCOLRESIZE, OnGridcolresize) + ON_NOTIFY(LVN_ITEMCHANGING, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_BEGINDRAG, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_BEGINLABELEDIT, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_BEGINRDRAG, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_COLUMNCLICK, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_DELETEALLITEMS, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_DELETEITEM, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_ENDLABELEDIT, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_GETDISPINFO, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_INSERTITEM, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_KEYDOWN, IDC_GENERIC1, OnTraceNotification) + ON_NOTIFY(LVN_SETDISPINFO, IDC_GENERIC1, OnTraceNotification) + ON_BN_CLICKED(IDC_RADIOCENTER, OnRadiocenter) + ON_BN_CLICKED(IDC_RADIOLEFT, OnRadioleft) + ON_BN_CLICKED(IDC_RADIORIGHT, OnRadioright) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlView construction/destruction + +CGridCtrlView::CGridCtrlView() + : + CFormView(CGridCtrlView::IDD), + m_bInitialized(FALSE) + { + //{{AFX_DATA_INIT(CGridCtrlView) + m_bGridLines = FALSE; + m_bEditCheck = FALSE; + m_bMulti = FALSE; + m_nRegion = 0; + m_bSort = FALSE; + m_iNumberOfRows = 5; + m_iImageColumn = 0; + m_bCheckable = FALSE; + m_bAutoEdit = FALSE; + m_bShowSel = FALSE; + m_bHorizontal = TRUE; + m_bVertical = TRUE; + m_bResize = TRUE; + //}}AFX_DATA_INIT + } + +CGridCtrlView::~CGridCtrlView() + { + } + +void CGridCtrlView::DoDataExchange(CDataExchange* pDX) + { + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CGridCtrlView) +// DDX_Control(pDX, IDC_COLOR_BUTTON, m_btnCustomize); + DDX_Control(pDX, IDC_IMAGE_COLUMN_SPIN, m_wndImageColumnSpin); + DDX_Control(pDX, IDC_NUM_ROWS_SPIN, m_wndNumRowsSpin); + DDX_Control(pDX, IDC_GENERIC1, m_GridCtrl); + DDX_Check(pDX, IDC_GRIDLINES, m_bGridLines); + DDX_Check(pDX, IDC_EDITCHECK, m_bEditCheck); + DDX_Check(pDX, IDC_MULCHECK, m_bMulti); + DDX_Radio(pDX, IDC_TEXT_COLOR, m_nRegion); + DDX_Check(pDX, IDC_SORTABLE, m_bSort); + DDX_Text(pDX, IDC_NUM_ROWS, m_iNumberOfRows); + DDV_MinMaxInt(pDX, m_iNumberOfRows, 0, 10000); + DDX_Text(pDX, IDC_IMAGE_COLUMN, m_iImageColumn); + DDV_MinMaxInt(pDX, m_iImageColumn, 0, 50); + DDX_Check(pDX, IDC_CHECKABLE, m_bCheckable); + DDX_Check(pDX, IDC_AUTO_EDIT, m_bAutoEdit); + DDX_Check(pDX, IDC_SHOW_SELECTION, m_bShowSel); + DDX_Check(pDX, IDC_HORIZONTAL_GRID, m_bHorizontal); + DDX_Check(pDX, IDC_VERTICAL_GRID, m_bVertical); + DDX_Check(pDX, IDC_GRIDCOLRESIZE, m_bResize); + //}}AFX_DATA_MAP + } + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlView diagnostics + +#ifdef _DEBUG +void CGridCtrlView::AssertValid() const + { + CFormView::AssertValid(); + } + +void CGridCtrlView::Dump(CDumpContext& dc) const + { + CFormView::Dump(dc); + } + +CGridCtrlDoc* CGridCtrlView::GetDocument() // non-debug version is inline + { + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGridCtrlDoc))); + return (CGridCtrlDoc*)m_pDocument; + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CGridCtrlView message handlers + +void CGridCtrlView::OnInitialUpdate() + { + CFormView::OnInitialUpdate(); + + // Add Headers to Grid Control + for (int i = 0; i < 4 ; i++) + { + CString sText; + sText.Format(_T("Header %d"),i); + m_GridCtrl.InsertColumn(i, sText); + } + + // Set the spin ranges + m_wndNumRowsSpin.SetRange(0, 10000); + // ... Only four columns (0 - 3) + m_wndImageColumnSpin.SetRange(0, 3); + + // create the small icon image list + m_ImageSmall.Create(IDB_IMAGELIST,16,0,RGB(255,255,255)); + // Associate the image lists with the grid control + m_GridCtrl.SetImageList(&m_ImageSmall, LVSIL_SMALL); + + m_GridCtrl.SetEqualWidth(); + + m_GridCtrl.ShowWindow(SW_SHOW); + ResizeParentToFit(FALSE); + + m_bInitialized = TRUE; + } + +void CGridCtrlView::OnSetFont() + { + LOGFONT logFont; + + memset(&logFont, 0, sizeof(LOGFONT)); + + // Logical font struct + CFontDialog dlg(&logFont); + + if (dlg.DoModal() == IDOK) + { + if (dlg.GetSize() > 90) + AfxMessageBox(_T("This font might not fit the row height")); + + CFont rFont; + VERIFY(rFont.CreateFontIndirect(&logFont)); + + m_GridCtrl.SetTextFont(&rFont); + } + } + +void CGridCtrlView::OnResetFont() + { + m_GridCtrl.SetTextFont(); + } + +void CGridCtrlView::OnColorButton() + { + if (!UpdateData(TRUE)) + return; + + COLORREF color = 0; + + switch (m_nRegion) + { + case 0: + color = m_GridCtrl.GetTextColor(); + break; + case 1: + color = m_GridCtrl.GetTextBkColor(); + break; + case 2: + color = m_GridCtrl.GetBkColor(); + break; + case 3: + { + BOOL bGridLines; + m_GridCtrl.GetGridLines(bGridLines, color); + } + break; + default: + TRACE1("CGridCtrlView::OnColorButton : Unexpected case in switch 1 : %i\n", m_nRegion); + ASSERT(FALSE); + break; + } + + CColorDialog cdlg(color); + if (cdlg.DoModal() != IDOK) + return; + color = cdlg.GetColor(); + + switch (m_nRegion) + { + case 0: + m_GridCtrl.SetTextColor(color); + break; + case 1: + m_GridCtrl.SetTextBkColor(color); + break; + case 2: + m_GridCtrl.SetBkColor(color); + break; + case 3: + { + BOOL bGridLines; + COLORREF lineColor; + m_GridCtrl.GetGridLines(bGridLines, lineColor); + m_GridCtrl.SetGridLines(bGridLines, color); + } + break; + default: + TRACE1("CGridCtrlView::OnColorButton : Unexpected case in switch 2 : %i\n", m_nRegion); + ASSERT(FALSE); + break; + } + + m_GridCtrl.RedrawWindow(); + } + +void CGridCtrlView::OnClear() + { + BeginWaitCursor(); + + m_GridCtrl.DeleteAllItems(); + m_GridCtrl.Invalidate(); + + EndWaitCursor(); + } + +void CGridCtrlView::OnInsert() + { + if (!UpdateData(TRUE)) + return; + + BeginWaitCursor(); + m_GridCtrl.LockWindowUpdate(); + //////// + // Specify the entire row's column entries. 'lParam' points + // to the data to be displayed in each column. + //////// + LV_ITEM lvi; + lvi.mask = LVIF_TEXT | LVIF_IMAGE; + lvi.cchTextMax = 0; + lvi.lParam = 0; + + int iSubItem; + TCHAR sBuffer[20]; + // Insert the item + for (int j = 0; j < m_iNumberOfRows ; j++) + { + iSubItem = 0; + + lvi.iItem = j; + lvi.iSubItem = 0; + lvi.iImage = 1; + + wsprintf(sBuffer, _T("Row%i,Col%i"),j + 1, iSubItem + 1); + lvi.pszText = sBuffer; + + int nRtnValue = m_GridCtrl.InsertItem(&lvi); + ASSERT(-1 != nRtnValue); + + // Note that we're starting from iSubItem '1' + for (iSubItem = 1; iSubItem < 4; iSubItem++) + { + wsprintf(sBuffer, _T("Row%i,Col%i"),j + 1, iSubItem + 1); + m_GridCtrl.SetItemText(j, iSubItem, sBuffer); + } + } + + m_GridCtrl.UnlockWindowUpdate(); + EndWaitCursor(); + } + + +void CGridCtrlView::OnSortable() + { + if (!UpdateData(TRUE)) + return; + + // ... Show wait cursor (may take a while) + CWaitCursor wc; + + m_GridCtrl.SetSortable(m_bSort); + } + +void CGridCtrlView::OnMulcheck() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetMultipleSelection(m_bMulti); + } + +void CGridCtrlView::OnEditcheck() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetEditable(m_bEditCheck); + } + +void CGridCtrlView::OnGridLines() + { + if (!UpdateData(TRUE)) + return; + + BOOL bGridLines; + COLORREF lineColor; + m_GridCtrl.GetGridLines(bGridLines, lineColor); + m_GridCtrl.SetGridLines(m_bGridLines, lineColor); + } + + +void CGridCtrlView::OnCheckable() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetCheckable(m_bCheckable != 0); + m_GridCtrl.SetCheckStyle(m_bCheckable == 2 ? BS_AUTO3STATE : BS_AUTOCHECKBOX); + } + + +void CGridCtrlView::OnTraceNotification(NMHDR* /*pNMHDR*/, LRESULT* pResult) + { +// NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; + static BOOL bAbort = FALSE; + + *pResult = bAbort; + } + + +void CGridCtrlView::OnAutoEdit() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetAutoEdit(m_bAutoEdit); + } + +void CGridCtrlView::OnShowSelection() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetShowSelAlways(m_bShowSel); + } + +void CGridCtrlView::OnChangeImageColumn() + { + if (!m_bInitialized || !UpdateData(TRUE)) + return; + + if (!m_GridCtrl.SetImageColumn(m_iImageColumn)) + AfxMessageBox(_T("Unable to set desired ImageColumn")); + } + +void CGridCtrlView::OnHorizontalGrid() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetGridLineOrientation(m_bHorizontal, m_bVertical); + } + +void CGridCtrlView::OnVerticalGrid() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetGridLineOrientation(m_bHorizontal, m_bVertical); + } + + +void CGridCtrlView::OnGridcolresize() + { + if (!UpdateData(TRUE)) + return; + + m_GridCtrl.SetResizing(m_bResize); + } + +void CGridCtrlView::OnRadiocenter() + { + LV_COLUMN lvc; + lvc.mask = LVCF_FMT; + lvc.fmt = LVCFMT_CENTER; + + m_GridCtrl.SetColumn(1, &lvc); + + m_GridCtrl.RedrawWindow(); + } + +void CGridCtrlView::OnRadioleft() + { + LV_COLUMN lvc; + lvc.mask = LVCF_FMT; + lvc.fmt = LVCFMT_LEFT; + + m_GridCtrl.SetColumn(1, &lvc); + m_GridCtrl.RedrawWindow(); + } + +void CGridCtrlView::OnRadioright() + { + LV_COLUMN lvc; + lvc.mask = LVCF_FMT; + lvc.fmt = LVCFMT_RIGHT; + + m_GridCtrl.SetColumn(1, &lvc); + m_GridCtrl.RedrawWindow(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.h new file mode 100644 index 0000000..3b10d6f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/GridCvw.h @@ -0,0 +1,101 @@ +// GridCvw.h : interface of the CGridCtrlView class +// +///////////////////////////////////////////////////////////////////////////// + +#include "OxGridList.h" +#include "OXGridEdit.h" +//#include "OXBitmapButton.h" + +class CGridCtrlView : public CFormView +{ +protected: // create from serialization only + CGridCtrlView(); + DECLARE_DYNCREATE(CGridCtrlView) + +public: + //{{AFX_DATA(CGridCtrlView) + enum { IDD = IDD_GRIDCTRL_FORM }; +// COXBitmapButton m_btnCustomize; + CSpinButtonCtrl m_wndImageColumnSpin; + CSpinButtonCtrl m_wndNumRowsSpin; + COXGridList m_GridCtrl; + BOOL m_bGridLines; + BOOL m_bEditCheck; + BOOL m_bMulti; + int m_nRegion; + BOOL m_bSort; + int m_iNumberOfRows; + int m_iImageColumn; + BOOL m_bCheckable; + BOOL m_bAutoEdit; + BOOL m_bShowSel; + BOOL m_bHorizontal; + BOOL m_bVertical; + BOOL m_bResize; + //}}AFX_DATA + +protected: + BOOL m_bInitialized; + CImageList m_ImageSmall; + COXGridEdit m_gridEdit; + CImageList m_stateImages; + +// Attributes +public: + CGridCtrlDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGridCtrlView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CGridCtrlView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CGridCtrlView) + afx_msg void OnSetFont(); + afx_msg void OnResetFont(); + afx_msg void OnColorButton(); + afx_msg void OnClear(); + afx_msg void OnInsert(); + afx_msg void OnSortable(); + afx_msg void OnMulcheck(); + afx_msg void OnEditcheck(); + afx_msg void OnGridLines(); + afx_msg void OnCheckable(); + afx_msg void OnTraceNotification(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnAutoEdit(); + afx_msg void OnShowSelection(); + afx_msg void OnChangeImageColumn(); + afx_msg void OnHorizontalGrid(); + afx_msg void OnVerticalGrid(); + afx_msg void OnGridcolresize(); + afx_msg void OnRadiocenter(); + afx_msg void OnRadioleft(); + afx_msg void OnRadioright(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in GridCvw.cpp +inline CGridCtrlDoc* CGridCtrlView::GetDocument() + { return (CGridCtrlDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.cpp new file mode 100644 index 0000000..5a9e526 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.cpp @@ -0,0 +1,125 @@ +// mainfrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "GridCtrl.h" + +#include "mainfrm.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_SETCURSOR() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// arrays of IDs used to initialize control bars + +// toolbar buttons - IDs are command buttons +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE 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.Create(this) || + !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) || + !m_wndToolBar.SetButtons(buttons, + sizeof(buttons)/sizeof(UINT))) + { + 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); + + // TODO: Remove this if you don't want tool tips + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +BOOL CMainFrame::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) +{ + // TODO: Add your message handler code here and/or call default + + return CMDIFrameWnd::OnSetCursor(pWnd, nHitTest, message); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.h new file mode 100644 index 0000000..7ad557b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/mainfrm.h @@ -0,0 +1,43 @@ +// mainfrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCdoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCdoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCdoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.rc2 new file mode 100644 index 0000000..9c3e860 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/GridCtrl.rc2 @@ -0,0 +1,13 @@ +// +// GRIDCTRL.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/OXGridListImg.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/OXGridListImg.bmp new file mode 100644 index 0000000..6128fa2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/OXGridListImg.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bitmap1.bmp new file mode 100644 index 0000000..e1142fa Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bmp00001.bmp new file mode 100644 index 0000000..6128fa2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon2.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon2.ico new file mode 100644 index 0000000..8d5de49 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon2.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon3.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon3.ico new file mode 100644 index 0000000..8ba9328 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/icon3.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/idr_main.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/idr_main.ico new file mode 100644 index 0000000..8d5de49 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/idr_main.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/toolbar.bmp new file mode 100644 index 0000000..0556e00 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/res/toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/resource.h new file mode 100644 index 0000000..050cc95 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/resource.h @@ -0,0 +1,72 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by GridCtrl.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_GRIDCTRL_FORM 101 +#define IDR_MAINFRAME 128 +#define IDR_GRIDCTTYPE 129 +#define IDI_ICON1 130 +#define IDI_ICON2 131 +#define IDB_IMAGELIST 131 +#define IDI_ICON3 132 +#define IDC_GENERIC1 1000 +#define IDC_EDIT1 1001 +#define IDC_EDIT2 1002 +#define IDC_EDIT3 1003 +#define IDC_BUTTON1 1004 +#define IDC_CHECK1 1005 +#define IDC_GRIDLINES 1005 +#define IDC_BUTTON2 1006 +#define IDC_SET_FONT 1006 +#define IDC_BUTTON3 1007 +#define IDC_RESET_FONT 1007 +#define IDC_MULCHECK 1008 +#define IDC_STYLE_BUTTON 1009 +#define IDC_GRIDCOLRESIZE 1009 +#define IDC_EDITCHECK 1010 +#define IDC_EDIT4 1011 +#define IDC_EDIT5 1012 +#define IDC_EDIT6 1013 +#define IDC_REGION_BUTTON 1014 +#define IDC_COLOR_BUTTON 1014 +#define IDC_RADIO1 1015 +#define IDC_TEXT_COLOR 1015 +#define IDC_RADIO2 1016 +#define IDC_TEXT_BK_COLOR 1016 +#define IDC_RADIO3 1017 +#define IDC_GRID_BK_COLOR 1017 +#define IDC_IMAGE_BUTTON 1018 +#define IDC_CHECK2 1020 +#define IDC_SORTABLE 1020 +#define IDC_EDIT7 1021 +#define IDC_NUM_ROWS 1021 +#define IDC_BUTTON5 1022 +#define IDC_INSERT 1022 +#define IDC_BUTTON6 1023 +#define IDC_CLEAR 1023 +#define IDC_EDIT8 1024 +#define IDC_IMAGE_COLUMN 1024 +#define IDC_CHECKABLE 1026 +#define IDC_AUTO_EDIT 1027 +#define IDC_SHOW_SELECTION 1030 +#define IDC_GRID_LINES_COLOR 1031 +#define IDC_HORIZONTAL_GRID 1032 +#define IDC_VERTICAL_GRID 1033 +#define IDC_NUM_ROWS_SPIN 1034 +#define IDC_IMAGE_COLUMN_SPIN 1035 +#define IDC_RADIOLEFT 1036 +#define IDC_RADIOCENTER 1037 +#define IDC_RADIORIGHT 1038 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1037 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.cpp new file mode 100644 index 0000000..0d9ebb5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// GridCtrl.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.h new file mode 100644 index 0000000..3768dbc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/GridCtrl/stdafx.h @@ -0,0 +1,11 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include // MFC core and standard components +#include // MFC extensions + +#ifdef WIN32 + #include // MFC new WIN95 components +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.clw new file mode 100644 index 0000000..4a19f68 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.clw @@ -0,0 +1,75 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CHistoryComboDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "historycombodemo.h" +LastPage=0 + +ClassCount=2 +Class1=CHistoryComboDemoApp +Class2=CHistoryComboDemoDlg + +ResourceCount=2 +Resource1=IDR_HISTORY_COMBO_TEST (Dutch (Belgium)) +Resource2=IDD_HISTORYCOMBODEMO_DIALOG (Dutch (Belgium)) + +[CLS:CHistoryComboDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=HistoryComboDemo.h +ImplementationFile=HistoryComboDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CHistoryComboDemoApp + +[CLS:CHistoryComboDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=HistoryComboDemoDlg.h +ImplementationFile=HistoryComboDemoDlg.cpp + +[DLG:IDD_HISTORYCOMBODEMO_DIALOG] +Type=1 +Class=CHistoryComboDemoDlg + +[DLG:IDD_HISTORYCOMBODEMO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=22 +Control1=IDC_HISTORY_COMBO,combobox,1344340034 +Control2=IDC_USE_GAP,button,1342242819 +Control3=IDC_MOVE_TOOLBAR,button,1342373888 +Control4=IDC_SAVE,button,1342242816 +Control5=IDC_RESTORE,button,1342242816 +Control6=IDC_STATIC,button,1342308359 +Control7=IDC_SIMPLE,button,1342308361 +Control8=IDC_DROPDOWN,button,1342177289 +Control9=IDC_DROP_LIST,button,1342177289 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_MAX_COUNT,edit,1350633600 +Control12=IDC_MAX_COUNT_SPIN,msctls_updown32,1342177334 +Control13=IDC_STATIC,button,1342308359 +Control14=IDC_BUTTON_1,button,1342373891 +Control15=IDC_BUTTON_2,button,1342242819 +Control16=IDC_BUTTON_3,button,1342242819 +Control17=IDC_BUTTON_4,button,1342242819 +Control18=IDC_BUTTON_5,button,1342242819 +Control19=IDC_BUTTON_6,button,1073807363 +Control20=IDC_SHOW,button,1342373888 +Control21=IDOK,button,1342373889 +Control22=IDC_STATIC,static,1342308352 + +[TB:IDR_HISTORY_COMBO_TEST (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_HISTORY_COMBO_NEW +Command2=ID_HISTORY_COMBO_DELETE +Command3=ID_HISTORY_COMBO_BROWSE +Command4=ID_HISTORY_COMBO_RESERVED_1 +Command5=ID_HISTORY_COMBO_RESERVED_2 +Command6=ID_HISTORY_TEST +CommandCount=6 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.cpp new file mode 100644 index 0000000..d89731a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.cpp @@ -0,0 +1,95 @@ +// HistoryComboDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "HistoryComboDemo.h" +#include "HistoryComboDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoApp + +BEGIN_MESSAGE_MAP(CHistoryComboDemoApp, CWinApp) + //{{AFX_MSG_MAP(CHistoryComboDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoApp construction + +CHistoryComboDemoApp::CHistoryComboDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CHistoryComboDemoApp object + +CHistoryComboDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoApp initialization + +BOOL CHistoryComboDemoApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Set the comapny name + SetRegistryKey(_T("Dundas")); + + CHistoryComboDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CHistoryComboDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsp new file mode 100644 index 0000000..6258e8e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsp @@ -0,0 +1,377 @@ +# Microsoft Developer Studio Project File - Name="HistoryComboDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HistoryComboDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HistoryComboDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HistoryComboDemo.mak" CFG="HistoryComboDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HistoryComboDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HistoryComboDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "HistoryComboDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "HistoryComboDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "HistoryComboDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HistoryComboDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"HistoryComboDemo.exe" + +!ELSEIF "$(CFG)" == "HistoryComboDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"HistoryComboDemo.exe" + +!ELSEIF "$(CFG)" == "HistoryComboDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "HistoryC" +# PROP BASE Intermediate_Dir "HistoryC" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"HistoryComboDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"HistoryComboDemo.exe" + +!ELSEIF "$(CFG)" == "HistoryComboDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "History0" +# PROP BASE Intermediate_Dir "History0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"HistoryComboDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"HistoryComboDemo.exe" + +!ELSEIF "$(CFG)" == "HistoryComboDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "History1" +# PROP BASE Intermediate_Dir "History1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"HistoryComboDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"HistoryComboDemo.exe" + +!ENDIF + +# Begin Target + +# Name "HistoryComboDemo - Win32 Release" +# Name "HistoryComboDemo - Win32 Debug" +# Name "HistoryComboDemo - Win32 Release_Shared" +# Name "HistoryComboDemo - Win32 Unicode_Debug" +# Name "HistoryComboDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Skins Framework" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\HistoryComboDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\HistoryComboDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\HistoryComboDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\HistoryComboDemo.h +# End Source File +# Begin Source File + +SOURCE=.\HistoryComboDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHistoryCombo.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\HistComboTest.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\HistoryComboDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\HistoryComboDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=..\..\INCLUDE\RES\OXHistoryComboImg.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\HistoryComboDemo.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsw new file mode 100644 index 0000000..d6578cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HistoryComboDemo"=".\HistoryComboDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/HistCmbo", RVHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.h new file mode 100644 index 0000000..7ce57b0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.h @@ -0,0 +1,38 @@ +// HistoryComboDemo.h : main header file for the HISTORYCOMBODEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoApp: +// See HistoryComboDemo.cpp for the implementation of this class +// + +class CHistoryComboDemoApp : public CWinApp +{ +public: + CHistoryComboDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHistoryComboDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CHistoryComboDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.rc new file mode 100644 index 0000000..ede0c14 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.rc @@ -0,0 +1,249 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\HistoryComboDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXHistoryCombo.rc"" // History combo resources\r\n" + "#endif\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\\HistoryComboDemo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_HISTORYCOMBODEMO_DIALOG DIALOGEX 0, 0, 270, 189 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "History Combo Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_HISTORY_COMBO,52,18,166,43,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + CONTROL "Use a small gap",IDC_USE_GAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,71,65,10 + PUSHBUTTON "&Move Toolbar",IDC_MOVE_TOOLBAR,14,83,50,14,WS_GROUP + PUSHBUTTON "&Save",IDC_SAVE,14,114,50,14 + PUSHBUTTON "&Restore",IDC_RESTORE,14,134,50,14 + GROUPBOX "Type",IDC_STATIC,96,71,77,55,WS_GROUP + CONTROL "&Simple",IDC_SIMPLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,103,83,37,10 + CONTROL "Drop&down",IDC_DROPDOWN,"Button",BS_AUTORADIOBUTTON,103,97,47,10 + CONTROL "Drop &List",IDC_DROP_LIST,"Button",BS_AUTORADIOBUTTON,103,111,43,10 + LTEXT "Max history",IDC_STATIC,97,139,37,8 + EDITTEXT IDC_MAX_COUNT,139,138,24,12,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Spin1",IDC_MAX_COUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,164,137,10,14 + GROUPBOX "Visibility",IDC_STATIC,195,70,59,85,WS_GROUP + CONTROL "Button 1",IDC_BUTTON_1,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,201,78,40,10 + CONTROL "Button 2",IDC_BUTTON_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,88,40,10 + CONTROL "Button 3",IDC_BUTTON_3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,98,40,10 + CONTROL "Button 4",IDC_BUTTON_4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,108,40,10 + CONTROL "Button 5",IDC_BUTTON_5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,118,40,10 + CONTROL "Button 6",IDC_BUTTON_6,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,201,128,40,10 + PUSHBUTTON "S&how",IDC_SHOW,201,139,38,12,WS_GROUP + DEFPUSHBUTTON "OK",IDOK,109,162,50,14,WS_GROUP + LTEXT "Persistent",IDC_STATIC,14,104,31,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 "040904b0" + BEGIN + VALUE "FileDescription", "HISTORYCOMBODEMO MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "HISTORYCOMBODEMO" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "HISTORYCOMBODEMO.EXE" + VALUE "ProductName", "HISTORYCOMBODEMO Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_HISTORYCOMBODEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 263 + TOPMARGIN, 7 + BOTTOMMARGIN, 182 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_HISTORYCOMBODEMO_DIALOG DLGINIT +BEGIN + IDC_HISTORY_COMBO, 0x403, 6, 0 +0x6854, 0x7269, 0x0064, + IDC_HISTORY_COMBO, 0x403, 7, 0 +0x6553, 0x6f63, 0x646e, "\000" + IDC_HISTORY_COMBO, 0x403, 6, 0 +0x6946, 0x7372, 0x0074, + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_HISTORY_COMBO_TEST TOOLBAR 16, 15 +BEGIN + BUTTON ID_HISTORY_COMBO_NEW + BUTTON ID_HISTORY_COMBO_DELETE + BUTTON ID_HISTORY_COMBO_BROWSE + BUTTON ID_HISTORY_COMBO_RESERVED_1 + BUTTON ID_HISTORY_COMBO_RESERVED_2 + BUTTON ID_HISTORY_TEST +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_HISTORY_COMBO_TEST BITMAP "res\\HistComboTest.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About HistoryComboDemo..." +END + +STRINGTABLE +BEGIN + ID_HISTORY_TEST "Delete All\nDelete All" + IDR_MAINRFAME "HistoryComboDemo" + ID_DESCRIPTION_FILE "HistorycomboInfo.rtf" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\HistoryComboDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXHistoryCombo.rc" // History combo resources +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.vcproj new file mode 100644 index 0000000..ad119f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemo.vcproj @@ -0,0 +1,2120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.cpp new file mode 100644 index 0000000..e294005 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.cpp @@ -0,0 +1,314 @@ +// HistoryComboDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "HistoryComboDemo.h" +#include "HistoryComboDemoDlg.h" +#include // for WM_KICKIDLE + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoDlg dialog + +CHistoryComboDemoDlg::CHistoryComboDemoDlg(CWnd* pParent /*=NULL*/) + : + CDialog(CHistoryComboDemoDlg::IDD, pParent), + m_wndHistoryCombo(/* COXHistoryCombo::TBPHorizontalRightCenter, + FALSE, MAKEINTRESOURCE(IDR_HISTORY_COMBO_TEST) */) + { + //{{AFX_DATA_INIT(CHistoryComboDemoDlg) + m_nType = -1; + m_bSmallGap = FALSE; + m_bButton1 = FALSE; + m_bButton2 = FALSE; + m_bButton3 = FALSE; + m_bButton4 = FALSE; + m_bButton5 = FALSE; + m_bButton6 = FALSE; + m_nMaxCount = 0; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CHistoryComboDemoDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CHistoryComboDemoDlg) + DDX_Control(pDX, IDC_MAX_COUNT_SPIN, m_wndMaxCountSpin); + DDX_Control(pDX, IDC_HISTORY_COMBO, m_wndHistoryCombo); + DDX_Radio(pDX, IDC_SIMPLE, m_nType); + DDX_Check(pDX, IDC_USE_GAP, m_bSmallGap); + DDX_Check(pDX, IDC_BUTTON_1, m_bButton1); + DDX_Check(pDX, IDC_BUTTON_2, m_bButton2); + DDX_Check(pDX, IDC_BUTTON_3, m_bButton3); + DDX_Check(pDX, IDC_BUTTON_4, m_bButton4); + DDX_Check(pDX, IDC_BUTTON_5, m_bButton5); + DDX_Check(pDX, IDC_BUTTON_6, m_bButton6); + DDX_Text(pDX, IDC_MAX_COUNT, m_nMaxCount); + DDV_MinMaxInt(pDX, m_nMaxCount, -1, 100); + //}}AFX_DATA_MAP + } + +BEGIN_MESSAGE_MAP(CHistoryComboDemoDlg, CDialog) + //{{AFX_MSG_MAP(CHistoryComboDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_MOVE_TOOLBAR, OnMoveToolbar) + ON_BN_CLICKED(IDC_DROP_LIST, OnStyleChange) + ON_BN_CLICKED(IDC_SAVE, OnSave) + ON_BN_CLICKED(IDC_SHOW, OnShow) + ON_BN_CLICKED(IDC_RESTORE, OnRestore) + ON_BN_CLICKED(IDC_DROPDOWN, OnStyleChange) + ON_BN_CLICKED(IDC_SIMPLE, OnStyleChange) + ON_EN_CHANGE(IDC_MAX_COUNT, OnChangeMaxCount) + ON_COMMAND(ID_HISTORY_TEST, OnExtra) + ON_UPDATE_COMMAND_UI(ID_HISTORY_TEST, OnUpdateExtra) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_KICKIDLE, OnKickIdle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoDlg message handlers + +BOOL CHistoryComboDemoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + + // Reflect the current type of combo + DWORD nComboStyle = m_wndHistoryCombo.GetStyle(); + if ((nComboStyle & CBS_SIMPLE) == CBS_SIMPLE) + m_nType = 0; + else if ((nComboStyle & CBS_DROPDOWN) == CBS_DROPDOWN) + m_nType = 1; + else if ((nComboStyle & CBS_DROPDOWNLIST) == CBS_DROPDOWNLIST) + m_nType = 2; + else + { + m_nType = -1; + TRACE0("CHistoryComboDemoDlg::OnInitDialog : History combo has unknown style\n"); + } + + // Initialize the visibility + m_bButton1 = m_wndHistoryCombo.IsButtonShown(0); + m_bButton2 = m_wndHistoryCombo.IsButtonShown(1); + m_bButton3 = m_wndHistoryCombo.IsButtonShown(2); + m_bButton4 = m_wndHistoryCombo.IsButtonShown(3); + m_bButton5 = m_wndHistoryCombo.IsButtonShown(4); + m_bButton6 = m_wndHistoryCombo.IsButtonShown(5); + + // Initialize the max list count + m_nMaxCount = m_wndHistoryCombo.GetMaxHistoryCount(); + m_wndMaxCountSpin.SetRange(-1, 100); + + // Use auto persistence + m_wndHistoryCombo.SetAutoPersistent(_T("History 1")); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + } + +void CHistoryComboDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINRFAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CHistoryComboDemoDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CHistoryComboDemoDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CHistoryComboDemoDlg::OnMoveToolbar() + { + if (!UpdateData(TRUE)) + return; + + COXHistoryCombo::EToolbarPosition eToolbarPosition = m_wndHistoryCombo.GetToolbarPosition(); + eToolbarPosition = (COXHistoryCombo::EToolbarPosition)((int)eToolbarPosition + 1); + if (COXHistoryCombo::TBP_LAST < eToolbarPosition) + eToolbarPosition = COXHistoryCombo::TBP_FIRST; + m_wndHistoryCombo.PositionToolbar(eToolbarPosition, m_bSmallGap); + } + +void CHistoryComboDemoDlg::OnStyleChange() + { + if (!UpdateData(TRUE)) + return; + + DWORD nMask = CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST; + DWORD nNewComboStyle = 0; + switch(m_nType) + { + case 0: + nNewComboStyle = CBS_SIMPLE; + break; + case 1: + nNewComboStyle = CBS_DROPDOWN; + break; + case 2: + nNewComboStyle = CBS_DROPDOWNLIST; + break; + default: + TRACE1("CHistoryComboDemoDlg::OnStyleChange : Unexpected case in switch : Unknown style\n", + m_nType); + ASSERT(FALSE); + break; + } + + DWORD nFullOldComboStyle = m_wndHistoryCombo.GetStyle(); + DWORD nOldComboStyle = m_wndHistoryCombo.GetStyle() & nMask; + if (nOldComboStyle != nNewComboStyle) + { + // The type changed, but changing the window style is not sufficient, + // we have to recreate the window + + // Get the state of the old window + CRect windowRect; + m_wndHistoryCombo.GetWindowRect(windowRect); + ScreenToClient(windowRect); + if ( nOldComboStyle != CBS_SIMPLE ) + // ... Use a height of 2.8 times the height of the edit (or static) control + windowRect.bottom = windowRect.top + (windowRect.Height() * 14) / 4; + + // Destroy old window and create new one + m_wndHistoryCombo.DestroyWindow(); + m_wndHistoryCombo.Create((nFullOldComboStyle & ~nMask) | nNewComboStyle | WS_VSCROLL, + windowRect, this, IDC_HISTORY_COMBO); + + // Restore the old state + m_wndHistoryCombo.SetFont(GetFont()); + // ... The contents is already restored during OnCreate + // because we use SetAutoPersistent + } + } + +LRESULT CHistoryComboDemoDlg::OnKickIdle(WPARAM wParam, LPARAM lParam) + { + UNUSED(wParam); + UNREFERENCED_PARAMETER(lParam); + + ASSERT_VALID(this); + ASSERT(wParam == MSGF_DIALOGBOX); + + BOOL bContinueIdle = TRUE; + + // Pass on to the history combo + m_wndHistoryCombo.OnIdle(); + + return bContinueIdle; + } + + +void CHistoryComboDemoDlg::OnSave() + { + m_wndHistoryCombo.SaveContents(_T("History 1")); + } + +void CHistoryComboDemoDlg::OnShow() + { + if (!UpdateData(TRUE)) + return; + m_wndHistoryCombo.ShowButton(0, m_bButton1); + m_wndHistoryCombo.ShowButton(1, m_bButton2); + m_wndHistoryCombo.ShowButton(2, m_bButton3); + m_wndHistoryCombo.ShowButton(3, m_bButton4); + m_wndHistoryCombo.ShowButton(4, m_bButton5); + m_wndHistoryCombo.ShowButton(5, m_bButton6); + + m_wndHistoryCombo.RefreshToolbar(); + } + +void CHistoryComboDemoDlg::OnRestore() + { + m_wndHistoryCombo.RestoreContents(_T("History 1")); + } + +void CHistoryComboDemoDlg::OnChangeMaxCount() + { + if (m_wndHistoryCombo.m_hWnd != NULL) + { + if (!UpdateData(TRUE)) + return; + m_wndHistoryCombo.SetMaxHistoryCount(m_nMaxCount); + } + } + +void CHistoryComboDemoDlg::OnExtra() + { + m_wndHistoryCombo.ResetContent(); + } + +void CHistoryComboDemoDlg::OnUpdateExtra(CCmdUI* pCmdUI) + { + pCmdUI->Enable(0 < m_wndHistoryCombo.GetCount()); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.h new file mode 100644 index 0000000..3200c71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.h @@ -0,0 +1,58 @@ +// HistoryComboDemoDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CHistoryComboDemoDlg dialog + +#include "OXHistoryCombo.h" + +class CHistoryComboDemoDlg : public CDialog +{ +// Construction +public: + CHistoryComboDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CHistoryComboDemoDlg) + enum { IDD = IDD_HISTORYCOMBODEMO_DIALOG }; + CSpinButtonCtrl m_wndMaxCountSpin; + COXHistoryCombo m_wndHistoryCombo; + int m_nType; + BOOL m_bSmallGap; + BOOL m_bButton1; + BOOL m_bButton2; + BOOL m_bButton3; + BOOL m_bButton4; + BOOL m_bButton5; + BOOL m_bButton6; + int m_nMaxCount; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHistoryComboDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CHistoryComboDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnMoveToolbar(); + afx_msg void OnStyleChange(); + afx_msg void OnSave(); + afx_msg void OnShow(); + afx_msg void OnRestore(); + afx_msg void OnChangeMaxCount(); + afx_msg void OnExtra(); + afx_msg void OnUpdateExtra(CCmdUI* pCmdUI); + //}}AFX_MSG + afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistorycomboInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistorycomboInfo.rtf new file mode 100644 index 0000000..7d4ebc6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/HistorycomboInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.cpp new file mode 100644 index 0000000..3432403 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// HistoryComboDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.h new file mode 100644 index 0000000..54a46ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/StdAfx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +#include "OXAdvancedAssert.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistComboTest.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistComboTest.bmp new file mode 100644 index 0000000..1c22aed Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistComboTest.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.rc2 new file mode 100644 index 0000000..af0df63 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/res/HistoryComboDemo.rc2 @@ -0,0 +1,13 @@ +// +// HISTORYCOMBODEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/resource.h new file mode 100644 index 0000000..18be7e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HistCmbo/resource.h @@ -0,0 +1,46 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by HistoryComboDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_HISTORYCOMBODEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_HISTORY_COMBO 1000 +#define IDC_MOVE_TOOLBAR 1001 +#define IDC_SIMPLE 1002 +#define IDC_DROPDOWN 1003 +#define IDC_DROP_LIST 1004 +#define IDC_USE_GAP 1005 +#define IDC_SAVE 1006 +#define IDC_RESTORE 1007 +#define IDC_BUTTON_1 1008 +#define IDC_BUTTON_2 1009 +#define IDC_BUTTON_3 1010 +#define IDC_BUTTON_4 1011 +#define IDC_BUTTON_5 1012 +#define IDC_BUTTON_6 1013 +#define IDC_SHOW 1014 +#define IDC_MAX_COUNT 1015 +#define IDC_MAX_COUNT_SPIN 1016 +#define IDR_HISTORY_COMBO_TEST 1017 +#define ID_HISTORY_TEST 32773 +#define IDR_MAINRFAME 32774 +#define ID_DESCRIPTION_FILE 32775 +#define ID_HISTORY_COMBO_NEW 53320 +#define ID_HISTORY_COMBO_DELETE 53321 +#define ID_HISTORY_COMBO_BROWSE 53322 +#define ID_HISTORY_COMBO_RESERVED_1 53323 +#define ID_HISTORY_COMBO_RESERVED_2 53324 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32774 +#define _APS_NEXT_CONTROL_VALUE 1017 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.cpp new file mode 100644 index 0000000..21b3063 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.cpp @@ -0,0 +1,76 @@ +// Config.cpp : implementation file +// + +#include "stdafx.h" +#include "HyperbarDemo.h" +#include "Config.h" + +#include "OXHyperBarRender.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CConfig dialog + + +CConfig::CConfig(CWnd* pParent /*=NULL*/) + : CDialog(CConfig::IDD, pParent) +{ + //{{AFX_DATA_INIT(CConfig) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CConfig::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CConfig) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP + + DDX_Control(pDX, IDC_ZOOM, m_Zoom); +} + +BEGIN_MESSAGE_MAP(CConfig, CDialog) + //{{AFX_MSG_MAP(CConfig) + ON_WM_HSCROLL() + ON_WM_ACTIVATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CConfig message handlers + +void CConfig::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) +{ + COXHyperBarRender::m_Focus = m_Zoom.GetPos()/100.0; + + AfxGetMainWnd()->SendMessage(WM_NCACTIVATE, TRUE); + + CDialog::OnHScroll(nSBCode, nPos, pScrollBar); +} + +BOOL CConfig::OnInitDialog() +{ + BOOL ret = CDialog::OnInitDialog(); + + if (ret != FALSE) + { + m_Zoom.SetRange(5, 40); + m_Zoom.SetPos(20); + } + + return ret; +} + +void CConfig::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) +{ + CDialog::OnActivate(nState, pWndOther, bMinimized); + + AfxGetMainWnd()->SendMessage(WM_NCACTIVATE, TRUE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.h new file mode 100644 index 0000000..792a2a9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/Config.h @@ -0,0 +1,50 @@ +#if !defined(AFX_CONFIG_H__461E437C_0CA6_4618_9D55_CA28CAD862CB__INCLUDED_) +#define AFX_CONFIG_H__461E437C_0CA6_4618_9D55_CA28CAD862CB__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// Config.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CConfig dialog + +class CConfig : public CDialog +{ +// Construction +public: + CConfig(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CConfig) + enum { IDD = IDD_CONFIGDLG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CConfig) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CConfig) + afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); + afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + CSliderCtrl m_Zoom; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CONFIG_H__461E437C_0CA6_4618_9D55_CA28CAD862CB__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.cpp new file mode 100644 index 0000000..3efc242 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.cpp @@ -0,0 +1,29 @@ +#include "stdafx.h" +#include "CustomHyperbar.h" + +void CCustomHyperbar::RenderBackground(CDC * pDC, RECT * pRect) +{ + pDC->FillSolidRect(pRect, RGB(235,234,214)); + + CBrush brush(RGB(60, 83, 174)); + + CBrush * pOldBrush = pDC->SelectObject(&brush); + + POINT pt; + pt.x = pt.y = 15; + pDC->RoundRect(pRect, pt); + + pDC->SelectObject(pOldBrush); + + CPen pen1(PS_SOLID, 1, RGB(56, 73, 141)); + + CPen * pOldPen = pDC->SelectObject(&pen1); + + for(int y = pRect->top + 2; y < pRect->bottom - 2; y += 3) + { + pDC->MoveTo(pRect->left, y); + pDC->LineTo(pRect->right, y); + } + + pDC->SelectObject(pOldPen); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.h new file mode 100644 index 0000000..3d92b7d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/CustomHyperbar.h @@ -0,0 +1,10 @@ +#pragma once +#include "OXhyperbar.h" + +class CCustomHyperbar : + public COXHyperBar +{ +public: + + void RenderBackground(CDC * pDC, RECT * pRect); +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.cpp new file mode 100644 index 0000000..2a7f2e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.cpp @@ -0,0 +1,156 @@ +// HyperbarDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "HyperbarDemo.h" + +#include "MainFrm.h" +#include "HyperbarDemoDoc.h" +#include "HyperbarDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoApp + +BEGIN_MESSAGE_MAP(CHyperbarDemoApp, CWinApp) + //{{AFX_MSG_MAP(CHyperbarDemoApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoApp construction + +CHyperbarDemoApp::CHyperbarDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CHyperbarDemoApp object + +CHyperbarDemoApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoApp initialization + +BOOL CHyperbarDemoApp::InitInstance() +{ + 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. + + // 1300 is VC2002. +#if _MSC_VER < 1300 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + // 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(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CHyperbarDemoDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CHyperbarDemoView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CHyperbarDemoApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoApp message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsp new file mode 100644 index 0000000..fc00676 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsp @@ -0,0 +1,254 @@ +# Microsoft Developer Studio Project File - Name="HyperbarDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HyperbarDemo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HyperbarDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HyperbarDemo.mak" CFG="HyperbarDemo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HyperbarDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HyperbarDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HyperbarDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 msimg32.lib /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "HyperbarDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 msimg32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "HyperbarDemo - Win32 Release" +# Name "HyperbarDemo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Config.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomHyperbar.cpp +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemoDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemoView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Config.h +# End Source File +# Begin Source File + +SOURCE=.\CustomHyperbar.h +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemo.h +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemoDoc.h +# End Source File +# Begin Source File + +SOURCE=.\HyperbarDemoView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\book.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\code.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\disk.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\document.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\folders.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\globe.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\HyperbarDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\HyperbarDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\HyperbarDemoDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\pc.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\plug.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\pocketpc.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\tools.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\user.bmp +# End Source File +# End Group +# Begin Group "Hyperbar" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OXHyperbar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHyperBarOverlay.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHyperBarRender.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXHyperFrameWnd.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsw new file mode 100644 index 0000000..d3ee8b2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HyperbarDemo"=".\HyperbarDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.h new file mode 100644 index 0000000..e8132e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.h @@ -0,0 +1,49 @@ +// HyperbarDemo.h : main header file for the HYPERBARDEMO application +// + +#if !defined(AFX_HYPERBARDEMO_H__B1D15F19_634B_434A_BDCF_477E6E64EA2C__INCLUDED_) +#define AFX_HYPERBARDEMO_H__B1D15F19_634B_434A_BDCF_477E6E64EA2C__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoApp: +// See HyperbarDemo.cpp for the implementation of this class +// + +class CHyperbarDemoApp : public CWinApp +{ +public: + CHyperbarDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHyperbarDemoApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CHyperbarDemoApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_HYPERBARDEMO_H__B1D15F19_634B_434A_BDCF_477E6E64EA2C__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.rc new file mode 100644 index 0000000..e6330f6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.rc @@ -0,0 +1,455 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\HyperbarDemo.ico" +IDR_HYPERBTYPE ICON "res\\HyperbarDemoDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + 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 "&Help" + BEGIN + MENUITEM "&About HyperbarDemo...", 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 DIALOG 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About HyperbarDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "HyperbarDemo Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2006",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_CONFIGDLG DIALOGEX 0, 0, 114, 30 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +EXSTYLE WS_EX_TOOLWINDOW +CAPTION "Zoom Setting" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Slider1",IDC_ZOOM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,6,100,15 +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 "040904B0" + BEGIN + VALUE "FileDescription", "HyperbarDemo MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "HyperbarDemo" + VALUE "LegalCopyright", "Copyright (C) 2006" + VALUE "OriginalFilename", "HyperbarDemo.EXE" + VALUE "ProductName", "HyperbarDemo Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_CONFIGDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 107 + TOPMARGIN, 6 + BOTTOMMARGIN, 23 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "HyperbarDemo\n\nHyperb\n\n\nHyperbarDemo.Document\nHyperb Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "HyperbarDemo" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Australia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_USER BITMAP "res\\user.bmp" +IDB_BOOK BITMAP "res\\book.bmp" +IDB_CODE BITMAP "res\\code.bmp" +IDB_DISK BITMAP "res\\disk.bmp" +IDB_DOC BITMAP "res\\document.bmp" +IDB_FOLDERS BITMAP "res\\folders.bmp" +IDB_GLOBE BITMAP "res\\globe.bmp" +IDB_PC BITMAP "res\\pc.bmp" +IDB_PLUG BITMAP "res\\plug.bmp" +IDB_POCKETPC BITMAP "res\\pocketpc.bmp" +IDB_TOOLS BITMAP "res\\tools.bmp" +IDR_TOOLBAR1 BITMAP "res\\toolbar1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR1 TOOLBAR 32, 32 +BEGIN + BUTTON ID_BUTTON32771 + BUTTON ID_BUTTON32772 + BUTTON ID_BUTTON32773 + BUTTON ID_BUTTON32774 + BUTTON ID_BUTTON32775 + BUTTON ID_BUTTON32776 + BUTTON ID_BUTTON32777 + BUTTON ID_BUTTON32778 + BUTTON ID_BUTTON32779 + BUTTON ID_BUTTON32780 + BUTTON ID_BUTTON32781 +END + + +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\HyperbarDemo.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 + +#endif // English (Australia) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\HyperbarDemo.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.sln new file mode 100644 index 0000000..11fff51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HyperbarDemo", "HyperbarDemo.vcproj", "{1AF15FBC-E92F-4161-99F7-7C1960A9F529}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Debug|Win32.Build.0 = Debug|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release|Win32.ActiveCfg = Release|Win32 + {1AF15FBC-E92F-4161-99F7-7C1960A9F529}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.vcproj new file mode 100644 index 0000000..b651dda --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemo.vcproj @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.cpp new file mode 100644 index 0000000..22f5417 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.cpp @@ -0,0 +1,84 @@ +// HyperbarDemoDoc.cpp : implementation of the CHyperbarDemoDoc class +// + +#include "stdafx.h" +#include "HyperbarDemo.h" + +#include "HyperbarDemoDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoDoc + +IMPLEMENT_DYNCREATE(CHyperbarDemoDoc, CDocument) + +BEGIN_MESSAGE_MAP(CHyperbarDemoDoc, CDocument) + //{{AFX_MSG_MAP(CHyperbarDemoDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoDoc construction/destruction + +CHyperbarDemoDoc::CHyperbarDemoDoc() +{ + // TODO: add one-time construction code here + +} + +CHyperbarDemoDoc::~CHyperbarDemoDoc() +{ +} + +BOOL CHyperbarDemoDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoDoc serialization + +void CHyperbarDemoDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoDoc diagnostics + +#ifdef _DEBUG +void CHyperbarDemoDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CHyperbarDemoDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.h new file mode 100644 index 0000000..e019699 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoDoc.h @@ -0,0 +1,57 @@ +// HyperbarDemoDoc.h : interface of the CHyperbarDemoDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_HYPERBARDEMODOC_H__93024CB4_9B6B_4AA9_A459_CA47E3D6A866__INCLUDED_) +#define AFX_HYPERBARDEMODOC_H__93024CB4_9B6B_4AA9_A459_CA47E3D6A866__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CHyperbarDemoDoc : public CDocument +{ +protected: // create from serialization only + CHyperbarDemoDoc(); + DECLARE_DYNCREATE(CHyperbarDemoDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHyperbarDemoDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CHyperbarDemoDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CHyperbarDemoDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_HYPERBARDEMODOC_H__93024CB4_9B6B_4AA9_A459_CA47E3D6A866__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.cpp new file mode 100644 index 0000000..4245c1b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.cpp @@ -0,0 +1,104 @@ +// HyperbarDemoView.cpp : implementation of the CHyperbarDemoView class +// + +#include "stdafx.h" +#include "HyperbarDemo.h" + +#include "HyperbarDemoDoc.h" +#include "HyperbarDemoView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView + +IMPLEMENT_DYNCREATE(CHyperbarDemoView, CView) + +BEGIN_MESSAGE_MAP(CHyperbarDemoView, CView) + //{{AFX_MSG_MAP(CHyperbarDemoView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView construction/destruction + +CHyperbarDemoView::CHyperbarDemoView() +{ + // TODO: add construction code here + +} + +CHyperbarDemoView::~CHyperbarDemoView() +{ +} + +BOOL CHyperbarDemoView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView drawing + +void CHyperbarDemoView::OnDraw(CDC* pDC) +{ + CHyperbarDemoDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView printing + +BOOL CHyperbarDemoView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CHyperbarDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CHyperbarDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView diagnostics + +#ifdef _DEBUG +void CHyperbarDemoView::AssertValid() const +{ + CView::AssertValid(); +} + +void CHyperbarDemoView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CHyperbarDemoDoc* CHyperbarDemoView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CHyperbarDemoDoc))); + return (CHyperbarDemoDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CHyperbarDemoView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.h new file mode 100644 index 0000000..86b8f67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/HyperbarDemoView.h @@ -0,0 +1,67 @@ +// HyperbarDemoView.h : interface of the CHyperbarDemoView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_HYPERBARDEMOVIEW_H__C7F27172_1BE2_4A2C_81D0_A8F6672AAD04__INCLUDED_) +#define AFX_HYPERBARDEMOVIEW_H__C7F27172_1BE2_4A2C_81D0_A8F6672AAD04__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CHyperbarDemoView : public CView +{ +protected: // create from serialization only + CHyperbarDemoView(); + DECLARE_DYNCREATE(CHyperbarDemoView) + +// Attributes +public: + CHyperbarDemoDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHyperbarDemoView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CHyperbarDemoView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CHyperbarDemoView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in HyperbarDemoView.cpp +inline CHyperbarDemoDoc* CHyperbarDemoView::GetDocument() + { return (CHyperbarDemoDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_HYPERBARDEMOVIEW_H__C7F27172_1BE2_4A2C_81D0_A8F6672AAD04__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.cpp new file mode 100644 index 0000000..3176206 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.cpp @@ -0,0 +1,162 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "HyperbarDemo.h" +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, COXHyperFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, COXHyperFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 (CFrameWnd::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_wndToolBar2.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP + | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar2.LoadToolBar(IDR_TOOLBAR1)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + CImageList imageList; + CBitmap bitmap; + + imageList.Create(90, 90, ILC_COLOR24|ILC_MASK, 8, 1); + + bitmap.LoadBitmap(IDB_BOOK); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_CODE); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_DISK); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_DOC); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_FOLDERS); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_PC); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_PLUG); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_POCKETPC); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_USER); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_TOOLS); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + bitmap.LoadBitmap(IDB_GLOBE); + imageList.Add(&bitmap, RGB(255,0,255)); + bitmap.Detach(); + + m_wndToolBar2.SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList.m_hImageList); + imageList.Detach(); + + + 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 + } + + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_BOTTOM | CBRS_ALIGN_TOP); + DockControlBar(&m_wndToolBar); + DockControlBar(&m_wndToolBar2); + + if (m_config.Create(IDD_CONFIGDLG, this)) + { + m_config.ShowWindow(SW_SHOW); + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.h new file mode 100644 index 0000000..60056a1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/MainFrm.h @@ -0,0 +1,69 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__F7DB7E3E_A711_4EB9_91EB_154ECAD15AD1__INCLUDED_) +#define AFX_MAINFRM_H__F7DB7E3E_A711_4EB9_91EB_154ECAD15AD1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "CustomHyperBar.h" +#include "OXHyperBar.h" +#include "Config.h" +#include "OXHyperFrameWnd.h" + +class CMainFrame : public COXHyperFrameWnd +{ + +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXHyperBar m_wndToolBar; + CCustomHyperbar m_wndToolBar2; + +// CConfigDlg m_config; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + CConfig m_config; +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__F7DB7E3E_A711_4EB9_91EB_154ECAD15AD1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/ReadMe.txt new file mode 100644 index 0000000..efe9e78 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/ReadMe.txt @@ -0,0 +1,105 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : HyperbarDemo +======================================================================== + + +AppWizard has created this HyperbarDemo 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 HyperbarDemo application. + +HyperbarDemo.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +HyperbarDemo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CHyperbarDemoApp application class. + +HyperbarDemo.cpp + This is the main application source file that contains the application + class CHyperbarDemoApp. + +HyperbarDemo.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++. + +HyperbarDemo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\HyperbarDemo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file HyperbarDemo.rc. + +res\HyperbarDemo.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CFrameWnd and controls all SDI 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 HyperbarDemo.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +HyperbarDemoDoc.h, HyperbarDemoDoc.cpp - the document + These files contain your CHyperbarDemoDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CHyperbarDemoDoc::Serialize). + +HyperbarDemoView.h, HyperbarDemoView.cpp - the view of the document + These files contain your CHyperbarDemoView class. + CHyperbarDemoView objects are used to view CHyperbarDemoDoc objects. + + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named HyperbarDemo.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.cpp new file mode 100644 index 0000000..769d1a2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// HyperbarDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.h new file mode 100644 index 0000000..281968e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__FEC09080_F619_4E82_A7BF_D2DF725C5261__INCLUDED_) +#define AFX_STDAFX_H__FEC09080_F619_4E82_A7BF_D2DF725C5261__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__FEC09080_F619_4E82_A7BF_D2DF725C5261__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.rc2 new file mode 100644 index 0000000..33a7da7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemo.rc2 @@ -0,0 +1,13 @@ +// +// HYPERBARDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemoDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemoDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/HyperbarDemoDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/book.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/book.bmp new file mode 100644 index 0000000..7df86a8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/book.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/code.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/code.bmp new file mode 100644 index 0000000..b83199d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/code.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/disk.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/disk.bmp new file mode 100644 index 0000000..0cd0e8d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/disk.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/document.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/document.bmp new file mode 100644 index 0000000..1540217 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/document.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/folders.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/folders.bmp new file mode 100644 index 0000000..327d1a5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/folders.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/globe.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/globe.bmp new file mode 100644 index 0000000..6422cad Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/globe.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pc.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pc.bmp new file mode 100644 index 0000000..0aa0d20 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pc.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/plug.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/plug.bmp new file mode 100644 index 0000000..d169325 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/plug.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pocketpc.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pocketpc.bmp new file mode 100644 index 0000000..213742e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/pocketpc.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/toolbar1.bmp new file mode 100644 index 0000000..ccc95df Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/tools.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/tools.bmp new file mode 100644 index 0000000..9edc968 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/tools.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/user.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/user.bmp new file mode 100644 index 0000000..29f4d86 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/res/user.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/resource.h new file mode 100644 index 0000000..292f2d6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/HyperbarDemo/resource.h @@ -0,0 +1,44 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by HyperbarDemo.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_CONFIGDLG 104 +#define IDR_MAINFRAME 128 +#define IDR_HYPERBTYPE 129 +#define IDB_USER 130 +#define IDB_BOOK 131 +#define IDB_CODE 132 +#define IDB_DISK 133 +#define IDB_DOC 134 +#define IDB_FOLDERS 135 +#define IDB_GLOBE 136 +#define IDB_PC 137 +#define IDB_PLUG 138 +#define IDB_POCKETPC 139 +#define IDB_TOOLS 140 +#define IDR_TOOLBAR1 141 +#define IDC_ZOOM 1000 +#define ID_BUTTON32771 32771 +#define ID_BUTTON32772 32772 +#define ID_BUTTON32773 32773 +#define ID_BUTTON32774 32774 +#define ID_BUTTON32775 32775 +#define ID_BUTTON32776 32776 +#define ID_BUTTON32777 32777 +#define ID_BUTTON32778 32778 +#define ID_BUTTON32779 32779 +#define ID_BUTTON32780 32780 +#define ID_BUTTON32781 32781 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 143 +#define _APS_NEXT_COMMAND_VALUE 32782 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 105 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.clw new file mode 100644 index 0000000..a820108 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.clw @@ -0,0 +1,51 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CImageListBoxApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ImageListBox.h" + +ClassCount=2 +Class1=CImageListBoxApp +Class2=CImageListBoxDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_IMAGELISTBOX_DIALOG + +[CLS:CImageListBoxApp] +Type=0 +HeaderFile=ImageListBox.h +ImplementationFile=ImageListBox.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CImageListBoxApp + +[CLS:CImageListBoxDlg] +Type=0 +HeaderFile=ImageListBoxDlg.h +ImplementationFile=ImageListBoxDlg.cpp +Filter=D +LastObject=CImageListBoxDlg +BaseClass=CDialog +VirtualFilter=dWC + +[DLG:IDD_IMAGELISTBOX_DIALOG] +Type=1 +Class=CImageListBoxDlg +ControlCount=11 +Control1=IDC_RADIO_DEFAULT,button,1342373897 +Control2=IDC_RADIO_CUSTOM,button,1342242825 +Control3=IDC_COMBO_ICONSOURCE_FILENAME,combobox,1344340034 +Control4=IDC_LIST_IMAGES,listbox,1353777937 +Control5=IDC_CHECK_SMALL_ICONS,button,1342242819 +Control6=IDC_BUTTON_BK_COLOR,button,1342242827 +Control7=IDC_BUTTON_REMOVE,button,1342242816 +Control8=IDC_BUTTON_ADD_DEFAULT,button,1342242816 +Control9=IDOK,button,1342242817 +Control10=IDC_STATIC_OPERATIONS,static,1342308864 +Control11=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.cpp new file mode 100644 index 0000000..66cbef3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.cpp @@ -0,0 +1,96 @@ +// ImageListBox.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ImageListBox.h" +#include "ImageListBoxDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxApp + +BEGIN_MESSAGE_MAP(CImageListBoxApp, CWinApp) + //{{AFX_MSG_MAP(CImageListBoxApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxApp construction + +CImageListBoxApp::CImageListBoxApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CImageListBoxApp object + +CImageListBoxApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxApp initialization + +BOOL CImageListBoxApp::InitInstance() +{ + // 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. + + // TODO: You should modify this string to be something appropriate + // such as the name of your company or organization. + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl\n")); + } + + CImageListBoxDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CImageListBoxApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsp new file mode 100644 index 0000000..e4de52c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsp @@ -0,0 +1,401 @@ +# Microsoft Developer Studio Project File - Name="ImageListBox" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ImageListBox - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ImageListBox.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ImageListBox.mak" CFG="ImageListBox - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ImageListBox - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ImageListBox - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ImageListBox - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ImageListBox - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "ImageListBox - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ImageListBox - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ImageListBox.exe" + +!ELSEIF "$(CFG)" == "ImageListBox - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ImageListBox.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ImageListBox - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ImageListBox.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ImageListBox.exe" + +!ELSEIF "$(CFG)" == "ImageListBox - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode_Release" +# PROP BASE Intermediate_Dir "Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ImageListBox.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ImageListBox.exe" + +!ELSEIF "$(CFG)" == "ImageListBox - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode_Debug" +# PROP BASE Intermediate_Dir "Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ImageListBox.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ImageListBox.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ImageListBox - Win32 Release" +# Name "ImageListBox - Win32 Debug" +# Name "ImageListBox - Win32 Release_Shared" +# Name "ImageListBox - Win32 Unicode_Release" +# Name "ImageListBox - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXImageListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Skins Framework" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ImageListBox.cpp +# End Source File +# Begin Source File + +SOURCE=.\ImageListBox.rc +# End Source File +# Begin Source File + +SOURCE=.\ImageListBoxDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ImageListBox.h +# End Source File +# Begin Source File + +SOURCE=.\ImageListBoxDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXImageListBox.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\il_default.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ImageListBox.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ImageListBox.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ImageListBox.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsw new file mode 100644 index 0000000..105f839 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ImageListBox"=".\ImageListBox.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ImageListBox", NWHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.h new file mode 100644 index 0000000..f35bf8c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.h @@ -0,0 +1,50 @@ +// ImageListBox.h : main header file for the IMAGELISTBOX application +// + +#if !defined(AFX_IMAGELISTBOX_H__A574A805_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) +#define AFX_IMAGELISTBOX_H__A574A805_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxApp: +// See ImageListBox.cpp for the implementation of this class +// + +class CImageListBoxApp : public CWinApp +{ +public: + CImageListBoxApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageListBoxApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CImageListBoxApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGELISTBOX_H__A574A805_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.rc new file mode 100644 index 0000000..87273c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.rc @@ -0,0 +1,212 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ImageListBox.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#include ""utsampleabout.rc""\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\\ImageListBox.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_IMAGELISTBOX_DIALOG DIALOGEX 0, 0, 241, 170 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "ImageListBox" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Display default set of images",IDC_RADIO_DEFAULT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,7,7,105,10 + CONTROL "Display icons from the specified source files",IDC_RADIO_CUSTOM, + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,7,21,152,10 + COMBOBOX IDC_COMBO_ICONSOURCE_FILENAME,7,35,178,71,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_LIST_IMAGES,7,53,227,62,LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + CONTROL "Display small icons",IDC_CHECK_SMALL_ICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,122,75,10 + CONTROL "\n Set the image list box background color",IDC_BUTTON_BK_COLOR, + "Button",BS_OWNERDRAW | WS_TABSTOP,175,120,59,14 + PUSHBUTTON "Remove selected image",IDC_BUTTON_REMOVE,7,149,88,14 + PUSHBUTTON "Add default set of images",IDC_BUTTON_ADD_DEFAULT,103,149,94,14 + DEFPUSHBUTTON "Close",IDOK,189,7,45,14 + LTEXT "Operations",IDC_STATIC_OPERATIONS,7,138,227,8,SS_CENTERIMAGE + LTEXT "Background color",IDC_STATIC,111,123,57,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 "040904B0" + BEGIN + VALUE "FileDescription", "ImageListBox MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ImageListBox" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "ImageListBox.EXE" + VALUE "ProductName", "ImageListBox Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_IMAGELISTBOX_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 234 + TOPMARGIN, 7 + BOTTOMMARGIN, 163 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IL_DEFAULT BITMAP "res\\il_default.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ImageListBox..." + ID_DESCRIPTION_FILE "ImageListBoxInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ImageListBox" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ImageListBox.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXHistoryCombo.rc" +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#include "utsampleabout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.vcproj new file mode 100644 index 0000000..22cb227 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBox.vcproj @@ -0,0 +1,2416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.cpp new file mode 100644 index 0000000..e11ab5d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.cpp @@ -0,0 +1,272 @@ +// ImageListBoxDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ImageListBox.h" +#include "ImageListBoxDlg.h" + +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxDlg dialog + +CImageListBoxDlg::CImageListBoxDlg(CWnd* pParent /*=NULL*/) + : CDialog(CImageListBoxDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CImageListBoxDlg) + m_sIconSourceFile = _T(""); + m_nSourceType = -1; + m_nSelectedImage = -1; + m_bUseSmallIcons = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CImageListBoxDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CImageListBoxDlg) + DDX_Control(pDX, IDC_BUTTON_BK_COLOR, m_btnBkColor); + DDX_Control(pDX, IDC_STATIC_OPERATIONS, m_sepOperations); + DDX_Control(pDX, IDC_LIST_IMAGES, m_listImages); + DDX_Control(pDX, IDC_COMBO_ICONSOURCE_FILENAME, m_comboIconSourceFile); + DDX_CBString(pDX, IDC_COMBO_ICONSOURCE_FILENAME, m_sIconSourceFile); + DDX_Radio(pDX, IDC_RADIO_DEFAULT, m_nSourceType); + DDX_LBIndex(pDX, IDC_LIST_IMAGES, m_nSelectedImage); + DDX_Check(pDX, IDC_CHECK_SMALL_ICONS, m_bUseSmallIcons); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_BK_COLOR, m_clrBackground); +} + +BEGIN_MESSAGE_MAP(CImageListBoxDlg, CDialog) + //{{AFX_MSG_MAP(CImageListBoxDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_ADD_DEFAULT, OnButtonAddDefault) + ON_BN_CLICKED(IDC_BUTTON_REMOVE, OnButtonRemove) + ON_CBN_EDITCHANGE(IDC_COMBO_ICONSOURCE_FILENAME, OnEditchangeComboIconsourceFilename) + ON_CBN_SELCHANGE(IDC_COMBO_ICONSOURCE_FILENAME, OnSelchangeComboIconsourceFilename) + ON_LBN_SELCHANGE(IDC_LIST_IMAGES, OnSelchangeListImages) + ON_BN_CLICKED(IDC_RADIO_CUSTOM, OnRadioCustom) + ON_BN_CLICKED(IDC_RADIO_DEFAULT, OnRadioDefault) + ON_BN_CLICKED(IDC_BUTTON_BK_COLOR, OnButtonBkColor) + ON_BN_CLICKED(IDC_CHECK_SMALL_ICONS, OnCheckSmallIcons) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxDlg message handlers + +BOOL CImageListBoxDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // create default image list + VERIFY(m_ilDefault.Create(IDB_IL_DEFAULT,16,0,RGB(192,192,192))); + + m_nSourceType=0; + // populate image list box with images + m_listImages.SetImageList(&m_ilDefault); + + // setup history combo + m_comboIconSourceFile. + SetAutoPersistent(_T("CustomizeTrayIcon_IconSourceFileName")); + for(int nIndex=4; nIndexModifyStyle(NULL,TBSTYLE_FLAT); + m_comboIconSourceFile.RefreshToolbar(); + + m_clrBackground=m_listImages.GetBkColor(); + m_btnBkColor.SetToolTip(TRUE); + + m_bUseSmallIcons=TRUE; + + UpdateData(FALSE); + + ShowControls(); + + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CImageListBoxDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CImageListBoxDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CImageListBoxDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CImageListBoxDlg::OnButtonAddDefault() +{ + // TODO: Add your control notification handler code here + m_listImages.AddImageList(&m_ilDefault); +} + +void CImageListBoxDlg::OnButtonRemove() +{ + // TODO: Add your control notification handler code here + m_listImages.RemoveImage(m_nSelectedImage); + m_listImages.SetCurSel(m_nSelectedImage); +} + +void CImageListBoxDlg::OnEditchangeComboIconsourceFilename() +{ + // TODO: Add your control notification handler code here + ShowControls(); + LoadFromFile(); +} + +void CImageListBoxDlg::OnSelchangeComboIconsourceFilename() +{ + // TODO: Add your control notification handler code here + ShowControls(); + if(m_comboIconSourceFile.GetCurSel()!=CB_ERR) + { + m_comboIconSourceFile.GetLBText(m_comboIconSourceFile.GetCurSel(), + m_sIconSourceFile); + UpdateData(FALSE); + ShowControls(); + LoadFromFile(); + } +} + +void CImageListBoxDlg::OnSelchangeListImages() +{ + // TODO: Add your control notification handler code here + ShowControls(); +} + +void CImageListBoxDlg::OnRadioCustom() +{ + // TODO: Add your control notification handler code here + ShowControls(); + // populate with icons from the source file + LoadFromFile(); +} + +void CImageListBoxDlg::OnRadioDefault() +{ + // TODO: Add your control notification handler code here + ShowControls(); + // populate image list box with images + m_listImages.SetImageList(&m_ilDefault); + m_listImages.SetCurSel(0); +} + +void CImageListBoxDlg::OnButtonBkColor() +{ + // TODO: Add your control notification handler code here + ShowControls(); + m_listImages.SetBkColor(m_clrBackground); +} + +void CImageListBoxDlg::OnCheckSmallIcons() +{ + // TODO: Add your control notification handler code here + ShowControls(); + LoadFromFile(); +} + +void CImageListBoxDlg::ShowControls() +{ + if(!UpdateData(TRUE)) + return; + + GetDlgItem(IDC_BUTTON_REMOVE)->EnableWindow(m_nSelectedImage!=-1); + GetDlgItem(IDC_BUTTON_ADD_DEFAULT)-> + EnableWindow(m_nSourceType==1 && m_bUseSmallIcons && + !m_sIconSourceFile.IsEmpty()); + GetDlgItem(IDC_CHECK_SMALL_ICONS)->EnableWindow(m_nSourceType==1); + m_comboIconSourceFile.EnableWindow(m_nSourceType==1); +} + +void CImageListBoxDlg::LoadFromFile() +{ + if(!m_sIconSourceFile.IsEmpty()) + { + m_listImages.LoadIconsFromFile(m_sIconSourceFile,m_bUseSmallIcons); + m_listImages.SetCurSel(0); + } + else + { + m_listImages.EmptyImageList(); + } +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.h new file mode 100644 index 0000000..f5e3e9e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxDlg.h @@ -0,0 +1,77 @@ +// ImageListBoxDlg.h : header file +// + +#if !defined(AFX_IMAGELISTBOXDLG_H__A574A807_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) +#define AFX_IMAGELISTBOXDLG_H__A574A807_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXSeparator.h" +#include "OXHistoryCombo.h" +#include "OXImageListBox.h" +#include "OXColorPickerButton.h" + +///////////////////////////////////////////////////////////////////////////// +// CImageListBoxDlg dialog + +class CImageListBoxDlg : public CDialog +{ +// Construction +public: + CImageListBoxDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CImageListBoxDlg) + enum { IDD = IDD_IMAGELISTBOX_DIALOG }; + COXColorPickerButton m_btnBkColor; + COXSeparator m_sepOperations; + COXImageListBox m_listImages; + COXHistoryCombo m_comboIconSourceFile; + CString m_sIconSourceFile; + int m_nSourceType; + int m_nSelectedImage; + BOOL m_bUseSmallIcons; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImageListBoxDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + CImageList m_ilDefault; + COLORREF m_clrBackground; + +protected: + void ShowControls(); + void LoadFromFile(); + + // Generated message map functions + //{{AFX_MSG(CImageListBoxDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonAddDefault(); + afx_msg void OnButtonRemove(); + afx_msg void OnEditchangeComboIconsourceFilename(); + afx_msg void OnSelchangeComboIconsourceFilename(); + afx_msg void OnSelchangeListImages(); + afx_msg void OnRadioCustom(); + afx_msg void OnRadioDefault(); + afx_msg void OnButtonBkColor(); + afx_msg void OnCheckSmallIcons(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_IMAGELISTBOXDLG_H__A574A807_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxInfo.rtf new file mode 100644 index 0000000..8a8ad28 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ImageListBoxInfo.rtf @@ -0,0 +1,89 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} +{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid8667087}{\*\generator Micro +soft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr14\min27}{\revtim\yr2005\mo1\dy17\hr14\min27}{\version2}{\edmins0}{\nofpages3}{\nofwords585}{\nofchars3336}{\*\company Dundas India}{\nofcharsws3914} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot8667087 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid8667087 COXImageListBox Overview}{\b\fs48\insrsid8667087 +\par }{\b\fs15\insrsid8667087 Copyright \'a9 }{\b\fs15\insrsid8667087 The Code Project}{\b\fs15\insrsid8667087 1997-1999, All Rights Reserved +\par }{\insrsid8667087 +\par }{\b\insrsid8667087 COXImageListBox}{\insrsid8667087 is }{\b\insrsid8667087 CListBox}{\insrsid8667087 derived class designed to display multiple }{\b\insrsid8667087 images}{\insrsid8667087 + of the same size. Images are displayed in multiple columns and if they don't fit the size of the control's window }{\b\insrsid8667087 COXImageListBox}{\insrsid8667087 will automatically support the scrolling in horizontal direction. +\par +\par COXImageListBox control supports only single selection and the following styles must be specified: }{\b\insrsid8667087 LBS_OWNERDRAWFIXED}{\insrsid8667087 and }{\b\insrsid8667087 LBS_MULTICOLUMN}{\insrsid8667087 ; and these styles must not be specified: +}{\b\insrsid8667087 LBS_MULTIPLESEL}{\insrsid8667087 and }{\b\insrsid8667087 LBS_OWNERDRAWVARIABLE}{\insrsid8667087 .\~ +\par +\par +\par COXImageListBox uses internally an object of }{\b\insrsid8667087 CImageList}{\insrsid8667087 class as a storage for displayed +images and uses its functionality to draw them. The number of items in this image list is always the same as the number of items in the list box. And an index of the item in the list box corresponds to the same index of the displayed image in the internal + image list. That means that any displayed image can be accessed just by its index. +\par +\par All CListBox functions can be applied to the COXImageListBox object keeping in mind the limitations on the used styles (e.g. functions for a list box with multiple selection are not applicable). +\par +\par \~ +\par }{\b\fs27\insrsid8667087 Usage +\par +\par }{\insrsid8667087 In order to use COXImageListBox object in your application you have to create it using standard }{\b\insrsid8667087 CListBox::Create}{\insrsid8667087 +() function or subclass the existing list box control, e.g. using DDX/DDV technology for a dialog or a form views.\~ +\par +\par After control was successfully created or subclassed you might want to populate it with images that will be displayed in it. We provide many ways of doing this. +\par +\par First of all you can specify your own external image list object as source of images. Call the following function in order to do that: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 int }{\ul\cf2\insrsid8667087 SetImageList}{\insrsid8667087 (CImageList* pImageList); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 You also can add new images to the existing ones through calling the following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 int }{\ul\cf2\insrsid8667087 AddImage}{\insrsid8667087 (CBitmap* pbmImage, CBitmap* pbmMask); +\par int }{\ul\cf2\insrsid8667087 AddImage}{\insrsid8667087 (CBitmap* pbmImage, COLORREF crMask); +\par int }{\ul\cf2\insrsid8667087 AddImage}{\insrsid8667087 (HICON hIcon); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 And you can add a set of images by calling: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 int }{\ul\cf2\insrsid8667087 AddImageList}{\insrsid8667087 (CImageList* pImageList); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 function. +\par +\par We would like to bring your attention to one specific way of populating the image list box with new images. It is known that icons that reside in executable files can be retrieved using Win32 API functions. We provide an automatic way of retrieving icons +from executables and insert them in the list box. In order to do that you just have to call the following function: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 BOOL }{\ul\cf2\insrsid8667087 LoadIconsFromFile}{\insrsid8667087 (LPCTSTR lpszFileName=NULL, BOOL bSmallIcon=TRUE); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 +\par At any time you can replace any displayed image with another one if you call the following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 BOOL }{\ul\cf2\insrsid8667087 ReplaceImage}{\insrsid8667087 (int nImage, CBitmap* pbmImage, CBitmap* pbmMask=NULL); +\par BOOL }{\ul\cf2\insrsid8667087 ReplaceImage}{\insrsid8667087 (int nImage, HICON hIcon); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 Note that after you are done with replacing images you have to call }{\b\insrsid8667087 RedrawWindow}{\insrsid8667087 () function in order to update the displayed images. +\par +\par And, finally, you can remove any displayed image from the list box using: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 BOOL }{\ul\cf2\insrsid8667087 RemoveImage}{\insrsid8667087 (int nImage); +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 All displayed images can be removed at once using: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 void }{\ul\cf2\insrsid8667087 EmptyImageList}{\insrsid8667087 (); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 function. +\par +\par The information about images can be accessed at any time by means of set of the following functions: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 BOOL }{\ul\cf2\insrsid8667087 GetImageInfo}{\insrsid8667087 (int nImage, IMAGEINFO* pImageInfo) const; +\par HICON }{\ul\cf2\insrsid8667087 GetIcon}{\insrsid8667087 (int nImage); +\par HICON }{\ul\cf2\insrsid8667087 GetSelectedIcon}{\insrsid8667087 (); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 +\par The internal image list object can be accessed directly through calling: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 CImageList* }{\ul\cf2\insrsid8667087 GetImageList}{\insrsid8667087 (); +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 +\par As an additional functionality we support an option to set the list box background color. Use these functions in order to set/retrieve the control's background color: +\par }\pard \ql \li720\ri720\nowidctlpar\faauto\rin720\lin720\itap0 {\insrsid8667087 virtual COLORREF }{\ul\cf2\insrsid8667087 GetBkColor}{\insrsid8667087 () const; +\par void }{\ul\cf2\insrsid8667087 SetBkColor}{\insrsid8667087 (COLORREF clrBackground);\~ +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid8667087 \~ +\par The sample that demonstrates COXImageListBox class is called }{\b\insrsid8667087 ImageListBox}{\insrsid8667087 and can be found in the }{\b\insrsid8667087 .\\Samples\\gui\\ImageListBox }{\insrsid8667087 subdirectory of your Ultimate Toolbox directory.\~ + +\par \~ +\par }{\b\insrsid8667087 Dependency: +\par }{\insrsid8667087 #include "}{\cf6\insrsid8667087 OXImageListBox.h}{\insrsid8667087 " +\par }{\b\insrsid8667087 +\par Source code files: +\par }{\insrsid8667087 "}{\cf6\insrsid8667087 OXImageListBox.cpp}{\insrsid8667087 " +\par \~ +\par +\par }{\fs20\insrsid8667087 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ReadMe.txt new file mode 100644 index 0000000..9de151c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ImageListBox +======================================================================== + + +AppWizard has created this ImageListBox 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 ImageListBox application. + +ImageListBox.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ImageListBox.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CImageListBoxApp application class. + +ImageListBox.cpp + This is the main application source file that contains the application + class CImageListBoxApp. + +ImageListBox.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++. + +ImageListBox.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ImageListBox.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ImageListBox.rc. + +res\ImageListBox.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ImageListBoxDlg.h, ImageListBoxDlg.cpp - the dialog + These files contain your CImageListBoxDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ImageListBox.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ImageListBox.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.cpp new file mode 100644 index 0000000..6b1bcf5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ImageListBox.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.h new file mode 100644 index 0000000..8b25a4e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A574A809_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) +#define AFX_STDAFX_H__A574A809_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#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 + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A574A809_4041_11D3_8AF4_0080C8F8F09F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.rc2 new file mode 100644 index 0000000..f313bcc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/ImageListBox.rc2 @@ -0,0 +1,13 @@ +// +// IMAGELISTBOX.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/il_default.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/il_default.bmp new file mode 100644 index 0000000..5d6f89d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/res/il_default.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/resource.h new file mode 100644 index 0000000..d30fc00 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ImageListBox/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ImageListBox.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_IMAGELISTBOX_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDB_IL_DEFAULT 129 +#define IDC_RADIO_DEFAULT 1000 +#define IDC_RADIO_CUSTOM 1001 +#define IDC_COMBO_ICONSOURCE_FILENAME 1002 +#define IDC_LIST_IMAGES 1003 +#define IDC_STATIC_OPERATIONS 1004 +#define IDC_BUTTON_REMOVE 1005 +#define IDC_BUTTON_ADD_DEFAULT 1006 +#define IDC_CHECK_SMALL_ICONS 1007 +#define IDC_BUTTON_BK_COLOR 1008 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1009 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.cpp new file mode 100644 index 0000000..82170f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.cpp @@ -0,0 +1,165 @@ +// CustomizeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + + +CCustomizeDlg::CCustomizeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeDlg) + m_bCustomizable = FALSE; + m_bFlat = FALSE; + m_bGripper = FALSE; + m_bList = FALSE; + m_bSeparator = FALSE; + m_bText = FALSE; + m_nRows = 0; + m_nWidth = 0; + m_nToolbar = -1; + m_nTextType = -1; + m_nIndent = 0; + //}}AFX_DATA_INIT +} + + +void CCustomizeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeDlg) +// DDX_Control(pDX, IDOK, m_ok); + DDX_Control(pDX, IDC_RADIO_PLAIN, m_ctlRadioTextType); + DDX_Control(pDX, IDC_EDIT_WIDTH, m_ctlEditWidth); + DDX_Control(pDX, IDC_EDIT_ROWS, m_ctlEditRows); + DDX_Control(pDX, IDC_COMBO_TOOLBAR, m_ctlComboToolbar); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZABLE, m_bCustomizable); + DDX_Check(pDX, IDC_CHECK_FLAT, m_bFlat); + DDX_Check(pDX, IDC_CHECK_GRIPPER, m_bGripper); + DDX_Check(pDX, IDC_CHECK_LIST, m_bList); + DDX_Check(pDX, IDC_CHECK_SEPARATOR, m_bSeparator); + DDX_Check(pDX, IDC_CHECK_TEXT, m_bText); + DDX_Text(pDX, IDC_EDIT_ROWS, m_nRows); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + DDX_CBIndex(pDX, IDC_COMBO_TOOLBAR, m_nToolbar); + DDX_Radio(pDX, IDC_RADIO_PLAIN, m_nTextType); + DDX_Text(pDX, IDC_EDIT_INDENT, m_nIndent); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeDlg) + ON_CBN_SELCHANGE(IDC_COMBO_TOOLBAR, OnSelchangeComboToolbar) + ON_BN_CLICKED(IDC_CHECK_TEXT, OnCheckText) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg message handlers + +BOOL CCustomizeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + m_ctlComboToolbar.AddString(_T("File")); + m_ctlComboToolbar.AddString(_T("Edit")); + m_ctlComboToolbar.AddString(_T("Window")); + + m_nToolbar=0; + m_nOldToolbar=0; + +// m_ok.SetButtonStyle(m_ok.GetButtonStyle()|BS_BOTTOM); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeDlg::GetVars() +{ + m_bCustomizable=arrCustomize[m_nToolbar].bCustomizable; + m_bFlat=arrCustomize[m_nToolbar].bFlat; + m_bGripper=arrCustomize[m_nToolbar].bGripper; + m_bList=arrCustomize[m_nToolbar].bList; + m_bSeparator=arrCustomize[m_nToolbar].bSeparator; + m_bText=arrCustomize[m_nToolbar].bText; + m_nTextType=arrCustomize[m_nToolbar].nTextType; + m_nRows=arrCustomize[m_nToolbar].nRows; + m_nWidth=arrCustomize[m_nToolbar].nWidth; + m_nIndent=arrCustomize[m_nOldToolbar].nIndent; + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeDlg::SetVars() +{ + UpdateData(); + + arrCustomize[m_nOldToolbar].bCustomizable=m_bCustomizable; + arrCustomize[m_nOldToolbar].bFlat=m_bFlat; + arrCustomize[m_nOldToolbar].bGripper=m_bGripper; + arrCustomize[m_nOldToolbar].bList=m_bList; + arrCustomize[m_nOldToolbar].bSeparator=m_bSeparator; + arrCustomize[m_nOldToolbar].bText=m_bText; + arrCustomize[m_nOldToolbar].nTextType=m_nTextType; + arrCustomize[m_nOldToolbar].nRows=m_nRows; + arrCustomize[m_nOldToolbar].nWidth=m_nWidth; + arrCustomize[m_nOldToolbar].nIndent=m_nIndent; + + m_nOldToolbar=m_nToolbar; + + ShowControls(); +} + +void CCustomizeDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeDlg::OnSelchangeComboToolbar() +{ + // TODO: Add your control notification handler code here + + SetVars(); + GetVars(); +} + +void CCustomizeDlg::OnCheckText() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +void CCustomizeDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditRows.EnableWindow(m_bText); + m_ctlEditWidth.EnableWindow(m_bText); + m_ctlRadioTextType.EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_TOOLTIP)->EnableWindow(m_bText); + GetDlgItem(IDC_RADIO_MENU)->EnableWindow(m_bText); + + UpdateData(FALSE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.h new file mode 100644 index 0000000..eb3175f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/CustomizeDlg.h @@ -0,0 +1,68 @@ +#if !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeDlg dialog + +class CCustomizeDlg : public CDialog +{ +// Construction +public: + CCustomizeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeDlg) + enum { IDD = IDD_CUSTOMIZE }; + CButton m_ctlRadioTextType; + CEdit m_ctlEditWidth; + CEdit m_ctlEditRows; + CComboBox m_ctlComboToolbar; + BOOL m_bCustomizable; + BOOL m_bFlat; + BOOL m_bGripper; + BOOL m_bList; + BOOL m_bSeparator; + BOOL m_bText; + UINT m_nRows; + UINT m_nWidth; + int m_nToolbar; + int m_nTextType; + UINT m_nIndent; + //}}AFX_DATA + struct CustomizeToolbar arrCustomize[3]; + int m_nOldToolbar; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeDlg) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnSelchangeComboToolbar(); + afx_msg void OnCheckText(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEDLG_H__166392C2_9CF5_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMe.txt new file mode 100644 index 0000000..8ec329f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMe.txt @@ -0,0 +1,334 @@ + + + I N T E L L I M O U S E S U P P O R T + + + LEFT CLICK OVER THE WINDOW AND MOVE MOUSE IN DIFFERENT DIRECTION. + THE CONTENTS OF THE WINDOW WILL BE CORRESPONDINGLY SCROLLED. + NOTE, THAT THE FAR YOU MOVE MOUSE FROM THE POINT WHERE YOU + CLICKED THE FASTER THE CONTENTS WILL BE SCROLLED. + + + CHECK OUT "VIEW" MENU. THERE YOU CAN OPTIONALY SET IDENTIFICATOR + OF THE EVENT THAT WILL INITIALIZE INTELLI MOUSE SUPPORT. + + THIS FUNCTIONALITY CAN BE EASILY APPLIED TO ANY WINDOW. WHEN + SPECIFIED STARTING EVENT IS FIRED INTELLI MOUSE SUPPORT WILL BE + AUTOMATICALLY ACTIVATED AS LONG AS THE TARGET WINDOW HAS + WS_VSCROLL AND/OR WS_HSCROLL STYLE SET. + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + + + + + + + + I N T E L L I M O U S E S U P P O R T + + + LEFT CLICK OVER THE WINDOW AND MOVE MOUSE IN DIFFERENT DIRECTION. + THE CONTENTS OF THE WINDOW WILL BE CORRESPONDINGLY SCROLLED. + NOTE, THAT THE FAR YOU MOVE MOUSE FROM THE POINT WHERE YOU + CLICKED THE FASTER THE CONTENTS WILL BE SCROLLED. + + + CHECK OUT "VIEW" MENU. THERE YOU CAN OPTIONALY SET IDENTIFICATOR + OF THE EVENT THAT WILL INITIALIZE INTELLI MOUSE SUPPORT. + + THIS FUNCTIONALITY CAN BE EASILY APPLIED TO ANY WINDOW. WHEN + SPECIFIED STARTING EVENT IS FIRED INTELLI MOUSE SUPPORT WILL BE + AUTOMATICALLY ACTIVATED AS LONG AS THE TARGET WINDOW HAS + WS_VSCROLL AND/OR WS_HSCROLL STYLE SET. + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. + + + This text will be repeated multiple number of times in order to demonstrate Intelli mouse support functionality. Intelli mouse support can be easily set for any window in your application. E.g. it can be applied for such controls as list control, tree control, list box, edit control and generally to any window that has WS_VSCROLL and/or WS_HSCROLL style set at the moment of activation of intelli mouse support. Intelli mouse support is activated when special event happens. by default we use WM_MBUTTONDOWN event but you can set whatever starting event you prefer. diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMeU.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMeU.txt new file mode 100644 index 0000000..b05aaf6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IMouseReadMeU.txt differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.rtf new file mode 100644 index 0000000..4603b93 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/IntelliMouseInfo.rtf @@ -0,0 +1,63 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f5\fmodern\fcharset0\fprq1{\*\panose 02070409020205020404}Courier;} +{\f37\froman\fcharset238\fprq2 Times New Roman CE;}{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid11678922}{\*\generator Micr +osoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr14\min32}{\revtim\yr2005\mo1\dy17\hr14\min35}{\version2}{\edmins3}{\nofpages2}{\nofwords401}{\nofchars2289}{\*\company Dundas India}{\nofcharsws2685} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot11678922 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid11678922 COXIntelliMouse}{\b\fs48\insrsid11678922 +\par }{\b\fs16\insrsid11678922 Copyright \'a9 }{\b\fs16\insrsid11678922 The Code Project}{\b\fs16\insrsid11678922 1997 - 1998, All Rights Reserved +\par }{\insrsid11678922 +\par A lot of popular applications such as Internet E +xplorer or Microsoft Excel have support for advanced scrolling functionality. But you probably even haven't noticed it because it's available only if you have Microsoft IntelliMouse (generally, any three-button mouse which is quite rare case now). Intelli +Mouse has special }{\insrsid11678922 wheel}{\insrsid11678922 turning }{\insrsid11678922 using }{\insrsid11678922 which you can scroll the contents of the active window. But if you click on this }{\insrsid11678922 wheel}{\insrsid11678922 + it will act as common mouse middle button. The most interesting thing is what happen}{\insrsid11678922 s after you click}{\insrsid11678922 on the mouse }{\insrsid11678922 wheel}{\insrsid11678922 . +\par +\par E.g. Internet Ex +plorer will do the following: if opened page has vertical and/or horizontal scrollbar(s) then it will display non-rectangular splash window in shape of target and if you move mouse it will scroll the contents of the page in the corresponding direction (if + +it's possible to scroll). Note that simultaneous scrolling in vertical and horizontal directions is supported. Moreover, the far you move mouse from the point where Intelli Mouse Support was started the faster the contents will be scrolled (ballistic scro +lling). +\par +\par We implemented all above described functionality in our COXIntelliMouse class. COXIntelliMouse is derived from COXHookWnd and uses internally COXSplashWnd class. Also in order to visually display the direction of the scrolling when Intelli Mouse S +upport is on COXIntelliMouse class uses set of cursors that is defined in "OXIntelliMouse.rc" file. +\par +\par }{\b\i\insrsid11678922 Note}{\insrsid11678922 : you have to include in "Resource Includes"-"Compile Time Directives" of your application's resource file reference to "OXIntelliMouse.rc" +\par +\par Following technique should be applied in order to provide Intelli Mouse Support in your application using COXIntelliMouse class: +\par +\par 1) Instantiate one object of COXIntelliMouse class for every window class for which you are going to provide Intelli Mouse Support. +\par +\par \tab Example: +\par }{\f5\insrsid11678922 \tab class CMyView : public CView}{\insrsid11678922 \tab \tab \tab +\par \tab }{\f5\insrsid11678922 \{ +\par \tab \tab . . . . . . . . . . . . . . +\par \tab protected: +\par \tab \tab // intelli mouse support +\par \tab \tab COXIntelliMouse m_IntelliMouse; }{\insrsid11678922 +\par \tab \tab }{\f5\insrsid11678922 . . . . . . . . . . . . . .}{\insrsid11678922 +\par \tab }{\f5\insrsid11678922 \}}{\insrsid11678922 \tab \tab +\par +\par 2) In OnCreate function of such window class call COXIntelliMouse::Attach function in order to register it with COXIntelliMouse object and to set up the start event that will be interpreted as trigger to launch Intelli Mouse Support. +\par +\par \tab Example: +\par }{\f5\insrsid11678922 \tab int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct)}{\insrsid11678922 \tab \tab \tab +\par \tab }{\f5\insrsid11678922 \{ +\par \tab \tab . . . . . . . . . . . . . . +\par \tab \tab // mouse left button down altogether +\par \tab \tab // with "Ctrl" key pressed down +\par \tab \tab // will launch Intelli Mouse Support +\par \tab \tab m_IntelliMouse.Attach(this,WM_LBUTTONDOWN,KEYPRESSED_CONTROL); +\par \tab \tab . . . . . . . . . . . . . . +\par \tab \}}{\insrsid11678922 \tab \tab +\par +\par 3) That's it. +\par +\par }{\fs20\insrsid11678922 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/MultiPad.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/MultiPad.rc new file mode 100644 index 0000000..9a5cd65 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/MultiPad.rc @@ -0,0 +1,643 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "RES\\MULTIPAD.ICO" +IDR_TEXTTYPE ICON DISCARDABLE "RES\\PADDOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_TOOLBAR_FILE BITMAP DISCARDABLE "res\\toolbar_file.bmp" +IDR_TOOLBAR_EDIT BITMAP DISCARDABLE "res\\toolbar_edit.bmp" +IDR_TOOLBAR_WINDOW BITMAP DISCARDABLE "res\\toolbar_window.bmp" +IDR_TOOLBAR_EDIT_HOT BITMAP DISCARDABLE "res\\toolbar_edit_hot.bmp" +IDR_TOOLBAR_FILE_HOT BITMAP DISCARDABLE "res\\toolbar_file_hot.bmp" +IDR_TOOLBAR_WINDOW_HOT BITMAP DISCARDABLE "res\\toolbar_window_hot.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME MENU DISCARDABLE +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 "E&xit\tAlt+F4", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_TEXTTYPE MENU DISCARDABLE +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 "P&rint Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+F4", 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 + MENUITEM "Delete\tDel", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "Find &Next\tF3", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "&Left button down", ID_VIEW_IMSEVENT_LEFTBTN + MENUITEM "&Middle button down", ID_VIEW_IMSEVENT_MIDDLEBTN + MENUITEM "Shif&t button must be pressed", ID_VIEW_IMSEVENT_SHIFT + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) MENU DISCARDABLE +#else +IDR_MAINFRAME MENU DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_TEXTTYPE$(_MAC) MENU DISCARDABLE +#else +IDR_TEXTTYPE MENU DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Save\t\021S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "&Document Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\t\021X", ID_EDIT_CUT + MENUITEM "&Copy\t\021C", ID_EDIT_COPY + MENUITEM "&Paste\t\021V", ID_EDIT_PASTE + MENUITEM "De&lete\t\021D", ID_EDIT_CLEAR + MENUITEM SEPARATOR + MENUITEM "&Find...", ID_EDIT_FIND + MENUITEM "&Repeat Find\t\021R", ID_EDIT_REPEAT + MENUITEM "&Replace...", ID_EDIT_REPLACE + MENUITEM SEPARATOR + MENUITEM "Select &All", ID_EDIT_SELECT_ALL + END + POPUP "&View" + BEGIN + POPUP "ToolBars" + BEGIN + MENUITEM "&File", ID_VIEW_TOOLBAR_FILE + MENUITEM "&Edit", ID_VIEW_TOOLBAR_EDIT + MENUITEM "&Window", ID_VIEW_TOOLBAR_WINDOW + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE + MENUITEM SEPARATOR + MENUITEM "Workspace...", ID_VIEW_WORKSPACE + MENUITEM SEPARATOR + MENUITEM "&Left button down", ID_VIEW_IMSEVENT_LEFTBTN + MENUITEM "&Middle button down", ID_VIEW_IMSEVENT_MIDDLEBTN + MENUITEM "Shif&t button must be pressed", ID_VIEW_IMSEVENT_SHIFT + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + END +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) ACCELERATORS PRELOAD MOVEABLE PURE +#else +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +#endif +BEGIN + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + "D", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "R", ID_EDIT_REPEAT, VIRTKEY, ALT, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F3, ID_EDIT_REPEAT, VIRTKEY, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT +END +#endif + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""OXIntelliMouse.rc""\r\n" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#include ""afxres.rc""\r\n" + "#include ""afxprint.rc""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_FILE TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_EDIT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_WINDOW TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + SEPARATOR + BUTTON ID_WINDOW_TILE_HORZ + SEPARATOR + BUTTON ID_WINDOW_ARRANGE +END + +IDR_TOOLBAR_EDIT_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + BUTTON ID_EDIT_CLEAR + SEPARATOR + BUTTON ID_EDIT_FIND + BUTTON ID_EDIT_REPEAT +END + +IDR_TOOLBAR_FILE_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR_WINDOW_HOT TOOLBAR DISCARDABLE 16, 16 +BEGIN + BUTTON ID_WINDOW_CASCADE + SEPARATOR + BUTTON ID_WINDOW_TILE_HORZ + SEPARATOR + BUTTON ID_WINDOW_ARRANGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 24 +// + +1 24 DISCARDABLE "IntelliMouseInfo.exe.manifest" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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_PRINT_SETUP "Change the printer and printing options\nPrint Setup" + ID_FILE_PRINT "Print the active document\nPrint" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_DESKACCESSORY "Opens the selected item" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_HELP_INDEX "List Help topics" + ID_HELP_USING "Display instructions about how to use help" + ID_CONTEXT_HELP "Display help for clicked on buttons, menus and windows" + ID_HELP "Display help for current task or command" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" + ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection\nDelete" + ID_EDIT_COPY "Copy the selection and puts it on the Clipboard\nCopy" + ID_EDIT_CUT "Cut the selection and puts it on the Clipboard\nCut" + ID_EDIT_FIND "Find the specified text\nFind" + ID_EDIT_PASTE "Insert Clipboard contents\nPaste" + ID_EDIT_REPEAT "Repeat last find command\nFind Next" + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar" + ID_VIEW_STATUS_BAR "Show or hide the status bar" +END + +STRINGTABLE DISCARDABLE +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_SCCLOSE "Close the active window and prompts to save the documents" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "IntelliMouse" + AFX_IDS_IDLEMESSAGE "Ready" + AFX_IDS_HELPMODEMESSAGE "Select an object on which to get Help" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "MultiPad with IntelliMouse support" + IDR_TEXTTYPE "\nUntitled\nTEXT Document\nText Files (*.txt)\n.txt\nTextFileType\nTEXT File Type\nTEXT\nText Files\n" + ID_DESCRIPTION_FILE "IntelliMouseInfo.rtf" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_CUSTOMIZE "Customize Toolbars/nCustomize" + ID_VIEW_WORKSPACE "Set workspace settings" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG DISCARDABLE 0, 0, 282, 174 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Toolbars" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO_TOOLBAR,90,8,131,48,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "&Flat",IDC_CHECK_FLAT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,20,40,27,10 + CONTROL "&List ",IDC_CHECK_LIST,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,84,40,29,10 + CONTROL "&Gripper",IDC_CHECK_GRIPPER,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,149,41,39,10 + CONTROL "&Seperator",IDC_CHECK_SEPARATOR,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,213,41,47,10 + CONTROL "&Customizable",IDC_CHECK_CUSTOMIZABLE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,20,64,57,10 + EDITTEXT IDC_EDIT_INDENT,181,64,35,11,ES_AUTOHSCROLL + CONTROL "Set t&ext to buttons",IDC_CHECK_TEXT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,20,92,73,10 + CONTROL "String &resource",IDC_RADIO_PLAIN,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,149,93,63,10 + CONTROL "T&ooltip",IDC_RADIO_TOOLTIP,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,149,107,37,10 + CONTROL "&Menu resourse",IDC_RADIO_MENU,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,149,122,63,10 + EDITTEXT IDC_EDIT_WIDTH,63,106,37,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_ROWS,63,121,37,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,87,153,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,153,50,14 + LTEXT "&Toolbar",IDC_STATIC,60,10,25,8 + GROUPBOX "Draw",IDC_STATIC,143,28,124,29 + GROUPBOX "Mode",IDC_STATIC,14,29,124,28 + GROUPBOX "Text",IDC_STATIC,14,80,253,57 + LTEXT "Max &Width",IDC_STATIC,20,108,35,8 + LTEXT "Text &Rows",IDC_STATIC,20,123,35,8 + LTEXT "Indention",IDC_STATIC,145,65,30,8 +END + +IDD_DIALOG_WORKSPACE DIALOG DISCARDABLE 0, 0, 143, 61 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "WorkSpace" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Save WorkSpace on &Exit",IDC_CHECK_SAVE_ON_EXIT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,7,111,10 + CONTROL "Load WorkSpace on En&ter",IDC_CHECK_LOAD_ON_ENTER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,117,10 + DEFPUSHBUTTON "&OK",IDOK,7,40,40,14 + PUSHBUTTON "&Cancel",IDCANCEL,51,40,40,14 + PUSHBUTTON "&Save",IDC_SAVE_WORKSPACE,96,40,40,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 14 + RIGHTMARGIN, 267 + TOPMARGIN, 7 + BOTTOMMARGIN, 167 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "OXIntelliMouse.rc" +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "UTSampleAbout.rc" + +#include "afxres.rc" +#include "afxprint.rc" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/Multipad.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/Multipad.cpp new file mode 100644 index 0000000..ffa7eb9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/Multipad.cpp @@ -0,0 +1,702 @@ +// multipad.cpp : Defines the class behaviors for the Multipad application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "multipad.h" +#include "CustomizeDlg.h" +#include "WorkspaceDlg.h" +#include + +#include "UTSampleAbout.h" + +CMultiPadApp NEAR theApp; +static HINSTANCE g_hRichEdDLL=NULL; + + +BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp) + //{{AFX_MSG_MAP(CMultiPadApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + ON_COMMAND(ID_VIEW_WORKSPACE, OnViewWorkspace) + //}}AFX_MSG_MAP + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) // file commands... + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +BOOL CMultiPadApp::InitInstance() +{ + _tsetlocale(LC_ALL, _T("")); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + Enable3dControls(); + + // use registry if you want to save CoolToolBars state + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + LoadStdProfileSettings(); + + AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE, + RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CChildFrame), + RUNTIME_CLASS(CMultipadView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + m_pMainWnd->ShowWindow(m_nCmdShow); + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + // don't create a new (empty) document, edit + // the !readme.txt file instead. +#ifndef _UNICODE + OpenDocumentFile(_T("Imousereadme.txt")); +#else + OpenDocumentFile(_T("Imousereadmeu.txt")); +#endif + + IniAppVars(); + + // load saved workspace after all bars were created + if(m_bLoadWSOnEnter) + { + ((CMainFrame*)m_pMainWnd)->LoadWorkspace(); + } + + return TRUE; +} + +int CMultiPadApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // save all application variables in registry + SaveAppVars(); + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} + +void CMultiPadApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +void CMultiPadApp::IniAppVars() +{ + m_bLoadWSOnEnter=GetProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),FALSE); + m_bSaveWSOnExit=GetProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),FALSE); +} + +void CMultiPadApp::SaveAppVars() +{ + WriteProfileInt(_T("WorkspaceOptions"),_T("LoadOnEnter"),m_bLoadWSOnEnter); + WriteProfileInt(_T("WorkspaceOptions"),_T("SaveOnExit"),m_bSaveWSOnExit); +} + +void CMultiPadApp::OnViewWorkspace() +{ + // TODO: Add your command handler code here + + CWorkspaceDlg workspaceDlg; + + workspaceDlg.m_bLoadOnEnter=m_bLoadWSOnEnter; + workspaceDlg.m_bSaveOnExit=m_bSaveWSOnExit; + + if(workspaceDlg.DoModal()==IDOK) + { + m_bLoadWSOnEnter=workspaceDlg.m_bLoadOnEnter; + m_bSaveWSOnExit=workspaceDlg.m_bSaveOnExit; + } + +} + + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_TEXTTYPE)); + ASSERT(cs.lpszClass); + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + m_Caption.Attach(this); + + CMainFrame* pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd; + ASSERT_VALID(pFrame); + COXCaptionPainter parentCaption; + if(::SendMessage(pFrame->m_hWnd,COXCaptionPainter::m_nGetCaptionPainter,0, + (LPARAM)&parentCaption)) + { + SendMessage(COXCaptionPainter::m_nSetCaptionPainter,0,(LPARAM)&parentCaption); + } + + SendMessage(WM_NCPAINT); + + return 0; +} + + +///////////////////////////////////////////////////// + +IMPLEMENT_DYNCREATE(CMainFrame, CMDIFrameWnd) +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + ON_COMMAND(ID_VIEW_CUSTOMIZE, OnViewCustomize) + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnUpdateViewToolbars) + ON_COMMAND_RANGE(ID_VIEW_TOOLBAR_FILE, ID_VIEW_TOOLBAR_WINDOW, + OnViewToolbars) + ON_NOTIFY(TBN_DROPDOWN, ID_VIEW_TOOLBAR_FILE, OnDropDown) +END_MESSAGE_MAP() + + +// we need these arrays to make our CoolToolBars customizable +// we use them as parameters in function COXCoolToolBar::SetBitmapIds() + +static UINT buttonsFile[] = +{ + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_CLOSE, + ID_FILE_SAVE, + ID_FILE_SAVE_AS, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT buttonsEdit[] = +{ + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_EDIT_CLEAR, + ID_EDIT_FIND, + ID_EDIT_REPEAT, +}; + +static UINT buttonsWindow[] = +{ + ID_WINDOW_CASCADE, + ID_WINDOW_TILE_HORZ, + ID_WINDOW_ARRANGE, +}; + +static UINT indicators[] = +{ + ID_SEPARATOR, + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL +}; + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if(CMDIFrameWnd::OnCreate(lpCreateStruct)==-1) + { + return -1; + } + + // create standard statusbar + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE(_T("Failed to create status bar\n")); + return -1; // fail to create + } + + // create toolbars + + ////////////////////////////// + // File ToolBar + // this is an example of simple toolbar without text + // but we add here images to show in hot mode + // Note that process of creation of CoolToolBar almost the same as + // standard CToolBar + if (!m_wndToolBarFile.Create(this, WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_GRIPPER, + ID_VIEW_TOOLBAR_FILE) || + !m_wndToolBarFile.LoadToolBar(IDR_TOOLBAR_FILE)) + { + TRACE(_T("Failed to create File toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarFile.SetBitmapIds(buttonsFile, sizeof(buttonsFile)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarFile.IniSizes(CSize(16,16)); + m_wndToolBarFile.SetList(); + m_wndToolBarFile.SetHotImageList(m_wndToolBarFile.AddImageList(IDR_TOOLBAR_FILE_HOT)); + m_wndToolBarFile.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarFile.SetHotTextColor(RGB(0,0,255)); + //////////// + + m_wndToolBarFile.SetButtonStyle(2,m_wndToolBarFile.GetButtonStyle(2)|TBSTYLE_DROPDOWN); + m_wndToolBarFile.SetDropDownArrow(TRUE); + m_wndToolBarFile.UpdateSizes(); + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarFile.SetBarStyle(m_wndToolBarFile.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarFile.EnableDocking(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM); + ////////////////////////////// + + ////////////////////////////// + // Edit ToolBar + if (!m_wndToolBarEdit.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER, + ID_VIEW_TOOLBAR_EDIT) || + !m_wndToolBarEdit.LoadToolBar(IDR_TOOLBAR_EDIT)) + { + TRACE(_T("Failed to create Edit toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarEdit.SetBitmapIds(buttonsEdit, sizeof(buttonsEdit)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + m_wndToolBarEdit.IniSizes(CSize(16,16)); + m_wndToolBarEdit.SetHotImageList(m_wndToolBarEdit.AddImageList(IDR_TOOLBAR_EDIT_HOT)); + m_wndToolBarEdit.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarEdit.SetHotTextColor(RGB(0,0,255)); + // we want to use text from string resource in our CoolToolBar + m_wndToolBarEdit.SetButtonsMinMaxWidth(0,70); + m_wndToolBarEdit.SetMaxTextRows(4); + m_wndToolBarEdit.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarEdit.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarEdit.SetBarStyle(m_wndToolBarEdit.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + ////////////////////////////// + + ////////////////////////////// + // Window ToolBar + if (!m_wndToolBarWindow.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER, + ID_VIEW_TOOLBAR_WINDOW) || + !m_wndToolBarWindow.LoadToolBar(IDR_TOOLBAR_WINDOW)) + { + TRACE(_T("Failed to create Window toolbar\n")); + return -1; // fail to create + } + // This function specifies the command ID's of the button images in the bitmap. + m_wndToolBarWindow.SetBitmapIds(buttonsWindow, sizeof(buttonsWindow)/sizeof(UINT)); + + ///////////// + // COXCoolToolBar specific functions + // use CoolToolBar in List mode + m_wndToolBarWindow.IniSizes(CSize(16,16)); + m_wndToolBarWindow.SetList(); + m_wndToolBarWindow.SetHotImageList(m_wndToolBarWindow.AddImageList(IDR_TOOLBAR_WINDOW_HOT)); + m_wndToolBarWindow.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarWindow.SetHotTextColor(RGB(0,0,255)); + // we want to use tooltips text in our CoolToolBar + m_wndToolBarWindow.SetMaxTextRows(1); + m_wndToolBarWindow.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarWindow.UpdateSizes(); + //////////// + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBarWindow.SetBarStyle(m_wndToolBarWindow.GetBarStyle() | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBarWindow.EnableDocking(CBRS_ALIGN_ANY); + ////////////////////////////// + + EnableDocking(CBRS_ALIGN_ANY); + + // TODO: Delete these lines if you don't want the toolbar to + // be dockable + DockControlBar(&m_wndToolBarFile); + DockControlBar(&m_wndToolBarWindow); + + // Dock Window toolbar to the right side of File toolbar + m_wndToolBarWindow.DockControlBarLeftOf(&m_wndToolBarFile); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + // Install caption painter + m_Caption.Attach(this); + COXCaptionInfo* pCI=m_Caption.GetCaptionInfo(TRUE); + pCI->SetBackgroundColor(RGB(0xff,0x68,0x20)); + pCI=m_Caption.GetCaptionInfo(FALSE); + pCI->SetBackgroundColor(RGB(0xD2,0xB4,0x8C)); + SendMessage(WM_NCPAINT); + + return 0; +} + +void CMainFrame::OnUpdateViewToolbars(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CControlBar* pBar=GetControlBar(pCmdUI->m_nID); + if(pBar!=NULL) + { + pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0); + return; + } +} + +void CMainFrame::OnViewToolbars(UINT nID) +{ + // TODO: Add your command handler code here + + CControlBar* pBar = GetControlBar(nID); + if (pBar != NULL) + { + ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE); + } +} + + +void CMainFrame::OnClose() +{ + // TODO: Add your message handler code here and/or call default + + // before close save the workspace + if(((CMultiPadApp*)AfxGetApp())->m_bSaveWSOnExit) + { + SaveWorkspace(); + } + + CMDIFrameWnd::OnClose(); +} + +void CMainFrame::SaveWorkspace() +{ + // save states of all CoolToolBar + m_wndToolBarFile.SaveBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.SaveBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.SaveBarState(_T("CoolToolBars"),_T("Window")); + + // save the state of all bars within framework + SaveBarState(_T("FrameworkBarState")); +} + +void CMainFrame::LoadWorkspace() +{ + LockWindowUpdate(); + + // load all bars state in framework + LoadBarState(_T("FrameworkBarState")); + + // load state of all CoolToolBar + m_wndToolBarFile.LoadBarState(_T("CoolToolBars"),_T("File")); + m_wndToolBarEdit.LoadBarState(_T("CoolToolBars"),_T("Edit")); + m_wndToolBarWindow.LoadBarState(_T("CoolToolBars"),_T("Window")); + + UnlockWindowUpdate(); +} + + +void CMainFrame::OnViewCustomize() +{ + // TODO: Add your command handler code here + + CCustomizeDlg dlgCustomize(this); + dlgCustomize.arrCustomize[0]=GetToolbarProperties(&m_wndToolBarFile); + dlgCustomize.arrCustomize[1]=GetToolbarProperties(&m_wndToolBarEdit); + dlgCustomize.arrCustomize[2]=GetToolbarProperties(&m_wndToolBarWindow); + + if(dlgCustomize.DoModal()==IDOK) + { + SetToolbarProperties(&m_wndToolBarFile,dlgCustomize.arrCustomize[0]); + SetToolbarProperties(&m_wndToolBarEdit,dlgCustomize.arrCustomize[1]); + SetToolbarProperties(&m_wndToolBarWindow,dlgCustomize.arrCustomize[2]); + } +} + +CustomizeToolbar CMainFrame::GetToolbarProperties(COXCoolToolBar* pBar) +{ + // collect information about CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar ct; + ct.bCustomizable=pBar->IsCustomizable(); + ct.bFlat=pBar->IsFlat(); + ct.bGripper=pBar->IsGripper(); + ct.bList=pBar->IsList(); + ct.bSeparator=pBar->IsSeparator(); + ct.bText=!pBar->GetButtonText(0).IsEmpty(); + ct.nTextType=(int)pBar->GetTextType(); + ct.nRows=pBar->GetTextRows(); + ct.nWidth=pBar->GetButtonsSize().cx; + ct.nIndent=pBar->GetIndent(); + + return ct; +} + +void CMainFrame::SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct) +{ + // change styles and properties of CoolToolBar + pBar->SetCustomizable(ct.bCustomizable); + pBar->SetFlat(ct.bFlat); + pBar->SetGripper(ct.bGripper); + pBar->SetList(ct.bList); + pBar->SetSeparator(ct.bSeparator); + pBar->SetIndent(ct.nIndent); + if(ct.bText) + { + pBar->SetButtonTextFromID((COXCoolToolBar::TextTypeFromID)ct.nTextType); + pBar->SetMaxTextRows(ct.nRows); + pBar->SetButtonsMinMaxWidth(0,ct.nWidth); + pBar->UpdateSizes(); + } + else + { + // if we don't want to use text in CoolToolBar then + // remove all previously associated text + if(pBar->GetTextType()!=COXCoolToolBar::TTID_NOTSET) + { + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NONE); + pBar->SetButtonTextFromID(COXCoolToolBar::TTID_NOTSET); + } + pBar->SetMaxTextRows(0); + pBar->SetButtonsMinMaxWidth(0,24); + pBar->IniSizes(CSize(16,16)); + } + + CSize sizeChild; + sizeChild=pBar->GetButtonsSize(); + + CRect rect; + pBar->GetWindowRect(&rect); + // resize window + pBar->SetWindowPos(NULL,0,0,rect.Width(),rect.Height(), + SWP_NOMOVE|SWP_NOZORDER|SWP_DRAWFRAME|SWP_FRAMECHANGED); + + // it is up to framework to reallocate all other control bars + CFrameWnd* pFrameWnd=pBar->GetDockingFrame(); + if(pFrameWnd!=NULL) + { + pFrameWnd->RecalcLayout(); + } +} + +void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + // this function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + m_wndToolBarFile.GetItemRect(m_wndToolBarFile.CommandToIndex(pNMToolBar->iItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + if(pNMToolBar->iItem == ID_FILE_OPEN) + { + CMenu menu; + CMenu* pPopup; + + // the font popup is stored in a resource + menu.LoadMenu(IDR_MAINFRAME); + pPopup = menu.GetSubMenu(0); + pPopup->RemoveMenu(ID_FILE_NEW,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_SEPARATOR,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_FILE_PRINT_SETUP,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_APP_EXIT,MF_BYCOMMAND); + pPopup->RemoveMenu(pPopup->GetMenuItemCount()-1,MF_BYPOSITION); + pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, + rect.top + 1, AfxGetMainWnd()); + } + *pResult = TBDDRET_DEFAULT; +} + + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CMultipadView + +IMPLEMENT_DYNCREATE(CMultipadView, CEditView) + +BEGIN_MESSAGE_MAP(CMultipadView, CEditView) + //{{AFX_MSG_MAP(CMultipadView) + ON_WM_CREATE() + ON_UPDATE_COMMAND_UI(ID_VIEW_IMSEVENT_LEFTBTN, OnUpdateViewIMSEventLeftbtn) + ON_UPDATE_COMMAND_UI(ID_VIEW_IMSEVENT_MIDDLEBTN, OnUpdateViewIMSEventMiddlebtn) + ON_COMMAND(ID_VIEW_IMSEVENT_SHIFT, OnViewShift) + ON_UPDATE_COMMAND_UI(ID_VIEW_IMSEVENT_SHIFT, OnUpdateViewShift) + ON_COMMAND(ID_VIEW_IMSEVENT_LEFTBTN, OnViewIMSEventLeftbtn) + ON_COMMAND(ID_VIEW_IMSEVENT_MIDDLEBTN, OnViewIMSEventMiddlebtn) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMultipadView message handlers + +int CMultipadView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CEditView::OnCreate(lpCreateStruct) == -1) + return -1; + + m_bLeft=TRUE; + m_bMiddle=FALSE; + m_bShift=FALSE; + + // TODO: Add your specialized creation code here + m_IntelliMouse.Attach(this,WM_LBUTTONDOWN); + + return 0; +} + +void CMultipadView::OnViewIMSEventLeftbtn() +{ + // TODO: Add your command handler code here + + m_bLeft=TRUE; + m_bMiddle=FALSE; + + SetStartEventID(); +} + +void CMultipadView::OnUpdateViewIMSEventLeftbtn(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetRadio(m_bLeft ? TRUE : FALSE); +} + +void CMultipadView::OnViewIMSEventMiddlebtn() +{ + // TODO: Add your command handler code here + + m_bLeft=FALSE; + m_bMiddle=TRUE; + + SetStartEventID(); +} + +void CMultipadView::OnUpdateViewIMSEventMiddlebtn(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetRadio(m_bMiddle ? TRUE : FALSE); +} + +void CMultipadView::OnViewShift() +{ + // TODO: Add your command handler code here + + m_bShift=!m_bShift; + SetStartEventID(); +} + +void CMultipadView::OnUpdateViewShift(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + + pCmdUI->SetCheck(m_bShift ? TRUE : FALSE); +} + +void CMultipadView::SetStartEventID() +{ + if(m_bLeft) + m_IntelliMouse.SetStartEventID(WM_LBUTTONDOWN, + m_bShift ? KEYPRESSED_SHIFT : 0); + else if(m_bMiddle) + m_IntelliMouse.SetStartEventID(WM_MBUTTONDOWN, + m_bShift ? KEYPRESSED_SHIFT : 0); + else + ASSERT(FALSE); +} + +///////////////////////////////////////////////////////////////////////////// + +IMPLEMENT_DYNCREATE(CPadDoc, CDocument) +BEGIN_MESSAGE_MAP(CPadDoc, CDocument) + //{{AFX_MSG_MAP(CPadDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +void CPadDoc::Serialize(CArchive& ar) +{ + ((CMultipadView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.cpp new file mode 100644 index 0000000..7baa167 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.cpp @@ -0,0 +1,53 @@ +// WorkspaceDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "multipad.h" +#include "WorkspaceDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + + +CWorkspaceDlg::CWorkspaceDlg(CWnd* pParent /*=NULL*/) + : CDialog(CWorkspaceDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CWorkspaceDlg) + m_bLoadOnEnter = FALSE; + m_bSaveOnExit = FALSE; + //}}AFX_DATA_INIT +} + + +void CWorkspaceDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceDlg) + DDX_Check(pDX, IDC_CHECK_LOAD_ON_ENTER, m_bLoadOnEnter); + DDX_Check(pDX, IDC_CHECK_SAVE_ON_EXIT, m_bSaveOnExit); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CWorkspaceDlg, CDialog) + //{{AFX_MSG_MAP(CWorkspaceDlg) + ON_BN_CLICKED(IDC_SAVE_WORKSPACE, OnSaveWorkspace) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg message handlers + +void CWorkspaceDlg::OnSaveWorkspace() +{ + // TODO: Add your control notification handler code here + + CMultiPadApp* pApp=(CMultiPadApp*)AfxGetApp(); + ((CMainFrame*)pApp->m_pMainWnd)->SaveWorkspace(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.h new file mode 100644 index 0000000..867fac4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/WorkspaceDlg.h @@ -0,0 +1,47 @@ +#if !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// WorkspaceDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + +class CWorkspaceDlg : public CDialog +{ +// Construction +public: + CWorkspaceDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CWorkspaceDlg) + enum { IDD = IDD_DIALOG_WORKSPACE }; + BOOL m_bLoadOnEnter; + BOOL m_bSaveOnExit; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CWorkspaceDlg) + afx_msg void OnSaveWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_WORKSPACEDLG_H__A53D9124_76C7_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsp new file mode 100644 index 0000000..e743522 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsp @@ -0,0 +1,476 @@ +# Microsoft Developer Studio Project File - Name="MultiPad" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MultiPad - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "multipad.mak" CFG="MultiPad - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MultiPad - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Release" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "MultiPad - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 + +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MultiPad - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"IntelliMouse.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"Stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"IntelliMouse.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_MBCS" /D "_AFXDLL" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"IntelliMouse.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"IntelliMouse.exe" + +!ELSEIF "$(CFG)" == "MultiPad - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MultiPad" +# PROP BASE Intermediate_Dir "MultiPad" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"Stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /Op /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Fr /Yu"Stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"CoolToolBar.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"IntelliMouse.exe" + +!ENDIF + +# Begin Target + +# Name "MultiPad - Win32 Release" +# Name "MultiPad - Win32 Debug" +# Name "MultiPad - Win32 Unicode Release" +# Name "MultiPad - Win32 Unicode Debug" +# Name "MultiPad - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIntelliMouse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplashWndDIB.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CustomizeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\mpadmac.r +# End Source File +# Begin Source File + +SOURCE=.\multipad.cpp +# End Source File +# Begin Source File + +SOURCE=.\multipad.rc +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD CPP /Yc"Stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;inl;fi;fd" +# Begin Source File + +SOURCE=.\CustomizeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\multipad.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXIntelliMouse.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\intellitarget.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\multipad.ico +# End Source File +# Begin Source File + +SOURCE=.\res\paddoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_all.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_bottomleft.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_bottomright.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_down.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_left.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_leftright.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_none.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_right.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_topbottom.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_topleft.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_topright.cur +# End Source File +# Begin Source File + +SOURCE=.\res\scrl_up.cur +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_edit.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_edit_hot.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_file.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_file_hot.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_window.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar_window_hot.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\IntelliMouseInfo.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsw new file mode 100644 index 0000000..7cc47c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MultiPad"=".\multipad.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/IntelliMouse", IXHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.h new file mode 100644 index 0000000..eaa79fd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/multipad.h @@ -0,0 +1,173 @@ +// multipad.h : main header file for the Multipad application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "resource.h" +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXCaptionPainter.h" +#include "OXIntelliMouse.h" + + +class CMultiPadApp : public CWinApp +{ +public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + + // load workspace on enter or not + BOOL m_bLoadWSOnEnter; + // save workspace on exit or not + BOOL m_bSaveWSOnExit; + +protected: + void IniAppVars(); + void SaveAppVars(); + +public: + //{{AFX_MSG(CMultiPadApp) + afx_msg void OnAppAbout(); + afx_msg void OnViewWorkspace(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +// special structure to define CoolToolBar properties +// used in Customize Toolbars dialog +struct CustomizeToolbar +{ + BOOL bCustomizable; + BOOL bFlat; + BOOL bGripper; + BOOL bList; + BOOL bSeparator; + BOOL bText; + int nTextType; + UINT nRows; + UINT nWidth; + UINT nIndent; +}; + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +protected: + // caption painter + COXCaptionPainter m_Caption; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNCREATE(CMainFrame) + +public: + //load and save bars placement in Framework and state of all CoolToolBars + void LoadWorkspace(); + void SaveWorkspace(); + + // get properties of CoolToolBar to use in Customize Toolbars dialog + CustomizeToolbar GetToolbarProperties(COXCoolToolBar* pBar); + // apply changed properties to CoolToolBar + void SetToolbarProperties(COXCoolToolBar* pBar, CustomizeToolbar ct); + +protected: + CStatusBar m_wndStatusBar; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + + // three CoolToolBars + COXCoolToolBar m_wndToolBarFile; + COXCoolToolBar m_wndToolBarEdit; + COXCoolToolBar m_wndToolBarWindow; + + // caption painter + COXCaptionPainter m_Caption; + + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + afx_msg void OnViewCustomize(); + //}}AFX_MSG + afx_msg void OnUpdateViewToolbars(CCmdUI* pCmdUI); + afx_msg void OnViewToolbars(UINT nID); + afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult); + DECLARE_MESSAGE_MAP() +}; + +class CMultipadView : public CEditView +{ + DECLARE_DYNCREATE(CMultipadView) +// Attributes +protected: + // intelli mouse support + COXIntelliMouse m_IntelliMouse; + + BOOL m_bLeft; + BOOL m_bMiddle; + BOOL m_bShift; + + //{{AFX_MSG(CMultipadView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnUpdateViewIMSEventLeftbtn(CCmdUI* pCmdUI); + afx_msg void OnUpdateViewIMSEventMiddlebtn(CCmdUI* pCmdUI); + afx_msg void OnViewShift(); + afx_msg void OnUpdateViewShift(CCmdUI* pCmdUI); + afx_msg void OnViewIMSEventLeftbtn(); + afx_msg void OnViewIMSEventMiddlebtn(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + void SetStartEventID(); +}; + +class CPadDoc : public CDocument +{ + DECLARE_DYNCREATE(CPadDoc) + void Serialize(CArchive& ar); + //{{AFX_MSG(CPadDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/intellitarget.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/intellitarget.bmp new file mode 100644 index 0000000..cd4a104 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/intellitarget.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/multipad.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/multipad.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/multipad.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/paddoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/paddoc.ico new file mode 100644 index 0000000..9e9b961 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/paddoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_all.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_all.cur new file mode 100644 index 0000000..43128bb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_all.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomleft.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomleft.cur new file mode 100644 index 0000000..beffce1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomleft.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomright.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomright.cur new file mode 100644 index 0000000..ca95184 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_bottomright.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_down.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_down.cur new file mode 100644 index 0000000..efb82b0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_down.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_left.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_left.cur new file mode 100644 index 0000000..89fcd0d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_left.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_leftright.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_leftright.cur new file mode 100644 index 0000000..71152d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_leftright.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_right.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_right.cur new file mode 100644 index 0000000..f9a7275 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_right.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topbottom.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topbottom.cur new file mode 100644 index 0000000..02a2e82 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topbottom.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topleft.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topleft.cur new file mode 100644 index 0000000..8918f60 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topleft.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topright.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topright.cur new file mode 100644 index 0000000..3b26027 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_topright.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_up.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_up.cur new file mode 100644 index 0000000..1fe9c7f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/scrl_up.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit.bmp new file mode 100644 index 0000000..4a96787 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit_hot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit_hot.bmp new file mode 100644 index 0000000..541683a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_edit_hot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file.bmp new file mode 100644 index 0000000..0339e85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file_hot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file_hot.bmp new file mode 100644 index 0000000..74c1feb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_file_hot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window.bmp new file mode 100644 index 0000000..093f758 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window_hot.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window_hot.bmp new file mode 100644 index 0000000..49d95b9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/res/toolbar_window_hot.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/resource.h new file mode 100644 index 0000000..174f7d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/resource.h @@ -0,0 +1,50 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MultiPad.rc +// +#define IDC_SAVE_WORKSPACE 3 +#define IDR_TOOLBAR_FILE 101 +#define IDR_TOOLBAR_EDIT 103 +#define IDR_TOOLBAR_WINDOW 105 +#define IDR_TOOLBAR_EDIT_HOT 108 +#define IDR_TOOLBAR_FILE_HOT 109 +#define IDD_CUSTOMIZE 109 +#define IDD_DIALOG_WORKSPACE 110 +#define IDR_TOOLBAR_WINDOW_HOT 111 +#define IDR_MAINFRAME 128 +#define IDR_TEXTTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_COMBO_TOOLBAR 1000 +#define IDC_CHECK_FLAT 1001 +#define IDC_CHECK_LIST 1002 +#define IDC_CHECK_GRIPPER 1003 +#define IDC_CHECK_SEPARATOR 1004 +#define IDC_CHECK_CUSTOMIZABLE 1005 +#define IDC_CHECK_TEXT 1007 +#define IDC_RADIO_PLAIN 1008 +#define IDC_RADIO_TOOLTIP 1009 +#define IDC_RADIO_MENU 1010 +#define IDC_EDIT_WIDTH 1011 +#define IDC_EDIT_ROWS 1012 +#define IDC_EDIT_INDENT 1013 +#define IDC_CHECK_SAVE_ON_EXIT 1015 +#define IDC_CHECK_LOAD_ON_ENTER 1016 +#define ID_VIEW_TOOLBAR_FILE 32794 +#define ID_VIEW_TOOLBAR_EDIT 32795 +#define ID_VIEW_TOOLBAR_WINDOW 32796 +#define ID_VIEW_CUSTOMIZE 32797 +#define ID_VIEW_WORKSPACE 32798 +#define ID_VIEW_IMSEVENT_LEFTBTN 32799 +#define ID_VIEW_IMSEVENT_MIDDLEBTN 32800 +#define ID_VIEW_IMSEVENT_SHIFT 32802 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 116 +#define _APS_NEXT_COMMAND_VALUE 32803 +#define _APS_NEXT_CONTROL_VALUE 1016 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.cpp new file mode 100644 index 0000000..77150d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.cpp @@ -0,0 +1,15 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.h new file mode 100644 index 0000000..5b29bee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/stdafx.h @@ -0,0 +1,20 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently + +#define VC_EXTRALEAN + +#include // MFC core and standard components +#include +#include +#include diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/unicode.utf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/unicode.utf new file mode 100644 index 0000000..4890d4b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/IntelliMouse/unicode.utf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.cpp new file mode 100644 index 0000000..fea1bb1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.cpp @@ -0,0 +1,115 @@ +#include "stdafx.h" +#include "ItemTips.h" +#include "AllListPropSht.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAllListSheet + +IMPLEMENT_DYNAMIC(CAllListSheet, CPropertySheet) + +CAllListSheet::CAllListSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) + :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + AddControlPages(); + + // TODO :: Add the pages for the rest of the controls here. +} + +CAllListSheet::CAllListSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) + :CPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + AddControlPages(); +} + +CAllListSheet::~CAllListSheet() +{ +} + +void CAllListSheet::AddControlPages() +{ + // Add icon and remove "Apply" button + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_psh.dwFlags |= PSP_USEHICON; + m_psh.dwFlags|=PSH_NOAPPLYNOW; + m_psh.hIcon = m_hIcon; + + // add property pages + AddPage(&m_standardPage); + AddPage(&m_derivedPage); +} + +BEGIN_MESSAGE_MAP(CAllListSheet, CPropertySheet) + //{{AFX_MSG_MAP(CAllListSheet) + ON_WM_QUERYDRAGICON() + ON_WM_SYSCOMMAND() + //}}AFX_MSG_MAP + ON_BN_CLICKED(IDHELP, OnAppAbout) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAllListSheet message handlers + +BOOL CAllListSheet::OnInitDialog() +{ + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + SetIcon(m_hIcon, TRUE); + SetIcon(m_hIcon, FALSE); + + // rename standard Help button + CWnd* pButtonCancel=GetDlgItem(IDHELP); + pButtonCancel->SetWindowText(_T("About...")); + + return CPropertySheet::OnInitDialog(); +} + +HCURSOR CAllListSheet::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CAllListSheet::OnSysCommand(UINT nID, LPARAM lParam) +{ + // TODO: Add your message handler code here and/or call default + + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnAppAbout(); + } + else + { + CPropertySheet::OnSysCommand(nID, lParam); + } +} + +void CAllListSheet::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.h new file mode 100644 index 0000000..90dad22 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/AllListPropSht.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// CAllListSheet + +#include "StandardDlg.h" +#include "DerivedDlg.h" + +class CAllListSheet : public CPropertySheet +{ + DECLARE_DYNAMIC(CAllListSheet) + +// Construction +public: + CAllListSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); + CAllListSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0); + +protected: + void AddControlPages(void); + +// Attributes +public: + + CStandardDlg m_standardPage; + CDerivedDlg m_derivedPage; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAllListSheet) + //}}AFX_VIRTUAL + afx_msg void OnAppAbout(); + +// Implementation +public: + virtual ~CAllListSheet(); + virtual BOOL OnInitDialog(); + + // Generated message map functions +protected: + + HICON m_hIcon; + + //{{AFX_MSG(CAllListSheet) + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.cpp new file mode 100644 index 0000000..bec60e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.cpp @@ -0,0 +1,253 @@ +// DeriveDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ItemTips.h" +#include "DerivedDlg.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNCREATE(CDerivedDlg, CPropertyPage) + +///////////////////////////////////////////////////////////////////////////// +// CDerivedDlg dialog + + +CDerivedDlg::CDerivedDlg():CPropertyPage(CDerivedDlg::IDD) +{ + //{{AFX_DATA_INIT(CDerivedDlg) + m_clrBackground = 0; + m_sFontName = _T(""); + m_bCustomize = FALSE; + m_bSmart = FALSE; + //}}AFX_DATA_INIT + + m_pimagelist=NULL; + m_pimagelistSmall=NULL; +} + +CDerivedDlg::~CDerivedDlg() +{ + if((HFONT)m_font) + { + m_font.DeleteObject(); + } + + if(m_pimagelist) + delete m_pimagelist; + if(m_pimagelistSmall) + delete m_pimagelistSmall; +} + + +void CDerivedDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDerivedDlg) + DDX_Control(pDX, IDC_CHECK_SMART, m_btnSmart); + DDX_Control(pDX, IDC_BUTTON_TEXTFONT, m_btnTextFont); + DDX_Control(pDX, IDC_BUTTON_BKCOLOR, m_btnBkColor); + DDX_Control(pDX, IDC_LIST_STANDARD, m_listStandard); + DDX_Text(pDX, IDC_EDIT_BKCOLOR, m_clrBackground); + DDX_Text(pDX, IDC_EDIT_TEXTFONT, m_sFontName); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZE, m_bCustomize); + DDX_Check(pDX, IDC_CHECK_SMART, m_bSmart); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CDerivedDlg, CPropertyPage) + //{{AFX_MSG_MAP(CDerivedDlg) + ON_BN_CLICKED(IDC_BUTTON_BKCOLOR, OnButtonBkcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTFONT, OnButtonTextfont) + ON_BN_CLICKED(IDC_CHECK_CUSTOMIZE, OnCheckCustomize) + ON_BN_CLICKED(IDC_CHECK_SMART, OnCheckSmart) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDerivedDlg message handlers + +BOOL CDerivedDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + + CItemTipsApp* pApp = (CItemTipsApp*)AfxGetApp(); + // start the random number generator + srand((unsigned) time(NULL)); + m_pimagelist = new CImageList(); + m_pimagelistSmall = new CImageList(); + // no serious allocation failure checking + ASSERT(m_pimagelist != NULL && m_pimagelistSmall != NULL); + m_pimagelist->Create(32, 32, TRUE/*bMask*/, LISTICONCOUNT/*nInitial*/, 4/*nGrow*/); + m_pimagelistSmall->Create(16, 16, TRUE/*bMask*/, LISTICONCOUNT, 4); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST1)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST2)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST3)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST4)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST1)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST2)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST3)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST4)); + + FillListCtrl(); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CDerivedDlg::FillListCtrl() +{ + CRect rect; + int i, iIcon, iItem, iSubItem, iActualItem; + LV_ITEM lvitem; + LV_COLUMN lvcolumn; + TCHAR rgtsz[2][10] = {_T("MAIN ITEM"), _T("SUB_ITEM")}; + CItemTipsApp *pApp; + TCHAR rgtszIconDescrip[LISTICONCOUNT][50], rgtszIconShortDesc[LISTICONCOUNT][12]; + + ASSERT(LISTICONCOUNT == 4); + UTBStr::tcscpy(rgtszIconDescrip[0], 50, _T("Blue Ellipse, Yellow Triangle, Red Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[1], 50, _T("Yellow Ellipse, Red Triangle, Blue Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[2], 50, _T("Red Ellipse, Blue Triangle, Yellow Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[3], 50, _T("Red Ellipse, Yellow Triangle, Blue Rectangle")); + + UTBStr::tcscpy(rgtszIconShortDesc[0], 12, _T("BE, YT, RR")); + UTBStr::tcscpy(rgtszIconShortDesc[1], 12, _T("YE, RT, BR")); + UTBStr::tcscpy(rgtszIconShortDesc[2], 12, _T("RE, BT, YR")); + UTBStr::tcscpy(rgtszIconShortDesc[3], 12, _T("RE, YT, BR")); + + + pApp = (CItemTipsApp*)AfxGetApp(); + m_listStandard.SetImageList(m_pimagelist, LVSIL_NORMAL); + m_listStandard.SetImageList(m_pimagelistSmall, LVSIL_SMALL); + m_listStandard.GetWindowRect(&rect); + + for (i = 0; i < 2; i++) // add the columns to the list control + { + lvcolumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH; + lvcolumn.fmt = LVCFMT_LEFT; + lvcolumn.pszText = rgtsz[i]; + lvcolumn.iSubItem = i; + lvcolumn.cx = rect.Width() * (i + 1) / 3; // SubItem is twice as large + m_listStandard.InsertColumn(i, &lvcolumn); // assumes return value is OK. + } + + for (iItem = 0; iItem < 50; iItem++) // will now insert the items and subitems into the list view. + for (iSubItem = 0; iSubItem < 2; iSubItem++) + { + if (iSubItem == 0) + iIcon = rand() % 4; // choose the icon and legend for the entry + + lvitem.mask = LVIF_TEXT | (iSubItem == 0 ? LVIF_IMAGE : 0); + lvitem.iItem = (iSubItem == 0) ? iItem : iActualItem; + lvitem.iSubItem = iSubItem; + lvitem.pszText = iSubItem == 0 ? rgtszIconShortDesc[iIcon] : rgtszIconDescrip[iIcon]; + + lvitem.iImage = iIcon; + if (iSubItem == 0) + iActualItem = m_listStandard.InsertItem(&lvitem); + else + m_listStandard.SetItem(&lvitem); + } +} + + +void CDerivedDlg::OnButtonBkcolor() +{ + // TODO: Add your control notification handler code here + + // use standard CColorDialog to change item tip window's background color + CColorDialog clrDlg(m_clrBackground); + if(clrDlg.DoModal()==IDOK) + { + m_clrBackground=clrDlg.GetColor(); + UpdateData(FALSE); + } +} + +void CDerivedDlg::OnButtonTextfont() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use font common dialog to change font and text color + LOGFONT lf; + BOOL bLogFont=FALSE; + if((HFONT)m_font) + { + if(m_font.GetLogFont(&lf)!=0) + { + bLogFont=TRUE; + } + } + CFontDialog fontDlg(bLogFont ? &lf : NULL); + fontDlg.m_cf.rgbColors=m_clrText; + if(fontDlg.DoModal()==IDOK) + { + m_clrText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&lf); + m_sFontName=lf.lfFaceName; + if((HFONT)m_font) + { + m_font.DeleteObject(); + } + m_font.CreateFontIndirect(&lf); + UpdateData(FALSE); + } +} + +void CDerivedDlg::OnCheckCustomize() +{ + // TODO: Add your control notification handler code here + + SetVars(); +} + +void CDerivedDlg::OnCheckSmart() +{ + // TODO: Add your control notification handler code here + + SetVars(); +} + +void CDerivedDlg::GetVars() +{ + // fill with values from CListCtrl + m_clrBackground=m_listStandard.GetBkColor(); + m_clrText=m_listStandard.GetTextColor(); + m_sFontName.Empty(); + + UpdateData(FALSE); + + ShowControls(); +} + +void CDerivedDlg::SetVars() +{ + UpdateData(); + ShowControls(); +} + +void CDerivedDlg::ShowControls() +{ + UpdateData(TRUE); + + m_btnBkColor.EnableWindow(m_bCustomize); + m_btnTextFont.EnableWindow(m_bCustomize); + m_btnSmart.EnableWindow(m_bCustomize); + + UpdateData(FALSE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.h new file mode 100644 index 0000000..111eff0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/DerivedDlg.h @@ -0,0 +1,74 @@ +#if !defined(AFX_DERIVEDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_) +#define AFX_DERIVEDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// StandardDlg.h : header file +// + +#include "MyListCtrl.h" + +///////////////////////////////////////////////////////////////////////////// +// CDerivedDlg dialog + +class CDerivedDlg : public CPropertyPage +{ + DECLARE_DYNCREATE(CDerivedDlg) + +// Construction +public: + CDerivedDlg(); // standard constructor + ~CDerivedDlg(); + +// Dialog Data + //{{AFX_DATA(CDerivedDlg) + enum { IDD = IDD_DIALOG_DERIVED }; + CButton m_btnSmart; + CButton m_btnTextFont; + CButton m_btnBkColor; + CMyListCtrl m_listStandard; + DWORD m_clrBackground; + CString m_sFontName; + BOOL m_bCustomize; + BOOL m_bSmart; + //}}AFX_DATA + + CImageList *m_pimagelist; + CImageList *m_pimagelistSmall; + + DWORD m_clrText; + CFont m_font; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDerivedDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + void FillListCtrl(void); + + // Generated message map functions + //{{AFX_MSG(CDerivedDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBkcolor(); + afx_msg void OnButtonTextfont(); + afx_msg void OnCheckCustomize(); + afx_msg void OnCheckSmart(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DERIVEDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.clw new file mode 100644 index 0000000..229515d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.clw @@ -0,0 +1,85 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CItemTipsApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "itemtips.h" +LastPage=0 + +ClassCount=5 +Class1=CAllListSheet +Class2=CDerivedDlg +Class3=CItemTipsApp +Class4=CMyListCtrl +Class5=CStandardDlg + +ResourceCount=2 +Resource1=IDD_DIALOG_STANDARD +Resource2=IDD_DIALOG_DERIVED + +[CLS:CAllListSheet] +Type=0 +BaseClass=CPropertySheet +HeaderFile=AllListPropSht.h +ImplementationFile=AllListPropSht.cpp +Filter=W +VirtualFilter=hWC +LastObject=CAllListSheet + +[CLS:CDerivedDlg] +Type=0 +BaseClass=CPropertyPage +HeaderFile=DerivedDlg.h +ImplementationFile=DerivedDlg.cpp + +[CLS:CItemTipsApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ItemTips.h +ImplementationFile=ItemTips.cpp +Filter=N +VirtualFilter=AC +LastObject=CItemTipsApp + +[CLS:CMyListCtrl] +Type=0 +BaseClass=CListCtrl +HeaderFile=MyListCtrl.h +ImplementationFile=MyListCtrl.cpp + +[CLS:CStandardDlg] +Type=0 +BaseClass=CPropertyPage +HeaderFile=StandardDlg.h +ImplementationFile=StandardDlg.cpp + +[DLG:IDD_DIALOG_DERIVED] +Type=1 +Class=CDerivedDlg +ControlCount=9 +Control1=IDC_LIST_STANDARD,SysListView32,1350631945 +Control2=IDC_STATIC,button,1342177287 +Control3=IDC_CHECK_CUSTOMIZE,button,1342242819 +Control4=IDC_STATIC,button,1342177287 +Control5=IDC_BUTTON_BKCOLOR,button,1342242816 +Control6=IDC_EDIT_BKCOLOR,edit,1350633600 +Control7=IDC_BUTTON_TEXTFONT,button,1342242816 +Control8=IDC_EDIT_TEXTFONT,edit,1350633600 +Control9=IDC_CHECK_SMART,button,1342242819 + +[DLG:IDD_DIALOG_STANDARD] +Type=1 +Class=CStandardDlg +ControlCount=9 +Control1=IDC_LIST_STANDARD,SysListView32,1350631945 +Control2=IDC_STATIC,button,1342177287 +Control3=IDC_CHECK_CUSTOMIZE,button,1342242819 +Control4=IDC_STATIC,button,1342177287 +Control5=IDC_BUTTON_BKCOLOR,button,1342242816 +Control6=IDC_EDIT_BKCOLOR,edit,1350633600 +Control7=IDC_BUTTON_TEXTFONT,button,1342242816 +Control8=IDC_EDIT_TEXTFONT,edit,1350633600 +Control9=IDC_CHECK_SMART,button,1342242819 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.cpp new file mode 100644 index 0000000..316b51c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.cpp @@ -0,0 +1,84 @@ +// ItemTips.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ItemTips.h" +#include "AllListPropSht.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CItemTipsApp + +BEGIN_MESSAGE_MAP(CItemTipsApp, CWinApp) + //{{AFX_MSG_MAP(CItemTipsApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CItemTipsApp construction + +CItemTipsApp::CItemTipsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CItemTipsApp object + +CItemTipsApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CItemTipsApp initialization + +BOOL CItemTipsApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CAllListSheet alllistsheet(_T("ItemTipSample")); + m_pMainWnd = &alllistsheet; + alllistsheet.DoModal(); + return FALSE; +} + +int CItemTipsApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsp new file mode 100644 index 0000000..952c601 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsp @@ -0,0 +1,313 @@ +# Microsoft Developer Studio Project File - Name="ItemTips" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ItemTips - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ItemTips.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ItemTips.mak" CFG="ItemTips - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ItemTips - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ItemTips - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ItemTips - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ItemTips - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ItemTips - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ItemTips - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ItemTips.exe" + +!ELSEIF "$(CFG)" == "ItemTips - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ItemTips.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ItemTips - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ItemTips" +# PROP BASE Intermediate_Dir "ItemTips" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ItemTips.exe" + +!ELSEIF "$(CFG)" == "ItemTips - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ItemTip0" +# PROP BASE Intermediate_Dir "ItemTip0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ItemTips.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ItemTips.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ItemTips - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ItemTip1" +# PROP BASE Intermediate_Dir "ItemTip1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ItemTips.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ItemTips.exe" + +!ENDIF + +# Begin Target + +# Name "ItemTips - Win32 Release" +# Name "ItemTips - Win32 Debug" +# Name "ItemTips - Win32 Release_Shared" +# Name "ItemTips - Win32 Unicode_Debug" +# Name "ItemTips - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\AllListPropSht.cpp +# End Source File +# Begin Source File + +SOURCE=.\DerivedDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ItemTips.cpp +# End Source File +# Begin Source File + +SOURCE=.\ItemTips.rc +# End Source File +# Begin Source File + +SOURCE=.\MyListCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\StandardDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AllListPropSht.h +# End Source File +# Begin Source File + +SOURCE=.\DerivedDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ItemTips.h +# End Source File +# Begin Source File + +SOURCE=.\MyListCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTip.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXItemTipWnd.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StandardDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon2.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon3.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon4.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ItemTips.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ItemTips.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ItemTips.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsw new file mode 100644 index 0000000..4459ded --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ItemTips"=".\ItemTips.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ItemTips", VYHBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.h new file mode 100644 index 0000000..3b2eb20 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.h @@ -0,0 +1,59 @@ +// ItemTips.h : main header file for the ITEMTIPS application +// + +#if !defined(AFX_ITEMTIPS_H__60CB2B7A_E9A4_11D1_8855_0080C83F712F__INCLUDED_) +#define AFX_ITEMTIPS_H__60CB2B7A_E9A4_11D1_8855_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +#define LISTICONCOUNT 4 +#define ICONLISTFIRST 0 +#define ICONLISTLAST (ICONLISTFIRST + LISTICONCOUNT - 1) +#define ICONCOUNT (LISTICONCOUNT) + +#define COLOR_BLUE RGB(0,0,255) +#define COLOR_RED RGB(255,0,0) +#define COLOR_YELLOW RGB(255,255,0) + +///////////////////////////////////////////////////////////////////////////// +// CItemTipsApp: +// See ItemTips.cpp for the implementation of this class +// + +class CItemTipsApp : public CWinApp +{ +public: + CItemTipsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CItemTipsApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CItemTipsApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ITEMTIPS_H__60CB2B7A_E9A4_11D1_8855_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.rc new file mode 100644 index 0000000..fc83f11 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.rc @@ -0,0 +1,222 @@ +// 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 + "#include ""UTSampleAbout.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ItemTips.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\ItemTips.ico" +IDI_ICONLIST1 ICON "res\\icon1.ico" +IDI_ICONLIST2 ICON "res\\icon2.ico" +IDI_ICONLIST3 ICON "res\\icon3.ico" +IDI_ICONLIST4 ICON "res\\icon4.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "ItemTips MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ItemTips" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "ItemTips.EXE" + VALUE "ProductName", "ItemTips Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_STANDARD DIALOG 0, 0, 298, 189 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Standard" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "List1",IDC_LIST_STANDARD,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,18,18,180,156 + GROUPBOX "Item Tip in standard CListCtrl",IDC_STATIC,7,7,284,175 + CONTROL "Customize ItemTip",IDC_CHECK_CUSTOMIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,22,80,10 + GROUPBOX "",IDC_STATIC,203,40,82,134 + PUSHBUTTON "Background Color",IDC_BUTTON_BKCOLOR,211,50,66,16 + EDITTEXT IDC_EDIT_BKCOLOR,211,69,66,13,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "Text Font",IDC_BUTTON_TEXTFONT,211,101,66,16 + EDITTEXT IDC_EDIT_TEXTFONT,211,120,66,13,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Smart drawing",IDC_CHECK_SMART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,211,158,68,9 +END + +IDD_DIALOG_DERIVED DIALOG 0, 0, 298, 189 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Derived" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "List1",IDC_LIST_STANDARD,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,18,18,180,156 + GROUPBOX "Item Tip in CListCtrl-derived control",IDC_STATIC,7,7,284,175 + CONTROL "Customize ItemTip",IDC_CHECK_CUSTOMIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,22,80,10 + GROUPBOX "",IDC_STATIC,203,40,82,134 + PUSHBUTTON "Background Color",IDC_BUTTON_BKCOLOR,211,50,66,16 + EDITTEXT IDC_EDIT_BKCOLOR,211,69,66,13,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "Text Font",IDC_BUTTON_TEXTFONT,211,101,66,16 + EDITTEXT IDC_EDIT_TEXTFONT,211,120,66,13,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Smart drawing",IDC_CHECK_SMART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,211,158,68,9 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_STANDARD, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 291 + TOPMARGIN, 7 + BOTTOMMARGIN, 182 + END + + IDD_DIALOG_DERIVED, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 291 + TOPMARGIN, 7 + BOTTOMMARGIN, 182 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ItemTips..." + ID_DESCRIPTION_FILE "ItemTipsInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ItemTips for CListCtrl" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ItemTips.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.vcproj new file mode 100644 index 0000000..043943a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTips.vcproj @@ -0,0 +1,1153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTipsInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTipsInfo.rtf new file mode 100644 index 0000000..4e46f91 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ItemTipsInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.cpp new file mode 100644 index 0000000..21d5fc8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.cpp @@ -0,0 +1,126 @@ +// MyListCtrl.cpp : implementation file +// + +#include "stdafx.h" +#include "ItemTips.h" +#include "MyListCtrl.h" +#include "DerivedDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyListCtrl + +CMyListCtrl::CMyListCtrl() +{ + m_bFirstTimeHooking=TRUE; +} + +CMyListCtrl::~CMyListCtrl() +{ +} + + +BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl) + //{{AFX_MSG_MAP(CMyListCtrl) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_DOYOUNEEDITEMTIP,OnNeedItemTip) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMyListCtrl message handlers + + +LRESULT CMyListCtrl::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) +{ + // TODO: Add your specialized code here and/or call the base class + + // hook window as soon as it subclussed standard CListCtrl + if(m_bFirstTimeHooking && m_ItemTip.GetHookedWnd()!=this) + { + m_bFirstTimeHooking=FALSE; + m_ItemTip.Attach(this); + } + + return CListCtrl::DefWindowProc(message, wParam, lParam); +} + +LRESULT CMyListCtrl::OnNeedItemTip(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + + LPNEEDITEMTIPINFO pnitInfo=(LPNEEDITEMTIPINFO)lParam; + + // parent of this window is corresponding property page + CDerivedDlg* pParentWnd=(CDerivedDlg*)GetParent(); + + // if item tip is for an item in the first column and that item is selected + // then draw it using system colors for hilited items + if(pnitInfo->col==0) + { + if(GetItemState(pnitInfo->row,LVIS_SELECTED)==LVIS_SELECTED) + { + pnitInfo->clrText=::GetSysColor(COLOR_HIGHLIGHTTEXT); + pnitInfo->clrBackground=::GetSysColor(COLOR_HIGHLIGHT); + } + } + + if(pParentWnd->m_bCustomize && pnitInfo->result==ID_NIT_SUCCESS) + { + if(!pParentWnd->m_bSmart) + { + // change text color, background color + pnitInfo->clrText=pParentWnd->m_clrText; + pnitInfo->clrBackground=pParentWnd->m_clrBackground; + } + else + { + // depending on image associated with the item set text and background colors + LV_ITEM lvitem; + lvitem.mask=LVIF_IMAGE; + lvitem.iItem=pnitInfo->row; + lvitem.iSubItem=0; + if(GetItem(&lvitem)) + { + switch(lvitem.iImage) + { + case 0: + { + pnitInfo->clrText=COLOR_BLUE; + pnitInfo->clrBackground=COLOR_YELLOW; + break; + } + case 1: + { + pnitInfo->clrText=COLOR_YELLOW; + pnitInfo->clrBackground=COLOR_RED; + break; + } + case 2: + { + pnitInfo->clrText=COLOR_RED; + pnitInfo->clrBackground=COLOR_BLUE; + break; + } + case 3: + { + pnitInfo->clrText=COLOR_RED; + pnitInfo->clrBackground=COLOR_YELLOW; + break; + } + } + } + } + // change font + if((HFONT)pParentWnd->m_font) + { + pnitInfo->pFont=(LPARAM)(&pParentWnd->m_font); + } + } + return 0; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.h new file mode 100644 index 0000000..ffba3c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/MyListCtrl.h @@ -0,0 +1,56 @@ +#if !defined(AFX_MYLISTCTRL_H__60CB2B85_E9A4_11D1_8855_0080C83F712F__INCLUDED_) +#define AFX_MYLISTCTRL_H__60CB2B85_E9A4_11D1_8855_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// MyListCtrl.h : header file +// + +#include "OXItemTip.h" + +///////////////////////////////////////////////////////////////////////////// +// CMyListCtrl window + +class CMyListCtrl : public CListCtrl +{ +// Construction +public: + CMyListCtrl(); + +// Attributes +public: + +protected: + BOOL m_bFirstTimeHooking; + COXItemTip m_ItemTip; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyListCtrl) + protected: + virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMyListCtrl(); + + // Generated message map functions +protected: + //{{AFX_MSG(CMyListCtrl) + //}}AFX_MSG + virtual LRESULT OnNeedItemTip(WPARAM wParam, LPARAM lParam); + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MYLISTCTRL_H__60CB2B85_E9A4_11D1_8855_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ReadMe.txt new file mode 100644 index 0000000..810e6d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ItemTips +======================================================================== + + +AppWizard has created this ItemTips 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 ItemTips application. + +ItemTips.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CItemTipsApp application class. + +ItemTips.cpp + This is the main application source file that contains the application + class CItemTipsApp. + +ItemTips.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 + Developer Studio. + +res\ItemTips.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ItemTips.rc. + +res\ItemTips.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ItemTips.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ItemTipsDlg.h, ItemTipsDlg.cpp - the dialog + These files contain your CItemTipsDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ItemTips.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ItemTips.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.cpp new file mode 100644 index 0000000..e06f73b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.cpp @@ -0,0 +1,327 @@ +// StandardDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ItemTips.h" +#include "StandardDlg.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNCREATE(CStandardDlg, CPropertyPage) + +///////////////////////////////////////////////////////////////////////////// +// CStandardDlg dialog + + +CStandardDlg::CStandardDlg():CPropertyPage(CStandardDlg::IDD) +{ + //{{AFX_DATA_INIT(CStandardDlg) + m_clrBackground = 0; + m_sFontName = _T(""); + m_bCustomize = FALSE; + m_bSmart = FALSE; + //}}AFX_DATA_INIT + + m_pimagelist=NULL; + m_pimagelistSmall=NULL; +} + +CStandardDlg::~CStandardDlg() +{ + if((HFONT)m_font) + { + m_font.DeleteObject(); + } + + if(m_pimagelist) + delete m_pimagelist; + if(m_pimagelistSmall) + delete m_pimagelistSmall; +} + + +void CStandardDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CStandardDlg) + DDX_Control(pDX, IDC_CHECK_SMART, m_btnSmart); + DDX_Control(pDX, IDC_BUTTON_TEXTFONT, m_btnTextFont); + DDX_Control(pDX, IDC_BUTTON_BKCOLOR, m_btnBkColor); + DDX_Control(pDX, IDC_LIST_STANDARD, m_listStandard); + DDX_Text(pDX, IDC_EDIT_BKCOLOR, m_clrBackground); + DDX_Text(pDX, IDC_EDIT_TEXTFONT, m_sFontName); + DDX_Check(pDX, IDC_CHECK_CUSTOMIZE, m_bCustomize); + DDX_Check(pDX, IDC_CHECK_SMART, m_bSmart); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CStandardDlg, CPropertyPage) + //{{AFX_MSG_MAP(CStandardDlg) + ON_BN_CLICKED(IDC_BUTTON_BKCOLOR, OnButtonBkcolor) + ON_BN_CLICKED(IDC_BUTTON_TEXTFONT, OnButtonTextfont) + ON_BN_CLICKED(IDC_CHECK_CUSTOMIZE, OnCheckCustomize) + ON_BN_CLICKED(IDC_CHECK_SMART, OnCheckSmart) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStandardDlg message handlers + +BOOL CStandardDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + + CItemTipsApp* pApp = (CItemTipsApp*)AfxGetApp(); + srand((unsigned) time(NULL)); // start the random number generator + m_pimagelist = new CImageList(); + m_pimagelistSmall = new CImageList(); + ASSERT(m_pimagelist != NULL && m_pimagelistSmall != NULL); // no serious allocation failure checking + m_pimagelist->Create(32, 32, TRUE/*bMask*/, LISTICONCOUNT/*nInitial*/, 4/*nGrow*/); + m_pimagelistSmall->Create(16, 16, TRUE/*bMask*/, LISTICONCOUNT, 4); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST1)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST2)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST3)); + m_pimagelist->Add(pApp->LoadIcon(IDI_ICONLIST4)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST1)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST2)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST3)); + m_pimagelistSmall->Add(pApp->LoadIcon(IDI_ICONLIST4)); + + FillListCtrl(); + + m_ItemTip.Attach(&m_listStandard); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CStandardDlg::FillListCtrl() +{ + CRect rect; + int i, iIcon, iItem, iSubItem, iActualItem; + LV_ITEM lvitem; + LV_COLUMN lvcolumn; + TCHAR rgtsz[2][10] = {_T("MAIN ITEM"), _T("SUB_ITEM")}; + CItemTipsApp *pApp; + TCHAR rgtszIconDescrip[LISTICONCOUNT][50], rgtszIconShortDesc[LISTICONCOUNT][12]; + + ASSERT(LISTICONCOUNT == 4); + UTBStr::tcscpy(rgtszIconDescrip[0], 50, _T("Blue Ellipse, Yellow Triangle, Red Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[1], 50, _T("Yellow Ellipse, Red Triangle, Blue Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[2], 50, _T("Red Ellipse, Blue Triangle, Yellow Rectangle")); + UTBStr::tcscpy(rgtszIconDescrip[3], 50, _T("Red Ellipse, Yellow Triangle, Blue Rectangle")); + + UTBStr::tcscpy(rgtszIconShortDesc[0], 12, _T("BE, YT, RR")); + UTBStr::tcscpy(rgtszIconShortDesc[1], 12, _T("YE, RT, BR")); + UTBStr::tcscpy(rgtszIconShortDesc[2], 12, _T("RE, BT, YR")); + UTBStr::tcscpy(rgtszIconShortDesc[3], 12, _T("RE, YT, BR")); + + + pApp = (CItemTipsApp*)AfxGetApp(); + m_listStandard.SetImageList(m_pimagelist, LVSIL_NORMAL); + m_listStandard.SetImageList(m_pimagelistSmall, LVSIL_SMALL); + m_listStandard.GetWindowRect(&rect); + + for (i = 0; i < 2; i++) // add the columns to the list control + { + lvcolumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH; + lvcolumn.fmt = LVCFMT_LEFT; + lvcolumn.pszText = rgtsz[i]; + lvcolumn.iSubItem = i; + lvcolumn.cx = rect.Width() * (i + 1) / 3; // SubItem is twice as large + m_listStandard.InsertColumn(i, &lvcolumn); // assumes return value is OK. + } + + for (iItem = 0; iItem < 500; iItem++) // will now insert the items and subitems into the list view. + for (iSubItem = 0; iSubItem < 2; iSubItem++) + { + if (iSubItem == 0) + iIcon = rand() % 4; // choose the icon and legend for the entry + + lvitem.mask = LVIF_TEXT | (iSubItem == 0 ? LVIF_IMAGE : 0); + lvitem.iItem = (iSubItem == 0) ? iItem : iActualItem; + lvitem.iSubItem = iSubItem; + lvitem.pszText = iSubItem == 0 ? rgtszIconShortDesc[iIcon] : rgtszIconDescrip[iIcon]; + + lvitem.iImage = iIcon; + if (iSubItem == 0) + iActualItem = m_listStandard.InsertItem(&lvitem); + else + m_listStandard.SetItem(&lvitem); + } +} + + +void CStandardDlg::OnButtonBkcolor() +{ + // TODO: Add your control notification handler code here + + // use standard CColorDialog to change item tip window's background color + CColorDialog clrDlg(m_clrBackground); + if(clrDlg.DoModal()==IDOK) + { + m_clrBackground=clrDlg.GetColor(); + UpdateData(FALSE); + } +} + +void CStandardDlg::OnButtonTextfont() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use font common dialog to change font and text color + LOGFONT lf; + BOOL bLogFont=FALSE; + if((HFONT)m_font) + { + if(m_font.GetLogFont(&lf)!=0) + { + bLogFont=TRUE; + } + } + CFontDialog fontDlg(bLogFont ? &lf : NULL); + fontDlg.m_cf.rgbColors=m_clrText; + if(fontDlg.DoModal()==IDOK) + { + m_clrText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&lf); + m_sFontName=lf.lfFaceName; + if((HFONT)m_font) + { + m_font.DeleteObject(); + } + m_font.CreateFontIndirect(&lf); + UpdateData(FALSE); + } +} + +void CStandardDlg::OnCheckCustomize() +{ + // TODO: Add your control notification handler code here + + SetVars(); + + // detach CListCtrl + m_ItemTip.Detach(); + // and then attach it again and register callback function depending + // on m_bCustomize value + m_ItemTip.Attach(&m_listStandard,m_bCustomize ? ItemTipHelper : NULL); +} + +void CStandardDlg::OnCheckSmart() +{ + // TODO: Add your control notification handler code here + + SetVars(); +} + +void CStandardDlg::GetVars() +{ + // fill with values from CListCtrl + m_clrBackground=m_listStandard.GetBkColor(); + m_clrText=m_listStandard.GetTextColor(); + m_sFontName.Empty(); + + UpdateData(FALSE); + + ShowControls(); +} + +void CStandardDlg::SetVars() +{ + UpdateData(); + ShowControls(); +} + +void CStandardDlg::ShowControls() +{ + UpdateData(TRUE); + + m_btnBkColor.EnableWindow(m_bCustomize); + m_btnTextFont.EnableWindow(m_bCustomize); + m_btnSmart.EnableWindow(m_bCustomize); + + UpdateData(FALSE); +} + +// callback function that is called by COXItemTip before display an item tip window +void CALLBACK ItemTipHelper(LPARAM lpSource, LPARAM lpInfo) +{ + // lpSource is a pointer to COXItemTip object + CWnd* pWnd=((COXItemTip*)lpSource)->GetHookedWnd(); + ASSERT(::IsWindow(pWnd->m_hWnd)); + ASSERT(pWnd->IsKindOf(RUNTIME_CLASS(CListCtrl))); + + CListCtrl* pListCtrl=(CListCtrl*)pWnd; + // lpInfo is pointer to NEEDITEMTIPINFO structure + LPNEEDITEMTIPINFO pnitInfo=(LPNEEDITEMTIPINFO)lpInfo; + + // get CListCtrl parent window + CStandardDlg* pParentWnd=(CStandardDlg*)pListCtrl->GetParent(); + + if(pnitInfo->result==ID_NIT_SUCCESS) + { + if(!pParentWnd->m_bSmart) + { + // just change the text & background color and set different font + pnitInfo->clrText=pParentWnd->m_clrText; + pnitInfo->clrBackground=pParentWnd->m_clrBackground; + if((HFONT)pParentWnd->m_font) + { + pnitInfo->pFont=(LPARAM)(&pParentWnd->m_font); + } + } + else + { + // depending on image associated with the item change the + // text and background colors + LV_ITEM lvitem; + lvitem.mask=LVIF_IMAGE; + lvitem.iItem=pnitInfo->row; + lvitem.iSubItem=0; + if(pListCtrl->GetItem(&lvitem)) + { + switch(lvitem.iImage) + { + case 0: + { + pnitInfo->clrText=COLOR_BLUE; + pnitInfo->clrBackground=COLOR_YELLOW; + break; + } + case 1: + { + pnitInfo->clrText=COLOR_YELLOW; + pnitInfo->clrBackground=COLOR_RED; + break; + } + case 2: + { + pnitInfo->clrText=COLOR_RED; + pnitInfo->clrBackground=COLOR_BLUE; + break; + } + case 3: + { + pnitInfo->clrText=COLOR_RED; + pnitInfo->clrBackground=COLOR_YELLOW; + break; + } + } + } + } + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.h new file mode 100644 index 0000000..c56976b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StandardDlg.h @@ -0,0 +1,78 @@ +#if !defined(AFX_STANDARDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_) +#define AFX_STANDARDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// StandardDlg.h : header file +// + +#include "OXItemTip.h" + +///////////////////////////////////////////////////////////////////////////// +// CStandardDlg dialog + +void CALLBACK ItemTipHelper(LPARAM lpSource, LPARAM lpInfo); + +class CStandardDlg : public CPropertyPage +{ + DECLARE_DYNCREATE(CStandardDlg) + +// Construction +public: + CStandardDlg(); // standard constructor + ~CStandardDlg(); + +// Dialog Data + //{{AFX_DATA(CStandardDlg) + enum { IDD = IDD_DIALOG_STANDARD }; + CButton m_btnSmart; + CButton m_btnTextFont; + CButton m_btnBkColor; + CListCtrl m_listStandard; + DWORD m_clrBackground; + CString m_sFontName; + BOOL m_bCustomize; + BOOL m_bSmart; + //}}AFX_DATA + + CImageList *m_pimagelist; + CImageList *m_pimagelistSmall; + + DWORD m_clrText; + CFont m_font; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStandardDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + void GetVars(); + void SetVars(); + void ShowControls(); + +// Implementation +protected: + + COXItemTip m_ItemTip; + + void FillListCtrl(void); + + // Generated message map functions + //{{AFX_MSG(CStandardDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnButtonBkcolor(); + afx_msg void OnButtonTextfont(); + afx_msg void OnCheckCustomize(); + afx_msg void OnCheckSmart(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STANDARDDLG_H__60CB2B84_E9A4_11D1_8855_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.cpp new file mode 100644 index 0000000..8f27632 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ItemTips.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.h new file mode 100644 index 0000000..4df733f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__60CB2B7E_E9A4_11D1_8855_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__60CB2B7E_E9A4_11D1_8855_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__60CB2B7E_E9A4_11D1_8855_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.rc2 new file mode 100644 index 0000000..adf469a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/ItemTips.rc2 @@ -0,0 +1,13 @@ +// +// ITEMTIPS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon1.ico new file mode 100644 index 0000000..bb271f4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon2.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon2.ico new file mode 100644 index 0000000..13978e8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon2.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon3.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon3.ico new file mode 100644 index 0000000..9f8b39f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon3.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon4.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon4.ico new file mode 100644 index 0000000..9ecf90c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/res/icon4.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/resource.h new file mode 100644 index 0000000..8a48a3e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ItemTips/resource.h @@ -0,0 +1,34 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ItemTips.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_ITEMTIPS_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDD_DIALOG_STANDARD 129 +#define IDD_DIALOG_DERIVED 130 +#define IDI_ICONLIST1 132 +#define IDI_ICONLIST2 133 +#define IDI_ICONLIST3 134 +#define IDI_ICONLIST4 135 +#define IDC_LIST_STANDARD 1000 +#define IDC_CHECK_CUSTOMIZE 1001 +#define IDC_BUTTON_BKCOLOR 1002 +#define IDC_EDIT_BKCOLOR 1003 +#define IDC_BUTTON_TEXTFONT 1006 +#define IDC_EDIT_TEXTFONT 1007 +#define IDC_CHECK_SMART 1008 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1009 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.cpp new file mode 100644 index 0000000..123d18a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Layout.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.h new file mode 100644 index 0000000..1a900a8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ChildFrm.h @@ -0,0 +1,52 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__7D955F2E_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_CHILDFRM_H__7D955F2E_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__7D955F2E_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.clw new file mode 100644 index 0000000..e7a6850 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.clw @@ -0,0 +1,189 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CLayoutApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "layout.h" +LastPage=0 + +ClassCount=9 +Class1=CChildFrame +Class2=CLayoutApp +Class3=CLayoutDoc +Class4=CLayoutView +Class5=CMainFrame +Class6=CResizingDialog +Class7=CResizingPropPage1 +Class8=CResizingPropPage2 +Class9=CResizingPropSheet + +ResourceCount=6 +Resource1=IDR_MAINFRAME +Resource2=IDD_ABOUTBOX +Resource3=IDD_RESIZING_DIALOG +Resource4=IDD_LAYOUT_FORM +Resource5=IDD_PAGE1 +Resource6=IDD_PAGE2 + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CLayoutApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Layout.h +ImplementationFile=Layout.cpp +Filter=N +VirtualFilter=AC +LastObject=CLayoutApp + +[CLS:CLayoutDoc] +Type=0 +BaseClass=CDocument +HeaderFile=LayoutDoc.h +ImplementationFile=LayoutDoc.cpp + +[CLS:CLayoutView] +Type=0 +BaseClass=CFormView +HeaderFile=LayoutView.h +ImplementationFile=LayoutView.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=CMyFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CResizingDialog] +Type=0 +BaseClass=CDialog +HeaderFile=ResizingDialog.h +ImplementationFile=ResizingDialog.cpp +Filter=D +VirtualFilter=dWC +LastObject=CResizingDialog + +[CLS:CResizingPropPage1] +Type=0 +BaseClass=CPropertyPage +HeaderFile=ResizingPropPage.h +ImplementationFile=ResizingPropPage.cpp + +[CLS:CResizingPropPage2] +Type=0 +BaseClass=CPropertyPage +HeaderFile=ResizingPropPage.h +ImplementationFile=ResizingPropPage.cpp + +[CLS:CResizingPropSheet] +Type=0 +BaseClass=CPropertySheet +HeaderFile=ResizingPropSheet.h +ImplementationFile=ResizingPropSheet.cpp + +[DLG:IDD_LAYOUT_FORM] +Type=1 +Class=CLayoutView +ControlCount=12 +Control1=IDC_FRAME,button,1342177287 +Control2=IDC_PICTURE,static,1342177283 +Control3=IDC_EDIT,edit,1350631552 +Control4=IDC_BUTTON,button,1342242816 +Control5=IDC_TREE,SysTreeView32,1350631424 +Control6=IDC_LIST,listbox,1352728835 +Control7=IDC_PROGRESS,msctls_progress32,1350565888 +Control8=IDC_SLIDER,msctls_trackbar32,1342242864 +Control9=IDC_COMBO,combobox,1344340227 +Control10=IDC_TEXT,static,1342308352 +Control11=IDC_RADIO,button,1342189321 +Control12=IDC_PICTURE2,static,1342177283 + +[DLG:IDD_RESIZING_DIALOG] +Type=1 +Class=CResizingDialog +ControlCount=7 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_COMBO,combobox,1344340227 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_PICTURE,static,1342177283 +Control6=IDC_TEXT,static,1342308864 +Control7=IDC_TREE,SysTreeView32,1350631424 + +[DLG:IDD_PAGE1] +Type=1 +Class=CResizingPropPage1 +ControlCount=3 +Control1=IDC_FRAME,button,1342177287 +Control2=IDC_EDIT,edit,1350631552 +Control3=IDC_LIST,listbox,1352728835 + +[DLG:IDD_PAGE2] +Type=1 +Class=CResizingPropPage2 +ControlCount=3 +Control1=IDC_FRAME,button,1342177287 +Control2=IDC_EDIT,edit,1350631552 +Control3=IDC_TREE,SysTreeView32,1350631424 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_EDIT_CUT +Command3=ID_EDIT_COPY +Command4=ID_EDIT_PASTE +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_TOOLBAR +Command4=ID_VIEW_STATUS_BAR +Command5=IDM_SHOW_DIALOG +Command6=IDM_SHOW_PROPPAGE +Command7=ID_WINDOW_NEW +Command8=ID_WINDOW_CASCADE +Command9=ID_WINDOW_TILE_HORZ +Command10=ID_WINDOW_ARRANGE +Command11=ID_APP_ABOUT +CommandCount=11 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.cpp new file mode 100644 index 0000000..3fca21e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.cpp @@ -0,0 +1,157 @@ +// Layout.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Layout.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "LayoutDoc.h" +#include "LayoutView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLayoutApp + +BEGIN_MESSAGE_MAP(CLayoutApp, CWinApp) + //{{AFX_MSG_MAP(CLayoutApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutApp construction + +CLayoutApp::CLayoutApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CLayoutApp object + +CLayoutApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CLayoutApp initialization + +BOOL CLayoutApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Change the registry key under which our settings are stored. + // 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(); // 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. + +#ifdef _OX_MDI + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CLayoutDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CLayoutView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; +#else + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CLayoutDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CLayoutView)); + AddDocTemplate(pDocTemplate); +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. +#ifdef _OX_MDI + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); +#else + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); +#endif + + return TRUE; +} + + +// App command to run the dialog +void CLayoutApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutApp commands + +int CLayoutApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsp new file mode 100644 index 0000000..ddb4fe0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsp @@ -0,0 +1,321 @@ +# Microsoft Developer Studio Project File - Name="Layout" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Layout - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Layout.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Layout.mak" CFG="Layout - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Layout - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Layout - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Layout - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Layout - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Layout - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Layout - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Layout.exe" + +!ELSEIF "$(CFG)" == "Layout - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Layout.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Layout - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Layout__" +# PROP BASE Intermediate_Dir "Layout__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Layout.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Layout.exe" + +!ELSEIF "$(CFG)" == "Layout - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Layout_0" +# PROP BASE Intermediate_Dir "Layout_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Layout.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Layout.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Layout - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Layout_1" +# PROP BASE Intermediate_Dir "Layout_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Layout.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Layout.exe" + +!ENDIF + +# Begin Target + +# Name "Layout - Win32 Release" +# Name "Layout - Win32 Debug" +# Name "Layout - Win32 Release_Shared" +# Name "Layout - Win32 Unicode_Debug" +# Name "Layout - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\Layout.cpp +# End Source File +# Begin Source File + +SOURCE=.\Layout.rc +# End Source File +# Begin Source File + +SOURCE=.\LayoutDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\LayoutView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResizingDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResizingPropPage.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResizingPropSheet.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Layout.h +# End Source File +# Begin Source File + +SOURCE=.\LayoutDoc.h +# End Source File +# Begin Source File + +SOURCE=.\LayoutView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXLayoutManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXLayoutManager.inl +# End Source File +# Begin Source File + +SOURCE=.\ResizingDialog.h +# End Source File +# Begin Source File + +SOURCE=.\ResizingPropPage.h +# End Source File +# Begin Source File + +SOURCE=.\ResizingPropSheet.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Layout.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Layout.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\LayoutDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Layout.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsw new file mode 100644 index 0000000..a205404 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Layout"=".\Layout.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/Layout", YAIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.h new file mode 100644 index 0000000..f05f131 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.h @@ -0,0 +1,51 @@ +// Layout.h : main header file for the LAYOUT application +// + +#if !defined(AFX_LAYOUT_H__7D955F28_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_LAYOUT_H__7D955F28_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CLayoutApp: +// See Layout.cpp for the implementation of this class +// + +class CLayoutApp : public CWinApp +{ +public: + CLayoutApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CLayoutApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LAYOUT_H__7D955F28_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rc new file mode 100644 index 0000000..0b4f447 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rc @@ -0,0 +1,521 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Layout.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" + "#include ""UTSampleAbout.rc"" // UT About box\r\n" + "#endif\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\\Layout.ico" +IDR_LAYOUTTYPE ICON "res\\LayoutDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR 16, 15 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_EDIT_CUT + BUTTON ID_EDIT_COPY + BUTTON ID_EDIT_PASTE + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM SEPARATOR + MENUITEM "Show Resizing Dialog", IDM_SHOW_DIALOG + MENUITEM "Show Resizing Property Pages", IDM_SHOW_PROPPAGE + 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 Layout...", 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 DIALOG 0, 0, 217, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Layout" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "Layout Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 1998",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP +END + +IDD_RESIZING_DIALOG DIALOGEX 0, 0, 214, 134 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +CAPTION "Resizing Dialog" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,157,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,157,24,50,14 + COMBOBOX IDC_COMBO,7,53,200,139,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "Please select an item:",IDC_STATIC,7,42,76,8 + ICON IDR_MAINFRAME,IDC_PICTURE,7,7,20,20 + LTEXT "Try to resize the dialog window",IDC_TEXT,36,7,114,20,SS_CENTERIMAGE,WS_EX_CLIENTEDGE + CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_BORDER | WS_TABSTOP,7,88,200,39 +END + +IDD_LAYOUT_FORM DIALOGEX 0, 0, 233, 119 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + GROUPBOX "Frame",IDC_FRAME,0,0,233,46,0,WS_EX_TRANSPARENT + ICON IDR_LAYOUTTYPE,IDC_PICTURE,91,61,20,20,0,WS_EX_STATICEDGE + EDITTEXT IDC_EDIT,0,48,206,12,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BUTTON,211,47,11,12 + CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_BORDER | WS_TABSTOP,2,62,87,37 + LISTBOX IDC_LIST,115,62,99,31,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,9,207,14 + CONTROL "Slider1",IDC_SLIDER,"msctls_trackbar32",TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,9,26,78,15 + COMBOBOX IDC_COMBO,98,27,105,239,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "Ultimate Toolbox for MFC Layout Manager Sample Application",IDC_TEXT,93,102,125,17,0,WS_EX_STATICEDGE + CONTROL "This is a Radio Button With a lot of text",IDC_RADIO, + "Button",BS_AUTORADIOBUTTON | BS_CENTER | BS_VCENTER | BS_MULTILINE,91,81,20,8,WS_EX_STATICEDGE + ICON IDR_MAINFRAME,IDC_PICTURE2,89,90,20,20,0,WS_EX_STATICEDGE +END + +IDD_PAGE1 DIALOG 0, 0, 249, 237 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Property Page 1" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Frame",IDC_FRAME,7,7,235,223 + EDITTEXT IDC_EDIT,23,20,101,14,ES_AUTOHSCROLL + LISTBOX IDC_LIST,20,40,79,37,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP +END + +IDD_PAGE2 DIALOG 0, 0, 249, 237 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Property Page 2" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Frame",IDC_FRAME,7,7,235,223 + EDITTEXT IDC_EDIT,17,20,101,14,ES_AUTOHSCROLL + CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_BORDER | WS_TABSTOP,18,38,85,74 +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 "040904B0" + BEGIN + VALUE "FileDescription", "Layout MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "Layout" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "Layout.EXE" + VALUE "ProductName", "Layout Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 210 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_RESIZING_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 207 + TOPMARGIN, 7 + BOTTOMMARGIN, 127 + END + + IDD_PAGE1, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 242 + TOPMARGIN, 7 + BOTTOMMARGIN, 230 + END + + IDD_PAGE2, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 242 + TOPMARGIN, 7 + BOTTOMMARGIN, 230 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_RESIZING_DIALOG DLGINIT +BEGIN + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + IDC_COMBO, 0x403, 13, 0 +0x7845, 0x6d61, 0x6c70, 0x2065, 0x7449, 0x6d65, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Layout" + IDR_LAYOUTTYPE "\nLayout\nLayout\n\n\nLayout.Document\nLayout Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Layout" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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_DESCRIPTION_FILE "layout.rtf" + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE +BEGIN + IDM_SHOW_DIALOG "Shows the resizing dialog" + IDM_SHOW_PROPPAGE "Shows reszing property pages" +END + +STRINGTABLE +BEGIN + IDS_PROPSHT_CAPTION "Property Sheet" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Layout.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "UTSampleAbout.rc" // UT About box +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rtf new file mode 100644 index 0000000..f06abec Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.vcproj new file mode 100644 index 0000000..e45804b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/Layout.vcproj @@ -0,0 +1,1208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.cpp new file mode 100644 index 0000000..664b355 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.cpp @@ -0,0 +1,84 @@ +// LayoutDoc.cpp : implementation of the CLayoutDoc class +// + +#include "stdafx.h" +#include "Layout.h" + +#include "LayoutDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLayoutDoc + +IMPLEMENT_DYNCREATE(CLayoutDoc, CDocument) + +BEGIN_MESSAGE_MAP(CLayoutDoc, CDocument) + //{{AFX_MSG_MAP(CLayoutDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutDoc construction/destruction + +CLayoutDoc::CLayoutDoc() +{ + // TODO: add one-time construction code here + +} + +CLayoutDoc::~CLayoutDoc() +{ +} + +BOOL CLayoutDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CLayoutDoc serialization + +void CLayoutDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutDoc diagnostics + +#ifdef _DEBUG +void CLayoutDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CLayoutDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLayoutDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.h new file mode 100644 index 0000000..4a8a91b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutDoc.h @@ -0,0 +1,57 @@ +// LayoutDoc.h : interface of the CLayoutDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_LAYOUTDOC_H__7D955F30_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_LAYOUTDOC_H__7D955F30_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +class CLayoutDoc : public CDocument +{ +protected: // create from serialization only + CLayoutDoc(); + DECLARE_DYNCREATE(CLayoutDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLayoutDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CLayoutDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LAYOUTDOC_H__7D955F30_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.cpp new file mode 100644 index 0000000..2b8263b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.cpp @@ -0,0 +1,258 @@ +// LayoutView.cpp : implementation of the CLayoutView class +// + +#include "stdafx.h" +#include "Layout.h" + +#include "LayoutDoc.h" +#include "LayoutView.h" + +#include "OXLayoutManager.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define OX_OFFSET (7) // This is the default padding in the Visual C++ Dialog editor + // so we use it here too. This number must be >= 0 + +///////////////////////////////////////////////////////////////////////////// +// CLayoutView + +IMPLEMENT_DYNCREATE(CLayoutView, CFormView) + +BEGIN_MESSAGE_MAP(CLayoutView, CFormView) + //{{AFX_MSG_MAP(CLayoutView) + ON_WM_SIZE() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutView construction/destruction + +CLayoutView::CLayoutView() + : CFormView(CLayoutView::IDD) +{ + //{{AFX_DATA_INIT(CLayoutView) + //}}AFX_DATA_INIT + + m_pLayoutManager = NULL; +} + +CLayoutView::~CLayoutView() +{ + if (m_pLayoutManager != NULL) + { + delete m_pLayoutManager; + m_pLayoutManager = NULL; + } +} + +void CLayoutView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + + //{{AFX_DATA_MAP(CLayoutView) + DDX_Control(pDX, IDC_TREE, m_tree); + DDX_Control(pDX, IDC_SLIDER, m_slider); + DDX_Control(pDX, IDC_PROGRESS, m_progress); + DDX_Control(pDX, IDC_LIST, m_list); + DDX_Control(pDX, IDC_COMBO, m_combo); + DDX_Control(pDX, IDC_EDIT, m_edit); + //}}AFX_DATA_MAP +} + +BOOL CLayoutView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + return CFormView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutView printing + +BOOL CLayoutView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CLayoutView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CLayoutView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +void CLayoutView::OnPrint(CDC* /*pDC*/, CPrintInfo*) +{ + // TODO: add code to print the controls +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutView diagnostics + +#ifdef _DEBUG +void CLayoutView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CLayoutView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CLayoutDoc* CLayoutView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLayoutDoc))); + return (CLayoutDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLayoutView message handlers + +void CLayoutView::OnInitialUpdate() +{ + CFormView::OnInitialUpdate(); + + if (m_pLayoutManager == NULL) + { + if ((m_pLayoutManager = new COXLayoutManager(this)) != NULL) + { + ASSERT_VALID(m_pLayoutManager); + + // Force the Frame to size with the parent window on the left and right + // sides with an offset of OX_OFFSET (Note: On the right side we need + // to use a negative offset) + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + + // Force progress bar to size between the (above) frame with the same offset + m_pLayoutManager->SetConstraint(IDC_PROGRESS, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_PROGRESS, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + + // Size combo box with the right side of the Frame + // The combo box window will not resize, it will only move; This is because we + // have not setup a constraint on combo box on the left side. + m_pLayoutManager->SetConstraint(IDC_COMBO, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + + // Setup the slider bar to fill the space between the FRAME on the left side + // and the combo box on the right side. Note the usage of the OX_LMT_OPPOSITE + // flag here instead of OX_LMT_SAME. + m_pLayoutManager->SetConstraint(IDC_SLIDER, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_SLIDER, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_COMBO); + // + // Set the minimum size for the slider control + m_pLayoutManager->SetMinMax(IDC_SLIDER, CSize(50, 0)); + + // BUTTON SIZING + m_pLayoutManager->SetConstraint(IDC_BUTTON, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_BUTTON, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_BUTTON, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_FRAME); + + // EDIT SIZING + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -3 /* = 3 pixels (just because OX_OFFSET is too big here*/, IDC_BUTTON); + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_FRAME); + + // The following enclosed controls are sized between each other. This is done using the + // OX_LMT_POSITION flag and setting a percentage of fill space for the window + // + // The Tree control is positioned relative to the FormView filling 33% of + // the window space. + // The Radio, Picture and Picture2 controls are sized between the Tree and + // the Listbox filling the remaining space (33%) + // + // The listbox is sized on from 66% of the window until the window edge; it is + // sized to 33% of the window. + + // TREE SIZING + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_EDIT); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_RIGHT, OX_LMT_POSITION, 33); + + // RADIO SIZING + m_pLayoutManager->SetConstraint(IDC_RADIO, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_PICTURE); + m_pLayoutManager->SetConstraint(IDC_RADIO, OX_LMS_LEFT, OX_LMT_OPPOSITE, OX_OFFSET, IDC_TREE); + m_pLayoutManager->SetConstraint(IDC_RADIO, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_LIST); + + // PICTURE2 SIZING + m_pLayoutManager->SetConstraint(IDC_PICTURE2, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_RADIO); + m_pLayoutManager->SetConstraint(IDC_PICTURE2, OX_LMS_BOTTOM, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_TEXT); + m_pLayoutManager->SetConstraint(IDC_PICTURE2, OX_LMS_LEFT, OX_LMT_OPPOSITE, OX_OFFSET, IDC_TREE); + m_pLayoutManager->SetConstraint(IDC_PICTURE2, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_LIST); + // + // Set minium height of this picture + m_pLayoutManager->SetMinMax(IDC_PICTURE2, CSize(0, 5)); + + // PICTURE SIZING + m_pLayoutManager->SetConstraint(IDC_PICTURE, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_EDIT); + m_pLayoutManager->SetConstraint(IDC_PICTURE, OX_LMS_LEFT, OX_LMT_OPPOSITE, OX_OFFSET, IDC_TREE); + m_pLayoutManager->SetConstraint(IDC_PICTURE, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_LIST); + + // LIST SIZING + // (The bottom edge of this window is sized according to the upper edge of + // the (below) Static Text control using the OX_LMT_OPPOSITE) + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_LEFT, OX_LMT_POSITION, 66); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_EDIT); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_BOTTOM, OX_LMT_OPPOSITE, -OX_OFFSET, IDC_TEXT); + + // TEXT SIZING + m_pLayoutManager->SetConstraint(IDC_TEXT, OX_LMS_LEFT, OX_LMT_OPPOSITE, OX_OFFSET, IDC_TREE); + m_pLayoutManager->SetConstraint(IDC_TEXT, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET); + + // Redraw the controls in the window with the new layout + m_pLayoutManager->RedrawLayout(); + } + } + + ///////////////////////////////////////////////////////////////////////////// + // Set some data on the dialog + + m_progress.SetRange(0, 100); + m_progress.SetPos(30); + + m_edit.SetWindowText(_T("C:\\Ultimate Toolbox\\")); + + HTREEITEM hItem = m_tree.InsertItem(_T("Root")); + TCHAR szBuffer[10]; + int i = 0; + for (; i < 100; i++) + { + wsprintf(szBuffer, _T("Item #%d"), i); + + m_combo.InsertString(i, szBuffer); + m_list.InsertString(i, szBuffer); + + m_tree.InsertItem(szBuffer, hItem); + } + + m_tree.ModifyStyle(NULL, TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS); + m_tree.Expand(hItem, TVE_EXPAND); +} + +void CLayoutView::OnSize(UINT nType, int cx, int cy) +{ + CFormView::OnSize(nType, cx, cy); + + //////////////////////////////////////////// + // + // Undo MFC's adding of Vertical and/or Horizontal + // scroll bars + + SetScrollSizes(MM_TEXT, CSize(0, 0)); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.h new file mode 100644 index 0000000..b2adef9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/LayoutView.h @@ -0,0 +1,81 @@ +// LayoutView.h : interface of the CLayoutView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_LAYOUTVIEW_H__7D955F32_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_LAYOUTVIEW_H__7D955F32_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class COXLayoutManager; + +class CLayoutView : public CFormView +{ +protected: // create from serialization only + CLayoutView(); + DECLARE_DYNCREATE(CLayoutView) + +public: + //{{AFX_DATA(CLayoutView) + enum { IDD = IDD_LAYOUT_FORM }; + CTreeCtrl m_tree; + CSliderCtrl m_slider; + CProgressCtrl m_progress; + CListBox m_list; + CEdit m_edit; + CComboBox m_combo; + //}}AFX_DATA + +// Attributes +public: + CLayoutDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnPrint(CDC* pDC, CPrintInfo*); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLayoutView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXLayoutManager* m_pLayoutManager; + +// Generated message map functions +protected: + //{{AFX_MSG(CLayoutView) + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in LayoutView.cpp +inline CLayoutDoc* CLayoutView::GetDocument() + { return (CLayoutDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LAYOUTVIEW_H__7D955F32_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.cpp new file mode 100644 index 0000000..74480ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.cpp @@ -0,0 +1,128 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Layout.h" + +#include "MainFrm.h" + +#include "ResizingDialog.h" +#include "ResizingPropSheet.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +#ifdef _OX_MDI +IMPLEMENT_DYNAMIC(CMainFrame, CMyFrameWnd) +#else +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) +#endif + +BEGIN_MESSAGE_MAP(CMainFrame, CMyFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(IDM_SHOW_DIALOG, OnShowDialog) + ON_COMMAND(IDM_SHOW_PROPPAGE, OnShowProppage) + //}}AFX_MSG_MAP +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 (CMyFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this) || + !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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMyFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMyFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMyFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::OnShowDialog() +{ + CResizingDialog().DoModal(); +} + +void CMainFrame::OnShowProppage() +{ + CResizingPropSheet dlg; + + // Remove the apply button + dlg.m_psh.dwFlags |= PSH_NOAPPLYNOW; + dlg.DoModal(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.h new file mode 100644 index 0000000..68107f3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/MainFrm.h @@ -0,0 +1,75 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__7D955F2C_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_MAINFRM_H__7D955F2C_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// _OX_MDI +// To have this example work as an MDI (Multiple document interface) application +// define _OX_MDI; otherwise, the application works as an SDI application + +#define _OX_MDI + + +#ifdef _OX_MDI +#define CMyFrameWnd CMDIFrameWnd +#else +#define CMyFrameWnd CFrameWnd +#endif + +class CMainFrame : public CMyFrameWnd +{ +#ifdef _OX_MDI + DECLARE_DYNAMIC(CMainFrame) +#else + DECLARE_DYNCREATE(CMainFrame) +#endif +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnShowDialog(); + afx_msg void OnShowProppage(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__7D955F2C_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ReadMe.txt new file mode 100644 index 0000000..60b9174 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ReadMe.txt @@ -0,0 +1,102 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : Layout +======================================================================== + + +AppWizard has created this Layout 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 Layout application. + +Layout.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CLayoutApp application class. + +Layout.cpp + This is the main application source file that contains the application + class CLayoutApp. + +Layout.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 + Developer Studio. + +res\Layout.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file Layout.rc. + +res\Layout.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +Layout.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +LayoutDoc.h, LayoutDoc.cpp - the document + These files contain your CLayoutDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CLayoutDoc::Serialize). + +LayoutView.h, LayoutView.cpp - the view of the document + These files contain your CLayoutView class. + CLayoutView objects are used to view CLayoutDoc objects. + +res\LayoutDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CLayoutDoc class. This icon is included by the main + resource file Layout.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Layout.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.cpp new file mode 100644 index 0000000..ad71215 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.cpp @@ -0,0 +1,120 @@ +// ResizingDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "layout.h" +#include "ResizingDialog.h" + +#include "OXLayoutManager.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define OX_OFFSET (7) // This is the default padding in the Visual C++ Dialog editor + // so we use it here too. This number must be >= 0 + +///////////////////////////////////////////////////////////////////////////// +// CResizingDialog dialog + + +CResizingDialog::CResizingDialog(CWnd* pParent /*=NULL*/) + : CDialog(CResizingDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CResizingDialog) + //}}AFX_DATA_INIT + + m_pLayoutManager = NULL; +} + +CResizingDialog::~CResizingDialog() +{ + if (m_pLayoutManager != NULL) + { + delete m_pLayoutManager; + m_pLayoutManager = NULL; + } +} + +void CResizingDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CResizingDialog) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CResizingDialog, CDialog) + //{{AFX_MSG_MAP(CResizingDialog) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CResizingDialog message handlers + +BOOL CResizingDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + + if ((m_pLayoutManager = new COXLayoutManager(this)) != NULL) + { + // + // Create the layout for this window; See CLayoutView::OnInitialUpdate + // for more detailed informaton. + // + + // Size the OK button with right edge of the window + // Size the CANCEL button with right edge of the window + m_pLayoutManager->SetConstraint(IDOK, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDCANCEL, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + + // Size the TEXT control with the left side of the picture control + // and size it on the right side with the OK button (you could have used the + // the cancel button since both buttons have the same dimensions) + m_pLayoutManager->SetConstraint(IDC_TEXT, OX_LMS_LEFT, OX_LMT_OPPOSITE, OX_OFFSET, IDC_PICTURE); + m_pLayoutManager->SetConstraint(IDC_TEXT, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDOK); + + // Size the combobox with the right and left sides of the window + m_pLayoutManager->SetConstraint(IDC_COMBO, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_COMBO, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + + // Size the tree with the left and right side of the window and on the top + // with the combobox and on the bottom with bottom of the Window. + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_BOTTOM | OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_COMBO); + + + // Set the minimum and maximum sizes of the CTreeCtrl and CEdit controls + // + m_pLayoutManager->SetMinMax(IDC_TEXT, CSize(30, 0)); + m_pLayoutManager->SetMinMax(IDC_TREE, CSize(20, 40)); + + + ///////////////////////////////////////////////////////////// + // Insert some data into the controls + // + + CTreeCtrl* pTree = (CTreeCtrl*) GetDlgItem(IDC_TREE); + if (pTree != NULL) + { + TCHAR szBuffer[10]; + HTREEITEM hRoot = pTree->InsertItem(_T("Root")); + for (int i = 0; i < 100; i++) + { + wsprintf(szBuffer, _T("Item #%d"), i); + pTree->InsertItem(szBuffer, hRoot); + } + pTree->ModifyStyle(NULL, TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS); + pTree->Expand(hRoot, TVE_EXPAND); + } + + m_pLayoutManager->RedrawLayout(); + } + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.h new file mode 100644 index 0000000..c18a7ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingDialog.h @@ -0,0 +1,49 @@ +#if !defined(AFX_RESIZINGDIALOG_H__7D955F3B_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_RESIZINGDIALOG_H__7D955F3B_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ResizingDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CResizingDialog dialog +class COXLayoutManager; + +class CResizingDialog : public CDialog +{ +// Construction +public: + CResizingDialog(CWnd* pParent = NULL); // standard constructor + virtual ~CResizingDialog(); + +// Dialog Data + //{{AFX_DATA(CResizingDialog) + enum { IDD = IDD_RESIZING_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResizingDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + COXLayoutManager* m_pLayoutManager; + + // Generated message map functions + //{{AFX_MSG(CResizingDialog) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_RESIZINGDIALOG_H__7D955F3B_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.cpp new file mode 100644 index 0000000..9addcc9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.cpp @@ -0,0 +1,191 @@ +// ResizingPropPage.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ResizingPropPage.h" + +#include "OXLayoutManager.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +#define OX_OFFSET (7) + +IMPLEMENT_DYNCREATE(CResizingPropPage1, CPropertyPage) +IMPLEMENT_DYNCREATE(CResizingPropPage2, CPropertyPage) + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropPage1 property page + +CResizingPropPage1::CResizingPropPage1() : CPropertyPage(CResizingPropPage1::IDD) +{ + //{{AFX_DATA_INIT(CResizingPropPage1) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + m_pLayoutManager = NULL; +} + +CResizingPropPage1::~CResizingPropPage1() +{ + if (m_pLayoutManager != NULL) + delete m_pLayoutManager; +} + +void CResizingPropPage1::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CResizingPropPage1) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CResizingPropPage1, CPropertyPage) + //{{AFX_MSG_MAP(CResizingPropPage1) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BOOL CResizingPropPage1::OnSetActive() +{ + if (m_pLayoutManager == NULL) + { + if ((m_pLayoutManager = new COXLayoutManager(this)) != NULL) + { + ASSERT_VALID(m_pLayoutManager); + + // + // Setup constraints + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_TOP | OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_BOTTOM | OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_EDIT); + m_pLayoutManager->SetConstraint(IDC_LIST, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + } + + // + // Insert some data into the listbox control + TCHAR szBuffer[10]; + int i = 0; + for (; i < 100; i++) + { + wsprintf(szBuffer, _T("Item #%d"), i); + GetDlgItem(IDC_LIST)->SendMessage(LB_INSERTSTRING, i, (LPARAM)(LPCTSTR) szBuffer); + } + + m_pLayoutManager->RedrawLayout(); + } + + return CPropertyPage::OnSetActive(); +} + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropPage2 property page + +CResizingPropPage2::CResizingPropPage2() : CPropertyPage(CResizingPropPage2::IDD) +{ + //{{AFX_DATA_INIT(CResizingPropPage2) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + m_pLayoutManager = NULL; +} + +CResizingPropPage2::~CResizingPropPage2() +{ + if (m_pLayoutManager != NULL) + delete m_pLayoutManager; +} + +void CResizingPropPage2::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CResizingPropPage2) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CResizingPropPage2, CPropertyPage) + //{{AFX_MSG_MAP(CResizingPropPage2) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BOOL CResizingPropPage2::OnSetActive() +{ + if (m_pLayoutManager == NULL) + { + if ((m_pLayoutManager = new COXLayoutManager(this)) != NULL) + { + ASSERT_VALID(m_pLayoutManager); + + // + // Setup constraints + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_TOP | OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(IDC_FRAME, OX_LMS_BOTTOM | OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_EDIT, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_TOP, OX_LMT_OPPOSITE, OX_OFFSET, IDC_EDIT); + m_pLayoutManager->SetConstraint(IDC_TREE, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET, IDC_FRAME); + } + + // + // Insert some data into the CTreeCtrl + // + CTreeCtrl* pTree = (CTreeCtrl*) GetDlgItem(IDC_TREE); + if (pTree != NULL) + { + HTREEITEM hItem = pTree->InsertItem(_T("Root")); + TCHAR szBuffer[10]; + + for (int i = 0; i < 100; i++) + { + wsprintf(szBuffer, _T("Item #%d"), i); + pTree->InsertItem(szBuffer, hItem); + } + + pTree->ModifyStyle(NULL, TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS); + pTree->Expand(hItem, TVE_EXPAND); + } + + m_pLayoutManager->RedrawLayout(); + } + + return CPropertyPage::OnSetActive(); +} + + + +BOOL CResizingPropPage1::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_LAYOUTTYPE)); + ASSERT(cs.lpszClass); + + return CPropertyPage::PreCreateWindow(cs); +} + +BOOL CResizingPropPage2::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_LAYOUTTYPE)); + ASSERT(cs.lpszClass); + + return CPropertyPage::PreCreateWindow(cs); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.h new file mode 100644 index 0000000..ff80459 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropPage.h @@ -0,0 +1,91 @@ +// ResizingPropPage.h : header file +// + +#ifndef __RESIZINGPROPPAGE_H__ +#define __RESIZINGPROPPAGE_H__ + +class COXLayoutManager; + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropPage1 dialog + +class CResizingPropPage1 : public CPropertyPage +{ + DECLARE_DYNCREATE(CResizingPropPage1) + +// Construction +public: + CResizingPropPage1(); + ~CResizingPropPage1(); + +// Dialog Data + //{{AFX_DATA(CResizingPropPage1) + enum { IDD = IDD_PAGE1 }; + // NOTE - ClassWizard will add data members here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CResizingPropPage1) + public: + virtual BOOL OnSetActive(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + COXLayoutManager* m_pLayoutManager; + + //{{AFX_MSG(CResizingPropPage1) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + + +class CResizingPropPage2 : public CPropertyPage +{ + DECLARE_DYNCREATE(CResizingPropPage2) + +// Construction +public: + CResizingPropPage2(); + ~CResizingPropPage2(); + +// Dialog Data + //{{AFX_DATA(CResizingPropPage2) + enum { IDD = IDD_PAGE2 }; + // NOTE - ClassWizard will add data members here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CResizingPropPage2) + public: + virtual BOOL OnSetActive(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + COXLayoutManager* m_pLayoutManager; + + //{{AFX_MSG(CResizingPropPage2) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + + + +#endif // __RESIZINGPROPPAGE_H__ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.cpp new file mode 100644 index 0000000..54dd610 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.cpp @@ -0,0 +1,167 @@ +// ResizingPropSheet.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ResizingPropSheet.h" + +#include "OXLayoutManager.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +#define OX_OFFSET (7) + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropSheet + +IMPLEMENT_DYNAMIC(CResizingPropSheet, CPropertySheet) + +CResizingPropSheet::CResizingPropSheet(CWnd* pWndParent) + : CPropertySheet(IDS_PROPSHT_CAPTION, pWndParent) +{ + // Add all of the property pages here. Note that + // the order that they appear in here will be + // the order they appear in on screen. By default, + // the first page of the set is the active one. + // One way to make a different property page the + // active one is to call SetActivePage(). + + AddPage(&m_Page1); + AddPage(&m_Page2); +} + +CResizingPropSheet::~CResizingPropSheet() +{ + if (m_pLayoutManager != NULL) + { + delete m_pLayoutManager; + m_pLayoutManager = NULL; + } +} + + +BEGIN_MESSAGE_MAP(CResizingPropSheet, CPropertySheet) + //{{AFX_MSG_MAP(CResizingPropSheet) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropSheet message handlers + +int CResizingPropSheet::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CPropertySheet::OnCreate(lpCreateStruct) == -1) + return -1; + + // Remove standard Restore, Maximize & Minimize items out of system menu. + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + pSysMenu->RemoveMenu(SC_RESTORE, MF_BYCOMMAND); + pSysMenu->RemoveMenu(SC_MINIMIZE, MF_BYCOMMAND); + pSysMenu->RemoveMenu(SC_MAXIMIZE, MF_BYCOMMAND); + } + + // Make the window resizable + ModifyStyle(NULL, WS_THICKFRAME); + + return 0; +} + +BOOL CResizingPropSheet::OnInitDialog() +{ + CPropertySheet::OnInitDialog(); + + if ((m_pLayoutManager = new COXLayoutManager(this)) != NULL) + { + // Setup constraints on the OK and Cancel buttons. + // + m_pLayoutManager->SetConstraint(IDCANCEL, OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDCANCEL, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(IDOK, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -OX_OFFSET, IDCANCEL); + m_pLayoutManager->SetConstraint(IDOK, OX_LMS_BOTTOM, OX_LMT_SAME, -OX_OFFSET); + + // + // Setup constraint on the CTabControl: Size it on the Left, Right and Top with the Window, + // and on the Bottom with the OK button. + m_pLayoutManager->SetConstraint(GetTabControl()->GetDlgCtrlID(), OX_LMS_LEFT, OX_LMT_SAME, OX_OFFSET); + m_pLayoutManager->SetConstraint(GetTabControl()->GetDlgCtrlID(), OX_LMS_RIGHT, OX_LMT_SAME, -OX_OFFSET); + m_pLayoutManager->SetConstraint(GetTabControl()->GetDlgCtrlID(), OX_LMS_BOTTOM, OX_LMT_OPPOSITE, -OX_OFFSET, IDOK); + m_pLayoutManager->SetConstraint(GetTabControl()->GetDlgCtrlID(), OX_LMS_TOP, OX_LMT_SAME, OX_OFFSET); + + // Draw the layout with the new constraints + // This is necessary when constraints are implemented and the window must be refreshed + CRect rect; + GetWindowRect(&rect); + GetTabControl()->AdjustRect(FALSE,&rect); + m_pLayoutManager->OnSize(rect.Width(), rect.Height()); + + GetTabControl()->GetWindowRect(&m_rectPage); + GetTabControl()->AdjustRect(FALSE,&m_rectPage); + ScreenToClient(&m_rectPage); + GetActivePage()->MoveWindow(&m_rectPage); + + m_pLayoutManager->RedrawLayout(); + } + + return TRUE; +} + +void CResizingPropSheet::OnSize(UINT nType, int cx, int cy) +{ + CPropertySheet::OnSize(nType, cx, cy); + + if (::IsWindow(m_hWnd) && IsWindowVisible()) + { + // When the parent window (The Property Sheet) is resized we need + // to resize the size of the CTabCtrl that is contained within the + // control. The OK and Cancel buttons are resized by the Layout + // Manager. + + m_pLayoutManager->OnSize(cx, cy); + + GetTabControl()->GetWindowRect(&m_rectPage); + GetTabControl()->AdjustRect(FALSE, &m_rectPage); + + ScreenToClient(&m_rectPage); + GetActivePage()->MoveWindow(&m_rectPage); + } +} + +BOOL CResizingPropSheet::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) +{ + BOOL bResult = CPropertySheet::OnNotify(wParam, lParam, pResult); + + if (bResult) + { + NMHDR* pnmh = (LPNMHDR) lParam; + + // the sheet resizes the page whenever it is activated + // so we need to resize it to what we want + if (pnmh->code == TCN_SELCHANGE) + { + // user-defined message needs to be posted because page must + // be resized after TCN_SELCHANGE has been processed + GetActivePage()->MoveWindow(&m_rectPage); + } + } + + return bResult; +} + +BOOL CResizingPropSheet::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_LAYOUTTYPE)); + ASSERT(cs.lpszClass); + + return CPropertySheet::PreCreateWindow(cs); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.h new file mode 100644 index 0000000..37e4fcf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/ResizingPropSheet.h @@ -0,0 +1,61 @@ +// ResizingPropSheet.h : header file +// +// This class defines custom modal property sheet +// CResizingPropSheet. + +#ifndef __RESIZINGPROPSHEET_H__ +#define __RESIZINGPROPSHEET_H__ + +#include "ResizingPropPage.h" + +///////////////////////////////////////////////////////////////////////////// +// CResizingPropSheet + +class COXLayoutManager; + +class CResizingPropSheet : public CPropertySheet +{ + DECLARE_DYNAMIC(CResizingPropSheet) + +// Construction +public: + CResizingPropSheet(CWnd* pWndParent = NULL); + +// Attributes +public: + CResizingPropPage1 m_Page1; + CResizingPropPage2 m_Page2; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResizingPropSheet) + public: + virtual BOOL OnInitDialog(); + protected: + virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CResizingPropSheet(); + +protected: + COXLayoutManager* m_pLayoutManager; + CRect m_rectPage; + +// Generated message map functions +protected: + //{{AFX_MSG(CResizingPropSheet) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +#endif // __RESIZINGPROPSHEET_H__ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.cpp new file mode 100644 index 0000000..4bed67a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Layout.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.h new file mode 100644 index 0000000..cff3b92 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__7D955F2A_0A9F_11D2_88B8_0080C859A484__INCLUDED_) +#define AFX_STDAFX_H__7D955F2A_0A9F_11D2_88B8_0080C859A484__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__7D955F2A_0A9F_11D2_88B8_0080C859A484__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.rc2 new file mode 100644 index 0000000..727c2db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Layout.rc2 @@ -0,0 +1,13 @@ +// +// LAYOUT.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/LayoutDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/LayoutDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/LayoutDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Toolbar.bmp new file mode 100644 index 0000000..8c33343 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/resource.h new file mode 100644 index 0000000..f6e6f56 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Layout/resource.h @@ -0,0 +1,39 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Layout.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_LAYOUT_FORM 101 +#define IDS_PROPSHT_CAPTION 102 +#define IDD_PAGE1 107 +#define IDR_MAINFRAME 128 +#define IDR_LAYOUTTYPE 129 +#define IDD_RESIZING_DIALOG 131 +#define IDD_PAGE2 132 +#define IDC_EDIT 1000 +#define IDC_BUTTON 1001 +#define IDC_TREE 1002 +#define IDC_LIST 1003 +#define IDC_PICTURE 1004 +#define IDC_FRAME 1005 +#define IDC_PROGRESS 1006 +#define IDC_SLIDER 1008 +#define IDC_COMBO 1009 +#define IDC_TEXT 1010 +#define IDC_RADIO 1011 +#define IDC_PICTURE2 1012 +#define IDM_SHOW_DIALOG 32771 +#define IDM_SHOW_PROPPAGE 32772 +#define ID_DESCRIPTION_FILE 57638 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 137 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1020 +#define _APS_NEXT_SYMED_VALUE 108 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.cpp new file mode 100644 index 0000000..8d1d04f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.cpp @@ -0,0 +1,162 @@ +// DlgDemo.cpp : implementation file +// + +#include "stdafx.h" +#include "LayoutManager.h" +#include "DlgDemo.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDlgDemo dialog + + +CDlgDemo::CDlgDemo(CWnd* pParent /*=NULL*/) + : CDialog(CDlgDemo::IDD, pParent) +{ + //{{AFX_DATA_INIT(CDlgDemo) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CDlgDemo::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDlgDemo) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CDlgDemo, CDialog) + //{{AFX_MSG_MAP(CDlgDemo) + ON_BN_CLICKED(IDC_BUTTON1, OnButton1) + ON_BN_CLICKED(IDC_BUTTON2, OnButton2) + ON_BN_CLICKED(IDC_BUTTON3, OnButton3) + ON_BN_CLICKED(IDC_BUTTON4, OnButton4) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDlgDemo message handlers + +BOOL CDlgDemo::OnInitDialog() +{ + CDialog::OnInitDialog(); + + m_LayoutManager.Attach(this); + m_LayoutManager.AddChild(IDC_BUTTON3); + + + // Constrain button2 to the right and left sides of buttons 1 and 3 respectively + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_LEFT, OX_LMT_OPPOSITE, 10, IDC_BUTTON1); + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -10, IDC_BUTTON3); + + // Constrain the bottom of button 3 to the top of button 4 + // This is used for vertical resize. (button4 will never be hidden by button3) + + m_LayoutManager.RemoveConstraint(IDC_BUTTON3, OX_LMS_LEFT); + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_RIGHT, OX_LMT_SAME, -10); + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_BOTTOM, OX_LMT_OPPOSITE, -10, IDC_BUTTON4); + + // Make button 4 start at the left of button1 and end at the right of button3 + m_LayoutManager.SetConstraint(IDC_BUTTON4, OX_LMS_LEFT, OX_LMT_SAME, 0, IDC_BUTTON1); + m_LayoutManager.SetConstraint(IDC_BUTTON4, OX_LMS_RIGHT, OX_LMT_SAME, 0, IDC_BUTTON3); + + // Make button 4 10 below button1 and 10 above the botton of the window + m_LayoutManager.SetConstraint(IDC_BUTTON4, OX_LMS_TOP, OX_LMT_OPPOSITE, 10, IDC_BUTTON1); + m_LayoutManager.SetConstraint(IDC_BUTTON4, OX_LMS_BOTTOM, OX_LMT_SAME, -10); + + // Set the minimum size of the window + m_LayoutManager.SetMinMax(IDC_BUTTON2, CSize(40,0)); + m_LayoutManager.SetMinMax(IDC_BUTTON4, CSize(0,60), CSize(0,0)); + + // Draw the layout with the new constraints + // This is necessary when constraints are implemented and the window must be refreshed + m_LayoutManager.RedrawLayout(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CDlgDemo::OnButton1() + { + // Set buttons 1,2,3 to have a default constraint (windows default) + m_LayoutManager.SetDefaultConstraint(IDC_BUTTON1); + m_LayoutManager.SetDefaultConstraint(IDC_BUTTON2); + m_LayoutManager.SetDefaultConstraint(IDC_BUTTON3); + + m_LayoutManager.RedrawLayout(); + MessageBox(_T("Buttons 1,2,3 have default behavior")); + } + +void CDlgDemo::OnButton2() + { + // Constrain button 1 to 10 points from the left of the window + // Remove any constraints on the right of button1 + m_LayoutManager.SetConstraint(IDC_BUTTON1, OX_LMS_LEFT, OX_LMT_SAME, 10); + m_LayoutManager.RemoveConstraint(IDC_BUTTON1, OX_LMS_RIGHT); + + //Constrain the left of button 2 to the right of button1 + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_LEFT, OX_LMT_OPPOSITE, 10, IDC_BUTTON1); + //Constrain the right of button2 to the left of button3 + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -10, IDC_BUTTON3); + + // Remove any constraints on the left of button3 + m_LayoutManager.RemoveConstraint(IDC_BUTTON3, OX_LMS_LEFT); + // Constrain the right of button3 to the right of the window + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_RIGHT, OX_LMT_SAME, -10); + + m_LayoutManager.RedrawLayout(); + MessageBox(_T("Button3's left side will be free.\nButton2 will stretch between buttons 1 and 3")); + } + +void CDlgDemo::OnButton3() + { + //Button1 will be 10 points from the left of the window + m_LayoutManager.SetConstraint(IDC_BUTTON1, OX_LMS_LEFT, OX_LMT_SAME, 10); + //Free the right side of button1 + m_LayoutManager.RemoveConstraint(IDC_BUTTON1, OX_LMS_RIGHT); + + // The following code will cause button2 to stretch between button1 and button 3 + // if the right of button1 or the left of button2 is moved + // Button2's left side will be constrained to the right of button1 + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_LEFT, OX_LMT_OPPOSITE, 10, IDC_BUTTON1); + // Button2's right side will be constrained to the left of button3 + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -10, IDC_BUTTON3); + + // The following code will cause the left of button3 to remain stationary while the right + // moves with the resizing of the window. This causes button 3 to stretch with the window + // Button3 will have default constraints + m_LayoutManager.SetDefaultConstraint(IDC_BUTTON3); + // Button3's right side will be constrained to the right of the window + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_RIGHT, OX_LMT_SAME, -10); + + m_LayoutManager.RedrawLayout(); + MessageBox(_T("Button3's left side will be constrainted to the container's left side.\nButton3 will stretch between button2 and the windows right side")); + } + +void CDlgDemo::OnButton4() + { + + // Button1's right side will be 33 percent of the way accross the window + m_LayoutManager.SetConstraint(IDC_BUTTON1, OX_LMS_LEFT, OX_LMT_SAME, 10); + m_LayoutManager.SetConstraint(IDC_BUTTON1, OX_LMS_RIGHT, OX_LMT_POSITION, 33); + + // Button2 will be between buttons 1 and 3. Since button1 and 3 occupy 66 percent of the window between + // then (0-33,66-100) button 2 will also occupy 33 percent of the space (33-66) + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_LEFT, OX_LMT_OPPOSITE, 5, IDC_BUTTON1); + m_LayoutManager.SetConstraint(IDC_BUTTON2, OX_LMS_RIGHT, OX_LMT_OPPOSITE, -5, IDC_BUTTON3); + + // Button3's left side will be 66 percent of the way accross the window + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_LEFT, OX_LMT_POSITION, 66); + m_LayoutManager.SetConstraint(IDC_BUTTON3, OX_LMS_RIGHT, OX_LMT_SAME, -10); + + m_LayoutManager.RedrawLayout(); + MessageBox(_T("Buttons 1,2,3 will be equally constrained")); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.h new file mode 100644 index 0000000..0e40721 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/DlgDemo.h @@ -0,0 +1,42 @@ +// DlgDemo.h : header file +// +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// +// CDlgDemo dialog + +class CDlgDemo : public CDialog +{ +// Construction +public: + CDlgDemo(CWnd* pParent = NULL); // standard constructor + + COXLayoutManager m_LayoutManager; + +// Dialog Data + //{{AFX_DATA(CDlgDemo) + enum { IDD = IDD_DEMO }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDlgDemo) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CDlgDemo) + virtual BOOL OnInitDialog(); + afx_msg void OnButton1(); + afx_msg void OnButton2(); + afx_msg void OnButton3(); + afx_msg void OnButton4(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.clw new file mode 100644 index 0000000..c1e3e47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.clw @@ -0,0 +1,77 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CLayoutManagerApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "layoutmanager.h" +LastPage=0 + +ClassCount=5 +Class1=CDlgDemo +Class2=CLayoutManagerApp +Class3=CMainFrame +Class4=CLayoutManagerDoc +Class5=CLayoutManagerView + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_DEMO (Neutral) + +[CLS:CDlgDemo] +Type=0 +BaseClass=CDialog +HeaderFile=DlgDemo.h +ImplementationFile=DlgDemo.cpp +LastObject=CDlgDemo +Filter=D +VirtualFilter=dWC + +[CLS:CLayoutManagerApp] +Type=0 +BaseClass=CWinApp +HeaderFile=LayoutManager.h +ImplementationFile=LayoutManager.cpp +LastObject=CLayoutManagerApp +Filter=N +VirtualFilter=AC + +[CLS:CLayoutManagerDoc] +Type=0 +BaseClass=CDocument +HeaderFile=LayoutManagerDoc.h +ImplementationFile=LayoutManagerDoc.cpp + +[CLS:CLayoutManagerView] +Type=0 +BaseClass=CView +HeaderFile=LayoutManagerView.h +ImplementationFile=LayoutManagerView.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=CFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[DLG:IDD_DEMO] +Type=1 +Class=CDlgDemo + +[DLG:IDD_DEMO (Neutral)] +Type=1 +Class=CDlgDemo +ControlCount=4 +Control1=IDC_BUTTON1,button,1342242816 +Control2=IDC_BUTTON2,button,1342242816 +Control3=IDC_BUTTON3,button,1342242816 +Control4=IDC_BUTTON4,button,1342242816 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_APP_EXIT +Command2=ID_APP_ABOUT +CommandCount=2 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.cpp new file mode 100644 index 0000000..56b67b0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.cpp @@ -0,0 +1,109 @@ +// LayoutManager.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "LayoutManager.h" +#include "UTSampleAbout.h" +#include "MainFrm.h" +#include "LayoutManagerDoc.h" +#include "LayoutManagerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerApp + +BEGIN_MESSAGE_MAP(CLayoutManagerApp, CWinApp) + //{{AFX_MSG_MAP(CLayoutManagerApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerApp construction + +CLayoutManagerApp::CLayoutManagerApp() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CLayoutManagerApp object + +CLayoutManagerApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerApp initialization + +BOOL CLayoutManagerApp::InitInstance() +{ + // Standard initialization + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + LoadStdProfileSettings(0); // Load standard INI file options (including MRU) + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Register document templates + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CLayoutManagerDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CLayoutManagerView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + return TRUE; +} + +// App command to run the dialog +void CLayoutManagerApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerApp commands + +int CLayoutManagerApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsp new file mode 100644 index 0000000..fe2b138 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsp @@ -0,0 +1,285 @@ +# Microsoft Developer Studio Project File - Name="LayoutManager" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=LayoutManager - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "LayoutManager.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "LayoutManager.mak" CFG="LayoutManager - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LayoutManager - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "LayoutManager - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "LayoutManager - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "LayoutManager - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "LayoutManager - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "LayoutManager - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"LayoutManager.exe" + +!ELSEIF "$(CFG)" == "LayoutManager - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"LayoutManager.exe" + +!ELSEIF "$(CFG)" == "LayoutManager - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "LayoutMa" +# PROP BASE Intermediate_Dir "LayoutMa" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"LayoutManager.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"LayoutManager.exe" + +!ELSEIF "$(CFG)" == "LayoutManager - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "LayoutM0" +# PROP BASE Intermediate_Dir "LayoutM0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"LayoutManager.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"LayoutManager.exe" + +!ELSEIF "$(CFG)" == "LayoutManager - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "LayoutM1" +# PROP BASE Intermediate_Dir "LayoutM1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"LayoutManager.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"LayoutManager.exe" + +!ENDIF + +# Begin Target + +# Name "LayoutManager - Win32 Release" +# Name "LayoutManager - Win32 Debug" +# Name "LayoutManager - Win32 Release_Shared" +# Name "LayoutManager - Win32 Unicode_Debug" +# Name "LayoutManager - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\DlgDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\LayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=.\LayoutManager.rc +# End Source File +# Begin Source File + +SOURCE=.\LayoutManagerDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\LayoutManagerView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\DlgDemo.h +# End Source File +# Begin Source File + +SOURCE=.\LayoutManager.h +# End Source File +# Begin Source File + +SOURCE=.\LayoutManagerDoc.h +# End Source File +# Begin Source File + +SOURCE=.\LayoutManagerView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon2.ico +# End Source File +# Begin Source File + +SOURCE=.\res\LayoutManager.ico +# End Source File +# Begin Source File + +SOURCE=.\res\LayoutManager.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\LayoutManagerDoc.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\LayoutManager.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsw new file mode 100644 index 0000000..97365ee --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "LayoutManager"=".\LayoutManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/LayoutManager", FCIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.h new file mode 100644 index 0000000..22a2926 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.h @@ -0,0 +1,37 @@ +// LayoutManager.h : main header file for the LAYOUTMANAGER application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerApp: +// See LayoutManager.cpp for the implementation of this class +// + +class CLayoutManagerApp : public CWinApp +{ +public: + CLayoutManagerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutManagerApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CLayoutManagerApp) + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.rc new file mode 100644 index 0000000..2f3f679 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.rc @@ -0,0 +1,227 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DEMO DIALOG 0, 0, 192, 117 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Windows Default",IDC_BUTTON1,7,7,72,26 + PUSHBUTTON "Stretch Me",IDC_BUTTON2,83,7,50,26 + PUSHBUTTON "Stretch Me",IDC_BUTTON3,135,7,50,26 + PUSHBUTTON "Stretch All",IDC_BUTTON4,7,40,50,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DEMO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 185 + TOPMARGIN, 7 + BOTTOMMARGIN, 110 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\LayoutManager.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "#endif\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\\LayoutManager.ico" +IDR_LAYOUTTYPE ICON "res\\LayoutManagerDoc.ico" +IDI_ICON1 ICON "res\\icon1.ico" +IDI_ICON2 ICON "res\\icon2.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About LayoutManager...", ID_APP_ABOUT + END +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 "040904B0" + BEGIN + VALUE "FileDescription", "LAYOUTMANAGER MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "LAYOUTMANAGER" + VALUE "LegalCopyright", "Copyright © 1997" + VALUE "OriginalFilename", "LAYOUTMANAGER.EXE" + VALUE "ProductName", "LAYOUTMANAGER Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "LayoutManager" + IDR_LAYOUTTYPE "LayoutManager\n\nLayout\n\n\nLayoutManager.Document\nLayout Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "LayoutManager" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_DESCRIPTION_FILE "LayoutManagerInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\LayoutManager.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.vcproj new file mode 100644 index 0000000..99cd066 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManager.vcproj @@ -0,0 +1,1038 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.cpp new file mode 100644 index 0000000..5355a82 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.cpp @@ -0,0 +1,73 @@ +// LayoutManagerDoc.cpp : implementation of the CLayoutManagerDoc class +// + +#include "stdafx.h" +#include "LayoutManager.h" + +#include "LayoutManagerDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerDoc + +IMPLEMENT_DYNCREATE(CLayoutManagerDoc, CDocument) + +BEGIN_MESSAGE_MAP(CLayoutManagerDoc, CDocument) + //{{AFX_MSG_MAP(CLayoutManagerDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerDoc construction/destruction + +CLayoutManagerDoc::CLayoutManagerDoc() +{ +} + +CLayoutManagerDoc::~CLayoutManagerDoc() +{ +} + +BOOL CLayoutManagerDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerDoc serialization + +void CLayoutManagerDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + } + else + { + } +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerDoc diagnostics + +#ifdef _DEBUG +void CLayoutManagerDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CLayoutManagerDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.h new file mode 100644 index 0000000..b8badc6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerDoc.h @@ -0,0 +1,43 @@ +// LayoutManagerDoc.h : interface of the CLayoutManagerDoc class +// + +///////////////////////////////////////////////////////////////////////////// + +class CLayoutManagerDoc : public CDocument +{ +protected: // create from serialization only + CLayoutManagerDoc(); + DECLARE_DYNCREATE(CLayoutManagerDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutManagerDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLayoutManagerDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CLayoutManagerDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerInfo.rtf new file mode 100644 index 0000000..e865f0a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.cpp new file mode 100644 index 0000000..4511aac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.cpp @@ -0,0 +1,104 @@ +// LayoutManagerView.cpp : implementation of the CLayoutManagerView class +// + +#include "stdafx.h" +#include "LayoutManager.h" + +#include "LayoutManagerDoc.h" +#include "LayoutManagerView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerView + +IMPLEMENT_DYNCREATE(CLayoutManagerView, CView) + +BEGIN_MESSAGE_MAP(CLayoutManagerView, CView) + //{{AFX_MSG_MAP(CLayoutManagerView) + ON_WM_ERASEBKGND() + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerView construction/destruction + +CLayoutManagerView::CLayoutManagerView() +{ +} + +CLayoutManagerView::~CLayoutManagerView() +{ +} + +BOOL CLayoutManagerView::PreCreateWindow(CREATESTRUCT& cs) +{ + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerView drawing + +void CLayoutManagerView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + CLayoutManagerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); +} + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerView diagnostics + +#ifdef _DEBUG +void CLayoutManagerView::AssertValid() const +{ + CView::AssertValid(); +} + +void CLayoutManagerView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CLayoutManagerDoc* CLayoutManagerView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLayoutManagerDoc))); + return (CLayoutManagerDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLayoutManagerView message handlers + +void CLayoutManagerView::OnInitialUpdate() +{ + CView::OnInitialUpdate(); + + m_dlgDemo.ShowWindow(SW_SHOW); + m_LayoutManager.Attach(this); + m_LayoutManager.SetConstraint(&m_dlgDemo, OX_LMS_ANY, OX_LMT_SAME); + m_LayoutManager.RedrawLayout(); +} + +BOOL CLayoutManagerView::OnEraseBkgnd(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + return 0; +} + +int CLayoutManagerView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + m_dlgDemo.Create(IDD_DEMO, this); + m_dlgDemo.SetDlgCtrlID(IDD_DEMO); + + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.h new file mode 100644 index 0000000..1a4dfc3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/LayoutManagerView.h @@ -0,0 +1,56 @@ +// LayoutManagerView.h : interface of the CLayoutManagerView class +// +#include "DlgDemo.h" +#include "OXLayoutManager.h" + +///////////////////////////////////////////////////////////////////////////// + +class CLayoutManagerView : public CView +{ +protected: // create from serialization only + CLayoutManagerView(); + DECLARE_DYNCREATE(CLayoutManagerView) + +// Attributes +public: + CLayoutManagerDoc* GetDocument(); + CDlgDemo m_dlgDemo; + COXLayoutManager m_LayoutManager; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLayoutManagerView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLayoutManagerView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CLayoutManagerView) + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in LayoutManagerView.cpp +inline CLayoutManagerDoc* CLayoutManagerView::GetDocument() + { return (CLayoutManagerDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.cpp new file mode 100644 index 0000000..6eb008a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.cpp @@ -0,0 +1,58 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "LayoutManager.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ +} + +CMainFrame::~CMainFrame() +{ +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + return CFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.h new file mode 100644 index 0000000..721736d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/MainFrm.h @@ -0,0 +1,38 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CFrameWnd +{ +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.cpp new file mode 100644 index 0000000..b82b2be --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// LayoutManager.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.h new file mode 100644 index 0000000..8a56c1d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT +#include + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.rc2 new file mode 100644 index 0000000..7f557ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManager.rc2 @@ -0,0 +1,13 @@ +// +// LAYOUTMANAGER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManagerDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManagerDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/LayoutManagerDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon1.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon2.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon2.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/res/icon2.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/resource.h new file mode 100644 index 0000000..ec5045b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/LayoutManager/resource.h @@ -0,0 +1,32 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by LayoutManager.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_LAYOUTTYPE 129 +#define IDD_DEMO 130 +#define IDI_ICON1 131 +#define IDI_ICON2 132 +#define IDC_BUTTON1 1000 +#define IDC_BUTTON2 1001 +#define IDC_BUTTON3 1002 +#define IDC_BUTTON4 1003 +#define IDC_BUTTON5 1004 +#define IDC_BUTTON6 1005 +#define IDC_BUTTON7 1006 +#define IDC_BUTTON8 1007 +#define IDC_BUTTON9 1008 +#define ID_DESCRIPTION_FILE 57666 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_SYMED_VALUE 106 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.clw new file mode 100644 index 0000000..6b47532 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.clw @@ -0,0 +1,143 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMonthCalendarApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "MonthCalendar.h" + +ClassCount=2 +Class1=CMonthCalendarApp +Class2=CMonthCalendarDlg + +ResourceCount=4 +Resource1=IDD_ABOUTBOX (English (U.S.)) +Resource2=IDR_MAINFRAME +Resource3=IDD_MONTHCALENDAR_DIALOG +Resource4=IDD_MONTHCALENDAR_DIALOG (English (U.S.)) + +[CLS:CMonthCalendarApp] +Type=0 +HeaderFile=MonthCalendar.h +ImplementationFile=MonthCalendar.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CMonthCalendarApp + +[CLS:CMonthCalendarDlg] +Type=0 +HeaderFile=MonthCalendarDlg.h +ImplementationFile=MonthCalendarDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CMonthCalendarDlg + +[DLG:IDD_MONTHCALENDAR_DIALOG] +Type=1 +Class=CMonthCalendarDlg +ControlCount=44 +Control1=IDC_MONTHCAL,static,1342308352 +Control2=IDC_CHECK_DAYSTATE,button,1342242819 +Control3=IDC_CHECK_MULTISELECT,button,1342242819 +Control4=IDC_CHECK_NOTODAY,button,1342242819 +Control5=IDC_CHECK_NOTODAYCIRCLE,button,1342242819 +Control6=IDC_CHECK_WEEKNUMBERS,button,1342242819 +Control7=IDC_CHECK_BOLDHOLIDAYS,button,1342242819 +Control8=IDC_CHECK_INFOTIP,button,1342242819 +Control9=IDC_BUTTON_CLRBK,button,1342242827 +Control10=IDC_BUTTON_CLRTEXT,button,1342242827 +Control11=IDC_BUTTON_CLRMONTHBK,button,1342243083 +Control12=IDC_BUTTON_CLRTITLETEXT,button,1342242827 +Control13=IDC_BUTTON_CLRTITLEBK,button,1342243083 +Control14=IDC_BUTTON_CLRTRAILINGTEXT,button,1342242827 +Control15=IDC_COMBO_DIMENSION,combobox,1344339971 +Control16=IDC_COMBO_FIRSTDAY,combobox,1344339971 +Control17=IDC_EDIT_SCROLLRATE,edit,1350631552 +Control18=IDC_SPIN_SCROLLRATE,msctls_updown32,1342177462 +Control19=IDC_BUTTON_FONTNAME,button,1342242816 +Control20=IDC_EDIT_MAXSEL,edit,1350631552 +Control21=IDC_SPIN_MAXSEL,msctls_updown32,1342177462 +Control22=IDC_APPLY,button,1342242816 +Control23=IDC_RESTORE,button,1342242816 +Control24=IDCANCEL,button,1342242817 +Control25=IDC_STYLES,button,1342177287 +Control26=IDC_COLORS,button,1342177287 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,static,1342308352 +Control34=IDC_STATIC,static,1342308352 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,static,1342308352 +Control37=IDC_STATIC,static,1342308352 +Control38=IDC_SELECTION,static,1342312448 +Control39=IDC_STATIC,static,1342308352 +Control40=IDC_STATIC,static,1342308352 +Control41=IDC_RANGEFROM,static,1342312448 +Control42=IDC_STATIC,static,1342308352 +Control43=IDC_RANGETO,static,1342312448 +Control44=IDC_STATIC_FONTNAME,static,1342312960 + +[DLG:IDD_MONTHCALENDAR_DIALOG (English (U.S.))] +Type=1 +Class=CMonthCalendarDlg +ControlCount=44 +Control1=IDC_MONTHCAL,static,1342308352 +Control2=IDC_CHECK_DAYSTATE,button,1342242819 +Control3=IDC_CHECK_MULTISELECT,button,1342242819 +Control4=IDC_CHECK_NOTODAY,button,1342242819 +Control5=IDC_CHECK_NOTODAYCIRCLE,button,1342242819 +Control6=IDC_CHECK_WEEKNUMBERS,button,1342242819 +Control7=IDC_CHECK_BOLDHOLIDAYS,button,1342242819 +Control8=IDC_CHECK_INFOTIP,button,1342242819 +Control9=IDC_BUTTON_CLRBK,button,1342242827 +Control10=IDC_BUTTON_CLRTEXT,button,1342242827 +Control11=IDC_BUTTON_CLRMONTHBK,button,1342243083 +Control12=IDC_BUTTON_CLRTITLETEXT,button,1342242827 +Control13=IDC_BUTTON_CLRTITLEBK,button,1342243083 +Control14=IDC_BUTTON_CLRTRAILINGTEXT,button,1342242827 +Control15=IDC_COMBO_DIMENSION,combobox,1344339971 +Control16=IDC_COMBO_FIRSTDAY,combobox,1344339971 +Control17=IDC_EDIT_SCROLLRATE,edit,1350631552 +Control18=IDC_SPIN_SCROLLRATE,msctls_updown32,1342177462 +Control19=IDC_BUTTON_FONTNAME,button,1342242816 +Control20=IDC_EDIT_MAXSEL,edit,1350631552 +Control21=IDC_SPIN_MAXSEL,msctls_updown32,1342177462 +Control22=IDC_APPLY,button,1342242816 +Control23=IDC_RESTORE,button,1342242816 +Control24=IDCANCEL,button,1342242817 +Control25=IDC_STYLES,button,1342177287 +Control26=IDC_COLORS,button,1342177287 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,static,1342308352 +Control34=IDC_STATIC,static,1342308352 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,static,1342308352 +Control37=IDC_STATIC,static,1342308352 +Control38=IDC_SELECTION,static,1342312448 +Control39=IDC_STATIC,static,1342308352 +Control40=IDC_STATIC,static,1342308352 +Control41=IDC_RANGEFROM,static,1342312448 +Control42=IDC_STATIC,static,1342308352 +Control43=IDC_RANGETO,static,1342312448 +Control44=IDC_STATIC_FONTNAME,static,1342312960 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.cpp new file mode 100644 index 0000000..5440559 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.cpp @@ -0,0 +1,102 @@ +// MonthCalendar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "MonthCalendar.h" +#include "MonthCalendarDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarApp + +BEGIN_MESSAGE_MAP(CMonthCalendarApp, CWinApp) + //{{AFX_MSG_MAP(CMonthCalendarApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarApp construction + +CMonthCalendarApp::CMonthCalendarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMonthCalendarApp object + +CMonthCalendarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarApp initialization + +BOOL CMonthCalendarApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CMonthCalendarDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CMonthCalendarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsp new file mode 100644 index 0000000..6c5cc79 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsp @@ -0,0 +1,300 @@ +# Microsoft Developer Studio Project File - Name="MonthCalendar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MonthCalendar - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MonthCalendar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MonthCalendar.mak" CFG="MonthCalendar - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MonthCalendar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MonthCalendar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MonthCalendar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "MonthCalendar - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "MonthCalendar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MonthCalendar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MonthCalendar.exe" + +!ELSEIF "$(CFG)" == "MonthCalendar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MonthCalendar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "MonthCalendar - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MonthCalendar.exe" + +!ELSEIF "$(CFG)" == "MonthCalendar - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MonthCal" +# PROP BASE Intermediate_Dir "MonthCal" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MonthCalendar.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"MonthCalendar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "MonthCalendar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MonthCa0" +# PROP BASE Intermediate_Dir "MonthCa0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MonthCalendar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"MonthCalendar.exe" + +!ENDIF + +# Begin Target + +# Name "MonthCalendar - Win32 Release" +# Name "MonthCalendar - Win32 Debug" +# Name "MonthCalendar - Win32 Release_Shared" +# Name "MonthCalendar - Win32 Unicode_Debug" +# Name "MonthCalendar - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMonthCalCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MonthCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=.\MonthCalendar.rc +# End Source File +# Begin Source File + +SOURCE=.\MonthCalendarDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\MonthCalendar.h +# End Source File +# Begin Source File + +SOURCE=.\MonthCalendarDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMonthCalCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPopupBarCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\MonthCalendar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\MonthCalendar.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MonthCalendar.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsw new file mode 100644 index 0000000..586d7b8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MonthCalendar"=".\MonthCalendar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/MonthCalendar", CEIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.h new file mode 100644 index 0000000..8e66924 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.h @@ -0,0 +1,50 @@ +// MonthCalendar.h : main header file for the MONTHCALENDAR application +// + +#if !defined(AFX_MONTHCALENDAR_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_MONTHCALENDAR_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarApp: +// See MonthCalendar.cpp for the implementation of this class +// + +class CMonthCalendarApp : public CWinApp +{ +public: + CMonthCalendarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMonthCalendarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CMonthCalendarApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MONTHCALENDAR_H__3F275487_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.rc new file mode 100644 index 0000000..566e22c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.rc @@ -0,0 +1,250 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MONTHCALENDAR_DIALOG DIALOGEX 0, 0, 450, 290 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "MonthCalendar" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "",IDC_MONTHCAL,8,8,282,192,0,WS_EX_CLIENTEDGE + CONTROL "MCS_DAYSTATE",IDC_CHECK_DAYSTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,16,73,10 + CONTROL "MCS_MULTISELECT",IDC_CHECK_MULTISELECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,30,85,10 + CONTROL "MCS_NOTODAY",IDC_CHECK_NOTODAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,44,71,10 + CONTROL "MCS_NOTODAYCIRCLE",IDC_CHECK_NOTODAYCIRCLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,58,96,10 + CONTROL "MCS_WEEKNUMBERS",IDC_CHECK_WEEKNUMBERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,72,93,10 + CONTROL "OXMCS_BOLDHOLIDAYS",IDC_CHECK_BOLDHOLIDAYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,86,101,10 + CONTROL "OXMCS_INFOTIP",IDC_CHECK_INFOTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,100,73,10 + CONTROL "\nSpecifies background color displayed between months",IDC_BUTTON_CLRBK, + "Button",BS_OWNERDRAW | WS_TABSTOP,304,154,61,16 + CONTROL "\nSpecifies background color displayed text within a month",IDC_BUTTON_CLRTEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,377,154,61,16 + CONTROL "\nSpecifies background color displayed within months",IDC_BUTTON_CLRMONTHBK, + "Button",BS_OWNERDRAW | BS_LEFT | WS_TABSTOP,304,194,61,16 + CONTROL "\nSpecifies background color displayed text within calendar's title",IDC_BUTTON_CLRTITLETEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,377,194,61,16 + CONTROL "\nSpecifies background color displayed in the calendar's title",IDC_BUTTON_CLRTITLEBK, + "Button",BS_OWNERDRAW | BS_LEFT | WS_TABSTOP,304,231,61,16 + CONTROL "\nSpecifies background color to display header and trailed-day text",IDC_BUTTON_CLRTRAILINGTEXT, + "Button",BS_OWNERDRAW | WS_TABSTOP,377,231,61,16 + COMBOBOX IDC_COMBO_DIMENSION,60,213,67,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO_FIRSTDAY,60,232,67,76,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_SCROLLRATE,87,251,39,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_SCROLLRATE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,126,251,13,13 + PUSHBUTTON "Font ...",IDC_BUTTON_FONTNAME,7,268,39,13 + EDITTEXT IDC_EDIT_MAXSEL,235,214,39,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_MAXSEL,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,274,214,13,13 + PUSHBUTTON "Apply",IDC_APPLY,296,265,40,14 + PUSHBUTTON "Restore",IDC_RESTORE,350,265,40,14 + DEFPUSHBUTTON "Close",IDCANCEL,403,265,40,14 + GROUPBOX "Styles",IDC_STYLES,295,4,148,111 + GROUPBOX "Colors",IDC_COLORS,295,127,148,130 + LTEXT "Background",IDC_STATIC,304,143,40,8 + LTEXT "Month Background",IDC_STATIC,304,183,62,8 + LTEXT "Text",IDC_STATIC,378,143,15,8 + LTEXT "Title Background",IDC_STATIC,304,221,55,8 + LTEXT "Title Text",IDC_STATIC,378,184,30,8 + LTEXT "Trailing Text",IDC_STATIC,378,221,40,8 + LTEXT "First weekday",IDC_STATIC,7,235,44,8 + LTEXT "Scroll rate (in months)",IDC_STATIC,7,253,68,8 + LTEXT "Max selected",IDC_STATIC,155,215,43,8 + LTEXT "Dimension",IDC_STATIC,7,215,34,8 + LTEXT "Selection",IDC_STATIC,155,236,30,8 + LTEXT "Static",IDC_SELECTION,193,235,81,11,SS_SUNKEN + LTEXT "Selection range",IDC_STATIC,155,252,50,8 + LTEXT "from",IDC_STATIC,156,267,14,8 + LTEXT "Static",IDC_RANGEFROM,173,266,41,11,SS_SUNKEN + LTEXT "to",IDC_STATIC,222,267,8,8 + LTEXT "Static",IDC_RANGETO,233,266,41,11,SS_SUNKEN + LTEXT "Static",IDC_STATIC_FONTNAME,59,269,67,12,SS_CENTERIMAGE | SS_SUNKEN +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 "040904B0" + BEGIN + VALUE "FileDescription", "MonthCalendar MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "MonthCalendar" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "MonthCalendar.EXE" + VALUE "ProductName", "MonthCalendar Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MONTHCALENDAR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 443 + TOPMARGIN, 7 + BOTTOMMARGIN, 283 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About MonthCalendar..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Month Calendar Demo" + ID_DESCRIPTION_FILE "MonthCalendarInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\MonthCalendar.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\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\\MonthCalendar.ico" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\MonthCalendar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.vcproj new file mode 100644 index 0000000..ed4bd68 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendar.vcproj @@ -0,0 +1,1186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.cpp new file mode 100644 index 0000000..53e939e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.cpp @@ -0,0 +1,575 @@ +// MonthCalendarDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "MonthCalendar.h" +#include "MonthCalendarDlg.h" + +#include "UTSampleAbout.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarDlg dialog + +CMonthCalendarDlg::CMonthCalendarDlg(CWnd* pParent /*=NULL*/) + : CDialog(CMonthCalendarDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CMonthCalendarDlg) + m_bBoldHolidays = FALSE; + m_bDayState = FALSE; + m_bMultiselect = FALSE; + m_bNotoday = FALSE; + m_bNotodaycircle = FALSE; + m_bWeeknumbers = FALSE; + m_nMaxSel = 0; + m_nScrollRate = 0; + m_nFirstDay = -1; + m_nDimension = -1; + m_sSelection = _T(""); + m_sRangeFrom = _T(""); + m_sRangeTo = _T(""); + m_bInfoTip = FALSE; + m_sFontName = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_clrTrailingText=RGB(0,0,0); + m_clrTitleText=RGB(0,0,0); + m_clrTitleBk=RGB(0,0,0); + m_clrText=RGB(0,0,0); + m_clrMonthBk=RGB(0,0,0); + m_clrBk=RGB(0,0,0); +} + +void CMonthCalendarDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMonthCalendarDlg) + DDX_Control(pDX, IDC_STATIC_FONTNAME, m_ctlFontName); + DDX_Control(pDX, IDC_COMBO_FIRSTDAY, m_cmbFirstDay); + DDX_Control(pDX, IDC_COMBO_DIMENSION, m_cmbDimension); + DDX_Control(pDX, IDC_BUTTON_CLRTRAILINGTEXT, m_btnClrTrailingText); + DDX_Control(pDX, IDC_BUTTON_CLRTITLETEXT, m_btnClrTitleText); + DDX_Control(pDX, IDC_BUTTON_CLRTITLEBK, m_btnClrTitleBk); + DDX_Control(pDX, IDC_BUTTON_CLRTEXT, m_btnClrText); + DDX_Control(pDX, IDC_BUTTON_CLRMONTHBK, m_btnClrMonthBk); + DDX_Control(pDX, IDC_BUTTON_CLRBK, m_btnClrBk); + DDX_Check(pDX, IDC_CHECK_BOLDHOLIDAYS, m_bBoldHolidays); + DDX_Check(pDX, IDC_CHECK_DAYSTATE, m_bDayState); + DDX_Check(pDX, IDC_CHECK_MULTISELECT, m_bMultiselect); + DDX_Check(pDX, IDC_CHECK_NOTODAY, m_bNotoday); + DDX_Check(pDX, IDC_CHECK_NOTODAYCIRCLE, m_bNotodaycircle); + DDX_Check(pDX, IDC_CHECK_WEEKNUMBERS, m_bWeeknumbers); + DDX_Text(pDX, IDC_EDIT_MAXSEL, m_nMaxSel); + DDX_Text(pDX, IDC_EDIT_SCROLLRATE, m_nScrollRate); + DDX_CBIndex(pDX, IDC_COMBO_FIRSTDAY, m_nFirstDay); + DDX_CBIndex(pDX, IDC_COMBO_DIMENSION, m_nDimension); + DDX_Text(pDX, IDC_SELECTION, m_sSelection); + DDX_Text(pDX, IDC_RANGEFROM, m_sRangeFrom); + DDX_Text(pDX, IDC_RANGETO, m_sRangeTo); + DDX_Check(pDX, IDC_CHECK_INFOTIP, m_bInfoTip); + DDX_Text(pDX, IDC_STATIC_FONTNAME, m_sFontName); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTRAILINGTEXT, m_clrTrailingText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTITLETEXT, m_clrTitleText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTITLEBK, m_clrTitleBk); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRTEXT, m_clrText); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRMONTHBK, m_clrMonthBk); + DDX_ColorPicker(pDX, IDC_BUTTON_CLRBK, m_clrBk); +} + +BEGIN_MESSAGE_MAP(CMonthCalendarDlg, CDialog) + //{{AFX_MSG_MAP(CMonthCalendarDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_APPLY, OnApply) + ON_BN_CLICKED(IDC_RESTORE, OnRestore) + ON_BN_CLICKED(IDC_BUTTON_FONTNAME, OnButtonFontname) + //}}AFX_MSG_MAP + ON_NOTIFY(MCN_SELCHANGE,IDC_MONTHCAL,OnSelChange) + ON_NOTIFY(MCN_SELECT,IDC_MONTHCAL,OnSelect) + ON_NOTIFY(MCN_GETDAYSTATE,IDC_MONTHCAL,OnGetDayState) + ON_NOTIFY(OXMCN_GETDAYSTATE,IDC_MONTHCAL,OnOXGetDayState) + ON_NOTIFY(OXMCN_GETINFOTIP,IDC_MONTHCAL,OnOXGetInfoTip) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarDlg message handlers + +BOOL CMonthCalendarDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // populate combo boxes + // + m_cmbDimension.AddString(_T("One month")); + m_cmbDimension.AddString(_T("2x1 months")); + m_cmbDimension.AddString(_T("1x2 months")); + m_cmbDimension.AddString(_T("2x2 months")); + + m_cmbFirstDay.AddString(_T("Monday")); + m_cmbFirstDay.AddString(_T("Tuesday")); + m_cmbFirstDay.AddString(_T("Wendsday")); + m_cmbFirstDay.AddString(_T("Thursday")); + m_cmbFirstDay.AddString(_T("Friday")); + m_cmbFirstDay.AddString(_T("Saturday")); + m_cmbFirstDay.AddString(_T("Sunday")); + ///////////////////////////// + + // enable tooltips for color picker buttons + // + m_btnClrTrailingText.SetToolTip(TRUE); + m_btnClrTitleText.SetToolTip(TRUE); + m_btnClrTitleBk.SetToolTip(TRUE); + m_btnClrText.SetToolTip(TRUE); + m_btnClrMonthBk.SetToolTip(TRUE); + m_btnClrBk.SetToolTip(TRUE); + ///////////////////////////// + + // create calendar control + // + CWnd *pFrame=GetDlgItem(IDC_MONTHCAL); + CRect rcWnd; + pFrame->GetWindowRect(rcWnd); + pFrame->DestroyWindow(); //pFrame was just a placeholder anyway. + ScreenToClient(rcWnd); + m_ctlMonthCal.Create(WS_CHILD|WS_VISIBLE,rcWnd.TopLeft(),this,IDC_MONTHCAL, + OXMCS_BOLDHOLIDAYS|OXMCS_INFOTIP,2,2); + + HOLIDAYS holidays; + + holidays.nMonth=-1; + holidays.nYear=-1; + holidays.arrWeekDays.AddTail(SATURDAY); + holidays.arrWeekDays.AddTail(SUNDAY); + m_ctlMonthCal.SetHolidays(&holidays); + + holidays.Reset(); + holidays.nMonth=7; + holidays.nYear=-1; + holidays.arrMonthDays.AddTail(FIRST); + m_ctlMonthCal.SetHolidays(&holidays); + ///////////////////////////// + + CFont* pFont=m_ctlMonthCal.GetFont(); + ASSERT(pFont); + VERIFY(pFont->GetLogFont(&m_lfText)); + m_lfText.lfWeight=FW_NORMAL; + + m_sFontName.Format(_T("%d pt, %s"),(ConvertLogUnitToPoint(m_lfText.lfHeight)+5)/10, + m_lfText.lfFaceName); + m_ctlFontName.SetTextLogFont(&m_lfText); + m_ctlFontName.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT)); + + GetVars(); + SetVars(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CMonthCalendarDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CMonthCalendarDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CMonthCalendarDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CMonthCalendarDlg::OnApply() +{ + // TODO: Add your control notification handler code here + + SetVars(); +} + +void CMonthCalendarDlg::OnRestore() +{ + // TODO: Add your control notification handler code here + + GetVars(); +} + +void CMonthCalendarDlg::GetVars() +{ + DWORD dwCalStyle=m_ctlMonthCal.GetMonthCalStyle(); + DWORD dwStyle=m_ctlMonthCal.GetStyle(); + + m_bBoldHolidays=(dwCalStyle&OXMCS_BOLDHOLIDAYS)!=0 ? TRUE : FALSE; + m_bInfoTip=(dwCalStyle&OXMCS_INFOTIP)!=0 ? TRUE : FALSE; + + m_bDayState=(dwStyle&MCS_DAYSTATE)!=0 ? TRUE : FALSE; + m_bMultiselect=(dwStyle&MCS_MULTISELECT)!=0 ? TRUE : FALSE; + m_bNotoday=(dwStyle&MCS_NOTODAY)!=0 ? TRUE : FALSE; +#if (_WIN32_IE >= 0x0400) + m_bNotodaycircle=(dwStyle&MCS_NOTODAYCIRCLE)!=0 ? TRUE : FALSE; +#else + m_bNotodaycircle=FALSE; +#endif + m_bWeeknumbers=(dwStyle&MCS_WEEKNUMBERS)!=0 ? TRUE : FALSE; + + m_nMaxSel=m_ctlMonthCal.GetMaxSelCount(); + m_nScrollRate=m_ctlMonthCal.GetMonthDelta(); + m_nFirstDay=m_ctlMonthCal.GetFirstDayOfWeek(); + + CSize szMonthFitCount; + VERIFY(m_ctlMonthCal.GetMonthFitCount(szMonthFitCount)); + switch(szMonthFitCount.cx*szMonthFitCount.cy) + { + case 1: + m_nDimension=0; + break; + case 2: + if(szMonthFitCount.cy==1) + m_nDimension=1; + else + m_nDimension=2; + break; + case 4: + m_nDimension=3; + break; + default: + ASSERT(FALSE); + } + + m_clrTrailingText=m_ctlMonthCal.GetTrailingTextColor(); + m_clrTitleText=m_ctlMonthCal.GetTitleTextColor(); + m_clrTitleBk=m_ctlMonthCal.GetTitleBkColor(); + m_clrText=m_ctlMonthCal.GetTextColor(); + m_clrMonthBk=m_ctlMonthCal.GetMonthBkColor(); + m_clrBk=m_ctlMonthCal.GetBkColor(); + + GetLatestSelInfo(); + + UpdateData(FALSE); +} + + +void CMonthCalendarDlg::GetLatestSelInfo() +{ + if((m_ctlMonthCal.GetStyle()&MCS_MULTISELECT)!=0) + { + m_sSelection.Empty(); + + COleDateTime ctmin, ctmax; + m_ctlMonthCal.GetSelRange(ctmin,ctmax); + m_sRangeFrom.Format(_T("%02d/%02d/%4d"),ctmin.GetMonth(), + ctmin.GetDay(),ctmin.GetYear()); + m_sRangeTo.Format(_T("%02d/%02d/%4d"),ctmax.GetMonth(), + ctmax.GetDay(),ctmax.GetYear()); + } + else + { + COleDateTime ct; + m_ctlMonthCal.GetCurSel(ct); + m_sSelection.Format(_T("%02d/%02d/%4d"),ct.GetMonth(),ct.GetDay(),ct.GetYear()); + + m_sRangeFrom.Empty(); + m_sRangeTo.Empty(); + } +} + + +void CMonthCalendarDlg::SetVars() +{ + if(!UpdateData(TRUE)) + return; + + if((((m_ctlMonthCal.GetStyle()&MCS_MULTISELECT)!=0)!=m_bMultiselect) || + (((m_ctlMonthCal.GetStyle()&MCS_DAYSTATE)!=0)!=m_bDayState) || + (((m_ctlMonthCal.GetMonthCalStyle()&OXMCS_BOLDHOLIDAYS)!=0)!=m_bBoldHolidays)) + { + // recreate calendar control + // + CWnd *pFrame=GetDlgItem(IDC_MONTHCAL); + CRect rcWnd; + pFrame->GetWindowRect(rcWnd); + pFrame->DestroyWindow(); + ScreenToClient(rcWnd); + m_ctlMonthCal.Create(WS_CHILD|WS_VISIBLE|(m_bMultiselect ? MCS_MULTISELECT : 0)| + (m_bDayState ? MCS_DAYSTATE : 0),rcWnd.TopLeft(),this,IDC_MONTHCAL, + (m_bBoldHolidays ? OXMCS_BOLDHOLIDAYS : 0)); + ///////////////////////////// + } + + if(m_bInfoTip) + m_ctlMonthCal.SetMonthCalStyle(m_ctlMonthCal.GetMonthCalStyle()| + OXMCS_INFOTIP); + else + m_ctlMonthCal.SetMonthCalStyle(m_ctlMonthCal.GetMonthCalStyle()& + ~(OXMCS_INFOTIP)); + + if(m_bNotoday) + m_ctlMonthCal.ModifyStyle(0,MCS_NOTODAY); + else + m_ctlMonthCal.ModifyStyle(MCS_NOTODAY,0); +#if (_WIN32_IE >= 0x0400) + if(m_bNotodaycircle) + m_ctlMonthCal.ModifyStyle(0,MCS_NOTODAYCIRCLE); + else + m_ctlMonthCal.ModifyStyle(MCS_NOTODAYCIRCLE,0); +#endif + if(m_bWeeknumbers) + m_ctlMonthCal.ModifyStyle(0,MCS_WEEKNUMBERS); + else + m_ctlMonthCal.ModifyStyle(MCS_WEEKNUMBERS,0); + + m_ctlMonthCal.SetMaxSelCount(m_nMaxSel); + m_ctlMonthCal.SetMonthDelta(m_nScrollRate); + m_ctlMonthCal.SetFirstDayOfWeek(m_nFirstDay); + + m_ctlMonthCal.SetTrailingTextColor(m_clrTrailingText); + m_ctlMonthCal.SetTitleTextColor(m_clrTitleText); + m_ctlMonthCal.SetTitleBkColor(m_clrTitleBk); + m_ctlMonthCal.SetTextColor(m_clrText); + m_ctlMonthCal.SetMonthBkColor(m_clrMonthBk); + m_ctlMonthCal.SetBkColor(m_clrBk); + + static CFont font; + if((HFONT)font!=NULL) + font.DeleteObject(); + VERIFY(font.CreateFontIndirect(&m_lfText)); + m_ctlMonthCal.SetFont(&font); + + CSize szMargin(4,4); + switch(m_nDimension) + { + case 0: + m_ctlMonthCal.SetCtrlDimension(1,1,szMargin); + break; + case 1: + m_ctlMonthCal.SetCtrlDimension(2,1,szMargin); + break; + case 2: + m_ctlMonthCal.SetCtrlDimension(1,2,szMargin); + break; + case 3: + m_ctlMonthCal.SetCtrlDimension(2,2,szMargin); + break; + default: + ASSERT(FALSE); + } +} + +//Notification handlers for notifications from the COXMonthCalCtrl +void CMonthCalendarDlg::OnGetDayState(NMHDR *pHdr, LRESULT *pRes) +{ + NMDAYSTATE *pds = (NMDAYSTATE*)pHdr; + //this function just bolds the first four days of every visible + //month. + for(int i=0;icDayState;i++) + BOLDDAY(pds->prgDayState[i],15); + *pRes=0; +} + +void CMonthCalendarDlg::OnOXGetDayState(NMHDR *pHdr, LRESULT *pRes) +{ + UNREFERENCED_PARAMETER(pHdr); +// LPOXNMDAYSTATE pds = (LPOXNMDAYSTATE)pHdr; + *pRes=0; +} + +void CMonthCalendarDlg::OnOXGetInfoTip(NMHDR *pHdr, LRESULT *pRes) +{ + LPOXNMMCINFOTIP pInfoTip = (LPOXNMMCINFOTIP)pHdr; + + CString sText=_T(""); + + if(pInfoTip->pMCHitTest->uHit==MCHT_TITLEBTNNEXT) + sText=_T("Button next"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_TITLEBTNPREV) + sText=_T("Button previous"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_TITLEMONTH) + sText=_T("Month name"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_TITLEYEAR) + sText=_T("Year"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_TITLEBK) + sText=_T("Title background"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_NOWHERE) + sText=_T("Nowhere"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARBK) + sText=_T("Calendar background"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARDAY) + sText=_T("Week day"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARWEEKNUM) + sText=_T("Week number"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARDATENEXT) + sText=_T("Date from next month"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARDATEPREV) + sText=_T("Date from previous month"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_CALENDARDATE) + sText=_T("Date from current month"); + else if(pInfoTip->pMCHitTest->uHit==MCHT_TODAYLINK) + sText=_T("Today link"); + + UTBStr::tcsncpy(pInfoTip->szText,countof(pInfoTip->szText), + sText.GetBuffer(sText.GetLength()), countof(pInfoTip->szText)); + sText.ReleaseBuffer(); + + *pRes=0; +} + +void CMonthCalendarDlg::OnSelect(NMHDR *pHdr, LRESULT *pRes) +{ + UNREFERENCED_PARAMETER(pHdr); + + GetLatestSelInfo(); + GetDlgItem(IDC_SELECTION)->SetWindowText(m_sSelection); + + *pRes=0; +} + +void CMonthCalendarDlg::OnSelChange(NMHDR *pHdr, LRESULT *pRes) +{ + UNREFERENCED_PARAMETER(pHdr); + + GetLatestSelInfo(); + GetDlgItem(IDC_RANGEFROM)->SetWindowText(m_sRangeFrom); + GetDlgItem(IDC_RANGETO)->SetWindowText(m_sRangeTo); + + *pRes=0; +} + + +void CMonthCalendarDlg::OnButtonFontname() +{ + // TODO: Add your control notification handler code here + + // Use font common dialog + CFontDialog fontDlg(&m_lfText); + if(fontDlg.DoModal()==IDOK) + { + fontDlg.GetCurrentFont(&m_lfText); + m_sFontName.Format(_T("%d pt, %s"),fontDlg.GetSize()/10,m_lfText.lfFaceName); + m_ctlFontName.SetTextLogFont(&m_lfText); + UpdateData(FALSE); + } +} + +int CMonthCalendarDlg::ConvertPointToLogUnit(const int nPointSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + // convert nPointSize to logical units based on pDC + POINT pt; + pt.y=::GetDeviceCaps(hDC,LOGPIXELSY)*nPointSize; + pt.y/=720; // 72 points/inch, 10 decipoints/point + ::DPtoLP(hDC,&pt,1); + POINT ptOrg = {0,0}; + ::DPtoLP(hDC,&ptOrg,1); + + if(pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return -abs(pt.y-ptOrg.y); +} + +int CMonthCalendarDlg::ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + POINT ptOrg={0,0}; + ::DPtoLP(hDC,&ptOrg,1); + POINT pt={0,0}; + + pt.y=abs(nLogUnitSize)+ptOrg.y; + ::LPtoDP(hDC,&pt,1); + pt.y*=720; // 72 points/inch, 10 decipoints/point + + int nPointSize=(pt.y)/(::GetDeviceCaps(hDC,LOGPIXELSY)); + + if (pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return nPointSize; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.h new file mode 100644 index 0000000..6fcf619 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarDlg.h @@ -0,0 +1,101 @@ +// MonthCalendarDlg.h : header file +// + +#if !defined(AFX_MONTHCALENDARDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_MONTHCALENDARDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXMonthCalCtrl.h" +#include "OXColorPickerButton.h" +#include "OXStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CMonthCalendarDlg dialog + +class CMonthCalendarDlg : public CDialog +{ +// Construction +public: + CMonthCalendarDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CMonthCalendarDlg) + enum { IDD = IDD_MONTHCALENDAR_DIALOG }; + COXStatic m_ctlFontName; + CComboBox m_cmbFirstDay; + CComboBox m_cmbDimension; + COXColorPickerButton m_btnClrTrailingText; + COXColorPickerButton m_btnClrTitleText; + COXColorPickerButton m_btnClrTitleBk; + COXColorPickerButton m_btnClrText; + COXColorPickerButton m_btnClrMonthBk; + COXColorPickerButton m_btnClrBk; + BOOL m_bBoldHolidays; + BOOL m_bDayState; + BOOL m_bMultiselect; + BOOL m_bNotoday; + BOOL m_bNotodaycircle; + BOOL m_bWeeknumbers; + int m_nMaxSel; + int m_nScrollRate; + int m_nFirstDay; + int m_nDimension; + CString m_sSelection; + CString m_sRangeFrom; + CString m_sRangeTo; + BOOL m_bInfoTip; + CString m_sFontName; + //}}AFX_DATA + COLORREF m_clrTrailingText; + COLORREF m_clrTitleText; + COLORREF m_clrTitleBk; + COLORREF m_clrText; + COLORREF m_clrMonthBk; + COLORREF m_clrBk; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMonthCalendarDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + LOGFONT m_lfText; + + COXMonthCalCtrl m_ctlMonthCal; + + void GetVars(); + void GetLatestSelInfo(); + void SetVars(); + + int ConvertPointToLogUnit(const int nPointSize, CDC* pDC=NULL); + int ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC=NULL); + + // Generated message map functions + //{{AFX_MSG(CMonthCalendarDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnApply(); + afx_msg void OnRestore(); + afx_msg void OnButtonFontname(); + //}}AFX_MSG + void OnSelChange(NMHDR *pHdr, LRESULT *pRes); + void OnSelect(NMHDR *pHdr, LRESULT *pRes); + void OnGetDayState(NMHDR *pHdr, LRESULT *pRes); + void OnOXGetDayState(NMHDR *pHdr, LRESULT *pRes); + void OnOXGetInfoTip(NMHDR *pHdr, LRESULT *pRes); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MONTHCALENDARDLG_H__3F275489_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarInfo.rtf new file mode 100644 index 0000000..2e02468 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/MonthCalendarInfo.rtf @@ -0,0 +1,54 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;} +{\f37\froman\fcharset238\fprq2 Times New Roman CE;}{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable +{\list\listtemplateid-1261958360\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}}{\listname ;}\listid-2}}{\*\listoverridetable{\listoverride\listid-2 +\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelold\levelspace0\levelindent360{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 }}\ls1}}{\*\rsidtbl \rsid6167666 +\rsid16608358}{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr15\min49}{\revtim\yr2005\mo1\dy17\hr15\min49}{\version3}{\edmins0}{\nofpages2}{\nofwords440}{\nofchars2514} +{\*\company Dundas India}{\nofcharsws2949}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot6167666 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\lang4105\langfe1033\langnp4105\insrsid16608358 COXMonthCalCtrl}{\b\fs48\lang4105\langfe1033\langnp4105\insrsid16608358 +\par }{\b\fs16\lang4105\langfe1033\langnp4105\insrsid16608358 Copyright \'a9 }{\b\fs16\lang4105\langfe1033\langnp4105\insrsid6167666 The Code Project}{\b\fs16\lang4105\langfe1033\langnp4105\insrsid16608358 1997 - 1998, All Rights Reserved +\par }{\b\lang4105\langfe1033\langnp4105\insrsid16608358 +\par include }{\lang4105\langfe1033\langnp4105\insrsid16608358 +\par +\par A COXMonthCalCtrl object encapsulates the functionality of a month calendar control. The month calendar control provides the user with a simple calendar interface, from which the user can select a date. The user can change the display by: +\par {\pntext\pard\plain\f3\lang4105\langfe1033\langnp4105 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ql \fi-360\li720\ri0\nowidctlpar{\*\pn \pnlvlblt\ilvl0\ls1\pnrnot0\pnf3\pnindent360 {\pntxtb \'b7}}\faauto\ls1\rin0\lin720\itap0\pararsid6167666 { +\lang4105\langfe1033\langnp4105\insrsid16608358 Scrolling backward and forward, from month to month. +\par {\pntext\pard\plain\f3\lang4105\langfe1033\langnp4105 \loch\af3\dbch\af0\hich\f3 \'b7\tab}Clicking the Today text to display the current day (if the MCS_NOTODAY style is not used). +\par {\pntext\pard\plain\f3\lang4105\langfe1033\langnp4105 \loch\af3\dbch\af0\hich\f3 \'b7\tab}Picking a month or a year from a pop-up menu. +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\lang4105\langfe1033\langnp4105\insrsid16608358 You can customize the month calendar control by applying a variety of styles to the object when you create it. +\par The month calendar control can display more than one month, and it can indicate special days (such as }{\lang4105\langfe1033\langnp4105\insrsid16608358\charrsid16608358 holidays}{\lang4105\langfe1033\langnp4105\insrsid16608358 ) by bolding the date. + +\par }{\b\fs28\lang4105\langfe1033\langnp4105\insrsid16608358 +\par Using COXMonthCalCtrl +\par }{\lang4105\langfe1033\langnp4105\insrsid16608358 The month calendar control (COXMonthCalCtrl) implements a calendar-like user interface. This provides the + user with a very intuitive and recognizable method of entering or selecting a date. The control also provides the application with the means to obtain and set the date information in the control using existing data types. By default, the month calendar c +ontrol displays the current day and month. However, the user is able to scroll to the previous and next months and select a specific month and/or year. +\par }{\b\fs28\lang4105\langfe1033\langnp4105\insrsid16608358 +\par Creating the Month Calendar Control +\par }{\lang4105\langfe1033\langnp4105\insrsid16608358 How the month calendar control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window. +\par +\par To use COXMonthCalCtrl directly in a dialog box: +\par }{\b\lang4105\langfe1033\langnp4105\insrsid16608358 Visual C++ v6.0: +\par }{\lang4105\langfe1033\langnp4105\insrsid16608358 In the dialog editor, add a Month Calendar Control to your dialog template resource. Specify its control ID. Specify + any styles required, using the Properties dialog box of the month calendar control. Use ClassWizard to add a member variable of type COXMonthCalCtrl with the Control property. You can use this member to call COXMonthCalCtrl member functions. Use ClassWiz +ard to map handler functions in the dialog class for any month calendar control notification messages you need to handle. In OnInitDialog, set any additional styles for the COXMonthCalCtrl object. +\par }{\b\lang4105\langfe1033\langnp4105\insrsid16608358 Visual C++ v5.0: +\par }{\lang4105\langfe1033\langnp4105\insrsid16608358 +In the dialog editor, add a Static Control to your dialog template resource (it will be a placeholder for the month calendar control). Specify its control ID. In OnInitDialog, you can use next code to replace Static Control on our calendar control: +\par \tab CWnd *pFrame=GetDlgItem(IDC_MONTHCAL); CRect rcWnd; pFrame->GetWindowRect(rcWnd); pFrame->DestroyWindow(); //pFrame was just a placeholder anyway. ScreenToClient(rcWnd); m_ctlMonthCal.Create(WS_CHILD|WS_VISIBLE,rcWnd.TopLeft(),this,IDC_MONTHCAL); +\tab +\par }{\b\fs28\lang4105\langfe1033\langnp4105\insrsid16608358 +\par To use COXMonthCalCtrl in a nondialog window +\par }{\lang4105\langfe1033\langnp4105\insrsid16608358 +Define the control in the view or window class. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function (if you're subclassing the control). + Set the styles for the control. +\par }{\fs20\insrsid16608358 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.cpp new file mode 100644 index 0000000..8519d33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MonthCalendar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.h new file mode 100644 index 0000000..3d217cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3F27548B_255F_11D2_889C_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.rc2 new file mode 100644 index 0000000..98b1177 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/res/MonthCalendar.rc2 @@ -0,0 +1,13 @@ +// +// MONTHCALENDAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/resource.h new file mode 100644 index 0000000..ac333cb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MonthCalendar/resource.h @@ -0,0 +1,49 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MonthCalendar.rc +// +#define IDC_APPLY 3 +#define IDC_RESTORE 4 +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_MONTHCALENDAR_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_MONTHCAL 1000 +#define IDC_STYLES 1002 +#define IDC_CHECK_DAYSTATE 1003 +#define IDC_CHECK_MULTISELECT 1004 +#define IDC_CHECK_NOTODAY 1005 +#define IDC_CHECK_NOTODAYCIRCLE 1006 +#define IDC_CHECK_WEEKNUMBERS 1007 +#define IDC_CHECK_BOLDHOLIDAYS 1008 +#define IDC_COLORS 1009 +#define IDC_BUTTON_CLRBK 1010 +#define IDC_BUTTON_CLRMONTHBK 1011 +#define IDC_COMBO_FIRSTDAY 1012 +#define IDC_EDIT_SCROLLRATE 1013 +#define IDC_SPIN_SCROLLRATE 1014 +#define IDC_COMBO_DIMENSION 1015 +#define IDC_BUTTON_CLRTITLEBK 1016 +#define IDC_BUTTON_CLRTEXT 1017 +#define IDC_BUTTON_CLRTITLETEXT 1018 +#define IDC_BUTTON_CLRTRAILINGTEXT 1019 +#define IDC_EDIT_MAXSEL 1020 +#define IDC_SPIN_MAXSEL 1021 +#define IDC_SELECTION 1022 +#define IDC_RANGEFROM 1023 +#define IDC_RANGETO 1024 +#define IDC_CHECK_INFOTIP 1025 +#define IDC_BUTTON_FONTNAME 1026 +#define IDC_STATIC_FONTNAME 1027 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1028 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.cpp new file mode 100644 index 0000000..8afb20a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.cpp @@ -0,0 +1,52 @@ +// CMCombo.cpp : implementation file +// + +#include "stdafx.h" +#include "MCombo.h" +#include "CMCombo.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMCombo + +CMCombo::CMCombo() +{ +} + +CMCombo::~CMCombo() +{ +} + + +BEGIN_MESSAGE_MAP(CMCombo, CComboBox) + //{{AFX_MSG_MAP(CMCombo) + ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMCombo message handlers + +void CMCombo::OnSelchange() +{ + int x = 1; + +} + +void CMCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) +{ + int z=1; + +} + +BOOL CMCombo::PreCreateWindow(CREATESTRUCT& cs) +{ + + + return CComboBox::PreCreateWindow(cs); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.h new file mode 100644 index 0000000..6cf1740 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/CMCombo.h @@ -0,0 +1,41 @@ +// CMCombo.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CMCombo window + +class CMCombo : public CComboBox +{ +// Construction +public: + CMCombo(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMCombo) + public: + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMCombo(); + + // Generated message map functions +protected: + //{{AFX_MSG(CMCombo) + afx_msg void OnSelchange(); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.cpp new file mode 100644 index 0000000..7b637ef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.cpp @@ -0,0 +1,16 @@ +// ComboLBox.cpp : implementation file +// + +#include "stdafx.h" +#include "MCombo.h" +#include "ComboLBox.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CComboLBox + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.h new file mode 100644 index 0000000..c0dccd5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/ComboLBox.h @@ -0,0 +1,8 @@ +// ComboLBox.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CComboLBox window + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.clw new file mode 100644 index 0000000..a787274 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.clw @@ -0,0 +1,110 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMCombo +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "mcombo.h" +LastPage=0 + +ClassCount=3 +Class1=CMCombo +Class2=CMComboApp +Class3=CMComboDlg + +ResourceCount=1 +Resource1=IDD_MCOMBO_DIALOG (Dutch (Belgium)) + +[CLS:CMCombo] +Type=0 +BaseClass=CComboBox +HeaderFile=CMCombo.h +ImplementationFile=CMCombo.cpp +LastObject=CMCombo + +[CLS:CMComboApp] +Type=0 +BaseClass=CWinApp +HeaderFile=MCombo.h +ImplementationFile=MCombo.cpp +Filter=N +VirtualFilter=AC +LastObject=CMComboApp + +[CLS:CMComboDlg] +Type=0 +BaseClass=CDialog +HeaderFile=MComboDlg.h +ImplementationFile=MComboDlg.cpp +LastObject=CMComboDlg +Filter=D +VirtualFilter=dWC + +[DLG:IDD_MCOMBO_DIALOG] +Type=1 +Class=CMComboDlg + +[DLG:IDD_MCOMBO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=58 +Control1=IDC_COMBO1,combobox,1344340818 +Control2=IDC_EDIT_COLCOUNT,edit,1350631552 +Control3=IDC_EDIT_COLCOUNT_SPIN,msctls_updown32,1342177334 +Control4=IDC_BUTTON_SETCOLCOUNT,button,1342242816 +Control5=IDC_EDIT_MASTERCOLUMNNUMBER,edit,1350631552 +Control6=IDC_EDIT_MASTERCOLUMNNUMBER_SPIN,msctls_updown32,1342177334 +Control7=IDC_BUTTON_SETMASTERCOLUMN,button,1342242816 +Control8=IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER,edit,1350631552 +Control9=IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER_SPIN,msctls_updown32,1342177334 +Control10=IDC_EDIT_COLUMNWIDTH,edit,1350631552 +Control11=IDC_EDIT_COLUMNWIDTH_SPIN,msctls_updown32,1342177334 +Control12=IDC_BUTTON_SETCOLUMNWIDTH,button,1342242816 +Control13=IDC_EDIT_GETLBTEXT_COLUMNNUMBER,edit,1350631552 +Control14=IDC_EDIT_GETLBTEXT_COLUMNNUMBER_SPIN,msctls_updown32,1342177334 +Control15=IDC_EDIT_LBTEXT_ROWNUM,edit,1350631552 +Control16=IDC_EDIT_LBTEXT_ROWNUM_SPIN,msctls_updown32,1342177334 +Control17=IDC_BUTTON_GETLBTEXT,button,1342242816 +Control18=IDC_EDIT_GETLBTEXT,edit,1350633600 +Control19=IDC_EDIT_SELECT_STARTAFTER,edit,1350631552 +Control20=IDC_EDIT_SELECT_STARTAFTER_SPIN,msctls_updown32,1342177334 +Control21=IDC_EDIT_SELECT_COLUMNNUMBER,edit,1350631552 +Control22=IDC_EDIT_SELECT_COLUMNNUMBER_SPIN,msctls_updown32,1342177334 +Control23=IDC_EDIT_SELECT_STRING,edit,1350631552 +Control24=IDC_BUTTON_SELECTSTRING,button,1342242816 +Control25=IDC_EDIT_ADD,edit,1352732804 +Control26=IDC_BUTTON_INSERTAT,button,1342242816 +Control27=IDC_BUTTON_ADD,button,1342242816 +Control28=IDC_EDIT_INSERTAT,edit,1350631552 +Control29=IDC_EDIT_INSERTAT_SPIN,msctls_updown32,1342177334 +Control30=IDC_EDIT_ITEMDATAINDEX,edit,1350631552 +Control31=IDC_EDIT_ITEMDATAINDEX_SPIN,msctls_updown32,1342177334 +Control32=IDC_BUTTON_GETITEMDATA,button,1342242816 +Control33=IDC_EDIT_ITEMDATA,edit,1350631552 +Control34=IDC_EDIT_ITEMDATA_SPIN,msctls_updown32,1342177334 +Control35=IDC_BUTTON_SETITEMDATA,button,1342242816 +Control36=IDC_CHECK_FITTOSIZE,button,1342242819 +Control37=IDOK,button,1342242817 +Control38=IDC_STATIC,button,1342177287 +Control39=IDC_STATIC,button,1342177287 +Control40=IDC_STATIC,static,1342308352 +Control41=IDC_STATIC,button,1342177287 +Control42=IDC_STATIC,static,1342308352 +Control43=IDC_STATIC,static,1342308352 +Control44=IDC_STATIC,static,1342308352 +Control45=IDC_STATIC,button,1342177287 +Control46=IDC_STATIC,static,1342308352 +Control47=IDC_STATIC,static,1342308352 +Control48=IDC_STATIC,static,1342308352 +Control49=IDC_STATIC,button,1342177287 +Control50=IDC_STATIC,static,1342308352 +Control51=IDC_STATIC,static,1342308352 +Control52=IDC_STATIC,static,1342308352 +Control53=IDC_STATIC,button,1342177287 +Control54=IDC_STATIC,static,1342308352 +Control55=IDC_STATIC,static,1342308352 +Control56=IDC_STATIC,button,1342177287 +Control57=IDC_STATIC,static,1342308352 +Control58=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.cpp new file mode 100644 index 0000000..20bbb9d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.cpp @@ -0,0 +1,100 @@ +// MCombo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "MCombo.h" +#include "MComboDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMComboApp + +BEGIN_MESSAGE_MAP(CMComboApp, CWinApp) + //{{AFX_MSG_MAP(CMComboApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMComboApp construction + +CMComboApp::CMComboApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMComboApp object + +CMComboApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CMComboApp initialization + +BOOL CMComboApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CMComboDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CMComboApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsp new file mode 100644 index 0000000..925e835 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsp @@ -0,0 +1,257 @@ +# Microsoft Developer Studio Project File - Name="MCombo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MCombo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MCombo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MCombo.mak" CFG="MCombo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MCombo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MCombo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MCombo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "MCombo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "MCombo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MCombo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MCombo.exe" + +!ELSEIF "$(CFG)" == "MCombo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MCombo.exe" + +!ELSEIF "$(CFG)" == "MCombo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MCombo__" +# PROP BASE Intermediate_Dir "MCombo__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MCombo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MCombo.exe" + +!ELSEIF "$(CFG)" == "MCombo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MCombo_0" +# PROP BASE Intermediate_Dir "MCombo_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MCombo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"MCombo.exe" + +!ELSEIF "$(CFG)" == "MCombo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MCombo_1" +# PROP BASE Intermediate_Dir "MCombo_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MCombo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"MCombo.exe" + +!ENDIF + +# Begin Target + +# Name "MCombo - Win32 Release" +# Name "MCombo - Win32 Debug" +# Name "MCombo - Win32 Release_Shared" +# Name "MCombo - Win32 Unicode_Debug" +# Name "MCombo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMultiComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MCombo.cpp +# End Source File +# Begin Source File + +SOURCE=.\MCombo.rc +# End Source File +# Begin Source File + +SOURCE=.\MComboDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\MCombo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\MCombo.rc2 +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\MCombo.h +# End Source File +# Begin Source File + +SOURCE=.\MComboDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\oxmulticombobox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMultiComboBox.inl +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MCombo.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsw new file mode 100644 index 0000000..61b3f71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MCombo"=".\MCombo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/MultiCombo", UEIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.h new file mode 100644 index 0000000..490d2c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.h @@ -0,0 +1,38 @@ +// MCombo.h : main header file for the MCOMBO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMComboApp: +// See MCombo.cpp for the implementation of this class +// + +class CMComboApp : public CWinApp +{ +public: + CMComboApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMComboApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CMComboApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.rc new file mode 100644 index 0000000..f49a443 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.rc @@ -0,0 +1,258 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\MCombo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\MCombo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "MCOMBO MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "MCOMBO" + VALUE "LegalCopyright", "Copyright © 1997" + VALUE "OriginalFilename", "MCOMBO.EXE" + VALUE "ProductName", "MCOMBO Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "About This Program " +END + +STRINGTABLE +BEGIN + IDR_MAINRFAME "MultiColumn Combo" + ID_DESCRIPTION_FILE "mcomboinfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MCOMBO_DIALOG DIALOGEX 0, 0, 322, 249 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "MCombo Ultimate Tool Box" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_COMBO1,13,15,143,57,CBS_DROPDOWN | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_COLCOUNT,64,54,40,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_EDIT_COLCOUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,102,54,10,14 + PUSHBUTTON "Set",IDC_BUTTON_SETCOLCOUNT,110,54,39,14 + EDITTEXT IDC_EDIT_MASTERCOLUMNNUMBER,64,86,40,14,ES_AUTOHSCROLL + CONTROL "Spin2",IDC_EDIT_MASTERCOLUMNNUMBER_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,101,86,10,14 + PUSHBUTTON "Set",IDC_BUTTON_SETMASTERCOLUMN,110,86,39,14 + EDITTEXT IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER,64,119,40,14,ES_AUTOHSCROLL + CONTROL "Spin3",IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER_SPIN, + "msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,101,119,10,14 + EDITTEXT IDC_EDIT_COLUMNWIDTH,64,135,40,14,ES_AUTOHSCROLL + CONTROL "Spin4",IDC_EDIT_COLUMNWIDTH_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,102,135,10,14 + PUSHBUTTON "Set",IDC_BUTTON_SETCOLUMNWIDTH,110,127,39,14 + EDITTEXT IDC_EDIT_GETLBTEXT_COLUMNNUMBER,64,164,40,14,ES_AUTOHSCROLL + CONTROL "Spin5",IDC_EDIT_GETLBTEXT_COLUMNNUMBER_SPIN, + "msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,103,164,10,14 + EDITTEXT IDC_EDIT_LBTEXT_ROWNUM,64,180,40,14,ES_AUTOHSCROLL + CONTROL "Spin6",IDC_EDIT_LBTEXT_ROWNUM_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,103,180,10,14 + PUSHBUTTON "Get",IDC_BUTTON_GETLBTEXT,110,174,39,14 + EDITTEXT IDC_EDIT_GETLBTEXT,64,202,40,14,ES_AUTOHSCROLL | ES_READONLY + EDITTEXT IDC_EDIT_SELECT_STARTAFTER,220,16,40,14,ES_AUTOHSCROLL + CONTROL "Spin7",IDC_EDIT_SELECT_STARTAFTER_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,260,16,10,14 + EDITTEXT IDC_EDIT_SELECT_COLUMNNUMBER,220,32,40,14,ES_AUTOHSCROLL + CONTROL "Spin8",IDC_EDIT_SELECT_COLUMNNUMBER_SPIN, + "msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,259,32,10,14 + EDITTEXT IDC_EDIT_SELECT_STRING,220,48,40,14,ES_AUTOHSCROLL + PUSHBUTTON "Select",IDC_BUTTON_SELECTSTRING,265,32,39,14 + EDITTEXT IDC_EDIT_ADD,175,99,82,50,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL + PUSHBUTTON "Insert",IDC_BUTTON_INSERTAT,265,111,39,14 + PUSHBUTTON "Add",IDC_BUTTON_ADD,265,127,39,14 + EDITTEXT IDC_EDIT_INSERTAT,220,151,30,14,ES_AUTOHSCROLL + CONTROL "Spin9",IDC_EDIT_INSERTAT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,249,151,10,14 + EDITTEXT IDC_EDIT_ITEMDATAINDEX,220,182,40,14,ES_AUTOHSCROLL + CONTROL "Spin10",IDC_EDIT_ITEMDATAINDEX_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,258,182,10,14 + PUSHBUTTON "Get",IDC_BUTTON_GETITEMDATA,265,182,39,14 + EDITTEXT IDC_EDIT_ITEMDATA,220,199,40,14,ES_AUTOHSCROLL + CONTROL "Spin11",IDC_EDIT_ITEMDATA_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,257,199,10,14 + PUSHBUTTON "Set",IDC_BUTTON_SETITEMDATA,265,199,39,14 + CONTROL "Set dropdown listbox to fit size of all columns",IDC_CHECK_FITTOSIZE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,232,155,10 + DEFPUSHBUTTON "OK",IDOK,265,228,50,14 + GROUPBOX "Column Width",IDC_STATIC,7,110,147,43 + GROUPBOX "Column Count",IDC_STATIC,7,45,147,30 + LTEXT "Count ",IDC_STATIC,15,57,44,8 + GROUPBOX "Master column",IDC_STATIC,7,77,147,30 + LTEXT "Column index",IDC_STATIC,12,89,46,8 + LTEXT "Column index",IDC_STATIC,12,122,50,8 + LTEXT "Width",IDC_STATIC,12,138,28,8 + GROUPBOX "Listbox text",IDC_STATIC,7,155,147,67 + LTEXT "Column index",IDC_STATIC,12,167,49,8 + LTEXT "Row index",IDC_STATIC,12,183,40,8 + LTEXT "Text",IDC_STATIC,12,205,19,8 + GROUPBOX "Select String",IDC_STATIC,167,7,147,60 + LTEXT "Start After",IDC_STATIC,175,19,30,8 + LTEXT "Col index",IDC_STATIC,175,35,37,8 + LTEXT "Select String",IDC_STATIC,175,51,39,8 + GROUPBOX "Add/Insert String",IDC_STATIC,168,69,147,102 + LTEXT "Press ENTER to separate column values (Should be <= Column Count)",IDC_STATIC,175,79,133,20 + LTEXT "Insert At",IDC_STATIC,175,154,25,8 + GROUPBOX "Get/Set ItemData",IDC_STATIC,168,173,147,49 + LTEXT "Item Index",IDC_STATIC,175,185,31,8 + LTEXT "Item Data",IDC_STATIC,175,202,30,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MCOMBO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 315 + TOPMARGIN, 7 + BOTTOMMARGIN, 242 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\MCombo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.vcproj new file mode 100644 index 0000000..c3924f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MCombo.vcproj @@ -0,0 +1,875 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.cpp new file mode 100644 index 0000000..20ce4bc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.cpp @@ -0,0 +1,341 @@ +// MComboDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "UTSampleAbout.h" +#include "mcombo.h" +#include "MComboDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMComboDlg dialog + +CMComboDlg::CMComboDlg(CWnd* pParent /*=NULL*/) + : CDialog(CMComboDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CMComboDlg) + m_MasterColumn = 0; + m_ColumnWidth = 0; + m_ColWidth_ColNum = 0; + m_ColCount = 0; + m_AddList = _T(""); + m_InsertAt_ColNum = 0; + m_LBText = _T(""); + m_LBText_ColNum = 0; + m_LBText_RowNum = 0; + m_SelectColNum = 0; + m_SelectStartAfter = 0; + m_SelectString = _T(""); + m_dwItemData = 0; + m_nItemDataIndex = 0; + m_bFitToSize = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CMComboDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMComboDlg) + DDX_Control(pDX, IDC_COMBO1, m_MCombo); + DDX_Control(pDX, IDC_EDIT_SELECT_STARTAFTER_SPIN, m_wndSelectStartAfterSpin); + DDX_Control(pDX, IDC_EDIT_SELECT_COLUMNNUMBER_SPIN, m_wndSelectColNumSpin); + DDX_Control(pDX, IDC_EDIT_MASTERCOLUMNNUMBER_SPIN, m_wndMasterColumnSpin); + DDX_Control(pDX, IDC_EDIT_LBTEXT_ROWNUM_SPIN, m_wndLBTextRowNumSpin); + DDX_Control(pDX, IDC_EDIT_ITEMDATAINDEX_SPIN, m_wndItemDataIndexSpin); + DDX_Control(pDX, IDC_EDIT_ITEMDATA_SPIN, m_wndItemDataSpin); + DDX_Control(pDX, IDC_EDIT_INSERTAT_SPIN, m_wndInsertAtColNumSpin); + DDX_Control(pDX, IDC_EDIT_GETLBTEXT_COLUMNNUMBER_SPIN, m_wndLBTextColNumSpin); + DDX_Control(pDX, IDC_EDIT_COLUMNWIDTH_SPIN, m_wndColWidthSpin); + DDX_Control(pDX, IDC_EDIT_COLCOUNT_SPIN, m_wndColCountSpin); + DDX_Control(pDX, IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER_SPIN, m_wndColWidthColSpin); + DDX_Text(pDX, IDC_EDIT_MASTERCOLUMNNUMBER, m_MasterColumn); + DDX_Text(pDX, IDC_EDIT_COLUMNWIDTH, m_ColumnWidth); + DDX_Text(pDX, IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER, m_ColWidth_ColNum); + DDX_Text(pDX, IDC_EDIT_COLCOUNT, m_ColCount); + DDX_Text(pDX, IDC_EDIT_ADD, m_AddList); + DDV_MaxChars(pDX, m_AddList, 100000); + DDX_Text(pDX, IDC_EDIT_INSERTAT, m_InsertAt_ColNum); + DDX_Text(pDX, IDC_EDIT_GETLBTEXT, m_LBText); + DDX_Text(pDX, IDC_EDIT_GETLBTEXT_COLUMNNUMBER, m_LBText_ColNum); + DDX_Text(pDX, IDC_EDIT_LBTEXT_ROWNUM, m_LBText_RowNum); + DDX_Text(pDX, IDC_EDIT_SELECT_COLUMNNUMBER, m_SelectColNum); + DDX_Text(pDX, IDC_EDIT_SELECT_STARTAFTER, m_SelectStartAfter); + DDX_Text(pDX, IDC_EDIT_SELECT_STRING, m_SelectString); + DDX_Text(pDX, IDC_EDIT_ITEMDATA, m_dwItemData); + DDX_Text(pDX, IDC_EDIT_ITEMDATAINDEX, m_nItemDataIndex); + DDX_Check(pDX, IDC_CHECK_FITTOSIZE, m_bFitToSize); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CMComboDlg, CDialog) + //{{AFX_MSG_MAP(CMComboDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_SETMASTERCOLUMN, OnButtonSetmastercolumn) + ON_BN_CLICKED(IDC_BUTTON_SETCOLUMNWIDTH, OnButtonSetcolumnwidth) + ON_BN_CLICKED(IDC_BUTTON_SETCOLCOUNT, OnButtonSetcolcount) + ON_BN_CLICKED(IDC_BUTTON_ADD, OnButtonAdd) + ON_BN_CLICKED(IDC_BUTTON_INSERTAT, OnButtonInsertat) + ON_BN_CLICKED(IDC_BUTTON_GETLBTEXT, OnButtonGetlbtext) + ON_BN_CLICKED(IDC_BUTTON_SELECTSTRING, OnButtonSelectstring) + ON_BN_CLICKED(IDC_BUTTON_SETITEMDATA, OnButtonSetitemdata) + ON_BN_CLICKED(IDC_BUTTON_GETITEMDATA, OnButtonGetitemdata) + ON_CBN_EDITCHANGE(IDC_COMBO1, OnEditchangeCombo1) + ON_CBN_EDITUPDATE(IDC_COMBO1, OnEditupdateCombo1) + ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1) + ON_BN_CLICKED(IDC_CHECK_FITTOSIZE, OnCheckFittosize) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMComboDlg message handlers + +BOOL CMComboDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + m_MCombo.SetColumnCount(3); + m_MCombo.SetColumnWidth(0,100); + m_MCombo.SetColumnWidth(1,120); + m_MCombo.SetColumnWidth(2,20); + LPTSTR str1[] = {_T("David"), _T("Cunningham"), _T("1")}; + LPTSTR str2[] = {_T("Troy") , _T("Marchand"), _T("2")}; + LPTSTR str3[] = {_T("Andrei"), _T("Zenkovitch"), _T("3")}; + LPTSTR str4[] = {_T("Ghazi"), _T("Wadi"), _T("4")}; + + m_MCombo.AddString((LPCTSTR*)str1,3); + m_MCombo.AddString((LPCTSTR*)str2,3); + m_MCombo.AddString((LPCTSTR*)str3,3); + m_MCombo.AddString((LPCTSTR*)str4,3); + + m_wndSelectStartAfterSpin.SetRange(-1, 100); + m_wndSelectColNumSpin.SetRange(0, 100); + m_wndMasterColumnSpin.SetRange(0, 100); + m_wndLBTextRowNumSpin.SetRange(0, 100); + m_wndItemDataIndexSpin.SetRange(0, 100); + m_wndItemDataSpin.SetRange(0, 100); + m_wndInsertAtColNumSpin.SetRange(0, 100); + m_wndLBTextColNumSpin.SetRange(0, 100); + m_wndColWidthSpin.SetRange(0, 100); + m_wndColCountSpin.SetRange(0, 100); + m_wndColWidthColSpin.SetRange(0, 100); + + m_bFitToSize=m_MCombo.GetFitToSize(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CMComboDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CMComboDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CMComboDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINRFAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + + +void CMComboDlg::PostNcDestroy() +{ + m_MCombo.Detach(); + CDialog::PostNcDestroy(); +} + +void CMComboDlg::OnButtonSetmastercolumn() +{ + UpdateData(TRUE); + if(!m_MCombo.SetMasterColumn(m_MasterColumn)) + AfxMessageBox(_T("Invalid Master Column")); +} + +void CMComboDlg::OnButtonSetcolumnwidth() +{ + UpdateData(TRUE); + if(!m_MCombo.SetColumnWidth(m_ColWidth_ColNum,m_ColumnWidth)) + AfxMessageBox(_T("Invalid Column")); +} + +void CMComboDlg::OnButtonSetcolcount() +{ + UpdateData(TRUE); + if(!m_MCombo.SetColumnCount(m_ColCount)) + AfxMessageBox(_T("Invalid Column Count")); +} + +void CMComboDlg::OnButtonAdd() +{ + UpdateData(TRUE); + CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT_ADD); + int nLineCount = pEdit->GetLineCount(); + TCHAR* PtrArray[50]; + int nNumChar; + int nIndex=0; + for(nIndex=0; nIndex < nLineCount; nIndex++) + { + PtrArray[nIndex] = new TCHAR[200]; + nNumChar = pEdit->GetLine(nIndex,PtrArray[nIndex],199); + (PtrArray[nIndex])[nNumChar] = '\0'; + } + if(m_MCombo.AddString((LPCTSTR*)PtrArray,nLineCount)==CB_ERR) + AfxMessageBox(_T("Add is not successfull")); + for(nIndex=0; nIndex < nLineCount; nIndex++) + delete PtrArray[nIndex]; +} + +void CMComboDlg::OnButtonInsertat() +{ + UpdateData(TRUE); + CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT_ADD); + int nLineCount = pEdit->GetLineCount(); + TCHAR* PtrArray[50]; + int nNumChar; + int nIndex=0; + for(nIndex=0; nIndex < nLineCount; nIndex++) + { + PtrArray[nIndex] = new TCHAR[200]; + nNumChar = pEdit->GetLine(nIndex,(LPTSTR)PtrArray[nIndex],200); + (PtrArray[nIndex])[nNumChar] = '\0'; + } + if(m_MCombo.InsertString(m_InsertAt_ColNum,(LPCTSTR*)PtrArray,nLineCount)==CB_ERR) + AfxMessageBox(_T("insert is not successfull")); + for(nIndex=0; nIndex < nLineCount; nIndex++) + delete PtrArray[nIndex]; + +} + +void CMComboDlg::OnButtonGetlbtext() +{ + UpdateData(TRUE); + m_MCombo.GetLBText(m_LBText_RowNum,m_LBText_ColNum,m_LBText); + UpdateData(FALSE); +} + + +void CMComboDlg::OnButtonSelectstring() +{ + UpdateData(TRUE); + if(m_MCombo.SelectString(m_SelectStartAfter,m_SelectColNum,m_SelectString.GetBuffer(0)) == CB_ERR) + AfxMessageBox(_T("select is not successfull")); +} + +void CMComboDlg::OnButtonSetitemdata() +{ + UpdateData(TRUE); + if(m_MCombo.SetItemData(m_nItemDataIndex,m_dwItemData)==CB_ERR) + { + AfxMessageBox(_T("SetItemData is not successfull")); + return; + } + UpdateData(FALSE); +} + +void CMComboDlg::OnButtonGetitemdata() +{ + UpdateData(TRUE); + if((m_dwItemData = m_MCombo.GetItemData(m_nItemDataIndex))==CB_ERR) + { + AfxMessageBox(_T("GetItemDatais not successfull")); + return; + } + UpdateData(FALSE); + +} + +void CMComboDlg::OnEditchangeCombo1() +{ + // TODO: Add your control notification handler code here + + CString sText; + m_MCombo.GetLBText(m_MCombo.GetCurSel(),1,sText); +} + +void CMComboDlg::OnEditupdateCombo1() +{ + // TODO: Add your control notification handler code here + + CString sText; + m_MCombo.GetLBText(m_MCombo.GetCurSel(),1,sText); +} + +void CMComboDlg::OnSelchangeCombo1() +{ + // TODO: Add your control notification handler code here + + CString sText; + m_MCombo.GetLBText(m_MCombo.GetCurSel(),1,sText); +} + +void CMComboDlg::OnCheckFittosize() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_MCombo.SetFitToSize(m_bFitToSize); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.h new file mode 100644 index 0000000..601f7a9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/MComboDlg.h @@ -0,0 +1,79 @@ +// MComboDlg.h : header file +// + +#include "OXMultiComboBox.h" + +#include "UTB64Bit.h" +///////////////////////////////////////////////////////////////////////////// +// CMComboDlg dialog + +class CMComboDlg : public CDialog +{ +// Construction +public: + CMComboDlg(CWnd* pParent = NULL); // standard constructor +// Dialog Data + //{{AFX_DATA(CMComboDlg) + enum { IDD = IDD_MCOMBO_DIALOG }; + COXMultiComboBox m_MCombo; + CSpinButtonCtrl m_wndSelectStartAfterSpin; + CSpinButtonCtrl m_wndSelectColNumSpin; + CSpinButtonCtrl m_wndMasterColumnSpin; + CSpinButtonCtrl m_wndLBTextRowNumSpin; + CSpinButtonCtrl m_wndItemDataIndexSpin; + CSpinButtonCtrl m_wndItemDataSpin; + CSpinButtonCtrl m_wndInsertAtColNumSpin; + CSpinButtonCtrl m_wndLBTextColNumSpin; + CSpinButtonCtrl m_wndColWidthSpin; + CSpinButtonCtrl m_wndColCountSpin; + CSpinButtonCtrl m_wndColWidthColSpin; + int m_MasterColumn; + int m_ColumnWidth; + int m_ColWidth_ColNum; + int m_ColCount; + CString m_AddList; + int m_InsertAt_ColNum; + CString m_LBText; + int m_LBText_ColNum; + int m_LBText_RowNum; + int m_SelectColNum; + int m_SelectStartAfter; + CString m_SelectString; + DWORD_PTR m_dwItemData; + int m_nItemDataIndex; + BOOL m_bFitToSize; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMComboDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void PostNcDestroy(); + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CMComboDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonSetmastercolumn(); + afx_msg void OnButtonSetcolumnwidth(); + afx_msg void OnButtonSetcolcount(); + afx_msg void OnButtonAdd(); + afx_msg void OnButtonInsertat(); + afx_msg void OnButtonGetlbtext(); + afx_msg void OnButtonSelectstring(); + afx_msg void OnButtonSetitemdata(); + afx_msg void OnButtonGetitemdata(); + afx_msg void OnEditchangeCombo1(); + afx_msg void OnEditupdateCombo1(); + afx_msg void OnSelchangeCombo1(); + afx_msg void OnCheckFittosize(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.cpp new file mode 100644 index 0000000..44f6544 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MCombo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.h new file mode 100644 index 0000000..74abe4f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/mcomboinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/mcomboinfo.rtf new file mode 100644 index 0000000..14c9e6f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/mcomboinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.rc2 new file mode 100644 index 0000000..261f705 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/res/MCombo.rc2 @@ -0,0 +1,13 @@ +// +// MCOMBO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/resource.h new file mode 100644 index 0000000..202a495 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/MultiCombo/resource.h @@ -0,0 +1,58 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MCombo.rc +// +#define IDR_MAINRFAME 2 +#define ID_DESCRIPTION_FILE 3 +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_MCOMBO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_COMBO1 1000 +#define IDC_BUTTON_SETMASTERCOLUMN 1004 +#define IDC_EDIT_MASTERCOLUMNNUMBER 1005 +#define IDC_BUTTON_SETCOLUMNWIDTH 1006 +#define IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER 1007 +#define IDC_EDIT_COLUMNWIDTH 1008 +#define IDC_EDIT_COLCOUNT 1009 +#define IDC_BUTTON_SETCOLCOUNT 1010 +#define IDC_EDIT_ADD 1011 +#define IDC_EDIT_INSERTAT 1012 +#define IDC_BUTTON_INSERTAT 1013 +#define IDC_BUTTON_ADD 1014 +#define IDC_EDIT_GETLBTEXT_COLUMNNUMBER 1015 +#define IDC_EDIT_LBTEXT_ROWNUM 1016 +#define IDC_EDIT_GETLBTEXT 1017 +#define IDC_BUTTON_GETLBTEXT 1018 +#define IDC_EDIT_SELECT_STARTAFTER 1022 +#define IDC_EDIT_SELECT_COLUMNNUMBER 1023 +#define IDC_EDIT_SELECT_STRING 1024 +#define IDC_BUTTON_SELECTSTRING 1025 +#define IDC_BUTTON_SETITEMDATA 1027 +#define IDC_BUTTON_GETITEMDATA 1028 +#define IDC_EDIT_ITEMDATAINDEX 1029 +#define IDC_EDIT_ITEMDATA 1030 +#define IDC_LIST1 1031 +#define IDC_EDIT_COLCOUNT_SPIN 1032 +#define IDC_EDIT_MASTERCOLUMNNUMBER_SPIN 1033 +#define IDC_EDIT_COLUMNWIDTH_COLUMNNUMBER_SPIN 1034 +#define IDC_EDIT_COLUMNWIDTH_SPIN 1035 +#define IDC_EDIT_GETLBTEXT_COLUMNNUMBER_SPIN 1036 +#define IDC_EDIT_LBTEXT_ROWNUM_SPIN 1037 +#define IDC_EDIT_SELECT_STARTAFTER_SPIN 1038 +#define IDC_EDIT_SELECT_COLUMNNUMBER_SPIN 1039 +#define IDC_EDIT_INSERTAT_SPIN 1040 +#define IDC_EDIT_ITEMDATAINDEX_SPIN 1041 +#define IDC_EDIT_ITEMDATA_SPIN 1042 +#define IDC_CHECK_FITTOSIZE 1043 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1044 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.cpp new file mode 100644 index 0000000..a326312 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.cpp @@ -0,0 +1,92 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "note.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ + // TODO: add member initialization code here + +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndStatusBar.Create(this)) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + if (!m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + AfxMessageBox(_T("wsersdfsd")); + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.h new file mode 100644 index 0000000..0a15ff0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Mainfrm.h @@ -0,0 +1,44 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CFrameWnd +{ +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.CPP new file mode 100644 index 0000000..f8b78c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.CPP @@ -0,0 +1,122 @@ +// note.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "note.h" + +#include "MainFrm.h" +#include "noteDoc.h" +#include "noteView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNoteApp + +BEGIN_MESSAGE_MAP(CNoteApp, CWinApp) + //{{AFX_MSG_MAP(CNoteApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CNoteApp construction + +CNoteApp::CNoteApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CNoteApp object + +CNoteApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CNoteApp initialization + +BOOL CNoteApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + LoadStdProfileSettings(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CNoteDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CNoteView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CNoteApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CNoteApp commands + +int CNoteApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.H new file mode 100644 index 0000000..60b0ab5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTE.H @@ -0,0 +1,39 @@ +// note.h : main header file for the NOTE application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CNoteApp: +// See note.cpp for the implementation of this class +// + +class CNoteApp : public CWinApp +{ +public: + CNoteApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNoteApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CNoteApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEDOC.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEDOC.H new file mode 100644 index 0000000..8b421ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEDOC.H @@ -0,0 +1,44 @@ +// noteDoc.h : interface of the CNoteDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CNoteDoc : public CDocument +{ +protected: // create from serialization only + CNoteDoc(); + DECLARE_DYNCREATE(CNoteDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNoteDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CNoteDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CNoteDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.CPP new file mode 100644 index 0000000..ac12c9e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.CPP @@ -0,0 +1,208 @@ +// ShapeWnd.cpp : implementation file +// + +#include "stdafx.h" +#include "noteWnd.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNoteWnd + +CNoteWnd::CNoteWnd(CWnd *pParentWnd) +{ + ASSERT(pParentWnd != NULL); + + m_bTrackMove = FALSE; + + // Must use CreateEx for popup windows + CWnd::CreateEx(0,AfxRegisterWndClass(0),_T(""),WS_POPUP|WS_VISIBLE, + 10,10,CXWIDTH,CYHEIGHT, + pParentWnd->GetSafeHwnd(),0); + + // Build the sticky note polygon shape + m_aPoints[0].x = 0; // Top left + m_aPoints[0].y = 0; + m_aPoints[1].x = CXWIDTH; // Top right + m_aPoints[1].y = 0; + m_aPoints[2].x = CXWIDTH; // Lower right (fold) + m_aPoints[2].y = CYHEIGHT-CYCORNER; + m_aPoints[3].x = CXWIDTH-CXCORNER; // Bottom right (fold) + m_aPoints[3].y = CYHEIGHT; + m_aPoints[4].x = 0; // Bottom left + m_aPoints[4].y = CYHEIGHT; + m_nPoints = 5; + + // Use CShape to set the visible region + SetPolyShape(m_aPoints,m_nPoints); + + // Create a sticky note font + m_fontText.CreateFont(16,0,0,0,FW_BOLD,0,0,0,DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, + PROOF_QUALITY,FF_SWISS|VARIABLE_PITCH,NULL); + + // Center the window + CenterWindow(); +} + +CNoteWnd::~CNoteWnd() +{ + // Destroy the window object + DestroyWindow(); +} + + +BEGIN_MESSAGE_MAP(CNoteWnd, CWnd) + //{{AFX_MSG_MAP(CNoteWnd) + ON_WM_PAINT() + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_MOUSEMOVE() + ON_WM_KEYDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CNoteWnd message handlers + +// Handle WM_LBUTTONDOWN Windows message +void CNoteWnd::OnLButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + // Save the location in case we are dragging + m_ptMouse = point; + ClientToScreen(&point); + m_ptLast = point; +} + +// Handle WM_LBUTTONUP Windows message +void CNoteWnd::OnLButtonUp(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + // If we are dragging the window... + if (m_bTrackMove) + { + // Reposition the window to where we dragged it + m_bTrackMove = FALSE; + ReleaseCapture(); + InvertTracker(m_ptLast); + ClientToScreen(&point); + SetWindowPos(NULL, point.x-m_ptMouse.x, point.y-m_ptMouse.y,0,0, + SWP_NOZORDER|SWP_NOSIZE); + } + else PostMessage(WM_CLOSE); // Clicked but didn't move, close the window +} + +// Handle WM_MOUSEMOVE Windows message +void CNoteWnd::OnMouseMove(UINT nFlags, CPoint point) +{ + // If we aren't dragging the window then check to see if the left + // mouse button is down + if(!m_bTrackMove && (nFlags & MK_LBUTTON)) + { + // Yes...begin to move the window + m_bTrackMove = TRUE; + SetCapture(); + InvertTracker(m_ptLast); + } + + // If we are moving... + if (m_bTrackMove) + { + // Update the location of the tracking rectangle + ClientToScreen(&point); + InvertTracker(m_ptLast); + m_ptLast = point; + InvertTracker(m_ptLast); + } + else CWnd::OnMouseMove(nFlags,point); +} + +// Utility routine to draw a tracking rectangle the size of the window +void CNoteWnd::InvertTracker(CPoint point) +{ + CRect rectFrame; + GetWindowRect(&rectFrame); + CDC dc; + dc.Attach(::GetDC(NULL)); + + // Draw reversed frame (this can add or remove the tracker) + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y, rectFrame.Width(), + 2, PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x+rectFrame.Width(), point.y-m_ptMouse.y, + 2, rectFrame.Height(), PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y+rectFrame.Height(), + rectFrame.Width()+2, 2, PATINVERT); + dc.PatBlt(point.x-m_ptMouse.x, point.y-m_ptMouse.y+2, 2, + rectFrame.Height()-2, PATINVERT); + ::ReleaseDC(NULL,dc.Detach()); +} + +// Handles painting of note window +void CNoteWnd::OnPaint() +{ + CPaintDC dc(this); + + CRect rect; + GetClientRect(&rect); + + CBrush brNote(RGB(255,255,128)); + CBrush brCorner(RGB(128,128,0)); + CPen penFrame(PS_SOLID,2,RGB(0,0,0)); + CPen *pOldPen; + CBrush *pOldBrush; + CFont *pOldFont; + COLORREF crOldText; + int nOldMode; + + // Fill the note's background + dc.FillRect(&rect,&brNote); + + pOldPen = (CPen *) dc.SelectObject(&penFrame); + + // Draw the left side and other sides of the note + dc.MoveTo(rect.left,rect.top); + dc.LineTo(rect.left,rect.bottom); + dc.Polyline(m_aPoints,m_nPoints); + + // Calculate the location of the turned up corner + POINT aPoints[3] = + { + {rect.right-CXCORNER,rect.bottom}, + {rect.right-CXCORNER,rect.bottom-CYCORNER}, + {rect.right,rect.bottom-CYCORNER} + }; + + // Draw and shade the turned up corner + pOldBrush = (CBrush *) dc.SelectObject(&brCorner); + dc.Polygon(aPoints,3); + + // Paint some text on the note + pOldFont = (CFont *) dc.SelectObject(&m_fontText); + crOldText = dc.SetTextColor(RGB(0,0,0)); + nOldMode = dc.SetBkMode(TRANSPARENT); + CRect rectText(rect.left+5,rect.top+20,rect.right-5,rect.bottom-20); + dc.DrawText(_T("Hello.\n\nThis is my new sticky note Object.\n\nPress ESC to exit."), + -1,rectText,DT_WORDBREAK|DT_NOPREFIX); + + // Restore everything + dc.SelectObject(pOldFont); + dc.SetBkMode(nOldMode); + dc.SelectObject(pOldBrush); + dc.SelectObject(pOldPen); +} + +// Handles WM_KEYDOWN Windows message +void CNoteWnd::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) +{ + // Found ESCAPE key, get out + if(nChar == VK_ESCAPE) + SendMessage(WM_CLOSE); + + CWnd::OnKeyDown(nChar, nRepCnt, nFlags); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.H new file mode 100644 index 0000000..f069648 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NOTEWND.H @@ -0,0 +1,59 @@ +// ShapeWnd.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CNoteWnd window + +#define CXWIDTH 250 +#define CYHEIGHT 200 +#define CXCORNER 20 +#define CYCORNER 20 + +#include "oxshape.h" + +class CNoteWnd : public CWnd, public COXShape +{ +private: + CRgn m_rgnWnd; + BOOL m_bTrackMove; + CPoint m_ptMouse, m_ptLast; + POINT m_aPoints[10]; + int m_nPoints; + CFont m_fontText; + +private: + void InvertTracker(CPoint point); + HWND GetHWND() { return m_hWnd; } + +// Construction +public: + CNoteWnd(CWnd *pParentWnd=NULL); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNoteWnd) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CNoteWnd(); + + // Generated message map functions +protected: + //{{AFX_MSG(CNoteWnd) + afx_msg void OnPaint(); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsp new file mode 100644 index 0000000..07dae57 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsp @@ -0,0 +1,281 @@ +# Microsoft Developer Studio Project File - Name="note" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=note - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Note.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Note.mak" CFG="note - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "note - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "note - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "note - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "note - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "note - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "note - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Note.exe" + +!ELSEIF "$(CFG)" == "note - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Note.exe" + +!ELSEIF "$(CFG)" == "note - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "note___W" +# PROP BASE Intermediate_Dir "note___W" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Note.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Note.exe" + +!ELSEIF "$(CFG)" == "note - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "note___0" +# PROP BASE Intermediate_Dir "note___0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Note.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Note.exe" + +!ELSEIF "$(CFG)" == "note - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "note___1" +# PROP BASE Intermediate_Dir "note___1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Note.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Note.exe" + +!ENDIF + +# Begin Target + +# Name "note - Win32 Release" +# Name "note - Win32 Debug" +# Name "note - Win32 Release_Shared" +# Name "note - Win32 Unicode_Debug" +# Name "note - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\SOURCE\OXShape.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\SOURCE\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\note.cpp +# End Source File +# Begin Source File + +SOURCE=.\note.rc +# End Source File +# Begin Source File + +SOURCE=.\noteDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\noteView.cpp +# End Source File +# Begin Source File + +SOURCE=.\notewnd.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\note.h +# End Source File +# Begin Source File + +SOURCE=.\noteDoc.h +# End Source File +# Begin Source File + +SOURCE=.\noteView.h +# End Source File +# Begin Source File + +SOURCE=.\NOTEWND.H +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\note.ico +# End Source File +# Begin Source File + +SOURCE=.\res\note.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\noteDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Note.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsw new file mode 100644 index 0000000..a77d2dc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "note"=".\Note.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/NOTE", HRIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.vcproj new file mode 100644 index 0000000..635d73a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Note.vcproj @@ -0,0 +1,1034 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NoteInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NoteInfo.rtf new file mode 100644 index 0000000..9ae3cb7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/NoteInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Notedoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Notedoc.cpp new file mode 100644 index 0000000..d6c0176 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Notedoc.cpp @@ -0,0 +1,82 @@ +// noteDoc.cpp : implementation of the CNoteDoc class +// + +#include "stdafx.h" +#include "note.h" + +#include "noteDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNoteDoc + +IMPLEMENT_DYNCREATE(CNoteDoc, CDocument) + +BEGIN_MESSAGE_MAP(CNoteDoc, CDocument) + //{{AFX_MSG_MAP(CNoteDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNoteDoc construction/destruction + +CNoteDoc::CNoteDoc() +{ + // TODO: add one-time construction code here + +} + +CNoteDoc::~CNoteDoc() +{ +} + +BOOL CNoteDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CNoteDoc serialization + +void CNoteDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CNoteDoc diagnostics + +#ifdef _DEBUG +void CNoteDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CNoteDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CNoteDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.cpp new file mode 100644 index 0000000..243f0ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.cpp @@ -0,0 +1,105 @@ +// noteView.cpp : implementation of the CNoteView class +// + +#include "stdafx.h" +#include "note.h" + +#include "noteDoc.h" +#include "noteView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNoteView + +IMPLEMENT_DYNCREATE(CNoteView, CView) + +BEGIN_MESSAGE_MAP(CNoteView, CView) + //{{AFX_MSG_MAP(CNoteView) + ON_COMMAND(ID_STICKNOTE_SHOW, OnStickyNoteShow) + //}}AFX_MSG_MAP + // Standard printing commands +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNoteView construction/destruction + +CNoteView::CNoteView() +{ +} + +CNoteView::~CNoteView() +{ + for(int i=0; iIsKindOf(RUNTIME_CLASS(CNoteDoc))); + return (CNoteDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CNoteView message handlers + +void CNoteView::OnStickyNoteShow() +{ + CNoteWnd* pNoteWnd=new CNoteWnd(this); + + CRect rect; + pNoteWnd->GetWindowRect(&rect); + int nXScreen=::GetSystemMetrics(SM_CXSCREEN); + int nYScreen=::GetSystemMetrics(SM_CYSCREEN); + nXScreen-=rect.Width(); + nYScreen-=rect.Height(); + srand((unsigned)time(NULL)); + CPoint point; + point.x=rand()*3%nXScreen; + point.y=rand()*2%nYScreen; + pNoteWnd->SetWindowPos(NULL,point.x,point.y,0,0,SWP_NOZORDER|SWP_NOSIZE); + + m_arrNoteWnd.Add(pNoteWnd); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.h new file mode 100644 index 0000000..6b08351 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Noteview.h @@ -0,0 +1,56 @@ +// noteView.h : interface of the CNoteView class +// +///////////////////////////////////////////////////////////////////////////// + +#include "notewnd.h" + +class CNoteView : public CView +{ +private: +// CNoteWnd* m_pNoteWnd; + CArray m_arrNoteWnd; + +protected: // create from serialization only + CNoteView(); + DECLARE_DYNCREATE(CNoteView) + +// Attributes +public: + CNoteDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNoteView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CNoteView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CNoteView) + afx_msg void OnStickyNoteShow(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in noteView.cpp +inline CNoteDoc* CNoteView::GetDocument() + { return (CNoteDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/STDAFX.CPP new file mode 100644 index 0000000..9853784 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/STDAFX.CPP @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// note.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Stdafx.h new file mode 100644 index 0000000..04ce274 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/Stdafx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.clw new file mode 100644 index 0000000..ec37848 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.clw @@ -0,0 +1,145 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CNoteApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "note.h" +LastPage=0 + +ClassCount=5 +Class1=CMainFrame +Class2=CNoteApp +Class3=CNoteDoc +Class4=CNoteView +Class5=CNoteWnd + +ResourceCount=3 +Resource1=IDR_MAINFRAME (English (U.S.)) +Resource2=IDD_ABOUTBOX (English (U.S.)) +Resource3=IDR_MAINFRAME + +[CLS:CMainFrame] +Type=0 +BaseClass=CFrameWnd +HeaderFile=Mainfrm.h +ImplementationFile=Mainfrm.cpp +LastObject=CMainFrame + +[CLS:CNoteApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Note.h +ImplementationFile=Note.cpp +LastObject=CNoteApp +Filter=N +VirtualFilter=AC + +[CLS:CNoteDoc] +Type=0 +BaseClass=CDocument +HeaderFile=Notedoc.h +ImplementationFile=Notedoc.cpp +LastObject=CNoteDoc + +[CLS:CNoteView] +Type=0 +BaseClass=CView +HeaderFile=Noteview.h +ImplementationFile=Noteview.cpp +LastObject=CNoteView +Filter=C +VirtualFilter=VWC + +[CLS:CNoteWnd] +Type=0 +BaseClass=CWnd +HeaderFile=Notewnd.h +ImplementationFile=Notewnd.cpp + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_APP_EXIT +Command2=ID_STICKNOTE_SHOW +Command3=ID_APP_ABOUT +CommandCount=3 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_APP_EXIT +Command2=ID_STICKNOTE_SHOW +Command3=ID_APP_ABOUT +CommandCount=3 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.rc new file mode 100644 index 0000000..2ef8437 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/note.rc @@ -0,0 +1,266 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\note.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\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\\note.ico" +IDR_NOTETYPE ICON "res\\noteDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "Sticky Note" + BEGIN + MENUITEM "&Display", ID_STICKNOTE_SHOW + END + POPUP "&Help" + BEGIN + MENUITEM "&About note...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "FileDescription", "NOTE MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "NOTE" + VALUE "LegalCopyright", "Copyright © 1996" + VALUE "OriginalFilename", "NOTE.EXE" + VALUE "ProductName", "NOTE Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Sticky note" + ID_DESCRIPTION_FILE "NoteInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Sticky note (CWnd's with special shapes in the Ultimate Toolbox)" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE +BEGIN + ID_STICKNOTE_SHOW "Display or hide the sticky note" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\note.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.ICO new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.RC2 new file mode 100644 index 0000000..f0c71e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTE.RC2 @@ -0,0 +1,13 @@ +// +// NOTE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTEDOC.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTEDOC.ICO new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/NOTEDOC.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/TOOLBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/TOOLBAR.BMP new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/res/TOOLBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/resource.h new file mode 100644 index 0000000..9e9c109 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NOTE/resource.h @@ -0,0 +1,21 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by note.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_NOTETYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define ID_STICKNOTE_SHOW 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32772 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.clw new file mode 100644 index 0000000..d443d23 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.clw @@ -0,0 +1,73 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CNetBrowseApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "netbrowse.h" +LastPage=0 + +ClassCount=2 +Class1=CNetBrowseApp +Class2=CNetBrowseDlg + +ResourceCount=1 +Resource1=IDD_NETBROWSE_DIALOG (Dutch (Belgium)) + +[CLS:CNetBrowseApp] +Type=0 +BaseClass=CWinApp +HeaderFile=NetBrowse.h +ImplementationFile=NetBrowse.cpp +Filter=N +VirtualFilter=AC +LastObject=CNetBrowseApp + +[CLS:CNetBrowseDlg] +Type=0 +BaseClass=CDialog +HeaderFile=NetBrowseDlg.h +ImplementationFile=NetBrowseDlg.cpp +LastObject=IDC_REINITIALIZE + +[DLG:IDD_NETBROWSE_DIALOG] +Type=1 +Class=CNetBrowseDlg + +[DLG:IDD_NETBROWSE_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=31 +Control1=IDC_STATIC,button,1342177287 +Control2=IDC_COMMENT_NAMES,button,1342242819 +Control3=IDC_DISKS,button,1342242819 +Control4=IDC_PRINTERS,button,1342242819 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_MAX_LEVELS,edit,1350639744 +Control7=IDC_MAX_LEVELS_SPIN,msctls_updown32,1342177334 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_EXPAND_LEVEL,edit,1350639744 +Control10=IDC_EXPAND_LEVEL_SPIN,msctls_updown32,1342177334 +Control11=IDC_REPORT,button,1342242819 +Control12=IDC_REINITIALIZE,button,1342242816 +Control13=IDC_NET_TREE,SysTreeView32,1350631463 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_SCOPE,edit,1350633600 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_TYPE,edit,1350633600 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_DISPLAY_TYPE,edit,1350633600 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_USAGE,edit,1350633600 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_LOCAL_NAME,edit,1350633600 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_REMOTE_NAME,edit,1350633600 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_COMMENT,edit,1350633600 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_PROVIDER,edit,1350633600 +Control30=IDOK,button,1342242817 +Control31=IDC_SCOPE_LIST,combobox,1344339971 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.cpp new file mode 100644 index 0000000..d7b9fd5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.cpp @@ -0,0 +1,99 @@ +// NetBrowse.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "NetBrowse.h" +#include "NetBrowseDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNetBrowseApp + +BEGIN_MESSAGE_MAP(CNetBrowseApp, CWinApp) + //{{AFX_MSG_MAP(CNetBrowseApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNetBrowseApp construction + +CNetBrowseApp::CNetBrowseApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CNetBrowseApp object + +CNetBrowseApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CNetBrowseApp initialization + +BOOL CNetBrowseApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CNetBrowseDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CNetBrowseApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsp new file mode 100644 index 0000000..1ec87aa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsp @@ -0,0 +1,253 @@ +# Microsoft Developer Studio Project File - Name="NetBrowse" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=NetBrowse - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NetBrowse.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NetBrowse.mak" CFG="NetBrowse - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NetBrowse - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "NetBrowse - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "NetBrowse - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "NetBrowse - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "NetBrowse - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NetBrowse - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"NetBrowse.exe" + +!ELSEIF "$(CFG)" == "NetBrowse - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"NetBrowse.exe" + +!ELSEIF "$(CFG)" == "NetBrowse - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NetBrows" +# PROP BASE Intermediate_Dir "NetBrows" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NOAUTOLIB" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"NetBrowse.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"NetBrowse.exe" + +!ELSEIF "$(CFG)" == "NetBrowse - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NetBrow0" +# PROP BASE Intermediate_Dir "NetBrow0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"NetBrowse.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"NetBrowse.exe" + +!ELSEIF "$(CFG)" == "NetBrowse - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NetBrow1" +# PROP BASE Intermediate_Dir "NetBrow1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NOAUTOLIB" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "NOAUTOLIB" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"NetBrowse.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"NetBrowse.exe" + +!ENDIF + +# Begin Target + +# Name "NetBrowse - Win32 Release" +# Name "NetBrowse - Win32 Debug" +# Name "NetBrowse - Win32 Release_Shared" +# Name "NetBrowse - Win32 Unicode_Debug" +# Name "NetBrowse - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXNetBrowseTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\NetBrowse.cpp +# End Source File +# Begin Source File + +SOURCE=.\NetBrowse.rc +# End Source File +# Begin Source File + +SOURCE=.\NetBrowseDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\NetBrowse.h +# End Source File +# Begin Source File + +SOURCE=.\NetBrowseDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\NetBrowse.ico +# End Source File +# Begin Source File + +SOURCE=.\res\NetBrowse.rc2 +# End Source File +# Begin Source File + +SOURCE=.\RES\OXNetBrowseTreeImg.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\NetBrowse.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsw new file mode 100644 index 0000000..e9525e0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "NetBrowse"=".\NetBrowse.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/NetBrowse", QFIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.h new file mode 100644 index 0000000..2693f3c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.h @@ -0,0 +1,38 @@ +// NetBrowse.h : main header file for the NETBROWSE application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CNetBrowseApp: +// See NetBrowse.cpp for the implementation of this class +// + +class CNetBrowseApp : public CWinApp +{ +public: + CNetBrowseApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNetBrowseApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CNetBrowseApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.rc new file mode 100644 index 0000000..45aaaf3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.rc @@ -0,0 +1,229 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "FileDescription", "NETBROWSE MFC EX Demo Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "NETBROWSE" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "NETBROWSE.EXE" + VALUE "ProductName", "NETBROWSE Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About NetBrowse..." + ID_DESCRIPTION_FILE "netbrowseinfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "NetBrowse Demo" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_NETBROWSE_DIALOG DIALOGEX 0, 0, 305, 233 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Net Browse Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + GROUPBOX "Create settings",IDC_STATIC,7,7,291,60 + CONTROL "Show &Comment names",IDC_COMMENT_NAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,17,85,10 + CONTROL "Show &Disks",IDC_DISKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,29,51,10 + CONTROL "Show &Printers",IDC_PRINTERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,41,57,10 + LTEXT "Max numbers of levels",IDC_STATIC,105,53,72,8 + EDITTEXT IDC_MAX_LEVELS,180,51,26,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_MAX_LEVELS_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,207,51,11,12 + LTEXT "Initially &Expand level",IDC_STATIC,105,37,65,8 + EDITTEXT IDC_EXPAND_LEVEL,180,35,26,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_EXPAND_LEVEL_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,206,35,11,12 + CONTROL "Report E&rrors",IDC_REPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,53,56,10 + PUSHBUTTON "&Re-initialize",IDC_REINITIALIZE,241,34,50,14 + CONTROL "Tree1",IDC_NET_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,75,125,125 + LTEXT "Scope",IDC_STATIC,139,75,21,8 + EDITTEXT IDC_SCOPE,188,73,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Type",IDC_STATIC,139,91,17,8 + EDITTEXT IDC_TYPE,188,89,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Display Type",IDC_STATIC,139,107,42,8 + EDITTEXT IDC_DISPLAY_TYPE,188,105,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Usage",IDC_STATIC,139,123,22,8 + EDITTEXT IDC_USAGE,188,121,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Local Name",IDC_STATIC,139,139,41,8 + EDITTEXT IDC_LOCAL_NAME,188,137,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Remote Name",IDC_STATIC,139,155,45,8 + EDITTEXT IDC_REMOTE_NAME,188,153,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Comment",IDC_STATIC,139,171,30,8 + EDITTEXT IDC_COMMENT,188,169,110,12,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Provider",IDC_STATIC,139,187,27,8 + EDITTEXT IDC_PROVIDER,188,185,110,12,ES_AUTOHSCROLL | ES_READONLY + DEFPUSHBUTTON "&Close",IDOK,127,212,50,14 + COMBOBOX IDC_SCOPE_LIST,105,16,187,45,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_NETBROWSE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 298 + TOPMARGIN, 7 + BOTTOMMARGIN, 226 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\NetBrowse.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXNetBrowseTree.rc"" // Net browse resource\r\n" + "#endif\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\\NetBrowse.ico" +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\NetBrowse.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXNetBrowseTree.rc" // Net browse resource +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.vcproj new file mode 100644 index 0000000..470db81 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowse.vcproj @@ -0,0 +1,871 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.cpp new file mode 100644 index 0000000..04ab3f8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.cpp @@ -0,0 +1,398 @@ +// ========================================================================== +// Class Implementation : CNetBrowseDlg +// ========================================================================== + +// Source file : NetBrowseDlg.cpp + +//================== Dundas Software ====================================== +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "NetBrowse.h" +#include "NetBrowseDlg.h" +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +// Data members ------------------------------------------------------------- +// protected: +// private: + +// Member functions --------------------------------------------------------- +// public: + +BEGIN_MESSAGE_MAP(CNetBrowseDlg, CDialog) + //{{AFX_MSG_MAP(CNetBrowseDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_NOTIFY(TVN_SELCHANGED, IDC_NET_TREE, OnSelchangedNetTree) + ON_BN_CLICKED(IDC_REINITIALIZE, OnReinitialize) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +CNetBrowseDlg::CNetBrowseDlg(CWnd* pParent /*=NULL*/) +: +CDialog(CNetBrowseDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CNetBrowseDlg) + m_sComment = _T(""); + m_sDisplayType = _T(""); + m_sProvider = _T(""); + m_sRemoteName = _T(""); + m_sScope = _T(""); + m_sType = _T(""); + m_sUsage = _T(""); + m_sLocalName = _T(""); + m_bShowDisks = TRUE; + m_bShowCommentNames = TRUE; + m_nExpandLevel = 0; + m_bShowPrinters = FALSE; + m_bReportErrors = TRUE; + m_nScopeList = 1; + m_nMaxLevels = 10; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +CNetBrowseDlg::~CNetBrowseDlg() +{ +} + +void CNetBrowseDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CNetBrowseDlg) + DDX_Control(pDX, IDC_MAX_LEVELS_SPIN, m_wndMaxLevelsSpin); + DDX_Control(pDX, IDC_SCOPE_LIST, m_wndScopeList); + DDX_Control(pDX, IDC_EXPAND_LEVEL_SPIN, m_wndExpandLevelSpin); + DDX_Control(pDX, IDC_NET_TREE, m_wndNetBrowseTree); + DDX_Text(pDX, IDC_COMMENT, m_sComment); + DDX_Text(pDX, IDC_DISPLAY_TYPE, m_sDisplayType); + DDX_Text(pDX, IDC_PROVIDER, m_sProvider); + DDX_Text(pDX, IDC_REMOTE_NAME, m_sRemoteName); + DDX_Text(pDX, IDC_SCOPE, m_sScope); + DDX_Text(pDX, IDC_TYPE, m_sType); + DDX_Text(pDX, IDC_USAGE, m_sUsage); + DDX_Text(pDX, IDC_LOCAL_NAME, m_sLocalName); + DDX_Check(pDX, IDC_DISKS, m_bShowDisks); + DDX_Check(pDX, IDC_COMMENT_NAMES, m_bShowCommentNames); + DDX_Text(pDX, IDC_EXPAND_LEVEL, m_nExpandLevel); + DDX_Check(pDX, IDC_PRINTERS, m_bShowPrinters); + DDX_Check(pDX, IDC_REPORT, m_bReportErrors); + DDX_CBIndex(pDX, IDC_SCOPE_LIST, m_nScopeList); + DDX_Text(pDX, IDC_MAX_LEVELS, m_nMaxLevels); + //}}AFX_DATA_MAP +} + +BOOL CNetBrowseDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Fill combo box with values + m_wndScopeList.AddString(_T("Connected Resources")); + m_wndScopeList.AddString(_T("Global Resources")); + m_wndScopeList.AddString(_T("Persistent Connections")); + m_wndScopeList.AddString(_T("Recent Connections (Win4)")); + m_wndScopeList.AddString(_T("Current Context Resources (Win4)")); + // ... Net scope is 1-based, index in combo is 0-based + m_wndScopeList.SetCurSel(4); + m_nScopeList=4; + + // Set the spin ranges + m_wndMaxLevelsSpin.SetRange(0, 100); + m_wndExpandLevelSpin.SetRange(0, 10); + + // Set initial values of the net browse control + SetTreeInitSettings(); + + // ... Set the tree as the focussed control + m_wndNetBrowseTree.SetFocus(); + return FALSE; // return TRUE unless you set the focus to a control +} + +void CNetBrowseDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CNetBrowseDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CNetBrowseDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CNetBrowseDlg::OnSelchangedNetTree(NMHDR* pNMHDR, LRESULT* pResult) +{ + UNREFERENCED_PARAMETER(pNMHDR); + // NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + + // SHow the information about the currently selected resource + const NETRESOURCE* pNetResource = m_wndNetBrowseTree.GetCurrentNetResource(); + if (pNetResource != NULL) + { + m_sScope.Format(_T("%i"), pNetResource->dwScope); + m_sScope += _T(" ") + GetScopeName(pNetResource); + m_sType.Format(_T("%i"), pNetResource->dwType); + m_sType += _T(" ") + GetTypeName(pNetResource); + m_sDisplayType.Format(_T("%i"), pNetResource->dwDisplayType); + m_sDisplayType += _T(" ") + GetDisplayTypeName(pNetResource); + m_sUsage.Format(_T("0x%X"), pNetResource->dwUsage); + m_sUsage += _T(" ") + GetUsageName(pNetResource); + m_sLocalName = pNetResource->lpLocalName; + m_sRemoteName = pNetResource->lpRemoteName; + m_sComment = pNetResource->lpComment; + m_sProvider = pNetResource->lpProvider; + } + else + { + m_sScope.Empty(); + m_sType.Empty(); + m_sDisplayType.Empty(); + m_sUsage.Empty(); + m_sLocalName.Empty(); + m_sRemoteName.Empty(); + m_sComment.Empty(); + m_sProvider.Empty(); + } + UpdateData(FALSE); + + *pResult = 0; +} + +CString CNetBrowseDlg::GetScopeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sScopeName; + switch (pNetResource->dwScope) + { + case RESOURCE_CONNECTED: + sScopeName = _T("(Connected resources)"); + break; + case RESOURCE_GLOBALNET: + sScopeName = _T("(Global resources)"); + break; + case RESOURCE_REMEMBERED: + sScopeName = _T("(Persistent connections)"); + break; + case RESOURCE_RECENT: + sScopeName = _T("(Recent connections)"); + break; + case RESOURCE_CONTEXT: + sScopeName = _T("(Current context resources)"); + break; + default: + // Let string stay empty + break; + } + return sScopeName; +} + +CString CNetBrowseDlg::GetTypeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sTypeName; + switch (pNetResource->dwType) + { + case RESOURCETYPE_ANY: + sTypeName = _T("(Any resource)"); + break; + case RESOURCETYPE_DISK: + sTypeName = _T("(Disk resource)"); + break; + case RESOURCETYPE_PRINT: + sTypeName = _T("(Print resource)"); + break; + case RESOURCETYPE_RESERVED: + sTypeName = _T("(Reserved resource)"); + break; + case RESOURCETYPE_UNKNOWN: + sTypeName = _T("(Unknown resource)"); + break; + default: + // Let string stay empty + break; + } + return sTypeName; +} + +CString CNetBrowseDlg::GetDisplayTypeName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sDisplayTypeName; + switch (pNetResource->dwDisplayType) + { + case RESOURCEDISPLAYTYPE_GENERIC: + sDisplayTypeName = _T("(Unspecified)"); + break; + case RESOURCEDISPLAYTYPE_DOMAIN: + sDisplayTypeName = _T("(Domain)"); + break; + case RESOURCEDISPLAYTYPE_SERVER: + sDisplayTypeName = _T("(Server)"); + break; + case RESOURCEDISPLAYTYPE_SHARE: + sDisplayTypeName = _T("(Share)"); + break; + case RESOURCEDISPLAYTYPE_FILE: + sDisplayTypeName = _T("(file)"); + break; + case RESOURCEDISPLAYTYPE_GROUP: + sDisplayTypeName = _T("(Broup)"); + break; + case RESOURCEDISPLAYTYPE_NETWORK: + sDisplayTypeName = _T("(Network)"); + break; + case RESOURCEDISPLAYTYPE_ROOT: + sDisplayTypeName = _T("(Network Root)"); + break; + case RESOURCEDISPLAYTYPE_SHAREADMIN: + sDisplayTypeName = _T("(Administrative Share)"); + break; + case RESOURCEDISPLAYTYPE_DIRECTORY: + sDisplayTypeName = _T("(Directory)"); + break; + case RESOURCEDISPLAYTYPE_TREE: + sDisplayTypeName = _T("(Tree)"); + break; + default: + // Let string stay empty + break; + } + return sDisplayTypeName; +} + +CString CNetBrowseDlg::GetUsageName(const NETRESOURCE* pNetResource) const +{ + ASSERT(pNetResource != NULL); + CString sUsageName; + if (pNetResource->dwScope == RESOURCE_GLOBALNET) + { + if ((pNetResource->dwUsage & RESOURCEUSAGE_CONNECTABLE) == RESOURCEUSAGE_CONNECTABLE) + sUsageName += _T("Connectable - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_CONTAINER) == RESOURCEUSAGE_CONTAINER) + sUsageName += _T("Container - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_NOLOCALDEVICE) == RESOURCEUSAGE_NOLOCALDEVICE) + sUsageName += _T("Local not needed - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_SIBLING) == RESOURCEUSAGE_SIBLING) + sUsageName += _T("Sibling - "); + if ((pNetResource->dwUsage & RESOURCEUSAGE_RESERVED) == RESOURCEUSAGE_RESERVED) + sUsageName += _T("Reserved - "); + if (!sUsageName.IsEmpty()) + { + // ... Remove trailing hyphen + sUsageName = sUsageName.Left(sUsageName.GetLength() - 3); + // ... Add parentheses + sUsageName = _T("(") + sUsageName + _T(")"); + } + } + return sUsageName; +} + + +void CNetBrowseDlg::OnReinitialize() +{ + // Get the data from the GUI + if (!UpdateData(TRUE)) + { + // ... Data validation failed, user already warned, so just return + return; + } + + // Clear the info controls + m_sScope.Empty(); + m_sType.Empty(); + m_sDisplayType.Empty(); + m_sUsage.Empty(); + m_sLocalName.Empty(); + m_sRemoteName.Empty(); + m_sComment.Empty(); + m_sProvider.Empty(); + UpdateData(FALSE); + + // ... Set new initial values + SetTreeInitSettings(); + // ... Build the contents of the tree again + m_wndNetBrowseTree.BuildTreeContents(); + // ... Select the root if (it exists) + m_wndNetBrowseTree.SelectItem(m_wndNetBrowseTree.GetRootItem()); +} + +void CNetBrowseDlg::SetTreeInitSettings() +{ + // Set initial values of the net browse control + m_wndNetBrowseTree.ShowCommentName(m_bShowCommentNames); + m_wndNetBrowseTree.ShowDisks(m_bShowDisks); + m_wndNetBrowseTree.ShowPrinters(m_bShowPrinters); + // ... Net scope is 1-based, index in combo is 0-based + m_wndNetBrowseTree.SetResourceScope(m_nScopeList + 1); + m_wndNetBrowseTree.SetMaxNumLevels(m_nMaxLevels); + m_wndNetBrowseTree.SetInitialExpandLevel(m_nExpandLevel); + m_wndNetBrowseTree.ReportErrors(m_bReportErrors); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.h new file mode 100644 index 0000000..1c1cf53 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/NetBrowseDlg.h @@ -0,0 +1,110 @@ +// ========================================================================== +// Class Specification : CNetBrowseDlg +// ========================================================================== + +// Header file : NetBrowseDlg.h + +//================== Dundas Software ====================================== +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CDialog + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// YES Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __NETBROWSEDLG_H__ +#define __NETBROWSEDLG_H__ + +#include "OXNetBrowseTree.h" + +class CNetBrowseDlg : public CDialog +{ +// Data members ------------------------------------------------------------- +public: + //{{AFX_DATA(CNetBrowseDlg) + enum { IDD = IDD_NETBROWSE_DIALOG }; + CSpinButtonCtrl m_wndMaxLevelsSpin; + CComboBox m_wndScopeList; + CSpinButtonCtrl m_wndExpandLevelSpin; + COXNetBrowseTree m_wndNetBrowseTree; + CString m_sComment; + CString m_sDisplayType; + CString m_sProvider; + CString m_sRemoteName; + CString m_sScope; + CString m_sType; + CString m_sUsage; + CString m_sLocalName; + BOOL m_bShowDisks; + BOOL m_bShowCommentNames; + int m_nExpandLevel; + BOOL m_bShowPrinters; + BOOL m_bReportErrors; + int m_nScopeList; + int m_nMaxLevels; + //}}AFX_DATA + +protected: + HICON m_hIcon; + +private: + +// Member functions --------------------------------------------------------- +public: + CNetBrowseDlg(CWnd* pParent = NULL); // standard constructor + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + + virtual ~CNetBrowseDlg(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNetBrowseDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +protected: + void SetTreeInitSettings(); + CString GetScopeName(const NETRESOURCE* pNetResource) const; + CString GetTypeName(const NETRESOURCE* pNetResource) const; + CString GetDisplayTypeName(const NETRESOURCE* pNetResource) const; + CString GetUsageName(const NETRESOURCE* pNetResource) const; + + //{{AFX_MSG(CNetBrowseDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSelchangedNetTree(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnReinitialize(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: +}; + +#endif // __NETBROWSEDLG_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.cpp new file mode 100644 index 0000000..aac59ae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// NetBrowse.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.h new file mode 100644 index 0000000..9775575 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/StdAfx.h @@ -0,0 +1,14 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/netbrowseinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/netbrowseinfo.rtf new file mode 100644 index 0000000..98a6e76 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/netbrowseinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.rc2 new file mode 100644 index 0000000..a78cebe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/NetBrowse.rc2 @@ -0,0 +1,13 @@ +// +// NETBROWSE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/OXNetBrowseTreeImg.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/OXNetBrowseTreeImg.bmp new file mode 100644 index 0000000..68a30df Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/res/OXNetBrowseTreeImg.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/resource.h new file mode 100644 index 0000000..8a3fba6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/NetBrowse/resource.h @@ -0,0 +1,40 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by NetBrowse.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_NETBROWSE_DIALOG 102 +#define IDRMAINFRAME 102 +#define ID_DESCRIPTION_FILE 103 +#define IDR_MAINFRAME 128 +#define IDC_NET_TREE 1000 +#define IDC_SCOPE 1001 +#define IDC_TYPE 1002 +#define IDC_DISPLAY_TYPE 1003 +#define IDC_USAGE 1004 +#define IDC_REMOTE_NAME 1005 +#define IDC_COMMENT 1006 +#define IDC_PROVIDER 1007 +#define IDC_LOCAL_NAME 1008 +#define IDC_COMMENT_NAMES 1009 +#define IDC_DISKS 1011 +#define IDC_PRINTERS 1012 +#define IDC_EXPAND_LEVEL 1013 +#define IDC_EXPAND_LEVEL_SPIN 1014 +#define IDC_REPORT 1015 +#define IDC_MAX_LEVELS 1016 +#define IDC_MAX_LEVELS_SPIN 1017 +#define IDC_REINITIALIZE 1018 +#define IDC_SCOPE_LIST 1021 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1022 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.cpp new file mode 100644 index 0000000..573aeef --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Notes.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.h new file mode 100644 index 0000000..03621da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__80E35B00_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_CHILDFRM_H__80E35B00_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__80E35B00_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.cpp new file mode 100644 index 0000000..e109060 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.cpp @@ -0,0 +1,107 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Notes.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.h new file mode 100644 index 0000000..5cebd09 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/MainFrm.h @@ -0,0 +1,57 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__80E35AFE_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_MAINFRM_H__80E35AFE_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__80E35AFE_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.clw new file mode 100644 index 0000000..bacc6f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.clw @@ -0,0 +1,145 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CAboutDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "Notes.h" +LastPage=0 + +ClassCount=6 +Class1=CNotesApp +Class2=CNotesDoc +Class3=CNotesView +Class4=CMainFrame + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDR_NOTESTYPE +Class5=CChildFrame +Class6=CAboutDlg +Resource3=IDD_ABOUTBOX + +[CLS:CNotesApp] +Type=0 +HeaderFile=Notes.h +ImplementationFile=Notes.cpp +Filter=N + +[CLS:CNotesDoc] +Type=0 +HeaderFile=NotesDoc.h +ImplementationFile=NotesDoc.cpp +Filter=N + +[CLS:CNotesView] +Type=0 +HeaderFile=NotesView.h +ImplementationFile=NotesView.cpp +Filter=C +BaseClass=COXNotesEditView +VirtualFilter=VWC + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M + + +[CLS:CAboutDlg] +Type=0 +HeaderFile=Notes.cpp +ImplementationFile=Notes.cpp +Filter=D +LastObject=CAboutDlg + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_NOTESTYPE] +Type=1 +Class=CNotesView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_WINDOW_ARRANGE +Command21=ID_APP_ABOUT +CommandCount=21 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.cpp new file mode 100644 index 0000000..8bd717c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.cpp @@ -0,0 +1,163 @@ +// Notes.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Notes.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "NotesDoc.h" +#include "NotesView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNotesApp + +BEGIN_MESSAGE_MAP(CNotesApp, CWinApp) + //{{AFX_MSG_MAP(CNotesApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CNotesApp construction + +CNotesApp::CNotesApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CNotesApp object + +CNotesApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CNotesApp initialization + +BOOL CNotesApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // 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(); // 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_NOTESTYPE, + RUNTIME_CLASS(CNotesDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CNotesView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CNotesApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CNotesApp message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsp new file mode 100644 index 0000000..802147d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsp @@ -0,0 +1,274 @@ +# Microsoft Developer Studio Project File - Name="Notes" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Notes - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Notes.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Notes.mak" CFG="Notes - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Notes - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Notes - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Notes - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "Notes - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "Notes - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Notes - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Notes.exe" + +!ELSEIF "$(CFG)" == "Notes - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Notes.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Notes - Win32 DebugUnicode" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugUnicode" +# PROP BASE Intermediate_Dir "DebugUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Notes.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Notes - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUnicode" +# PROP BASE Intermediate_Dir "ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Notes.exe" + +!ELSEIF "$(CFG)" == "Notes - Win32 ReleaseShared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseShared" +# PROP BASE Intermediate_Dir "ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Notes.exe" + +!ENDIF + +# Begin Target + +# Name "Notes - Win32 Release" +# Name "Notes - Win32 Debug" +# Name "Notes - Win32 DebugUnicode" +# Name "Notes - Win32 ReleaseUnicode" +# Name "Notes - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\Notes.cpp +# End Source File +# Begin Source File + +SOURCE=.\Notes.rc +# End Source File +# Begin Source File + +SOURCE=.\NotesDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\NotesView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXNotesEditView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Notes.h +# End Source File +# Begin Source File + +SOURCE=.\NotesDoc.h +# End Source File +# Begin Source File + +SOURCE=.\NotesView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXNotesEditView.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Notes.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Notes.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\NotesDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Notes.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsw new file mode 100644 index 0000000..8c2c8bd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Notes"=".\Notes.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/Notes", HSIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.h new file mode 100644 index 0000000..c202784 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.h @@ -0,0 +1,49 @@ +// Notes.h : main header file for the NOTES application +// + +#if !defined(AFX_NOTES_H__80E35AFA_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_NOTES_H__80E35AFA_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CNotesApp: +// See Notes.cpp for the implementation of this class +// + +class CNotesApp : public CWinApp +{ +public: + CNotesApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNotesApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CNotesApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_NOTES_H__80E35AFA_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.rc new file mode 100644 index 0000000..3502a60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.rc @@ -0,0 +1,428 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\Notes.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" + "#include ""OXNotesEditView.rc""\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\\Notes.ico" +IDR_NOTESTYPE ICON "res\\NotesDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "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 Notes...", ID_APP_ABOUT + END +END + +IDR_NOTESTYPE 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 Notes...", 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 DIALOG 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Notes" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "Notes Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2000",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,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 "040904B0" + BEGIN + VALUE "FileDescription", "Notes MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "Notes" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "Notes.EXE" + VALUE "ProductName", "Notes Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + 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 + IDR_MAINFRAME "Notes" + IDR_NOTESTYPE "\nNotes\nNotes\n\n\nNotes.Document\nNotes Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Notes" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\Notes.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXNotesEditView.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.vcproj new file mode 100644 index 0000000..29ca329 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/Notes.vcproj @@ -0,0 +1,988 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.cpp new file mode 100644 index 0000000..7a04061 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.cpp @@ -0,0 +1,84 @@ +// NotesDoc.cpp : implementation of the CNotesDoc class +// + +#include "stdafx.h" +#include "Notes.h" + +#include "NotesDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNotesDoc + +IMPLEMENT_DYNCREATE(CNotesDoc, CDocument) + +BEGIN_MESSAGE_MAP(CNotesDoc, CDocument) + //{{AFX_MSG_MAP(CNotesDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNotesDoc construction/destruction + +CNotesDoc::CNotesDoc() +{ + // TODO: add one-time construction code here + +} + +CNotesDoc::~CNotesDoc() +{ +} + +BOOL CNotesDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CNotesDoc serialization + +void CNotesDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CNotesDoc diagnostics + +#ifdef _DEBUG +void CNotesDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CNotesDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CNotesDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.h new file mode 100644 index 0000000..71945f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesDoc.h @@ -0,0 +1,57 @@ +// NotesDoc.h : interface of the CNotesDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NOTESDOC_H__80E35B02_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_NOTESDOC_H__80E35B02_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CNotesDoc : public CDocument +{ +protected: // create from serialization only + CNotesDoc(); + DECLARE_DYNCREATE(CNotesDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNotesDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CNotesDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CNotesDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_NOTESDOC_H__80E35B02_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.cpp new file mode 100644 index 0000000..f3323c0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.cpp @@ -0,0 +1,124 @@ +// NotesView.cpp : implementation of the CNotesView class +// + +#include "stdafx.h" +#include "Notes.h" + +#include "NotesDoc.h" +#include "NotesView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNotesView + +IMPLEMENT_DYNCREATE(CNotesView, COXNotesEditView) + +BEGIN_MESSAGE_MAP(CNotesView, COXNotesEditView) + //{{AFX_MSG_MAP(CNotesView) + ON_WM_CREATE() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, COXNotesEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, COXNotesEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, COXNotesEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNotesView construction/destruction + +CNotesView::CNotesView() +{ + // TODO: add construction code here + +} + +CNotesView::~CNotesView() +{ +} + +BOOL CNotesView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return COXNotesEditView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CNotesView drawing + +void CNotesView::OnDraw(CDC* pDC) +{ + UNUSED_ALWAYS(pDC); + CNotesDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CNotesView printing + +BOOL CNotesView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CNotesView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + COXNotesEditView::OnBeginPrinting(pDC, pInfo); +} + +void CNotesView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CNotesView diagnostics + +#ifdef _DEBUG +void CNotesView::AssertValid() const +{ + COXNotesEditView::AssertValid(); +} + +void CNotesView::Dump(CDumpContext& dc) const +{ + COXNotesEditView::Dump(dc); +} + +CNotesDoc* CNotesView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CNotesDoc))); + return (CNotesDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CNotesView message handlers + +void CNotesView::OnChangeCursor(HCURSOR* phCursor, UINT nPosition) +{ + UNUSED_ALWAYS(phCursor); + UNUSED_ALWAYS(nPosition); + +} + + +int CNotesView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COXNotesEditView::OnCreate(lpCreateStruct) == -1) + return -1; + + SetWindowText(CLIENT_TEXT); + SetBookmark(10,0); + SetBookmark(40,2); + SetBookmark(90,3); + return 0; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.h new file mode 100644 index 0000000..91eb10d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/NotesView.h @@ -0,0 +1,76 @@ +// NotesView.h : interface of the CNotesView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NOTESVIEW_H__80E35B04_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_NOTESVIEW_H__80E35B04_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXNotesEditView.h" + +#define CLIENT_TEXT _T("This is a sample how it can look.\r\n\ +You can set different types of the bookmarks that will have different look.\r\n\ +Up to 256 different images supported. The bookmarks can be added,\r\n\ +deleted, or updated. The bookmarks is set on the character basis,\r\n\ +not on the line basis. With double click the bookmark may be set on \r\n\ +or removed. Select a few lines and press \"Tab\" and the \"Shift-Tab\"\r\n\ +to see that it works like Visual Studio. And now move Cursor to the notes area.") + +class CNotesView : public COXNotesEditView +{ +protected: // create from serialization only + CNotesView(); + DECLARE_DYNCREATE(CNotesView) + +// Attributes +public: + CNotesDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNotesView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CNotesView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + virtual void OnChangeCursor(HCURSOR* phCursor, UINT nPosition); + +// Generated message map functions +protected: + //{{AFX_MSG(CNotesView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in NotesView.cpp +inline CNotesDoc* CNotesView::GetDocument() + { return (CNotesDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_NOTESVIEW_H__80E35B04_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ReadMe.txt new file mode 100644 index 0000000..94cb3f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/ReadMe.txt @@ -0,0 +1,117 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : Notes +======================================================================== + + +AppWizard has created this Notes 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 Notes application. + +Notes.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +Notes.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CNotesApp application class. + +Notes.cpp + This is the main application source file that contains the application + class CNotesApp. + +Notes.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++. + +Notes.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\Notes.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file Notes.rc. + +res\Notes.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 Notes.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +NotesDoc.h, NotesDoc.cpp - the document + These files contain your CNotesDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CNotesDoc::Serialize). + +NotesView.h, NotesView.cpp - the view of the document + These files contain your CNotesView class. + CNotesView objects are used to view CNotesDoc objects. + +res\NotesDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CNotesDoc class. This icon is included by the main + resource file Notes.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Notes.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.cpp new file mode 100644 index 0000000..03904ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Notes.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.h new file mode 100644 index 0000000..28a2803 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__80E35AFC_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__80E35AFC_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__80E35AFC_070A_11D4_ACEF_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.rc2 new file mode 100644 index 0000000..225a26e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Notes.rc2 @@ -0,0 +1,13 @@ +// +// NOTES.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/NotesDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/NotesDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/NotesDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/resource.h new file mode 100644 index 0000000..1f1a291 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Notes/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Notes.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_NOTESTYPE 129 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/CalDemoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/CalDemoInfo.rtf new file mode 100644 index 0000000..0410eb4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/CalDemoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.clw new file mode 100644 index 0000000..1e1217b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.clw @@ -0,0 +1,67 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=COXCalendarDemo1App +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "oxcalendardemo1.h" +LastPage=0 + +ClassCount=2 +Class1=COXCalendarDemo1App +Class2=COXCalendarDemo1Dlg + +ResourceCount=2 +Resource1=IDD_OXCALENDARDEMO1_DIALOG (English (U.S.)) +Resource2=IDD_OXCALENDARDEMO1_DIALOG + +[CLS:COXCalendarDemo1App] +Type=0 +BaseClass=CWinApp +HeaderFile=OXCalendarDemo1.h +ImplementationFile=OXCalendarDemo1.cpp +Filter=N +VirtualFilter=AC +LastObject=COXCalendarDemo1App + +[CLS:COXCalendarDemo1Dlg] +Type=0 +BaseClass=CDialog +HeaderFile=OXCalendarDemo1Dlg.h +ImplementationFile=OXCalendarDemo1Dlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=COXCalendarDemo1Dlg + +[DLG:IDD_OXCALENDARDEMO1_DIALOG] +Type=1 +Class=COXCalendarDemo1Dlg +ControlCount=11 +Control1=IDC_EDIT1,edit,1350631552 +Control2=IDC_EDIT2,edit,1350631552 +Control3=IDC_CALENDAR1,edit,1350631552 +Control4=IDC_CALENDAR2,edit,1350631552 +Control5=IDC_STATIC,static,1342308864 +Control6=IDC_STATIC,static,1342308864 +Control7=IDC_STATIC,static,1342308864 +Control8=IDC_STATIC,static,1342308864 +Control9=IDOK,button,1342242817 +Control10=IDC_STATIC,static,1342308864 +Control11=IDC_STATIC,static,1342308864 + +[DLG:IDD_OXCALENDARDEMO1_DIALOG (English (U.S.))] +Type=1 +ControlCount=11 +Control1=IDC_EDIT1,edit,1350631552 +Control2=IDC_EDIT2,edit,1350631552 +Control3=IDC_CALENDAR1,edit,1350631552 +Control4=IDC_CALENDAR2,edit,1350631552 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_OK,button,1073807361 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.cpp new file mode 100644 index 0000000..50e7ddd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.cpp @@ -0,0 +1,93 @@ +// OXCalendarDemo1.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "OXCalendarDemo1.h" +#include "OXCalendarDemo1Dlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1App + +BEGIN_MESSAGE_MAP(COXCalendarDemo1App, CWinApp) + //{{AFX_MSG_MAP(COXCalendarDemo1App) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1App construction + +COXCalendarDemo1App::COXCalendarDemo1App() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only COXCalendarDemo1App object + +COXCalendarDemo1App theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1App initialization + +BOOL COXCalendarDemo1App::InitInstance() +{ + 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + COXCalendarDemo1Dlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int COXCalendarDemo1App::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsp new file mode 100644 index 0000000..cc902ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsp @@ -0,0 +1,273 @@ +# Microsoft Developer Studio Project File - Name="OXCalendarDemo1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=OXCalendarDemo1 - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "OXCalendarDemo1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "OXCalendarDemo1.mak" CFG="OXCalendarDemo1 - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "OXCalendarDemo1 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "OXCalendarDemo1 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "OXCalendarDemo1 - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "OXCalendarDemo1 - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "OXCalendarDemo1 - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "OXCalendarDemo1 - Win32 Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OXCalendarDemo1.exe" + +!ELSEIF "$(CFG)" == "OXCalendarDemo1 - Win32 Debug" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"OXCalendarDemo1.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "OXCalendarDemo1 - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "OXCalend" +# PROP BASE Intermediate_Dir "OXCalend" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"OXCalendarDemo1.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OXCalendarDemo1.exe" + +!ELSEIF "$(CFG)" == "OXCalendarDemo1 - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "OXCalen0" +# PROP BASE Intermediate_Dir "OXCalen0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"OXCalendarDemo1.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"OXCalendarDemo1.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "OXCalendarDemo1 - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "OXCalen1" +# PROP BASE Intermediate_Dir "OXCalen1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"OXCalendarDemo1.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"OXCalendarDemo1.exe" + +!ENDIF + +# Begin Target + +# Name "OXCalendarDemo1 - Win32 Release" +# Name "OXCalendarDemo1 - Win32 Debug" +# Name "OXCalendarDemo1 - Win32 Release_Shared" +# Name "OXCalendarDemo1 - Win32 Unicode_Debug" +# Name "OXCalendarDemo1 - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\OXCalendarDemo1.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXCalendarDemo1.rc +# End Source File +# Begin Source File + +SOURCE=.\OXCalendarDemo1Dlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXCalendar.h +# End Source File +# Begin Source File + +SOURCE=.\OXCalendarDemo1.h +# End Source File +# Begin Source File + +SOURCE=.\OXCalendarDemo1Dlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCalendarPopup.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\OXCalendarDemo1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\OXCalendarDemo1.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\OXCalendarDemo1.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsw new file mode 100644 index 0000000..c18d236 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "OXCalendarDemo1"=".\OXCalendarDemo1.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/OXCalendarDemo1", DUIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.h new file mode 100644 index 0000000..70c21ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.h @@ -0,0 +1,50 @@ +// OXCalendarDemo1.h : main header file for the OXCALENDARDEMO1 application +// + +#if !defined(AFX_OXCALENDARDEMO1_H__4EDE7CB7_874D_11D1_A4E3_0020359647BF__INCLUDED_) +#define AFX_OXCALENDARDEMO1_H__4EDE7CB7_874D_11D1_A4E3_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1App: +// See OXCalendarDemo1.cpp for the implementation of this class +// + +class COXCalendarDemo1App : public CWinApp +{ +public: + COXCalendarDemo1App(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXCalendarDemo1App) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(COXCalendarDemo1App) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OXCALENDARDEMO1_H__4EDE7CB7_874D_11D1_A4E3_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.rc new file mode 100644 index 0000000..4ad1ac2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.rc @@ -0,0 +1,204 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\OXCalendarDemo1.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXCalendarPopup.rc""\r\n" + "#endif\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\\OXCalendarDemo1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OXCALENDARDEMO1_DIALOG DIALOGEX 0, 0, 237, 94 +STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "OXCalendarDemo Ultimate ToolBox" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT1,69,7,161,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT2,69,22,161,12,ES_AUTOHSCROLL + EDITTEXT IDC_CALENDAR1,69,37,95,12,ES_AUTOHSCROLL + EDITTEXT IDC_CALENDAR2,69,52,95,12,ES_AUTOHSCROLL + LTEXT "First Name",IDC_STATIC,7,7,44,12,SS_CENTERIMAGE + LTEXT "Last Name",IDC_STATIC,7,22,44,12,SS_CENTERIMAGE + LTEXT "Last Appointment",IDC_STATIC,7,37,59,11,SS_CENTERIMAGE + LTEXT "Next Appointment",IDC_STATIC,7,52,60,11,SS_CENTERIMAGE + DEFPUSHBUTTON "&Close",IDOK,196,71,34,16 + LTEXT "(format: mm/dd/yy)",IDC_STATIC,167,37,60,11,SS_CENTERIMAGE + LTEXT "(format: default)",IDC_STATIC,167,52,50,11,SS_CENTERIMAGE +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 "040904B0" + BEGIN + VALUE "FileDescription", "OXCalendarDemo1 MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "OXCalendarDemo1" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "OXCalendarDemo1.EXE" + VALUE "ProductName", "OXCalendarDemo1 Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OXCALENDARDEMO1_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 230 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About OXCalendarDemo..." + ID_DESCRIPTION_FILE "CalDemoInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "OXCalendar Class Demo" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\OXCalendarDemo1.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXCalendarPopup.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.vcproj new file mode 100644 index 0000000..9b1fefa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1.vcproj @@ -0,0 +1,934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.cpp new file mode 100644 index 0000000..bd1ec28 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.cpp @@ -0,0 +1,146 @@ +// OXCalendarDemo1Dlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "OXCalendarDemo1.h" +#include "OXCalendarDemo1Dlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1Dlg dialog + +COXCalendarDemo1Dlg::COXCalendarDemo1Dlg(CWnd* pParent /*=NULL*/) + : CDialog(COXCalendarDemo1Dlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(COXCalendarDemo1Dlg) + m_First = _T("First"); + m_Last = _T("Knight"); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void COXCalendarDemo1Dlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COXCalendarDemo1Dlg) + DDX_Control(pDX, IDC_CALENDAR2, m_Calendar2); + DDX_Control(pDX, IDC_CALENDAR1, m_Calendar1); + DDX_Text(pDX, IDC_EDIT1, m_First); + DDX_Text(pDX, IDC_EDIT2, m_Last); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(COXCalendarDemo1Dlg, CDialog) + //{{AFX_MSG_MAP(COXCalendarDemo1Dlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1Dlg message handlers + +BOOL COXCalendarDemo1Dlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + m_Calendar1.SetFirstDayOfWeek(0); + m_Calendar2.SetFirstDayOfWeek(0); + // + COleDateTime SampleLastDay = COleDateTime::GetCurrentTime(); // give a sample last + /// + // do it before SetCurrentDate() + m_Calendar1.SetFormat(_T("%m/%d/%y")); + + /// + //Set current date value + m_Calendar1.SetCurrentDate( SampleLastDay ); + + // Set Date Range for calendar + m_Calendar2.SetDateRange(COleDateTime(SampleLastDay.GetYear()-1,1,1,0,0,0), + COleDateTime(SampleLastDay.GetYear()+1,12,31,0,0,0)); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void COXCalendarDemo1Dlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void COXCalendarDemo1Dlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR COXCalendarDemo1Dlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.h new file mode 100644 index 0000000..79bf69f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/OXCalendarDemo1Dlg.h @@ -0,0 +1,52 @@ +// OXCalendarDemo1Dlg.h : header file +// + +#if !defined(AFX_OXCALENDARDEMO1DLG_H__4EDE7CB9_874D_11D1_A4E3_0020359647BF__INCLUDED_) +#define AFX_OXCALENDARDEMO1DLG_H__4EDE7CB9_874D_11D1_A4E3_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +#include "OXCalendar.h" +///////////////////////////////////////////////////////////////////////////// +// COXCalendarDemo1Dlg dialog + +class COXCalendarDemo1Dlg : public CDialog +{ +// Construction +public: + COXCalendarDemo1Dlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(COXCalendarDemo1Dlg) + enum { IDD = IDD_OXCALENDARDEMO1_DIALOG }; + COXCalendar m_Calendar2; + COXCalendar m_Calendar1; + CString m_First; + CString m_Last; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXCalendarDemo1Dlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(COXCalendarDemo1Dlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OXCALENDARDEMO1DLG_H__4EDE7CB9_874D_11D1_A4E3_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/ReadMe.txt new file mode 100644 index 0000000..877fb67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : OXCalendarDemo1 +======================================================================== + + +AppWizard has created this OXCalendarDemo1 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 OXCalendarDemo1 application. + +OXCalendarDemo1.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + COXCalendarDemo1App application class. + +OXCalendarDemo1.cpp + This is the main application source file that contains the application + class COXCalendarDemo1App. + +OXCalendarDemo1.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 + Developer Studio. + +res\OXCalendarDemo1.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file OXCalendarDemo1.rc. + +res\OXCalendarDemo1.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +OXCalendarDemo1.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +OXCalendarDemo1Dlg.h, OXCalendarDemo1Dlg.cpp - the dialog + These files contain your COXCalendarDemo1Dlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in OXCalendarDemo1.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named OXCalendarDemo1.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.cpp new file mode 100644 index 0000000..8cec0e8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// OXCalendarDemo1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.h new file mode 100644 index 0000000..084b38d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__4EDE7CBB_874D_11D1_A4E3_0020359647BF__INCLUDED_) +#define AFX_STDAFX_H__4EDE7CBB_874D_11D1_A4E3_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__4EDE7CBB_874D_11D1_A4E3_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.rc2 new file mode 100644 index 0000000..ab929f0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/OXCalendarDemo1.rc2 @@ -0,0 +1,13 @@ +// +// OXCALENDARDEMO1.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/bitmap1.bmp new file mode 100644 index 0000000..7f98e5b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/resource.h new file mode 100644 index 0000000..1fd5f62 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OXCalendarDemo1/resource.h @@ -0,0 +1,29 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by OXCalendarDemo1.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_OXCALENDARDEMO1_DIALOG 102 +#define IDR_MAIN_FRAME 102 +#define ID_DESCRIPTION_FILE 103 +#define IDR_MAINFRAME 128 +#define IDB_BITMAP1 129 +#define IDC_EDIT1 1000 +#define IDC_EDIT2 1001 +#define IDC_CALENDAR1 1002 +#define IDC_CALENDAR2 1003 +#define IDC_OK 1004 +#define IDC_CALENDAR3 1008 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1005 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.clw new file mode 100644 index 0000000..586d60b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.clw @@ -0,0 +1,75 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=COptionTreeDlg +LastTemplate=CTreeCtrl +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "OptionTree.h" + +ClassCount=3 +Class1=COptionTreeApp +Class2=COptionTreeDlg +Class3=COXOptionTree + +ResourceCount=4 +Resource1=IDD_OPTIONTREE_DIALOG (English (U.S.)) +Resource2=IDR_MAINFRAME +Resource3=IDD_ABOUTBOX (English (U.S.)) +Resource4=IDD_OPTIONTREE_DIALOG + +[CLS:COptionTreeApp] +Type=0 +HeaderFile=OptionTree.h +ImplementationFile=OptionTree.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=COptionTreeApp + +[CLS:COptionTreeDlg] +Type=0 +HeaderFile=OptionTreeDlg.h +ImplementationFile=OptionTreeDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=COptionTreeDlg + +[DLG:IDD_OPTIONTREE_DIALOG] +Type=1 +Class=COptionTreeDlg +ControlCount=6 +Control1=IDOK,button,1342242817 +Control2=IDC_TREE_OPTION,SysTreeView32,1350631456 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_SEPARATOR1,static,1342312448 +Control5=IDC_SEPARATOR2,static,1342312448 +Control6=IDC_UPDATE_INFO,static,1342308864 + +[DLG:IDD_OPTIONTREE_DIALOG (English (U.S.))] +Type=1 +Class=COptionTreeDlg +ControlCount=3 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_TREE_OPTION,SysTreeView32,1350631424 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[CLS:COXOptionTree] +Type=0 +HeaderFile=OXOptionTree.h +ImplementationFile=OXOptionTree.cpp +BaseClass=CTreeCtrl +Filter=W +VirtualFilter=GWC +LastObject=COXOptionTree + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.cpp new file mode 100644 index 0000000..420b1a1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.cpp @@ -0,0 +1,91 @@ +// OptionTree.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "OptionTree.h" +#include "OptionTreeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeApp + +BEGIN_MESSAGE_MAP(COptionTreeApp, CWinApp) + //{{AFX_MSG_MAP(COptionTreeApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeApp construction + +COptionTreeApp::COptionTreeApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only COptionTreeApp object + +COptionTreeApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeApp initialization + +BOOL COptionTreeApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + COptionTreeDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int COptionTreeApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsp new file mode 100644 index 0000000..b1b3503 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsp @@ -0,0 +1,298 @@ +# Microsoft Developer Studio Project File - Name="OptionTree" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=OptionTree - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "OptionTree.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "OptionTree.mak" CFG="OptionTree - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "OptionTree - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "OptionTree - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "OptionTree - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "OptionTree - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "OptionTree - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "OptionTree - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OptionTree.exe" + +!ELSEIF "$(CFG)" == "OptionTree - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"OptionTree.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "OptionTree - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "OptionTree___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "OptionTree___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"OptionTree.exe" + +!ELSEIF "$(CFG)" == "OptionTree - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "OptionTree___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "OptionTree___Win32_Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"OptionTree.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "OptionTree - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "OptionTree___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "OptionTree___Win32_Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"OptionTree.exe" + +!ENDIF + +# Begin Target + +# Name "OptionTree - Win32 Release" +# Name "OptionTree - Win32 Debug" +# Name "OptionTree - Win32 Release_Shared" +# Name "OptionTree - Win32 Unicode_Debug" +# Name "OptionTree - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXOptionTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticText.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\OptionTree.cpp +# End Source File +# Begin Source File + +SOURCE=.\OptionTree.rc +# End Source File +# Begin Source File + +SOURCE=.\OptionTreeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\OptionTree.h +# End Source File +# Begin Source File + +SOURCE=.\OptionTreeDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXOptionTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\B_check.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_check0.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_check1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_cookie.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_radio.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_radio0.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\B_radio1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\OptionTree.ico +# End Source File +# Begin Source File + +SOURCE=.\res\OptionTree.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\oxoption.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\OptionTree.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsw new file mode 100644 index 0000000..b01f3e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "OptionTree"=".\OptionTree.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/OptionTree", HTIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.h new file mode 100644 index 0000000..337a9d1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.h @@ -0,0 +1,50 @@ +// OptionTree.h : main header file for the OPTIONTREE application +// + +#if !defined(AFX_OPTIONTREE_H__1D5197E5_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_OPTIONTREE_H__1D5197E5_DB32_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeApp: +// See OptionTree.cpp for the implementation of this class +// + +class COptionTreeApp : public CWinApp +{ +public: + COptionTreeApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COptionTreeApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(COptionTreeApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OPTIONTREE_H__1D5197E5_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.rc new file mode 100644 index 0000000..225571e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.rc @@ -0,0 +1,214 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPTIONTREE_DIALOG DIALOGEX 0, 0, 246, 230 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "OptionTree" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,189,209,50,14 + CONTROL "Tree1",IDC_TREE_OPTION,"SysTreeView32",TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,22,232,130 + LTEXT "COXOptionTreeCtrl has the functionality to save and restore its state. Change the state of the check boxes and radio buttons in the tree and close the sample. Next time the sample is loaded the last set of options will be restored.",IDC_STATIC,7,164,232,32 + LTEXT "",IDC_SEPARATOR1,7,154,232,8,SS_SUNKEN + LTEXT "",IDC_SEPARATOR2,7,204,151,8,SS_SUNKEN + LTEXT "Update info",IDC_UPDATE_INFO,7,7,232,11,SS_CENTERIMAGE +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 "040904B0" + BEGIN + VALUE "FileDescription", "OptionTree MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "OptionTree" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "OptionTree.EXE" + VALUE "ProductName", "OptionTree Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPTIONTREE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 239 + TOPMARGIN, 7 + BOTTOMMARGIN, 223 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_VISUAL BITMAP "res\\B_radio.bmp" +IDB_FOLDER BITMAP "res\\B_check.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About OptionTree..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Option Tree Control" + ID_DESCRIPTION_FILE "OptionTreeCtrlInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\OptionTree.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\r\n" + "#include ""OXOptionTreeCtrl.rc""\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\\OptionTree.ico" +#endif // English (Canada) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\OptionTree.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#include "OXOptionTreeCtrl.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.vcproj new file mode 100644 index 0000000..8ee60a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTree.vcproj @@ -0,0 +1,1011 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeCtrlInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeCtrlInfo.rtf new file mode 100644 index 0000000..0c4177d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeCtrlInfo.rtf @@ -0,0 +1,94 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} +{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2582882\rsid5862705 +\rsid9898003}{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr16\min50}{\revtim\yr2005\mo1\dy17\hr16\min50}{\version4}{\edmins0}{\nofpages3}{\nofwords652}{\nofchars3720} +{\*\company Dundas India}{\nofcharsws4364}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot5862705 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid9898003 COXOptionTreeCtrl}{\b\fs48\insrsid9898003 +\par }{\b\fs16\insrsid9898003 Copyright \'a9}{\b\fs16\insrsid5862705 The Code Project}{\b\fs16\insrsid2582882 1997-2005}{\b\fs16\insrsid9898003 , All Rights Reserved +\par }{\insrsid9898003 +\par COXOptionTreeControl is }{\insrsid9898003 a }{\insrsid9898003 +CTreeCtrl derived class that allows you to use check boxes and radio buttons as tree items. Tree control functionality allows you to organize them in groups, which provides a compact way of displaying and navigating through a big number of option +s that can be represented using check box or radio button. +\par +\par In most cases options should be organized in some logical way. We associate a tree control brunch with any of such group of options and call them "control groups". Please note that the functionali +ty of the tree control allows you to use multiple level of dependency between groups and subgroups. In order to add new control group in the tree control you have to call the following function: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 AddControlGroup();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 +\par Using this function you may create any control groups. This function returns a handle to the tree item that was created to display the control group title. You can use this value to add check boxes, radio buttons or other control groups. +\par In order to add new check box item in the tree you have to use the following function: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 AddCheckBox();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 In order to add new radio button item in the tree you have to use the following function: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 AddRadioButton();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 +\par Note that both of this functions require you to specify a unique ID of new option control. This way any +check box or radio button can be uniquely identified throughout the option tree control. In order to retrieve the ID of an option control that is specified by its handle to the tree item you can call: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 GetItemFromID();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 And if you need to get the handle of a tree item which corresponds to the given ID you can call: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 GetIDFromItem();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 +\par Using first three function you can easily populate option tree control. You also can use all standard CTreeCtrl functions that are used in order to populate a tree control with items. +\par +\par We would like to emphasize one specific rule that applies to the way }{\b\insrsid9898003 COXOptionTreeCtrl}{\insrsid9898003 must be used which different from the standard approach. You}{\b\insrsid9898003 must not}{\insrsid9898003 + explicitly change the image list associated with tree. We use our own internally in order to display check box and radio button images. But what if you want to display some images for control group items? }{\ul\cf2\insrsid9898003 AddControlGroup()}{ +\insrsid9898003 function allows you to specify the image indexes for normal and selected state but these indexes must be returned by the following function which add new image to the internal image list: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 AddImage();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 Using this function you can add as many images as you want. +\par +\par Although it is not supposed to be modified outside but we still decided to provide a direct access to the internal image list. You may retrieve a pointer to it using +\par the following function: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 GetImageList();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 One of the possible use of the image list would be replacing of the images we use to display check box and radio button. At this moment the following images are predefined: +\par }{\insrsid9898003 +\par }{\b\insrsid9898003 Index}{\insrsid9898003 \tab }{\b\insrsid9898003 Image}{\insrsid9898003 \tab +\par 0\tab unchecked box\tab +\par 1\tab checked box\tab +\par 2\tab unselected radio button\tab +\par 3\tab selected radio button\tab +\par \~\~\~\~\~\~\~\~\~\~\~ +\par After the control is populated and displayed a user can expand and collapse control groups and change state of option items left clicking mouse or pressing down SPACE key. +\par \~ +\par Whenever the state of an option item is changed the following notification will be send in form of WM_NOTIFY message: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid9898003 OTN_OPTIONCHANGED}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 If you handle the notification you have to cast NMHDR* object to }{\b\insrsid9898003 NMOPTIONTREE}{\insrsid9898003 * object. +\par NMOPTIONTREE structure provides info about the item, which state has been changed, the old state and the new state of the item. NMOPTIONTREE structure is declared as following: +\par +\par }{\b\i\insrsid9898003 typedef struct _tagNMOPTIONTREE +\par \{ +\par \~\~\~ // standard header +\par \~\~\~ NMHDR hdr; +\par \~\~\~ // handle to the tree item (check box or radio button, which state +\par \~\~\~ // has been changed) +\par \~\~\~ HTREEITEM hItem; +\par \~\~\~ // item ID +\par \~\~\~ UINT uItemID; +\par \~\~\~ // old item state: OTITEM_UNCHECKED or OTITEM_CHECKED +\par \~\~\~ int nOldCheck; +\par \~\~\~ // new item state: OTITEM_UNCHECKED or OTITEM_CHECKED +\par \~\~\~ int nNewCheck; +\par \} NMOPTIONTREE, * LPNMOPTIONTREE; +\par }{\insrsid9898003 +\par +\par +\par The state of any option item can be programmatically retrieved and changed using the following set of functions: +\par +\par }{\ul\cf2\insrsid9898003 SetCheck(); +\par GetCheck(); +\par GetCheckedRadioButton(); +\par IsCheckBox(); +\par IsRadioButton(); +\par }{\insrsid9898003 +\par +\par +\par And, finally, we provide the functionality to save to and load from registry option settings. Use these two functions to do that: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid9898003 SaveState(); +\par LoadState();}{\insrsid9898003 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid9898003 \~ +\par }{\fs20\insrsid9898003 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.cpp new file mode 100644 index 0000000..26562af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.cpp @@ -0,0 +1,212 @@ +// OptionTreeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "OptionTree.h" +#include "OptionTreeDlg.h" +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeDlg dialog + +COptionTreeDlg::COptionTreeDlg(CWnd* pParent /*=NULL*/) + : CDialog(COptionTreeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(COptionTreeDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void COptionTreeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COptionTreeDlg) + DDX_Control(pDX, IDC_UPDATE_INFO, m_staticUpdateInfo); + DDX_Control(pDX, IDC_SEPARATOR2, m_separator2); + DDX_Control(pDX, IDC_SEPARATOR1, m_separator1); + DDX_Control(pDX, IDC_TREE_OPTION, m_treeOption); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(COptionTreeDlg, CDialog) + //{{AFX_MSG_MAP(COptionTreeDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_NOTIFY(OTN_OPTIONCHANGED, IDC_TREE_OPTION, OnOptionChanged) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeDlg message handlers + +BOOL COptionTreeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // add data + int nFolderImageIndex=m_treeOption.AddImage(IDB_FOLDER,RGB(255,255,255)); + ASSERT(nFolderImageIndex!=-1); + HTREEITEM hFilesFolder=m_treeOption.AddControlGroup(_T("Files and Folders"), + NULL,TRUE,nFolderImageIndex,nFolderImageIndex); + m_treeOption.AddCheckBox(1100, + _T("Show popup descriptions for folder and desktop items"), hFilesFolder); + m_treeOption.AddCheckBox(1101, + _T("Display the full path in title bar"), hFilesFolder); + m_treeOption.AddCheckBox(1102, + _T("Display compressed files and folders with alternate color"), hFilesFolder); + m_treeOption.AddCheckBox(1103, + _T("Show file attributes in Detail View"), hFilesFolder); + m_treeOption.AddCheckBox(1104, + _T("Show Map Network Drive button in toolbar"), hFilesFolder); + m_treeOption.AddCheckBox(1105, + _T("Hide file extensions for known file types"), hFilesFolder); + + HTREEITEM hHiddenFiles=m_treeOption.AddControlGroup(_T("Hidden Files"), + hFilesFolder,TRUE,nFolderImageIndex,nFolderImageIndex); + m_treeOption.AddRadioButton(1000,_T("Show all files"),hHiddenFiles); + m_treeOption.AddRadioButton(1001, + _T("Do not show system or hidden files"),hHiddenFiles,TRUE); + m_treeOption.AddRadioButton(1002,_T("Do not show hidden files"),hHiddenFiles); + + m_treeOption.AddCheckBox(1106, + _T("Allow all uppercase names"), hFilesFolder); + m_treeOption.AddCheckBox(1107, + _T("Remember each folder's view settings"), hFilesFolder); + + int nVisualImageIndex=m_treeOption.AddImage(IDB_VISUAL,RGB(255,255,255)); + ASSERT(nVisualImageIndex!=-1); + HTREEITEM hVisualSettings=m_treeOption.AddControlGroup(_T("Visual Settings"), + NULL,TRUE,nVisualImageIndex,nVisualImageIndex); + m_treeOption.AddCheckBox(1200, + _T("Hide icons when desktop is viewed as Web page"), hVisualSettings); + m_treeOption.AddCheckBox(1201, + _T("Smooth edges of screen fonts"), hVisualSettings); + m_treeOption.AddCheckBox(1202, + _T("Show window contents while dragging"), hVisualSettings); + + m_treeOption.LoadState(_T("OptionTree"),_T("Folder Options")); + + m_staticUpdateInfo.SetWindowText(_T("Information about changes in the option states")); + m_staticUpdateInfo.SetBkColor(::GetSysColor(COLOR_BTNFACE)); + m_staticUpdateInfo.SetTextColor(RGB(0,0,128)); + CSize szGap=CSize(150,0); + m_staticUpdateInfo.SetGapSize(szGap); + m_staticUpdateInfo.SetHorzAlignment(OX_ALIGNHORZ_RIGHT); + m_staticUpdateInfo.SetVertAlignment(OX_ALIGNVERT_CENTER); + m_staticUpdateInfo.SetScrollDirection(180); + m_staticUpdateInfo.SetScrollSpeed(90); + m_staticUpdateInfo.StartScrolling(TRUE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void COptionTreeDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void COptionTreeDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR COptionTreeDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void COptionTreeDlg::OnCancel() +{ + // TODO: Add extra cleanup here + m_treeOption.SaveState(_T("OptionTree"),_T("Folder Options")); + CDialog::OnCancel(); +} + +void COptionTreeDlg::OnOK() +{ + // TODO: Add extra validation here + m_treeOption.SaveState(_T("OptionTree"),_T("Folder Options")); + CDialog::OnOK(); +} + +void COptionTreeDlg::OnOptionChanged(NMHDR* pNMHDR, LRESULT* pResult) +{ + NMOPTIONTREE* pNMOptionTree=(NMOPTIONTREE*)pNMHDR; + // TODO: Add your control notification handler code here + + HTREEITEM hItem=pNMOptionTree->hItem; + CString sNewText=_T("Option <")+m_treeOption.GetItemText(hItem)+_T("> has been "); + sNewText+=(pNMOptionTree->nNewCheck==OTITEM_CHECKED ? + _T("Checked") : _T("Unchecked")); + m_staticUpdateInfo.SetWindowText(sNewText,TRUE); + + *pResult = 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.h new file mode 100644 index 0000000..444b940 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/OptionTreeDlg.h @@ -0,0 +1,59 @@ +// OptionTreeDlg.h : header file +// + +#if !defined(AFX_OPTIONTREEDLG_H__1D5197E7_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_OPTIONTREEDLG_H__1D5197E7_DB32_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXOptionTreeCtrl.h" +#include "OXSeparator.h" +#include "OXStaticText.h" + +///////////////////////////////////////////////////////////////////////////// +// COptionTreeDlg dialog + +class COptionTreeDlg : public CDialog +{ +// Construction +public: + COptionTreeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(COptionTreeDlg) + enum { IDD = IDD_OPTIONTREE_DIALOG }; + COXStaticText m_staticUpdateInfo; + COXSeparator m_separator2; + COXSeparator m_separator1; + COXOptionTreeCtrl m_treeOption; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COptionTreeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(COptionTreeDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnCancel(); + virtual void OnOK(); + afx_msg void OnOptionChanged(NMHDR* pNMHDR, LRESULT* pResult); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OPTIONTREEDLG_H__1D5197E7_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/ReadMe.txt new file mode 100644 index 0000000..7a88226 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : OptionTree +======================================================================== + + +AppWizard has created this OptionTree 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 OptionTree application. + +OptionTree.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +OptionTree.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + COptionTreeApp application class. + +OptionTree.cpp + This is the main application source file that contains the application + class COptionTreeApp. + +OptionTree.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++. + +OptionTree.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\OptionTree.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file OptionTree.rc. + +res\OptionTree.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +OptionTreeDlg.h, OptionTreeDlg.cpp - the dialog + These files contain your COptionTreeDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in OptionTree.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named OptionTree.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.cpp new file mode 100644 index 0000000..4d7904b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// OptionTree.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.h new file mode 100644 index 0000000..c016b72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__1D5197E9_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) +#define AFX_STDAFX_H__1D5197E9_DB32_11D2_B476_00E0291A4FD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__1D5197E9_DB32_11D2_B476_00E0291A4FD3__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_check.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_check.bmp new file mode 100644 index 0000000..092528d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_check.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_cookie.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_cookie.bmp new file mode 100644 index 0000000..a3a3074 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_cookie.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_radio.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_radio.bmp new file mode 100644 index 0000000..3aae26b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/B_radio.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.rc2 new file mode 100644 index 0000000..b28c64f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/res/OptionTree.rc2 @@ -0,0 +1,13 @@ +// +// OPTIONTREE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/resource.h new file mode 100644 index 0000000..3350735 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/OptionTree/resource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by OptionTree.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_OPTIONTREE_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_VISUAL 134 +#define IDB_FOLDER 136 +#define IDC_TREE_OPTION 1000 +#define IDC_SEPARATOR1 1002 +#define IDC_SEPARATOR2 1003 +#define IDC_UPDATE_INFO 1004 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 138 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1005 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.clw new file mode 100644 index 0000000..a2a0d3d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.clw @@ -0,0 +1,68 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CPhysicalTestApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "physicaltest.h" +LastPage=0 + +ClassCount=2 +Class1=CPhysicalTestApp +Class2=CPhysicalTestDlg + +ResourceCount=1 +Resource1=IDD_PHYSICALTEST_DIALOG (Dutch (Belgium)) + +[CLS:CPhysicalTestApp] +Type=0 +BaseClass=CWinApp +HeaderFile=PhysicalTest.h +ImplementationFile=PhysicalTest.cpp +Filter=N +VirtualFilter=AC +LastObject=CPhysicalTestApp + +[CLS:CPhysicalTestDlg] +Type=0 +BaseClass=CDialog +HeaderFile=PhysicalTestDlg.h +ImplementationFile=PhysicalTestDlg.cpp + +[DLG:IDD_PHYSICALTEST_DIALOG] +Type=1 +Class=CPhysicalTestDlg + +[DLG:IDD_PHYSICALTEST_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=27 +Control1=IDC_LENGTH,edit,1350631552 +Control2=IDC_TIME,edit,1350631552 +Control3=IDC_TEMPERATURE,edit,1350631552 +Control4=IDC_ANGLE,edit,1350631552 +Control5=IDC_LENGTH_LIST,combobox,1344339971 +Control6=IDC_TIME_LIST,combobox,1344339971 +Control7=IDC_TEMPERATURE_LIST,combobox,1344339971 +Control8=IDC_ANGLE_LIST,combobox,1344339971 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_CONVERT_LENGTH,button,1342242816 +Control13=IDC_CONVERTED_LENGTH,edit,1350633600 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_CONVERT_TIME,button,1342242816 +Control17=IDC_CONVERTED_TIME,edit,1350633600 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_CONVERT_TEMPERATURE,button,1342242816 +Control21=IDC_CONVERTED_TEMPERATURE,edit,1350633600 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_CONVERT_ANGLE,button,1342242816 +Control25=IDC_CONVERTED_ANGLE,edit,1350633600 +Control26=IDOK,button,1342242816 +Control27=IDCANCEL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.cpp new file mode 100644 index 0000000..bb734c2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.cpp @@ -0,0 +1,100 @@ +// PhysicalTest.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "PhysicalTest.h" +#include "PhysicalTestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestApp + +BEGIN_MESSAGE_MAP(CPhysicalTestApp, CWinApp) + //{{AFX_MSG_MAP(CPhysicalTestApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestApp construction + +CPhysicalTestApp::CPhysicalTestApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CPhysicalTestApp object + +CPhysicalTestApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestApp initialization + +BOOL CPhysicalTestApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CPhysicalTestDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CPhysicalTestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsp new file mode 100644 index 0000000..5a99df2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsp @@ -0,0 +1,307 @@ +# Microsoft Developer Studio Project File - Name="PhysicalTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PhysicalTest - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PhysicalTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PhysicalTest.mak" CFG="PhysicalTest - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PhysicalTest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PhysicalTest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PhysicalTest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "PhysicalTest - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "PhysicalTest - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PhysicalTest - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"PhysicalTest.exe" + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"PhysicalTest.exe" + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Release_Shared" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Physica0" +# PROP BASE Intermediate_Dir "Physica0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /fo".\Physica0/PhysicalTest.res" /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"PhysicalTest.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"PhysicalTest.exe" + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Physica1" +# PROP BASE Intermediate_Dir "Physica1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /fo".\Physica1/PhysicalTest.res" /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"PhysicalTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"PhysicalTest.exe" + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Unicode_Release" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Physica2" +# PROP BASE Intermediate_Dir "Physica2" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /fo".\Physica2/PhysicalTest.res" /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"PhysicalTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"PhysicalTest.exe" + +!ENDIF + +# Begin Target + +# Name "PhysicalTest - Win32 Release" +# Name "PhysicalTest - Win32 Debug" +# Name "PhysicalTest - Win32 Release_Shared" +# Name "PhysicalTest - Win32 Unicode_Debug" +# Name "PhysicalTest - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPhysicalEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPhysicalEditEx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\PhysicalTest.cpp +# End Source File +# Begin Source File + +SOURCE=.\PhysicalTest.rc +# End Source File +# Begin Source File + +SOURCE=.\PhysicalTestDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=..\..\..\Include\OXPhysicalEdit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPhysicalEditEx.h +# End Source File +# Begin Source File + +SOURCE=.\PhysicalTest.h +# End Source File +# Begin Source File + +SOURCE=.\PhysicalTestDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\PhysicalTest.ico +# End Source File +# Begin Source File + +SOURCE=.\res\PhysicalTest.rc2 +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\res\UTBLogo.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.rc + +!IF "$(CFG)" == "PhysicalTest - Win32 Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Release_Shared" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Unicode_Debug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "PhysicalTest - Win32 Unicode_Release" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\res\UTSampleAbout.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\PhysicalTest.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsw new file mode 100644 index 0000000..3860c1d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PhysicalTest"=".\PhysicalTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.h new file mode 100644 index 0000000..575a30e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.h @@ -0,0 +1,38 @@ +// PhysicalTest.h : main header file for the PHYSICALTEST application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestApp: +// See PhysicalTest.cpp for the implementation of this class +// + +class CPhysicalTestApp : public CWinApp +{ +public: + CPhysicalTestApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPhysicalTestApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CPhysicalTestApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.rc new file mode 100644 index 0000000..c04b9d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.rc @@ -0,0 +1,213 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\PhysicalTest.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXPhysicalEditEx.rc"" // For extended physical edit controls\r\n" + "#endif\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\\PhysicalTest.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_PHYSICALTEST_DIALOG DIALOGEX 0, 0, 337, 135 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "PhysicalTest" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_LENGTH,53,25,56,14,ES_AUTOHSCROLL + EDITTEXT IDC_TIME,53,44,56,14,ES_AUTOHSCROLL + EDITTEXT IDC_TEMPERATURE,53,63,56,14,ES_AUTOHSCROLL + EDITTEXT IDC_ANGLE,53,82,56,14,ES_AUTOHSCROLL + COMBOBOX IDC_LENGTH_LIST,143,25,48,44,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_TIME_LIST,143,45,48,43,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_TEMPERATURE_LIST,143,64,48,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_ANGLE_LIST,143,83,48,45,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "To test the class : Type in a value with a unit (e.g. 1m) select a new unit and click Convert",IDC_STATIC,7,7,323,8 + LTEXT "&Length",IDC_STATIC,7,28,23,8 + LTEXT "To",IDC_STATIC,125,28,10,8 + PUSHBUTTON "Convert",IDC_CONVERT_LENGTH,197,25,39,12 + EDITTEXT IDC_CONVERTED_LENGTH,246,24,84,14,ES_AUTOHSCROLL | ES_READONLY + LTEXT "&Time",IDC_STATIC,7,47,16,8 + LTEXT "To",IDC_STATIC,125,47,10,8 + PUSHBUTTON "Convert",IDC_CONVERT_TIME,197,45,39,12 + EDITTEXT IDC_CONVERTED_TIME,246,44,84,14,ES_AUTOHSCROLL | ES_READONLY + LTEXT "Tem&perature",IDC_STATIC,7,66,41,8 + LTEXT "To",IDC_STATIC,125,66,10,8 + PUSHBUTTON "Convert",IDC_CONVERT_TEMPERATURE,197,64,39,12 + EDITTEXT IDC_CONVERTED_TEMPERATURE,246,63,84,14,ES_AUTOHSCROLL | ES_READONLY + LTEXT "&Angle",IDC_STATIC,7,85,19,8 + LTEXT "To",IDC_STATIC,125,85,10,8 + PUSHBUTTON "Convert",IDC_CONVERT_ANGLE,197,83,39,12 + EDITTEXT IDC_CONVERTED_ANGLE,246,82,84,14,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "OK",IDOK,100,114,50,14 + PUSHBUTTON "Cancel",IDCANCEL,187,114,50,14 +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 "040904b0" + BEGIN + VALUE "FileDescription", "PHYSICALTEST MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "PHYSICALTEST" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "PHYSICALTEST.EXE" + VALUE "ProductName", "PHYSICALTEST Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_PHYSICALTEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 330 + TOPMARGIN, 7 + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About PhysicalTest..." + ID_DESCRIPTION_FILE "physicalTestInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "PhysicalTest" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\PhysicalTest.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXPhysicalEditEx.rc" // For extended physical edit controls +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.vcproj new file mode 100644 index 0000000..00f85c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTest.vcproj @@ -0,0 +1,1044 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.cpp new file mode 100644 index 0000000..00508b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.cpp @@ -0,0 +1,227 @@ +// PhysicalTestDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "PhysicalTest.h" +#include "PhysicalTestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestDlg dialog + +CPhysicalTestDlg::CPhysicalTestDlg(CWnd* pParent /*=NULL*/) + : CDialog(CPhysicalTestDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CPhysicalTestDlg) + m_dConvertedAngle = 0.0; + m_dConvertedLength = 0.0; + m_dConvertedTemp = 0.0; + m_dConvertedTime = 0.0; + //}}AFX_DATA_INIT + m_dConvAngle = 0.0; + m_dConvLength = 0.0; + m_dConvTemp = 0.0; + m_dConvTime = 0.0; + m_nNeededConvAngle = 0; + m_nNeededConvLength = 0; + m_nNeededConvTemp = 0; + m_nNeededConvTime = 0; + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CPhysicalTestDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPhysicalTestDlg) + DDX_Control(pDX, IDC_TIME_LIST, m_wndTimeList); + DDX_Control(pDX, IDC_TEMPERATURE_LIST, m_wndTempList); + DDX_Control(pDX, IDC_LENGTH_LIST, m_wndLengthList); + DDX_Control(pDX, IDC_ANGLE_LIST, m_wndAngleList); + DDX_Control(pDX, IDC_TEMPERATURE, m_wndTemp); + DDX_Control(pDX, IDC_TIME, m_wndTime); + DDX_Control(pDX, IDC_LENGTH, m_wndLength); + DDX_Control(pDX, IDC_ANGLE, m_wndAngle); + DDX_Text(pDX, IDC_CONVERTED_ANGLE, m_dConvertedAngle); + DDX_Text(pDX, IDC_CONVERTED_LENGTH, m_dConvertedLength); + DDX_Text(pDX, IDC_CONVERTED_TEMPERATURE, m_dConvertedTemp); + DDX_Text(pDX, IDC_CONVERTED_TIME, m_dConvertedTime); + //}}AFX_DATA_MAP + // We only want to retrieve data from the control (not put new data in it) + if (pDX->m_bSaveAndValidate) + { + DDX_OXAngleEdit(pDX, IDC_ANGLE, m_dConvAngle, m_nNeededConvAngle); + DDX_OXLengthEdit(pDX, IDC_LENGTH, m_dConvLength, m_nNeededConvLength); + DDX_OXTempEdit(pDX, IDC_TEMPERATURE, m_dConvTemp, m_nNeededConvTemp); + DDX_OXTimeEdit(pDX, IDC_TIME, m_dConvTime, m_nNeededConvTime); + } + } + +BEGIN_MESSAGE_MAP(CPhysicalTestDlg, CDialog) + //{{AFX_MSG_MAP(CPhysicalTestDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CONVERT_ANGLE, OnConvertAngle) + ON_BN_CLICKED(IDC_CONVERT_LENGTH, OnConvertLength) + ON_BN_CLICKED(IDC_CONVERT_TEMPERATURE, OnConvertTemperature) + ON_BN_CLICKED(IDC_CONVERT_TIME, OnConvertTime) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestDlg message handlers + +BOOL CPhysicalTestDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Initialize the combo boxes + int nUnitIndex; + for (nUnitIndex = 0; nUnitIndex < m_wndLength.GetNumberOfUnits(); nUnitIndex++) + m_wndLengthList.AddString(m_wndLength.GetUnitNames()[nUnitIndex]); + m_wndLengthList.SetCurSel(m_wndLength.GetDefaultUnit()); + + for (nUnitIndex = 0; nUnitIndex < m_wndTime.GetNumberOfUnits(); nUnitIndex++) + m_wndTimeList.AddString(m_wndTime.GetUnitNames()[nUnitIndex]); + m_wndTimeList.SetCurSel(m_wndTime.GetDefaultUnit()); + + for (nUnitIndex = 0; nUnitIndex < m_wndTemp.GetNumberOfUnits(); nUnitIndex++) + m_wndTempList.AddString(m_wndTemp.GetUnitNames()[nUnitIndex]); + m_wndTempList.SetCurSel(m_wndTemp.GetDefaultUnit()); + + for (nUnitIndex = 0; nUnitIndex < m_wndAngle.GetNumberOfUnits(); nUnitIndex++) + m_wndAngleList.AddString(m_wndAngle.GetUnitNames()[nUnitIndex]); + m_wndAngleList.SetCurSel(m_wndAngle.GetDefaultUnit()); + + //The below lines added to work around a bug in the COXDropEdit + //implementatioin which causes some controls to be partially hidden + //when themes are enabled + m_wndTime.ShowWindow(SW_HIDE); + m_wndTime.ShowWindow(SW_SHOW); + m_wndTemp.ShowWindow(SW_HIDE); + m_wndTemp.ShowWindow(SW_SHOW); + m_wndLength.ShowWindow(SW_HIDE); + m_wndLength.ShowWindow(SW_SHOW); + m_wndAngle.ShowWindow(SW_HIDE); + m_wndAngle.ShowWindow(SW_SHOW); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CPhysicalTestDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CPhysicalTestDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CPhysicalTestDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CPhysicalTestDlg::OnConvertAngle() + { + m_nNeededConvAngle = m_wndAngleList.GetCurSel(); + if (UpdateData(TRUE)) + { + m_dConvertedAngle = m_dConvAngle; + UpdateData(FALSE); + } + } + +void CPhysicalTestDlg::OnConvertLength() + { + m_nNeededConvLength = m_wndLengthList.GetCurSel(); + if (UpdateData(TRUE)) + { + m_dConvertedLength = m_dConvLength; + UpdateData(FALSE); + } + } + +void CPhysicalTestDlg::OnConvertTemperature() + { + m_nNeededConvTemp = m_wndTempList.GetCurSel(); + if (UpdateData(TRUE)) + { + m_dConvertedTemp = m_dConvTemp; + UpdateData(FALSE); + } + } + +void CPhysicalTestDlg::OnConvertTime() + { + m_nNeededConvTime = m_wndTimeList.GetCurSel(); + if (UpdateData(TRUE)) + { + m_dConvertedTime = m_dConvTime; + UpdateData(FALSE); + } + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.h new file mode 100644 index 0000000..e7e740b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/PhysicalTestDlg.h @@ -0,0 +1,62 @@ +// PhysicalTestDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CPhysicalTestDlg dialog + +#include "OXPhysicalEditEx.h" + +class CPhysicalTestDlg : public CDialog +{ +// Construction +public: + CPhysicalTestDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CPhysicalTestDlg) + enum { IDD = IDD_PHYSICALTEST_DIALOG }; + CComboBox m_wndTimeList; + CComboBox m_wndTempList; + CComboBox m_wndLengthList; + CComboBox m_wndAngleList; + COXTempEdit m_wndTemp; + COXTimeEdit m_wndTime; + COXLengthEdit m_wndLength; + COXAngleEdit m_wndAngle; + double m_dConvertedAngle; + double m_dConvertedLength; + double m_dConvertedTemp; + double m_dConvertedTime; + //}}AFX_DATA + double m_dConvAngle; + double m_dConvLength; + double m_dConvTemp; + double m_dConvTime; + int m_nNeededConvAngle; + int m_nNeededConvLength; + int m_nNeededConvTemp; + int m_nNeededConvTime; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPhysicalTestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CPhysicalTestDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnConvertAngle(); + afx_msg void OnConvertLength(); + afx_msg void OnConvertTemperature(); + afx_msg void OnConvertTime(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.cpp new file mode 100644 index 0000000..ee5a0e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// PhysicalTest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.h new file mode 100644 index 0000000..12f6912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/physicalTestInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/physicalTestInfo.rtf new file mode 100644 index 0000000..d0a5682 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/physicalTestInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.rc2 new file mode 100644 index 0000000..ca2c4aa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/res/PhysicalTest.rc2 @@ -0,0 +1,13 @@ +// +// PHYSICALTEST.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/resource.h new file mode 100644 index 0000000..2df07d8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PhysicalTest/resource.h @@ -0,0 +1,37 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by PhysicalTest.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_PHYSICALTEST_DIALOG 102 +#define ID_DESCRIPTION_FILE 103 +#define IDR_MAINFRAME 128 +#define IDC_LENGTH 1000 +#define IDC_TIME 1001 +#define IDC_TEMPERATURE 1002 +#define IDC_ANGLE 1004 +#define IDC_LENGTH_LIST 1005 +#define IDC_CONVERT_LENGTH 1006 +#define IDC_CONVERTED_LENGTH 1007 +#define IDC_TIME_LIST 1008 +#define IDC_CONVERT_TIME 1009 +#define IDC_CONVERTED_TIME 1010 +#define IDC_TEMPERATURE_LIST 1011 +#define IDC_CONVERT_TEMPERATURE 1012 +#define IDC_CONVERTED_TEMPERATURE 1013 +#define IDC_ANGLE_LIST 1014 +#define IDC_CONVERT_ANGLE 1015 +#define IDC_CONVERTED_ANGLE 1016 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1018 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/BorderPickerCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/BorderPickerCtrl.cpp new file mode 100644 index 0000000..fc3ef22 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/BorderPickerCtrl.cpp @@ -0,0 +1,136 @@ +// BorderPickerCtrl.cpp : implementation file +// + +#include "stdafx.h" +#include "BorderPickerCtrl.h" +#include "Resource.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +COLORREF CBorderPickerCtrl::m_defaultBorderStyles[] = +{ + { ID_BORDER_OUTSIDE }, + { ID_BORDER_TOP }, + { ID_BORDER_BOTTOM }, + { ID_BORDER_LEFT }, + { ID_BORDER_RIGHT }, + { ID_BORDER_ALL }, + { ID_BORDER_INSIDE }, + { ID_BORDER_HORZ_INSIDE }, + { ID_BORDER_VERT_INSIDE }, + { ID_BORDER_NONE } +}; + +ButtonToolTipIDTable CBorderPickerCtrl::m_defaultArrToolTipText[] = +{ + { ID_BORDER_OUTSIDE, IDS_OUTBORDERS }, //"Outside Borders" + { ID_BORDER_TOP, IDS_TOPBORDER }, //"Top Border" + { ID_BORDER_BOTTOM, IDS_BOTTOMBORDER }, //"Bottom Border" + { ID_BORDER_LEFT, IDS_LEFTBORDER }, //"Left Border" + { ID_BORDER_RIGHT, IDS_RIGHTBORDER }, //"Right Border" + { ID_BORDER_ALL, IDS_ALLBORDERS }, //"All Borders" + { ID_BORDER_INSIDE, IDS_INSIDEBORDERS }, //"Inside Borders" + { ID_BORDER_HORZ_INSIDE, IDS_HINSIDE }, //"Horizontal Inside" + { ID_BORDER_VERT_INSIDE, IDS_VINSIDE }, //"Vertical Inside" + { ID_BORDER_NONE, IDS_NOBORDERS } //"No Borders" +}; + +///////////////////////////////////////////////////////////////////////////// +// CBorderPickerCtrl + +CBorderPickerCtrl::CBorderPickerCtrl(UINT nButtons, UINT nRows, DWORD dwDefault, + CSize sizeButton, int nIDDefault, + int nIDCustom): + COXPopupBarCtrl(nButtons, nRows, dwDefault, sizeButton, nIDDefault, + nIDCustom) +{ + +} + +BEGIN_MESSAGE_MAP(CBorderPickerCtrl, COXPopupBarCtrl) + //{{AFX_MSG_MAP(CBorderPickerCtrl) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + + +BOOL CBorderPickerCtrl::Pick(UINT nAlignment, CRect* pParentRect, CSize sizeOffset) +{ + ASSERT_VALID(m_pParentWnd); + ASSERT(::IsWindow(m_pParentWnd->GetSafeHwnd())); + ASSERT(::IsWindow(m_hWnd)); + + ASSERT(m_nButtons<=ID_POPUPBAR_MAX_BUTTONS && m_nButtons>0); + ASSERT(m_nRows<=ID_POPUPBAR_MAX_BUTTONS && m_nRows>0 && m_nRows<=m_nButtons); + + // nobody has cared to fill array of colors + // then we'll do that using predefined array + if(m_arrData.GetSize()==0) + { + if(!SetButtonDataTable(m_defaultBorderStyles,BORDERPICK_DEFINEDSTYLES)) + { + return FALSE; + } + } + ASSERT(m_arrData.GetSize()>=(int)m_nButtons); + + + // nobody has cared to fill array of tooltip text + // then we'll do that using default table + if(m_arrToolTipText.GetCount()==0) + { + if(!SetToolTipTextIDTable(m_defaultArrToolTipText,BORDERPICK_DEFINEDSTYLES)) + { + return FALSE; + } + } + + // force next styles + SetPopupBarStyle(POPUPBAR_NODEFAULT|POPUPBAR_NOCUSTOM|POPUPBAR_NOTEAROFF); + + return COXPopupBarCtrl::Pick(nAlignment,pParentRect,sizeOffset); +} + +//////////////////////////////////// +// Attributes + +///////////////////////////////////////////////////////////////////////////// +// CBorderPickerCtrl message handlers + +// draw button +void CBorderPickerCtrl::DrawButton(CDC* pDC, UINT nIndex) +{ + ASSERT(m_nButtons>0 && m_nButtons<=ID_POPUPBAR_MAX_BUTTONS); + ASSERT((int)m_nButtons==m_arrButtonRect.GetSize()); + ASSERT((int)m_nButtons<=m_arrData.GetSize()); + ASSERT(nIndex<=m_nButtons); + + ASSERT(m_ilStyles.GetImageCount()>(int)nIndex); + + COLORREF clrShadow=::GetSysColor(COLOR_BTNSHADOW); + CRect rect=m_arrButtonRect[nIndex]; + + DrawFrameRect(pDC,rect,nIndex+1); + + CBrush brushFrame(clrShadow); + rect.DeflateRect(0,1); + m_ilStyles.Draw(pDC,nIndex,rect.TopLeft(),ILD_TRANSPARENT); +} + + +int CBorderPickerCtrl::FindImageIndexFromStyle(DWORD dwStyle) +{ + for(int nIndex=0; nIndex= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXPopupBarCtrl.h" +#include "Resource.h" + +// BorderPickerCtrl.h : header file +// + +// border styles +#define ID_BORDER_NONE 0x00000000 +#define ID_BORDER_TOP 0x00000001 +#define ID_BORDER_BOTTOM 0x00000002 +#define ID_BORDER_LEFT 0x00000004 +#define ID_BORDER_RIGHT 0x00000008 +#define ID_BORDER_OUTSIDE ID_BORDER_TOP|ID_BORDER_BOTTOM|ID_BORDER_LEFT|ID_BORDER_RIGHT +#define ID_BORDER_HORZ_INSIDE 0x00010000 +#define ID_BORDER_VERT_INSIDE 0x00020000 +#define ID_BORDER_INSIDE ID_BORDER_HORZ_INSIDE|ID_BORDER_VERT_INSIDE +#define ID_BORDER_ALL ID_BORDER_OUTSIDE|ID_BORDER_INSIDE + +// the number of predefined tooltiptext +#define BORDERPICK_DEFINEDSTYLES 10 + +///////////////////////////////////////////////////////////////////////////// +// CBorderPickerCtrl window + +class CBorderPickerCtrl : public COXPopupBarCtrl +{ +// Construction +public: + CBorderPickerCtrl(UINT nButtons=BORDERPICK_DEFINEDSTYLES, UINT nRows=2, + DWORD dwDefault=ID_BORDER_ALL, CSize sizeButton=CSize(19,19), + int nIDDefault=IDS_DEFAULT, int nIDCustom=IDS_CUSTOM); + +// Data +protected: + static DWORD m_defaultBorderStyles[]; + + static ButtonToolTipIDTable m_defaultArrToolTipText[]; + + CImageList m_ilStyles; + +// data for inner use + +// Attributes +public: + +// Operations +public: + virtual BOOL Pick(UINT nAlignment=ID_POPUPBAR_ALIGNBOTTOM, CRect* pParentRect=NULL, + CSize sizeOffset=CSize(0,0)); + + // sets selected color + inline void SetSelectedStyle(DWORD dwSelected) { SetSelectedData(dwSelected); } + // returns selected color + inline DWORD GetSelectedStyle() { return GetSelectedData(); } + // sets default color + inline void SetDefaultStyle(DWORD dwDefault) { SetDefaultData(dwDefault); } + // returns default color + inline DWORD GetDefaultStyle() { return GetDefaultData(); } + + inline BOOL SetStylesImages(UINT nBitmapID, int cx, int nGrow, COLORREF crMask) + { + return SetStylesImages(MAKEINTRESOURCE(nBitmapID), cx, nGrow, crMask); + } + inline BOOL SetStylesImages(LPCTSTR lpszBitmapID, int cx, int nGrow, COLORREF crMask) + { + return m_ilStyles.Create(lpszBitmapID, cx, nGrow, crMask); + } + + inline CImageList* GetStylesImages() { return &m_ilStyles; } + + static int FindImageIndexFromStyle(DWORD dwStyle); + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CBorderPickerCtrl) + //}}AFX_VIRTUAL +public: + virtual ~CBorderPickerCtrl() {} ; + +// implementation +protected: + virtual void DrawButton(CDC* pDC, UINT nIndex); + +// Generated message map functions +protected: + //{{AFX_MSG(CBorderPickerCtrl) + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_BORDERPICKERCTRL_H_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.cpp new file mode 100644 index 0000000..ea533c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.cpp @@ -0,0 +1,162 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "PopupBar.h" +#include "MainFrm.h" + +#include "PopupBarDoc.h" +#include "PopupBarView.h" +#include "ChildFrm.h" + +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + ON_WM_GETMINMAXINFO() + ON_WM_CREATE() + ON_WM_DESTROY() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame construction/destruction + +CChildFrame::CChildFrame() +{ + // TODO: add member initialization code here + m_bModal=FALSE; +} + +CChildFrame::~CChildFrame() +{ +} + +BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +void CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) +{ + // TODO: Add your message handler code here and/or call default + + CMDIChildWnd::OnGetMinMaxInfo(lpMMI); + + CClientDC dc(this); + ASSERT(&dc); + + CFont* pFont=dc.GetCurrentFont(); + ASSERT(pFont); + + CRect rect(0,0,1,1); + dc.DrawText(_T("Second Quater"),rect,DT_CENTER|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT); + + CSize minTextSize=rect.Size(); + + lpMMI->ptMinTrackSize.x=2*ID_EDGE_MARGIN+3*ID_BORDER_MARGIN+ + 4*ID_TEXT_MARGIN+2*minTextSize.cx; + lpMMI->ptMinTrackSize.y=2*ID_EDGE_MARGIN+3*ID_BORDER_MARGIN+ + 4*ID_TEXT_MARGIN+2*minTextSize.cy; +} + +void CChildFrame::SetModal(BOOL bModal) +{ + ASSERT(m_hWnd != NULL); + ASSERT(::IsWindow(m_hWnd)); + + if(bModal) + { + ASSERT(m_arrHandles.GetSize()==0); + + DisableWindows(AfxGetMainWnd()->GetSafeHwnd()); + } + else + { + for(int nIndex=0; nIndexIsKindOf(RUNTIME_CLASS(CChildFrame))) + { + ::EnableWindow(hWnd, FALSE); + m_arrHandles.Add((void*)hWnd); + } + } + DisableWindows(::GetWindow(hWnd,GW_CHILD)); + hWnd = ::GetWindow(hWnd, GW_HWNDNEXT); + } +} + +int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + if(((CMainFrame*)AfxGetMainWnd())->m_bModal) + SetModal(TRUE); + + return 0; +} + +void CChildFrame::OnDestroy() +{ + if(IsModal()) + SetModal(FALSE); + ((CMainFrame*)AfxGetMainWnd())->MDINext(); + + CMDIChildWnd::OnDestroy(); + +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.h new file mode 100644 index 0000000..de686fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ChildFrm.h @@ -0,0 +1,63 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__95493CEB_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_CHILDFRM_H__95493CEB_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +protected: + BOOL m_bModal; + CPtrArray m_arrHandles; + +public: + +// Operations +public: + void SetModal(BOOL bModal); + inline BOOL IsModal() { return m_bModal; } + +protected: + void DisableWindows(HWND hWnd); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnDestroy(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__95493CEB_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.cpp new file mode 100644 index 0000000..d91978e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.cpp @@ -0,0 +1,167 @@ +// DashStylePickerCtrl.cpp : implementation file +// + +#include "stdafx.h" +#include "DashStylePickerCtrl.h" +#include "Resource.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define ID_DASH_SOLID 0 +#define ID_DASH_DASH 1 +#define ID_DASH_DOT 2 +#define ID_DASH_DASHDOT 3 +#define ID_DASH_DASHDOTDOT 4 +COLORREF CDashStylePickerCtrl::m_defaultDashStyles[] = +{ + { ID_DASH_SOLID }, + { ID_DASH_DASH }, + { ID_DASH_DOT }, + { ID_DASH_DASHDOT }, + { ID_DASH_DASHDOTDOT } +}; + +ButtonToolTipIDTable CDashStylePickerCtrl::m_defaultArrToolTipText[] = +{ + { ID_DASH_SOLID, IDS_SOLID }, //"Solid" + { ID_DASH_DASH, IDS_DASH }, //"Dash" + { ID_DASH_DOT, IDS_DOT }, //"Dot" + { ID_DASH_DASHDOT, IDS_DASHDOT }, //"Dash Dot" + { ID_DASH_DASHDOTDOT, IDS_DASHDOTDOT } //"Dash Dot Dot" +}; + +///////////////////////////////////////////////////////////////////////////// +// CDashStylePickerCtrl + +CDashStylePickerCtrl::CDashStylePickerCtrl(UINT nButtons, UINT nRows, DWORD dwDefault, + CSize sizeButton, int nIDDefault, + int nIDCustom): + COXPopupBarCtrl(nButtons, nRows, dwDefault, sizeButton, nIDDefault, + nIDCustom) +{ + +} + +BEGIN_MESSAGE_MAP(CDashStylePickerCtrl, COXPopupBarCtrl) + //{{AFX_MSG_MAP(CDashStylePickerCtrl) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + + +BOOL CDashStylePickerCtrl::Pick(UINT nAlignment, CRect* pParentRect, CSize sizeOffset) +{ + ASSERT_VALID(m_pParentWnd); + ASSERT(::IsWindow(m_pParentWnd->GetSafeHwnd())); + ASSERT(::IsWindow(m_hWnd)); + + ASSERT(m_nButtons<=ID_POPUPBAR_MAX_BUTTONS && m_nButtons>0); + ASSERT(m_nRows<=ID_POPUPBAR_MAX_BUTTONS && m_nRows>0 && m_nRows<=m_nButtons); + + // nobody has cared to fill array of colors + // then we'll do that using predefined array + if(m_arrData.GetSize()==0) + { + if(!SetButtonDataTable(m_defaultDashStyles,DASHSTYLEPICK_DEFINEDSTYLES)) + { + return FALSE; + } + } + ASSERT(m_arrData.GetSize()>=(int)m_nButtons); + + + // nobody has cared to fill array of tooltip text + // then we'll do that using default table + if(m_arrToolTipText.GetCount()==0) + { + if(!SetToolTipTextIDTable(m_defaultArrToolTipText,DASHSTYLEPICK_DEFINEDSTYLES)) + { + return FALSE; + } + } + + // force next styles + SetPopupBarStyle(POPUPBAR_NODEFAULT|POPUPBAR_NOCUSTOM|POPUPBAR_NOTEAROFF); + + return COXPopupBarCtrl::Pick(nAlignment,pParentRect,sizeOffset); +} + +//////////////////////////////////// +// Attributes + +///////////////////////////////////////////////////////////////////////////// +// CDashStylePickerCtrl message handlers + +// draw button +void CDashStylePickerCtrl::DrawButton(CDC* pDC, UINT nIndex) +{ + ASSERT(m_nButtons>0 && m_nButtons<=ID_POPUPBAR_MAX_BUTTONS); + ASSERT((int)m_nButtons==m_arrButtonRect.GetSize()); + ASSERT((int)m_nButtons<=m_arrData.GetSize()); + ASSERT(nIndex<=m_nButtons); + + CRect rect=m_arrButtonRect[nIndex]; + + DrawFrameRect(pDC,rect,nIndex+1); + + rect.DeflateRect(1,1); + + int nSaveDC=pDC->SaveDC(); + + pDC->SetBkMode(TRANSPARENT); + pDC->SelectObject(GetTextFont()); + + // draw lines + rect.DeflateRect(2,0); + + CPen pen; + switch(nIndex) + { + case ID_DASH_SOLID: + { + VERIFY(pen.CreatePen(PS_SOLID,1,RGB(0,0,0))); + break; + } + case ID_DASH_DASH: + { + VERIFY(pen.CreatePen(PS_DASH,1,RGB(0,0,0))); + break; + } + case ID_DASH_DOT: + { + VERIFY(pen.CreatePen(PS_DOT,1,RGB(0,0,0))); + break; + } + case ID_DASH_DASHDOT: + { + VERIFY(pen.CreatePen(PS_DASHDOT,1,RGB(0,0,0))); + break; + } + case ID_DASH_DASHDOTDOT: + { + VERIFY(pen.CreatePen(PS_DASHDOTDOT,1,RGB(0,0,0))); + break; + } + default: + ASSERT(FALSE); + } + + pDC->SelectObject(&pen); + + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + + if(nSaveDC) + pDC->RestoreDC(nSaveDC); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.h new file mode 100644 index 0000000..0a911af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/DashStylePickerCtrl.h @@ -0,0 +1,86 @@ +#if !defined(_DASHSTYLEPICKERCTRL_H_) +#define _DASHSTYLEPICKERCTRL_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXPopupBarCtrl.h" +#include "Resource.h" + + +// DashStylePickerCtrl.h : header file +// + +// dash styles +#define ID_DASH_SOLID 0 +#define ID_DASH_DASH 1 +#define ID_DASH_DOT 2 +#define ID_DASH_DASHDOT 3 +#define ID_DASH_DASHDOTDOT 4 + +// the number of predefined tooltiptext +#define DASHSTYLEPICK_DEFINEDSTYLES 5 + +///////////////////////////////////////////////////////////////////////////// +// CDashStylePickerCtrl window + +class CDashStylePickerCtrl : public COXPopupBarCtrl +{ +// Construction +public: + CDashStylePickerCtrl(UINT nButtons=DASHSTYLEPICK_DEFINEDSTYLES, + UINT nRows=DASHSTYLEPICK_DEFINEDSTYLES, DWORD dwDefault=ID_DASH_SOLID, + CSize sizeButton=CSize(100,18), int nIDDefault=IDS_DEFAULT, + int nIDCustom=IDS_CUSTOM); + +// Data +protected: + static DWORD m_defaultDashStyles[]; + + static ButtonToolTipIDTable m_defaultArrToolTipText[]; + +// data for inner use + +// Attributes +public: + +// Operations +public: + virtual BOOL Pick(UINT nAlignment=ID_POPUPBAR_ALIGNBOTTOM, CRect* pParentRect=NULL, + CSize sizeOffset=CSize(0,0)); + + // sets selected color + inline void SetSelectedStyle(DWORD dwSelected) { SetSelectedData(dwSelected); } + // returns selected color + inline DWORD GetSelectedStyle() { return GetSelectedData(); } + // sets default color + inline void SetDefaultStyle(DWORD dwDefault) { SetDefaultData(dwDefault); } + // returns default color + inline DWORD GetDefaultStyle() { return GetDefaultData(); } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDashStylePickerCtrl) + //}}AFX_VIRTUAL +public: + virtual ~CDashStylePickerCtrl() {} ; + +// implementation +protected: + virtual void DrawButton(CDC* pDC, UINT nIndex); + +// Generated message map functions +protected: + //{{AFX_MSG(CDashStylePickerCtrl) + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_DASHSTYLEPICKERCTRL_H_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.cpp new file mode 100644 index 0000000..4e1c2c0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.cpp @@ -0,0 +1,228 @@ +// LineStylePickerCtrl.cpp : implementation file +// + +#include "stdafx.h" +#include "LineStylePickerCtrl.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +COLORREF CLineStylePickerCtrl::m_defaultLineStyles[] = +{ + { ID_LINE_1PX }, + { ID_LINE_2PX }, + { ID_LINE_3PX }, + { ID_LINE_4PX }, + { ID_LINE_6PX }, + { ID_LINE_3PX_2LINES }, + { ID_LINE_4PX_2LINES }, + { ID_LINE_4PX_2LINES_REVERSE }, + { ID_LINE_7PX_3LINES } +}; + +LPCTSTR CLineStylePickerCtrl::m_defaultArrToolTipText[] = +{ + { _T("1 pix") }, + { _T("2 pix") }, + { _T("3 pix") }, + { _T("4 pix") }, + { _T("6 pix") }, + { _T("3 pix") }, + { _T("4 pix") }, + { _T("4 pix") }, + { _T("7 pix") }, +}; + +///////////////////////////////////////////////////////////////////////////// +// CLineStylePickerCtrl + +CLineStylePickerCtrl::CLineStylePickerCtrl(UINT nButtons, + UINT nRows, + DWORD dwDefault, + CSize sizeButton, + int nIDDefault, + int nIDCustom): + COXPopupBarCtrl(nButtons, nRows, dwDefault, sizeButton, nIDDefault, + nIDCustom) +{ + m_rectEdgeMargin=CRect(2,2,2,2); +} + +BEGIN_MESSAGE_MAP(CLineStylePickerCtrl, COXPopupBarCtrl) + //{{AFX_MSG_MAP(CLineStylePickerCtrl) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + + +BOOL CLineStylePickerCtrl::Pick(UINT nAlignment, CRect* pParentRect, CSize sizeOffset) +{ + ASSERT_VALID(m_pParentWnd); + ASSERT(::IsWindow(m_pParentWnd->GetSafeHwnd())); + ASSERT(::IsWindow(m_hWnd)); + + ASSERT(m_nButtons<=ID_POPUPBAR_MAX_BUTTONS && m_nButtons>0); + ASSERT(m_nRows<=ID_POPUPBAR_MAX_BUTTONS && m_nRows>0 && m_nRows<=m_nButtons); + + // nobody has cared to fill array of colors + // then we'll do that using predefined array + if(m_arrData.GetSize()==0) + { + if(!SetButtonDataTable(m_defaultLineStyles,LINESTYLEPICK_DEFINEDSTYLES)) + { + return FALSE; + } + } + ASSERT(m_arrData.GetSize()>=(int)m_nButtons); + + + // force next styles + SetPopupBarStyle(POPUPBAR_NODEFAULT|POPUPBAR_NOCUSTOM|POPUPBAR_NOTEAROFF); + + return COXPopupBarCtrl::Pick(nAlignment,pParentRect,sizeOffset); +} + +//////////////////////////////////// +// Attributes + +///////////////////////////////////////////////////////////////////////////// +// CLineStylePickerCtrl message handlers + +// draw button +void CLineStylePickerCtrl::DrawButton(CDC* pDC, UINT nIndex) +{ + ASSERT(m_nButtons>0 && m_nButtons<=ID_POPUPBAR_MAX_BUTTONS); + ASSERT((int)m_nButtons==m_arrButtonRect.GetSize()); + ASSERT((int)m_nButtons<=m_arrData.GetSize()); + ASSERT(nIndex<=m_nButtons); + + CRect rect=m_arrButtonRect[nIndex]; + + DrawFrameRect(pDC,rect,nIndex+1); + + rect.DeflateRect(1,1); + + int nSaveDC=pDC->SaveDC(); + + pDC->SetBkMode(TRANSPARENT); + pDC->SelectObject(GetTextFont()); + + // draw text + CRect rectText=rect; + rectText.right=rectText.left+30; + pDC->DrawText(m_defaultArrToolTipText[nIndex],5,rectText, + DT_LEFT|DT_VCENTER|DT_SINGLELINE); + + // draw lines + rect.left+=30; + rect.right-=2; + CPen pen(PS_SOLID,1,RGB(0,0,0)); + pDC->SelectObject(&pen); + switch(nIndex) + { + case ID_LINE_1PX: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + break; + } + case ID_LINE_2PX: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + break; + } + case ID_LINE_3PX: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + break; + } + case ID_LINE_4PX: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+2); + break; + } + case ID_LINE_6PX: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+3); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+3); + break; + } + case ID_LINE_3PX_2LINES: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + break; + } + case ID_LINE_4PX_2LINES: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+2); + break; + } + case ID_LINE_4PX_2LINES_REVERSE: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-1); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-1); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+2); + break; + } + case ID_LINE_7PX_3LINES: + { + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-3); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-3); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2-2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2-2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+2); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+2); + pDC->MoveTo(rect.left,rect.top+rect.Height()/2+3); + pDC->LineTo(rect.right,rect.top+rect.Height()/2+3); + break; + } + default: + ASSERT(FALSE); + } + + if(nSaveDC) + pDC->RestoreDC(nSaveDC); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.h new file mode 100644 index 0000000..38f00a0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/LineStylePickerCtrl.h @@ -0,0 +1,89 @@ +#if !defined(_LINESTYLEPICKERCTRL_H_) +#define _LINESTYLEPICKERCTRL_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXPopupBarCtrl.h" +#include "Resource.h" + + +// LineStylePickerCtrl.h : header file +// + +// line styles +#define ID_LINE_1PX 0 +#define ID_LINE_2PX 1 +#define ID_LINE_3PX 2 +#define ID_LINE_4PX 3 +#define ID_LINE_6PX 4 +#define ID_LINE_3PX_2LINES 5 +#define ID_LINE_4PX_2LINES 6 +#define ID_LINE_4PX_2LINES_REVERSE 7 +#define ID_LINE_7PX_3LINES 8 + +// the number of predefined tooltiptext +#define LINESTYLEPICK_DEFINEDSTYLES 9 + +///////////////////////////////////////////////////////////////////////////// +// CLineStylePickerCtrl window + +class CLineStylePickerCtrl : public COXPopupBarCtrl +{ +// Construction +public: + CLineStylePickerCtrl(UINT nButtons=LINESTYLEPICK_DEFINEDSTYLES, + UINT nRows=LINESTYLEPICK_DEFINEDSTYLES, DWORD dwDefault=ID_LINE_1PX, + CSize sizeButton=CSize(120,18), int nIDDefault=IDS_DEFAULT, + int nIDCustom=IDS_CUSTOM); + +// Data +protected: + static DWORD m_defaultLineStyles[]; + static LPCTSTR m_defaultArrToolTipText[]; + +// data for inner use + +// Attributes +public: + +// Operations +public: + virtual BOOL Pick(UINT nAlignment=ID_POPUPBAR_ALIGNBOTTOM, CRect* pParentRect=NULL, + CSize sizeOffset=CSize(0,0)); + + // sets selected color + inline void SetSelectedStyle(DWORD dwSelected) { SetSelectedData(dwSelected); } + // returns selected color + inline DWORD GetSelectedStyle() { return GetSelectedData(); } + // sets default color + inline void SetDefaultStyle(DWORD dwDefault) { SetDefaultData(dwDefault); } + // returns default color + inline DWORD GetDefaultStyle() { return GetDefaultData(); } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLineStylePickerCtrl) + //}}AFX_VIRTUAL +public: + virtual ~CLineStylePickerCtrl() {} ; + +// implementation +protected: + virtual void DrawButton(CDC* pDC, UINT nIndex); + +// Generated message map functions +protected: + //{{AFX_MSG(CLineStylePickerCtrl) + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_LINESTYLEPICKERCTRL_H_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.cpp new file mode 100644 index 0000000..21300d6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.cpp @@ -0,0 +1,512 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "PopupBar.h" + +#include "OXColorPickerCtrl.h" + +#include "BorderPickerCtrl.h" +#include "LineStylePickerCtrl.h" +#include "DashStylePickerCtrl.h" + +#include "PopupBarDoc.h" +#include "ChildFrm.h" +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_TEXT_COLOR, OnUpdateCustomizeButtons) + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_BORDER_COLOR, OnUpdateCustomizeButtons) + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_BORDER_STYLE, OnUpdateCustomizeButtons) + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_DASH_STYLE, OnUpdateCustomizeButtons) + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_FILL_COLOR, OnUpdateCustomizeButtons) + ON_UPDATE_COMMAND_UI(ID_CUSTOMIZE_LINE_STYLE, OnUpdateCustomizeButtons) + ON_COMMAND(ID_WINDOW_MODAL, OnWindowModal) + ON_UPDATE_COMMAND_UI(ID_WINDOW_MODAL, OnUpdateWindowModal) + //}}AFX_MSG_MAP + ON_UPDATE_COMMAND_UI_RANGE(ID_TOOLBAR_FILE, ID_TOOLBAR_CUSTOMIZE, + OnUpdateViewToolbars) + ON_COMMAND_RANGE(ID_TOOLBAR_FILE, ID_TOOLBAR_CUSTOMIZE, OnViewToolbars) + ON_NOTIFY(TBN_DROPDOWN, ID_TOOLBAR_FILE, OnDropDownFileOpen) + ON_NOTIFY(TBN_DROPDOWN, ID_TOOLBAR_CUSTOMIZE, OnDropDownCustomizeToolbar) +#if _MFC_VER>=0x0420 + // reflect message to provide custom draw functionality + ON_NOTIFY(OXCTBN_CUSTOMDRAW,ID_TOOLBAR_CUSTOMIZE,OnCustomDraw) +#endif +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 + m_bModal=FALSE; +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBarFile.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER, + ID_TOOLBAR_FILE) || !m_wndToolBarFile.LoadToolBar(IDR_TOOLBAR_FILE)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + m_wndToolBarFile.SetButtonStyle(2,m_wndToolBarFile.GetButtonStyle(2)|TBSTYLE_DROPDOWN); + m_wndToolBarFile.SetDropDownArrow(TRUE); + m_wndToolBarFile.UpdateSizes(); + + if (!m_wndToolBarWindow.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER, + ID_TOOLBAR_WINDOW) || !m_wndToolBarWindow.LoadToolBar(IDR_TOOLBAR_WINDOW)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + m_wndToolBarWindow.IniSizes(CSize(16,16)); + m_wndToolBarWindow.SetList(); + m_wndToolBarWindow.SetDefaultTextColor(RGB(0,0,128)); + m_wndToolBarWindow.SetHotTextColor(RGB(0,0,255)); + // we want to use tooltips text in our CoolToolBar + m_wndToolBarWindow.SetMaxTextRows(1); + m_wndToolBarWindow.SetButtonTextFromID(COXCoolToolBar::TTID_TOOLTIP); + m_wndToolBarWindow.UpdateSizes(); + + if (!m_wndToolBarCustomize.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, + ID_TOOLBAR_CUSTOMIZE) || !m_wndToolBarCustomize.LoadToolBar(IDR_TOOLBAR_CUSTOMIZE)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + for (int nIndex=0; nIndexiItem), &rect); + rect.top = rect.bottom; + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + if(pNMToolBar->iItem == ID_FILE_OPEN) + { + CMenu menu; + CMenu* pPopup; + + // the font popup is stored in a resource + menu.LoadMenu(IDR_MAINFRAME); + pPopup = menu.GetSubMenu(0); + pPopup->RemoveMenu(ID_FILE_NEW,MF_BYCOMMAND); + pPopup->RemoveMenu(ID_APP_EXIT,MF_BYCOMMAND); + pPopup->RemoveMenu(pPopup->GetMenuItemCount()-1,MF_BYPOSITION); + pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, rect.left, + rect.top + 1, AfxGetMainWnd()); + } + *pResult = TBDDRET_DEFAULT; +} + +void CMainFrame::OnViewToolbars(UINT nID) +{ + // TODO: Add your command handler code here + + CControlBar* pBar = GetControlBar(nID); + if (pBar != NULL) + { + ShowControlBar(pBar, (pBar->GetStyle() & WS_VISIBLE) == 0, FALSE); + } +} + +void CMainFrame::OnUpdateViewToolbars(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CControlBar* pBar=GetControlBar(pCmdUI->m_nID); + if(pBar!=NULL) + { + pCmdUI->SetCheck((pBar->GetStyle() & WS_VISIBLE) != 0); + return; + } +} + + +void CMainFrame::OnDropDownCustomizeToolbar(NMHDR* pNotifyStruct, LRESULT* pResult) +{ + CFrameWnd* pFrame=GetActiveFrame(); + ASSERT(pFrame); + CPopupBarDoc* pDoc = (CPopupBarDoc*)pFrame->GetActiveDocument(); + ASSERT(pDoc); + ASSERT_VALID(pDoc); + + // this function handles the dropdown menus from the toolbar + NMTOOLBAR* pNMToolBar = (NMTOOLBAR*)pNotifyStruct; + CRect rect; + + COXCoolToolBar* pToolBar=GetCustomizeToolBar(); + + // translate the current toolbar item rectangle into screen coordinates + // so that we'll know where to pop up the menu + pToolBar->GetItemRect(pToolBar->CommandToIndex(pNMToolBar->iItem), &rect); + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.TopLeft()); + ::ClientToScreen(pNMToolBar->hdr.hwndFrom, &rect.BottomRight()); + + COLORREF clr; + COXColorPickerCtrl colorPicker; + switch(pNMToolBar->iItem) + { + case ID_CUSTOMIZE_TEXT_COLOR: + { + if(::IsWindow(colorPicker.m_hWnd) || colorPicker.Create(pToolBar)) + { + clr=pDoc->GetTextColor(); + colorPicker.SetSelectedColor(clr); + colorPicker.SetDefaultColor(pDoc->GetDefaultTextColor()); + if(colorPicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + clr=colorPicker.GetSelectedColor(); + pDoc->SetTextColor(clr); + } + } + break; + } + case ID_CUSTOMIZE_FILL_COLOR: + { + if(::IsWindow(colorPicker.m_hWnd) || colorPicker.Create(pToolBar)) + { + clr=pDoc->GetFillColor(); + colorPicker.SetSelectedColor(clr); + colorPicker.SetDefaultColor(pDoc->GetDefaultFillColor()); + if(colorPicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + clr=colorPicker.GetSelectedColor(); + pDoc->SetFillColor(clr); + } + } + break; + } + case ID_CUSTOMIZE_BORDER_COLOR: + { + if(::IsWindow(colorPicker.m_hWnd) || colorPicker.Create(pToolBar)) + { + clr=pDoc->GetBorderColor(); + colorPicker.SetSelectedColor(clr); + colorPicker.SetDefaultColor(pDoc->GetDefaultBorderColor()); + if(colorPicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + clr=colorPicker.GetSelectedColor(); + pDoc->SetBorderColor(clr); + } + } + break; + } + case ID_CUSTOMIZE_BORDER_STYLE: + { + CBorderPickerCtrl borderPicker; + if(::IsWindow(borderPicker.m_hWnd) || borderPicker.Create(pToolBar)) + { + int nBorderStyle=pDoc->GetBorderStyle(); + borderPicker.SetSelectedStyle(nBorderStyle); + borderPicker.SetStylesImages(IDB_BORDER_TYPES,16, + BORDERPICK_DEFINEDSTYLES,RGB(192,192,192)); + if(borderPicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + nBorderStyle=borderPicker.GetSelectedStyle(); + pDoc->SetBorderStyle(nBorderStyle); + } + } + break; + } + case ID_CUSTOMIZE_LINE_STYLE: + { + CLineStylePickerCtrl lineStylePicker; + if(::IsWindow(lineStylePicker.m_hWnd) || lineStylePicker.Create(pToolBar)) + { + int nLineStyle=pDoc->GetLineStyle(); + lineStylePicker.SetSelectedStyle(nLineStyle); + if(lineStylePicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + nLineStyle=lineStylePicker.GetSelectedStyle(); + pDoc->SetLineStyle(nLineStyle); + } + } + break; + } + case ID_CUSTOMIZE_DASH_STYLE: + { + CDashStylePickerCtrl dashStylePicker; + if(::IsWindow(dashStylePicker.m_hWnd) || dashStylePicker.Create(pToolBar)) + { + int nDashStyle=pDoc->GetDashStyle(); + dashStylePicker.SetSelectedStyle(nDashStyle); + if(dashStylePicker.Pick(ID_POPUPBAR_ALIGNBOTTOM,&rect)) + { + nDashStyle=dashStylePicker.GetSelectedStyle(); + pDoc->SetDashStyle(nDashStyle); + } + } + break; + } + } + + + pToolBar->InvalidateRect(rect); + + pDoc->UpdateAllViews(NULL); + + *pResult = TBDDRET_DEFAULT; +} + +#if _MFC_VER>=0x0420 +////////////////////// +// custom draw of a toolbar is available since MFC 4.2 +afx_msg void CMainFrame::OnCustomDraw(NMHDR* pNotify, LRESULT* pResult) +{ + *pResult=0; + + COXCoolToolBar* pToolBar=GetCustomizeToolBar(); + + LPOXCTB_CUSTOMDRAW phdr=(LPOXCTB_CUSTOMDRAW)pNotify; + // in new version of comctl32.dll(4.71) + // we use toolbar specific custom draw structure + LPNMTBCUSTOMDRAW pTBCDRW; + LPNMCUSTOMDRAW pCDRW; + + DWORD dwComCtlVersion=pToolBar->GetComCtlVersion(); + + if(dwComCtlVersion>=_IE40_COMCTL_VERSION) + { + pTBCDRW=(LPNMTBCUSTOMDRAW)phdr->pCustomDraw; + pCDRW=&pTBCDRW->nmcd; + } + else + { + pCDRW=(LPNMCUSTOMDRAW)phdr->pCustomDraw; + } + + phdr->result = CDRF_DODEFAULT; + + if(pCDRW->dwDrawStage==CDDS_ITEMPOSTPAINT) + { + CPopupBarDoc* pDoc = NULL; + CFrameWnd* pFrame=GetActiveFrame(); + if(pFrame) + { + pDoc = (CPopupBarDoc*)pFrame->GetActiveDocument(); + if(pDoc) + { + ASSERT_VALID(pDoc); + } + } + + COLORREF clr; + switch(pCDRW->dwItemSpec) + { + case ID_CUSTOMIZE_TEXT_COLOR: + { + clr=pDoc!=NULL ? pDoc->GetTextColor() : ::GetSysColor(COLOR_BTNSHADOW); + break; + } + case ID_CUSTOMIZE_FILL_COLOR: + { + clr=pDoc!=NULL ? pDoc->GetFillColor() : ::GetSysColor(COLOR_BTNSHADOW); + break; + } + case ID_CUSTOMIZE_BORDER_COLOR: + { + clr=pDoc!=NULL ? pDoc->GetBorderColor() : ::GetSysColor(COLOR_BTNSHADOW); + break; + } + default: + return; + } + + if(pCDRW->uItemState&CDIS_DISABLED || pCDRW->uItemState&CDIS_GRAYED) + { + clr=::GetSysColor(COLOR_BTNSHADOW); + } + + int nIndex=pToolBar->CommandToIndex(pCDRW->dwItemSpec); + + CRect rect; + pToolBar->GetItemRect(nIndex,rect); + rect.DeflateRect(2,2); + rect.top=rect.bottom-5; + rect.right-=pToolBar->GetDropDownArrowWidth()+1; + + if(pCDRW->uItemState&CDIS_SELECTED || pCDRW->uItemState&CDIS_CHECKED) + { + rect.OffsetRect(1,1); + } + + CDC dc; + dc.Attach(pCDRW->hdc); + COLORREF clrShadow=::GetSysColor(COLOR_BTNSHADOW); + CBrush brushFrame(clrShadow); + dc.FrameRect(&rect,&brushFrame); + rect.DeflateRect(1,1); + + if(clr!=ID_CLRPICK_COLOR_NONE) + { + CBrush brush(clr); + dc.FillRect(&rect,&brush); + } + dc.Detach(); + + phdr->bDoDefault=FALSE; + } +} +////////////////////// +#endif + + +void CMainFrame::OnUpdateCustomizeButtons(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + CPopupBarDoc* pDoc = NULL; + CFrameWnd* pFrame=GetActiveFrame(); + if(pFrame) + { + pDoc = (CPopupBarDoc*)pFrame->GetActiveDocument(); + if(pDoc) + { + ASSERT_VALID(pDoc); + } + } + + pCmdUI->Enable(pDoc!=NULL); + + if(pCmdUI->m_nID==ID_CUSTOMIZE_BORDER_STYLE) + { + int nBorderStyle=pDoc==NULL ? CPopupBarDoc::GetDefaultBorderStyle() : + pDoc->GetBorderStyle(); + int nIndex=CBorderPickerCtrl::FindImageIndexFromStyle(nBorderStyle); + if(nIndex!=-1) + { + int nImageIndex=nIndex+m_nFirstBorderStyleImage; + TBBUTTON button; + int nButtonIndex=m_wndToolBarCustomize.CommandToIndex(pCmdUI->m_nID); + VERIFY(m_wndToolBarCustomize.GetToolBarCtrl().GetButton(nButtonIndex,&button)); + if(button.iBitmap!=nImageIndex) + { + m_wndToolBarCustomize.GetToolBarCtrl().DeleteButton(nButtonIndex); + button.iBitmap=nImageIndex; + VERIFY(m_wndToolBarCustomize.GetToolBarCtrl(). + InsertButton(nButtonIndex,&button)); + } + } + } + + return; +} + + +void CMainFrame::OnWindowModal() +{ + // TODO: Add your command handler code here + m_bModal=!m_bModal; + ((CChildFrame*)GetActiveFrame())->SetModal(m_bModal); +} + +void CMainFrame::OnUpdateWindowModal(CCmdUI* pCmdUI) +{ + // TODO: Add your command update UI handler code here + pCmdUI->SetCheck(m_bModal); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.h new file mode 100644 index 0000000..0423205 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/MainFrm.h @@ -0,0 +1,82 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__95493CE9_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_MAINFRM_H__95493CE9_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +protected: + +public: + BOOL m_bModal; + +// Operations +public: + + COXCoolToolBar* GetCustomizeToolBar() { return &m_wndToolBarCustomize; } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBarFile; + COXCoolToolBar m_wndToolBarWindow; + COXCoolToolBar m_wndToolBarCustomize; + + int m_nFirstBorderStyleImage; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnUpdateCustomizeButtons(CCmdUI* pCmdUI); + afx_msg void OnWindowModal(); + afx_msg void OnUpdateWindowModal(CCmdUI* pCmdUI); + //}}AFX_MSG + afx_msg void OnUpdateViewToolbars(CCmdUI* pCmdUI); + afx_msg void OnViewToolbars(UINT nID); + afx_msg void OnDropDownFileOpen(NMHDR* pNotifyStruct, LRESULT* pResult); + afx_msg void OnDropDownCustomizeToolbar(NMHDR* pNotifyStruct, LRESULT* pResult); +#if _MFC_VER>=0x0420 + // reflect custom draw notification + afx_msg void OnCustomDraw(NMHDR* pNotifyStruct, LRESULT* result); +#endif + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__95493CE9_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.clw new file mode 100644 index 0000000..50888e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.clw @@ -0,0 +1,289 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMainFrame +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "PopupBar.h" +LastPage=0 + +ClassCount=5 +Class1=CPopupBarApp +Class2=CPopupBarDoc +Class3=CPopupBarView +Class4=CMainFrame + +ResourceCount=16 +Resource1=IDD_ABOUTBOX +Resource2=IDR_SQUARETYPE +Resource3=IDR_SUARETYPE +Resource7=IDR_SQUARETYPE (English (U.S.)) +Resource8=IDR_TOOLBAR_FILE (English (U.S.)) +Resource9=IDR_MAINFRAME (English (U.S.)) +Resource10=IDR_TOOLBAR_WINDOW +Resource11=IDR_TOOLBAR_FILE +Resource12=IDR_TOOLBAR_CUSTOMIZE (English (Canada)) +Resource13=IDR_TOOLBAR_WINDOW (English (Canada)) +Resource14=IDR_MAINFRAME +Class5=CChildFrame +Resource15=IDR_TOOLBAR_CUSTOMIZE +Resource16=IDD_DIALOG1 + +[CLS:CPopupBarApp] +Type=0 +HeaderFile=PopupBar.h +ImplementationFile=PopupBar.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CPopupBarApp + +[CLS:CPopupBarDoc] +Type=0 +HeaderFile=PopupBarDoc.h +ImplementationFile=PopupBarDoc.cpp +Filter=N +BaseClass=CDocument +VirtualFilter=DC +LastObject=CPopupBarDoc + +[CLS:CPopupBarView] +Type=0 +HeaderFile=PopupBarView.h +ImplementationFile=PopupBarView.cpp +Filter=C +BaseClass=CView +VirtualFilter=VWC +LastObject=CPopupBarView + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CMDIFrameWnd +VirtualFilter=fWC +LastObject=ID_WINDOW_MODAL + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M +BaseClass=CMDIChildWnd +VirtualFilter=mfWC +LastObject=CChildFrame + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_MRU_FILE1 +Command4=ID_APP_EXIT +Command5=ID_TOOLBAR_FILE +Command6=ID_TOOLBAR_WINDOW +Command7=ID_TOOLBAR_CUSTOMIZE +Command8=ID_VIEW_STATUS_BAR +Command9=ID_APP_ABOUT +CommandCount=9 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +CommandCount=8 +Command8=ID_APP_ABOUT + +[MNU:IDR_SUARETYPE] +Type=1 +Class=CPopupBarView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +CommandCount=21 +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_WINDOW_ARRANGE +Command21=ID_APP_ABOUT + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[MNU:IDR_SQUARETYPE (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_MRU_FILE1 +Command7=ID_APP_EXIT +Command8=ID_TOOLBAR_FILE +Command9=ID_TOOLBAR_WINDOW +Command10=ID_TOOLBAR_CUSTOMIZE +Command11=ID_VIEW_STATUS_BAR +Command12=ID_WINDOW_NEW +Command13=ID_WINDOW_CASCADE +Command14=ID_WINDOW_TILE_HORZ +Command15=ID_WINDOW_ARRANGE +Command16=ID_APP_ABOUT +CommandCount=16 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_MRU_FILE1 +Command4=ID_APP_EXIT +Command5=ID_TOOLBAR_FILE +Command6=ID_TOOLBAR_WINDOW +Command7=ID_TOOLBAR_CUSTOMIZE +Command8=ID_VIEW_STATUS_BAR +Command9=ID_APP_ABOUT +CommandCount=9 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[TB:IDR_TOOLBAR_WINDOW] +Type=1 +Command1=ID_WINDOW_NEW +Command2=ID_WINDOW_CASCADE +Command3=ID_WINDOW_TILE_HORZ +Command4=ID_WINDOW_ARRANGE +CommandCount=4 + +[TB:IDR_TOOLBAR_FILE (English (U.S.))] +Type=1 +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_APP_ABOUT +CommandCount=6 + +[TB:IDR_TOOLBAR_CUSTOMIZE] +Type=1 +Command1=ID_CUSTOMIZE_TEXT_COLOR +Command2=ID_CUSTOMIZE_FILL_COLOR +Command3=ID_CUSTOMIZE_BORDER_COLOR +Command4=ID_CUSTOMIZE_BORDER_STYLE +Command5=ID_CUSTOMIZE_LINE_STYLE +Command6=ID_CUSTOMIZE_DASH_STYLE +CommandCount=6 + +[TB:IDR_TOOLBAR_CUSTOMIZE (English (Canada))] +Type=1 +Class=? +Command1=ID_CUSTOMIZE_TEXT_COLOR +Command2=ID_CUSTOMIZE_FILL_COLOR +Command3=ID_CUSTOMIZE_BORDER_COLOR +Command4=ID_CUSTOMIZE_BORDER_STYLE +Command5=ID_CUSTOMIZE_LINE_STYLE +Command6=ID_CUSTOMIZE_DASH_STYLE +CommandCount=6 + +[TB:IDR_TOOLBAR_FILE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_APP_ABOUT +CommandCount=6 + +[TB:IDR_TOOLBAR_WINDOW (English (Canada))] +Type=1 +Class=? +Command1=ID_WINDOW_NEW +Command2=ID_WINDOW_CASCADE +Command3=ID_WINDOW_TILE_HORZ +Command4=ID_WINDOW_ARRANGE +CommandCount=4 + +[MNU:IDR_SQUARETYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_MRU_FILE1 +Command7=ID_APP_EXIT +Command8=ID_TOOLBAR_FILE +Command9=ID_TOOLBAR_WINDOW +Command10=ID_TOOLBAR_CUSTOMIZE +Command11=ID_VIEW_STATUS_BAR +Command12=ID_WINDOW_NEW +Command13=ID_WINDOW_CASCADE +Command14=ID_WINDOW_TILE_HORZ +Command15=ID_WINDOW_ARRANGE +Command16=ID_WINDOW_MODAL +Command17=ID_APP_ABOUT +CommandCount=17 + +[DLG:IDD_DIALOG1] +Type=1 +Class=? +ControlCount=2 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.cpp new file mode 100644 index 0000000..31854da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.cpp @@ -0,0 +1,145 @@ +// PopupBar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "PopupBar.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "PopupBarDoc.h" +#include "PopupBarView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarApp + +BEGIN_MESSAGE_MAP(CPopupBarApp, CWinApp) + //{{AFX_MSG_MAP(CPopupBarApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarApp construction + +CPopupBarApp::CPopupBarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CPopupBarApp object + +CPopupBarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarApp initialization + +BOOL CPopupBarApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Change the registry key under which our settings are stored. + // 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(); // 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_SQUARETYPE, + RUNTIME_CLASS(CPopupBarDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CPopupBarView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CPopupBarApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarApp commands + +int CPopupBarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsp new file mode 100644 index 0000000..c472eb7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsp @@ -0,0 +1,452 @@ +# Microsoft Developer Studio Project File - Name="PopupBar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PopupBar - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PopupBar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PopupBar.mak" CFG="PopupBar - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PopupBar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PopupBar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PopupBar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "PopupBar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "PopupBar - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PopupBar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"PopupBar.exe" + +!ELSEIF "$(CFG)" == "PopupBar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"PopupBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "PopupBar - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"PopupBar.exe" + +!ELSEIF "$(CFG)" == "PopupBar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "PopupBar" +# PROP BASE Intermediate_Dir "PopupBar" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"PopupBar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"PopupBar.exe" + +!ELSEIF "$(CFG)" == "PopupBar - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "PopupBa0" +# PROP BASE Intermediate_Dir "PopupBa0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"PopupBar.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"PopupBar.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "PopupBar - Win32 Release" +# Name "PopupBar - Win32 Debug" +# Name "PopupBar - Win32 Release_Shared" +# Name "PopupBar - Win32 Unicode_Release" +# Name "PopupBar - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\BorderPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\DashStylePickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\LineStylePickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\PopupBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\PopupBar.rc +# End Source File +# Begin Source File + +SOURCE=.\PopupBarDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\PopupBarView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\BorderPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\DashStylePickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\LineStylePickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPopupBarCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\PopupBar.h +# End Source File +# Begin Source File + +SOURCE=.\PopupBarDoc.h +# End Source File +# Begin Source File + +SOURCE=.\PopupBarView.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bmp00002.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\PopupBar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\PopupBar.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\PopupBarDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\PopupBar.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\PopupBar.reg +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsw new file mode 100644 index 0000000..55eaab2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PopupBar"=".\PopupBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/PopupBar", XVIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.h new file mode 100644 index 0000000..cad87ad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.h @@ -0,0 +1,51 @@ +// PopupBar.h : main header file for the POPUPBAR application +// + +#if !defined(AFX_POPUPBAR_H__95493CE5_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_POPUPBAR_H__95493CE5_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarApp: +// See PopupBar.cpp for the implementation of this class +// + +class CPopupBarApp : public CWinApp +{ +public: + CPopupBarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPopupBarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CPopupBarApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_POPUPBAR_H__95493CE5_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.rc new file mode 100644 index 0000000..f4eefdb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.rc @@ -0,0 +1,516 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\PopupBar.ico" +IDR_SQUARETYPE ICON "res\\PopupBarDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_TOOLBAR_FILE BITMAP "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_FILE TOOLBAR 16, 15 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_CLOSE + SEPARATOR + BUTTON ID_FILE_SAVE + BUTTON ID_FILE_SAVE_AS + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "&Toolbar" + BEGIN + MENUITEM "&File", ID_TOOLBAR_FILE + MENUITEM "&Window", ID_TOOLBAR_WINDOW + MENUITEM "&Customize", ID_TOOLBAR_CUSTOMIZE + END + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About PopupBar...", ID_APP_ABOUT + END +END + +IDR_SQUARETYPE 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 "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + POPUP "&Toolbar" + BEGIN + MENUITEM "&File", ID_TOOLBAR_FILE + MENUITEM "&Window", ID_TOOLBAR_WINDOW + MENUITEM "&Customize", ID_TOOLBAR_CUSTOMIZE + END + 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 + MENUITEM "Modal", ID_WINDOW_MODAL + END + POPUP "&Help" + BEGIN + MENUITEM "&About PopupBar...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "FileDescription", "PopupBar MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "PopupBar" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "PopupBar.EXE" + VALUE "ProductName", "PopupBar Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG1 DIALOG 0, 0, 186, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG1, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "PopupBar" + IDR_SQUARETYPE "\nSquare\nSquare\nSquare Files (*.sqr)\n.sqr\nPopupBar.Document\nSquare Document" + ID_DESCRIPTION_FILE "PopupBarInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "PopupBar" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_TOOLBAR_WINDOW BITMAP "res\\toolbar1.bmp" +IDR_TOOLBAR_CUSTOMIZE BITMAP "res\\bmp00001.bmp" +IDB_BORDER_TYPES BITMAP "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_TOOLBAR_WINDOW TOOLBAR 16, 15 +BEGIN + BUTTON ID_WINDOW_NEW + BUTTON ID_WINDOW_CASCADE + BUTTON ID_WINDOW_TILE_HORZ + BUTTON ID_WINDOW_ARRANGE +END + +IDR_TOOLBAR_CUSTOMIZE TOOLBAR 16, 15 +BEGIN + BUTTON ID_CUSTOMIZE_TEXT_COLOR + BUTTON ID_CUSTOMIZE_FILL_COLOR + BUTTON ID_CUSTOMIZE_BORDER_COLOR + SEPARATOR + BUTTON ID_CUSTOMIZE_BORDER_STYLE + SEPARATOR + BUTTON ID_CUSTOMIZE_LINE_STYLE + BUTTON ID_CUSTOMIZE_DASH_STYLE +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\PopupBar.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" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + ID_CUSTOMIZE_TEXT_COLOR "\nText Color" + ID_CUSTOMIZE_BORDER_STYLE "\nBorder Style" + ID_CUSTOMIZE_FILL_COLOR "\nFill Color" + ID_CUSTOMIZE_BORDER_COLOR "\nBorder Color" + ID_CUSTOMIZE_DASH_STYLE "\nDash Style" +END + +STRINGTABLE +BEGIN + ID_CUSTOMIZE_LINE_STYLE "\nLine Style" + IDS_OUTBORDERS "Outside Borders" + IDS_TOPBORDER "Top Border" + IDS_BOTTOMBORDER "Bottom Border" + IDS_LEFTBORDER "Left Border" + IDS_RIGHTBORDER "Right Border" + IDS_ALLBORDERS "All Borders" + IDS_INSIDEBORDERS "Inside Borders" + IDS_HINSIDE "Horizontal Inside" + IDS_VINSIDE "Vertical Inside" + IDS_NOBORDERS "No Borders" + IDS_SOLID "Solid" + IDS_DASH "Dash" + IDS_DOT "Dot" + IDS_DASHDOT "Dash Dot" + IDS_DASHDOTDOT "Dash Dot Dot" +END + +STRINGTABLE +BEGIN + IDS_DEFAULT " " + IDS_CUSTOM " " +END + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\PopupBar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.reg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.reg new file mode 100644 index 0000000..78966da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.reg @@ -0,0 +1,14 @@ +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\.sqr = PopupBar.Document +HKEY_CLASSES_ROOT\PopupBar.Document\shell\open\command = POPUPBAR.EXE %1 +HKEY_CLASSES_ROOT\PopupBar.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\PopupBar.Document\shell\open\ddeexec\application = POPUPBAR + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\PopupBar.Document = Suare Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.vcproj new file mode 100644 index 0000000..f3b9ba0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBar.vcproj @@ -0,0 +1,2464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.cpp new file mode 100644 index 0000000..4a3283c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.cpp @@ -0,0 +1,140 @@ +// PopupBarDoc.cpp : implementation of the CPopupBarDoc class +// + +#include "stdafx.h" +#include "PopupBar.h" + +#include "MainFrm.h" +#include "PopupBarDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarDoc + +IMPLEMENT_DYNCREATE(CPopupBarDoc, CDocument) + +BEGIN_MESSAGE_MAP(CPopupBarDoc, CDocument) + //{{AFX_MSG_MAP(CPopupBarDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarDoc construction/destruction + +CPopupBarDoc::CPopupBarDoc() +{ + // TODO: add one-time construction code here + +} + +CPopupBarDoc::~CPopupBarDoc() +{ +} + +BOOL CPopupBarDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + m_clrText=GetDefaultTextColor(); + m_clrFill=GetDefaultFillColor(); + m_clrBorder=GetDefaultBorderColor(); + + m_nBorderStyle=GetDefaultBorderStyle(); + m_nLineStyle=GetDefaultLineStyle(); + m_nDashStyle=GetDefaultDashStyle(); + + return TRUE; +} + + +BOOL CPopupBarDoc::DoFileSave() +{ + if(m_strPathName.IsEmpty()) + { + // File was created using File New + // + // set whatever name for the document file + m_strPathName=_T("Document.ext"); + if (!DoSave(m_strPathName)) + { + TRACE0("Warning: File save failed.\n"); + return FALSE; + } + return TRUE; + } + else + return CDocument::DoFileSave(); +} + + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarDoc serialization + +void CPopupBarDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + ar << (DWORD)m_clrText; + ar << (DWORD)m_clrFill; + ar << (DWORD)m_clrBorder; + ar << m_nBorderStyle; + ar << m_nLineStyle; + ar << m_nDashStyle; + } + else + { + // TODO: add loading code here + ar >> (DWORD)m_clrText; + ar >> (DWORD)m_clrFill; + ar >> (DWORD)m_clrBorder; + ar >> m_nBorderStyle; + ar >> m_nLineStyle; + ar >> m_nDashStyle; + + + // check for correct values + if((m_nBorderStyle&ID_BORDER_ALL)==0 && m_nBorderStyle!=ID_BORDER_NONE) + { + TRACE(_T("CPopupBarDoc::Serialize: Incorrect border style")); + m_nBorderStyle=ID_BORDER_ALL; + } + if(m_nLineStyleID_LINE_7PX_3LINES) + { + TRACE(_T("CPopupBarDoc::Serialize: Incorrect line style")); + m_nLineStyle=ID_LINE_1PX; + } + if(m_nDashStyleID_DASH_DASHDOTDOT) + { + TRACE(_T("CPopupBarDoc::Serialize: Incorrect dash style")); + m_nDashStyle=ID_DASH_SOLID; + } + } +} + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarDoc diagnostics + +#ifdef _DEBUG +void CPopupBarDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CPopupBarDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.h new file mode 100644 index 0000000..dccc42a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarDoc.h @@ -0,0 +1,96 @@ +// PopupBarDoc.h : interface of the CPopupBarDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_POPUPBARDOC_H__95493CED_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_POPUPBARDOC_H__95493CED_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "BorderPickerCtrl.h" +#include "LineStylePickerCtrl.h" +#include "DashStylePickerCtrl.h" + + +class CPopupBarDoc : public CDocument +{ +protected: // create from serialization only + CPopupBarDoc(); + DECLARE_DYNCREATE(CPopupBarDoc) + +// Attributes +public: + +protected: + COLORREF m_clrText; + COLORREF m_clrFill; + COLORREF m_clrBorder; + + int m_nBorderStyle; + int m_nLineStyle; + int m_nDashStyle; + +// Operations +public: + + static COLORREF GetDefaultTextColor() { return RGB(0,0,128); } + COLORREF GetTextColor() { return m_clrText; } + void SetTextColor(COLORREF clrText) { m_clrText=clrText; SetModifiedFlag(TRUE); } + + static COLORREF GetDefaultFillColor() { return RGB(192,192,192); } + COLORREF GetFillColor() { return m_clrFill; } + void SetFillColor(COLORREF clrFill) { m_clrFill=clrFill; SetModifiedFlag(TRUE); } + + static COLORREF GetDefaultBorderColor() { return RGB(0,0,0); } + COLORREF GetBorderColor() { return m_clrBorder; } + void SetBorderColor(COLORREF clrBorder) { m_clrBorder=clrBorder; SetModifiedFlag(TRUE); } + + static int GetDefaultBorderStyle() { return ID_BORDER_ALL; } + int GetBorderStyle() { return m_nBorderStyle; } + void SetBorderStyle(int nBorderStyle) { m_nBorderStyle=nBorderStyle; SetModifiedFlag(TRUE); } + + static int GetDefaultLineStyle() { return ID_LINE_1PX; } + int GetLineStyle() { return m_nLineStyle; } + void SetLineStyle(int nLineStyle) { m_nLineStyle=nLineStyle; SetModifiedFlag(TRUE); } + + static int GetDefaultDashStyle() { return ID_DASH_SOLID; } + int GetDashStyle() { return m_nDashStyle; } + void SetDashStyle(int nDashStyle) { m_nDashStyle=nDashStyle; SetModifiedFlag(TRUE); } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPopupBarDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + virtual BOOL DoFileSave(); + +// Implementation +public: + virtual ~CPopupBarDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CPopupBarDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_POPUPBARDOC_H__95493CED_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarInfo.rtf new file mode 100644 index 0000000..7577744 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarInfo.rtf @@ -0,0 +1,57 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} +{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid1259828}{\*\generator Micro +soft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr16\min59}{\revtim\yr2005\mo1\dy17\hr16\min59}{\version2}{\edmins0}{\nofpages2}{\nofwords396}{\nofchars2259}{\*\company Dundas India}{\nofcharsws2650} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot1259828 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\insrsid1259828 COXPopupBarCtrl General Information +\par }{\insrsid1259828 +\par }{\b\insrsid1259828 Copyright \'a9}{\b\insrsid1259828 The Code Project}{\b\insrsid1259828 1997 - 1998, All Rights Reserved}{\insrsid1259828 +\par +\par Our Popup Bar control as any control that can be +represented as a top most popup window with items on it that can be chosen using the mouse or keyboard. For example standard Popup Menu Bar or Color Picker from Word 97 are Popup Bar controls. Next types of items can be defined on our Popup Bar control : + +\par +\par "Default" button. Always is located on the top. The size of this button is calculated automatically. +\par "Common" buttons. You can set the number of common buttons and their size. You can also set the number of rows used to display them. +\par "Custom" button. Is always located at the bottom. Size of this button is calculated automatically. +\par +\par Default and Custom buttons are optional and at least one common button has to be assigned to the Popup Bar control. +\par +\par After displaying, the Popup Bar control captures all mouse +messages and hides itself if any mouse button is clicked or the user presses ESC, ENTER or SPACE buttons. If at the moment of clicking the mouse wasn't over any button within Popup Bar or user pressed ESC then nothing was chosen. +\par +\par COXPopupBarCtrl is a generic class designed specifically as a base class to provide basic functionality of any Popup Bar control. +\par +\par Next are the main points about this class: +\par +\par }\pard \ql \fi-360\li720\ri0\nowidctlpar\faauto\rin0\lin720\itap0 {\insrsid1259828 With any button (except Custom button) we associate DWORD value to uniquely identify them. In derived cl +ass you specify the logic of this value. It can be just a plain value or a pointer to any object, but it's up to implementor to provide logic that stands by that value. +\par +\par COXPopupBarCtrl is created in two steps: }{\ul\cf2\insrsid1259828 constructor}{\insrsid1259828 and }{\ul\cf2\insrsid1259828 Create}{\insrsid1259828 function. In construc +tor you can specify number of common buttons, number of rows to display common buttons, common button size, the value that should be associated with Default button and the text that is going to be displayed on Default and Custom buttons. +\par After creation you can change whatever attributes you want (including those specified in the }{\ul\cf2\insrsid1259828 constructor}{\insrsid1259828 and }{\ul\cf2\insrsid1259828 Create}{\insrsid1259828 function) +\par +\par In order to provide graphical representation of buttons in your derived class, you will probably need to overwrite the following virtual functions: +\par +\par virtual void DrawButton(CDC* pDC, UINT nIndex); +\par virtual void DrawDefaultButton(CDC* pDC); +\par virtual void DrawCustomButton(CDC* pDC); +\par virtual void DrawFrameRect(CDC* pDC, CRect& rect, UINT nIndex); +\par +\par pDC - device context to draw in +\par nIndex - index of button to be drawn +\par +\par When the Custom button is pressed next virtual function is called: +\par +\par virtual BOOL OnCustomButton(); +\par +\par Override it too in order to provide your own handling of custom button in derived class. +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\fs20\insrsid1259828 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.cpp new file mode 100644 index 0000000..a2bfcce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.cpp @@ -0,0 +1,831 @@ +// PopupBarView.cpp : implementation of the CPopupBarView class +// + +#include "stdafx.h" +#include "PopupBar.h" + +#include "MainFrm.h" +#include "PopupBarDoc.h" +#include "PopupBarView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView + +IMPLEMENT_DYNCREATE(CPopupBarView, CView) + +BEGIN_MESSAGE_MAP(CPopupBarView, CView) + //{{AFX_MSG_MAP(CPopupBarView) + ON_WM_SIZE() + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView construction/destruction + +CPopupBarView::CPopupBarView() +{ + // TODO: add construction code here + +} + +CPopupBarView::~CPopupBarView() +{ +} + +BOOL CPopupBarView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView drawing + +void CPopupBarView::OnDraw(CDC* pDC) +{ + CPopupBarDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + + // fill square + CBrush brush(pDoc->GetFillColor()); + CRect rectSquare=m_rectWholeSquare; + rectSquare.InflateRect(0,0,1,1); + pDC->FillRect(rectSquare,&brush); + + // draw borders + int nBorderStyle=pDoc->GetBorderStyle(); + if(nBorderStyle!=ID_BORDER_NONE) + { + // set pen to draw borders + COLORREF clrBorder=pDoc->GetBorderColor(); + CPen pen; + switch(pDoc->GetDashStyle()) + { + case ID_DASH_SOLID: + { + VERIFY(pen.CreatePen(PS_SOLID,1,clrBorder)); + break; + } + case ID_DASH_DASH: + { + VERIFY(pen.CreatePen(PS_DASH,1,clrBorder)); + break; + } + case ID_DASH_DOT: + { + VERIFY(pen.CreatePen(PS_DOT,1,clrBorder)); + break; + } + case ID_DASH_DASHDOT: + { + VERIFY(pen.CreatePen(PS_DASHDOT,1,clrBorder)); + break; + } + case ID_DASH_DASHDOTDOT: + { + VERIFY(pen.CreatePen(PS_DASHDOTDOT,1,clrBorder)); + break; + } + default: + ASSERT(FALSE); + } + + pDC->SelectObject(&pen); + pDC->SetBkMode(TRANSPARENT); + + CRect rectBorder; + int nLineStyle=pDoc->GetLineStyle(); + + if(nBorderStyle&ID_BORDER_TOP) + { + rectBorder=m_rectWholeSquare; + rectBorder.bottom=rectBorder.top; + DrawBorder(pDC,rectBorder,ID_BORDER_TOP,nLineStyle); + } + if(nBorderStyle&ID_BORDER_BOTTOM) + { + rectBorder=m_rectWholeSquare; + rectBorder.top=rectBorder.bottom; + if(nBorderStyle&ID_BORDER_RIGHT) + { + rectBorder.right++; + } + DrawBorder(pDC,rectBorder,ID_BORDER_BOTTOM,nLineStyle); + } + if(nBorderStyle&ID_BORDER_LEFT) + { + rectBorder=m_rectWholeSquare; + rectBorder.right=rectBorder.left; + DrawBorder(pDC,rectBorder,ID_BORDER_LEFT,nLineStyle); + } + if(nBorderStyle&ID_BORDER_RIGHT) + { + rectBorder=m_rectWholeSquare; + rectBorder.left=rectBorder.right; + if(nBorderStyle&ID_BORDER_BOTTOM) + { + rectBorder.bottom++; + } + DrawBorder(pDC,rectBorder,ID_BORDER_RIGHT,nLineStyle); + } + if(nBorderStyle&ID_BORDER_HORZ_INSIDE) + { + rectBorder=m_rectWholeSquare; + rectBorder.bottom=rectBorder.top+rectBorder.Height()/2; + rectBorder.top=rectBorder.bottom; + DrawBorder(pDC,rectBorder,ID_BORDER_HORZ_INSIDE,nLineStyle); + } + if(nBorderStyle&ID_BORDER_VERT_INSIDE) + { + rectBorder=m_rectWholeSquare; + rectBorder.right=rectBorder.left+rectBorder.Width()/2; + rectBorder.left=rectBorder.right; + DrawBorder(pDC,rectBorder,ID_BORDER_VERT_INSIDE,nLineStyle); + } + } + + // draw text + pDC->SetTextColor(pDoc->GetTextColor()); + + pDC->DrawText(_T("First Quarter"),m_rectFirstSquare,DT_CENTER|DT_VCENTER|DT_SINGLELINE); + pDC->DrawText(_T("Second Quarter"),m_rectSecondSquare,DT_CENTER|DT_VCENTER|DT_SINGLELINE); + pDC->DrawText(_T("Third Quarter"),m_rectThirdSquare,DT_CENTER|DT_VCENTER|DT_SINGLELINE); + pDC->DrawText(_T("Fourth Quarter"),m_rectFourthSquare,DT_CENTER|DT_VCENTER|DT_SINGLELINE); +} + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView printing + +BOOL CPopupBarView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CPopupBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CPopupBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView diagnostics + +#ifdef _DEBUG +void CPopupBarView::AssertValid() const +{ + CView::AssertValid(); +} + +void CPopupBarView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CPopupBarDoc* CPopupBarView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPopupBarDoc))); + return (CPopupBarDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CPopupBarView message handlers + + +void CPopupBarView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); + ASSERT(pFrame); + pFrame->GetCustomizeToolBar()->Invalidate(); + + CView::OnActivateView(bActivate, pActivateView, pDeactiveView); +} + +void CPopupBarView::OnInitialUpdate() +{ + CView::OnInitialUpdate(); + + // TODO: Add your specialized code here and/or call the base class + + CalculateRects(); +} + + +void CPopupBarView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + // TODO: Add your message handler code here + + CalculateRects(); +} + + +void CPopupBarView::CalculateRects() +{ + GetClientRect(m_rectWholeSquare); + + m_rectWholeSquare.DeflateRect(ID_EDGE_MARGIN,ID_EDGE_MARGIN); + + m_rectFirstSquare=m_rectWholeSquare; + m_rectFirstSquare.right=m_rectFirstSquare.left+m_rectWholeSquare.Width()/2; + m_rectFirstSquare.bottom=m_rectFirstSquare.top+m_rectWholeSquare.Height()/2; + + m_rectSecondSquare=m_rectFirstSquare; + m_rectSecondSquare.left=m_rectFirstSquare.right; + m_rectSecondSquare.right=m_rectWholeSquare.right; + + m_rectThirdSquare=m_rectFirstSquare; + m_rectThirdSquare.top=m_rectFirstSquare.bottom; + m_rectThirdSquare.bottom=m_rectWholeSquare.bottom; + + m_rectFourthSquare=m_rectSecondSquare; + m_rectFourthSquare.top=m_rectSecondSquare.bottom; + m_rectFourthSquare.bottom=m_rectWholeSquare.bottom; + + m_textSize.cx=m_rectFirstSquare.Width()-2*ID_TEXT_MARGIN- + ID_BORDER_MARGIN-ID_BORDER_MARGIN/2; + m_textSize.cy=m_rectFirstSquare.Height()-2*ID_TEXT_MARGIN- + ID_BORDER_MARGIN-ID_BORDER_MARGIN/2; +} + +void CPopupBarView::DrawBorder(CDC* pDC, CRect rect, int nBorderStyle, int nLineStyle) +{ + pDC->MoveTo(rect.left,rect.top); + switch(nLineStyle) + { + case ID_LINE_1PX: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + case ID_BORDER_BOTTOM: + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + break; + } + case ID_BORDER_LEFT: + case ID_BORDER_RIGHT: + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + break; + } + } + break; + } + case ID_LINE_2PX: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + break; + } + case ID_BORDER_LEFT: + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + break; + } + } + break; + } + case ID_LINE_3PX: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + break; + } + } + break; + } + case ID_LINE_4PX: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + break; + } + } + break; + } + case ID_LINE_6PX: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + pDC->MoveTo(rect.left,rect.top+4); + pDC->LineTo(rect.right,rect.top+4); + pDC->MoveTo(rect.left,rect.top+5); + pDC->LineTo(rect.right,rect.top+5); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + pDC->MoveTo(rect.left,rect.top-4); + pDC->LineTo(rect.right,rect.top-4); + pDC->MoveTo(rect.left,rect.top-5); + pDC->LineTo(rect.right,rect.top-5); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + pDC->MoveTo(rect.left+4,rect.top); + pDC->LineTo(rect.left+4,rect.bottom); + pDC->MoveTo(rect.left+5,rect.top); + pDC->LineTo(rect.left+5,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + pDC->MoveTo(rect.left-4,rect.top); + pDC->LineTo(rect.left-4,rect.bottom); + pDC->MoveTo(rect.left-5,rect.top); + pDC->LineTo(rect.left-5,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + break; + } + } + break; + } + case ID_LINE_3PX_2LINES: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + break; + } + } + break; + } + case ID_LINE_4PX_2LINES: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + break; + } + } + break; + } + case ID_LINE_4PX_2LINES_REVERSE: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + break; + } + } + break; + } + case ID_LINE_7PX_3LINES: + { + switch(nBorderStyle) + { + case ID_BORDER_TOP: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top+1); + pDC->LineTo(rect.right,rect.top+1); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + pDC->MoveTo(rect.left,rect.top+5); + pDC->LineTo(rect.right,rect.top+5); + pDC->MoveTo(rect.left,rect.top+6); + pDC->LineTo(rect.right,rect.top+6); + break; + } + case ID_BORDER_BOTTOM: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-1); + pDC->LineTo(rect.right,rect.top-1); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + pDC->MoveTo(rect.left,rect.top-5); + pDC->LineTo(rect.right,rect.top-5); + pDC->MoveTo(rect.left,rect.top-6); + pDC->LineTo(rect.right,rect.top-6); + break; + } + case ID_BORDER_LEFT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left+1,rect.top); + pDC->LineTo(rect.left+1,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + pDC->MoveTo(rect.left+5,rect.top); + pDC->LineTo(rect.left+5,rect.bottom); + pDC->MoveTo(rect.left+6,rect.top); + pDC->LineTo(rect.left+6,rect.bottom); + break; + } + case ID_BORDER_RIGHT: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-1,rect.top); + pDC->LineTo(rect.left-1,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + pDC->MoveTo(rect.left-5,rect.top); + pDC->LineTo(rect.left-5,rect.bottom); + pDC->MoveTo(rect.left-6,rect.top); + pDC->LineTo(rect.left-6,rect.bottom); + break; + } + case ID_BORDER_HORZ_INSIDE: + { + pDC->LineTo(rect.right,rect.top); + pDC->MoveTo(rect.left,rect.top-2); + pDC->LineTo(rect.right,rect.top-2); + pDC->MoveTo(rect.left,rect.top+2); + pDC->LineTo(rect.right,rect.top+2); + pDC->MoveTo(rect.left,rect.top-3); + pDC->LineTo(rect.right,rect.top-3); + pDC->MoveTo(rect.left,rect.top+3); + pDC->LineTo(rect.right,rect.top+3); + break; + } + case ID_BORDER_VERT_INSIDE: + { + pDC->LineTo(rect.left,rect.bottom); + pDC->MoveTo(rect.left-2,rect.top); + pDC->LineTo(rect.left-2,rect.bottom); + pDC->MoveTo(rect.left+2,rect.top); + pDC->LineTo(rect.left+2,rect.bottom); + pDC->MoveTo(rect.left-3,rect.top); + pDC->LineTo(rect.left-3,rect.bottom); + pDC->MoveTo(rect.left+3,rect.top); + pDC->LineTo(rect.left+3,rect.bottom); + break; + } + } + break; + } + default: + ASSERT(FALSE); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.h new file mode 100644 index 0000000..278feed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/PopupBarView.h @@ -0,0 +1,83 @@ +// PopupBarView.h : interface of the CPopupBarView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_POPUPBARVIEW_H__95493CEF_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_POPUPBARVIEW_H__95493CEF_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define ID_EDGE_MARGIN 20 +#define ID_BORDER_MARGIN 7 +#define ID_TEXT_MARGIN 10 + +class CPopupBarView : public CView +{ +protected: // create from serialization only + CPopupBarView(); + DECLARE_DYNCREATE(CPopupBarView) + +// Attributes +public: + CPopupBarDoc* GetDocument(); + +// Operations +public: + +protected: + void CalculateRects(); + void DrawBorder(CDC* pDC, CRect rect, int nBorderStyle, int nLineStyle); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPopupBarView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CPopupBarView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CRect m_rectWholeSquare; + + CRect m_rectFirstSquare; + CRect m_rectSecondSquare; + CRect m_rectThirdSquare; + CRect m_rectFourthSquare; + + CSize m_textSize; + +// Generated message map functions +protected: + //{{AFX_MSG(CPopupBarView) + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in PopupBarView.cpp +inline CPopupBarDoc* CPopupBarView::GetDocument() + { return (CPopupBarDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_POPUPBARVIEW_H__95493CEF_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ReadMe.txt new file mode 100644 index 0000000..a3ea2d4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/ReadMe.txt @@ -0,0 +1,108 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : PopupBar +======================================================================== + + +AppWizard has created this PopupBar 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 PopupBar application. + +PopupBar.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CPopupBarApp application class. + +PopupBar.cpp + This is the main application source file that contains the application + class CPopupBarApp. + +PopupBar.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 + Developer Studio. + +res\PopupBar.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file PopupBar.rc. + +res\PopupBar.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +PopupBar.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. + +PopupBar.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +PopupBarDoc.h, PopupBarDoc.cpp - the document + These files contain your CPopupBarDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CPopupBarDoc::Serialize). + +PopupBarView.h, PopupBarView.cpp - the view of the document + These files contain your CPopupBarView class. + CPopupBarView objects are used to view CPopupBarDoc objects. + +res\PopupBarDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CPopupBarDoc class. This icon is included by the main + resource file PopupBar.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named PopupBar.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/Square.sqr b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/Square.sqr new file mode 100644 index 0000000..9ed7d25 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/Square.sqr differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/SquareNew.sqr b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/SquareNew.sqr new file mode 100644 index 0000000..16518cb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/SquareNew.sqr differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.cpp new file mode 100644 index 0000000..c621447 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// PopupBar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.h new file mode 100644 index 0000000..9c0d917 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__95493CE7_F252_11D1_B475_B0D808C10000__INCLUDED_) +#define AFX_STDAFX_H__95493CE7_F252_11D1_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__95493CE7_F252_11D1_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.rc2 new file mode 100644 index 0000000..052a0cb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBar.rc2 @@ -0,0 +1,13 @@ +// +// POPUPBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBarDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBarDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/PopupBarDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/Toolbar.bmp new file mode 100644 index 0000000..1cc75be Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bitmap1.bmp new file mode 100644 index 0000000..b7626eb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00001.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00001.bmp new file mode 100644 index 0000000..00c26ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00001.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00002.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00002.bmp new file mode 100644 index 0000000..6e8e840 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/bmp00002.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/toolbar1.bmp new file mode 100644 index 0000000..7accbea Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/resource.h new file mode 100644 index 0000000..4a58076 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/PopupBar/resource.h @@ -0,0 +1,51 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by PopupBar.rc +// +#define IDR_MAINFRAME 128 +#define IDR_SQUARETYPE 129 +#define IDR_TOOLBAR_FILE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDR_TOOLBAR_WINDOW 130 +#define IDR_TOOLBAR_CUSTOMIZE 132 +#define IDB_BORDER_TYPES 134 +#define IDD_DIALOG1 136 +#define ID_TOOLBAR_FILE 32771 +#define ID_TOOLBAR_WINDOW 32777 +#define ID_CUSTOMIZE_TEXT_COLOR 32779 +#define ID_CUSTOMIZE_BORDER_STYLE 32780 +#define ID_CUSTOMIZE_FILL_COLOR 32781 +#define ID_CUSTOMIZE_BORDER_COLOR 32782 +#define ID_CUSTOMIZE_DASH_STYLE 32783 +#define ID_CUSTOMIZE_LINE_STYLE 32784 +#define ID_TOOLBAR_CUSTOMIZE 32785 +#define IDS_OUTBORDERS 32785 +#define IDS_TOPBORDER 32786 +#define ID_WINDOW_MODAL 32787 +#define IDS_BOTTOMBORDER 32787 +#define IDS_LEFTBORDER 32788 +#define IDS_RIGHTBORDER 32789 +#define IDS_ALLBORDERS 32790 +#define IDS_INSIDEBORDERS 32791 +#define IDS_HINSIDE 32792 +#define IDS_VINSIDE 32793 +#define IDS_NOBORDERS 32794 +#define IDS_SOLID 32795 +#define IDS_DASH 32796 +#define IDS_DOT 32797 +#define IDS_DASHDOT 32798 +#define IDS_DASHDOTDOT 32799 +#define IDS_DEFAULT 32800 +#define IDS_CUSTOM 32801 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 138 +#define _APS_NEXT_COMMAND_VALUE 32788 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/ReadMe.txt new file mode 100644 index 0000000..7ec46e4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : RoundedButton +======================================================================== + + +AppWizard has created this RoundedButton 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 RoundedButton application. + +RoundedButton.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +RoundedButton.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CRoundedButtonApp application class. + +RoundedButton.cpp + This is the main application source file that contains the application + class CRoundedButtonApp. + +RoundedButton.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++. + +RoundedButton.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\RoundedButton.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file RoundedButton.rc. + +res\RoundedButton.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +RoundedButtonDlg.h, RoundedButtonDlg.cpp - the dialog + These files contain your CRoundedButtonDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in RoundedButton.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named RoundedButton.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.clw new file mode 100644 index 0000000..64cd580 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.clw @@ -0,0 +1,117 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CRoundedButtonDlg +LastTemplate=CPropertyPage +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "RoundedButton.h" + +ClassCount=3 +Class1=CRoundedButtonApp +Class2=CRoundedButtonDlg + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDD_ROUNDEDBUTTON_SAMPLES_DIALOG +Class3=CRoundedButtonSamplesDlg +Resource3=IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG + +[CLS:CRoundedButtonApp] +Type=0 +HeaderFile=RoundedButton.h +ImplementationFile=RoundedButton.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CRoundedButtonApp + +[CLS:CRoundedButtonDlg] +Type=0 +HeaderFile=RoundedButtonDlg.h +ImplementationFile=RoundedButtonDlg.cpp +Filter=D +LastObject=CRoundedButtonDlg +BaseClass=CPropertyPage +VirtualFilter=dWC + +[DLG:IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG] +Type=1 +Class=CRoundedButtonDlg +ControlCount=37 +Control1=IDC_BUTTON_ROUND,button,1342246155 +Control2=IDC_BUTTON_COLOR,button,1342242827 +Control3=IDC_EDIT_RADIUS_EXT,edit,1350631552 +Control4=IDC_SPIN_RADIUS_EXT,msctls_updown32,1342177462 +Control5=IDC_EDIT_RADIUS_INT,edit,1350631552 +Control6=IDC_SPIN_RADIUS_INT,msctls_updown32,1342177462 +Control7=IDC_LIGHT_COLOR,button,1342242827 +Control8=IDC_EDIT_THETTA,edit,1350631552 +Control9=IDC_SPIN_THETTA,msctls_updown32,1342177462 +Control10=IDC_EDIT_PHI,edit,1350631552 +Control11=IDC_SPIN_PHI,msctls_updown32,1342177462 +Control12=IDC_EDIT_LIGHT_INTENSITY,edit,1350631552 +Control13=IDC_SPIN_LIGHT_INTENSITY,msctls_updown32,1342177462 +Control14=IDC_EDIT_PHONG,edit,1350631552 +Control15=IDC_SPIN_PHONG,msctls_updown32,1342177462 +Control16=IDC_EDIT_MIRROR,edit,1350631552 +Control17=IDC_SPIN_MIRROR,msctls_updown32,1342177462 +Control18=IDC_EDIT_DIFFUSE,edit,1350631552 +Control19=IDC_SPIN_DIFFUSE,msctls_updown32,1342177462 +Control20=IDC_EDIT_AMBIENT,edit,1350631552 +Control21=IDC_SPIN_AMBIENT,msctls_updown32,1342177462 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC_BUTTON_SETTINGS,static,1342312450 +Control34=IDC_STATIC_SEPARATOR,static,1342312448 +Control35=IDC_STATIC_LIGHTSOURCE_SETTINGS,static,1342312450 +Control36=IDC_STATIC,static,1342308352 +Control37=IDC_STATIC_SURFACE_SETTINGS,static,1342312450 + +[DLG:IDD_ROUNDEDBUTTON_SAMPLES_DIALOG] +Type=1 +Class=CRoundedButtonSamplesDlg +ControlCount=24 +Control1=IDC_BUTTON_ROUND_1,button,1342246667 +Control2=IDC_BUTTON_ROUND_2,button,1342246667 +Control3=IDC_BUTTON_ROUND_3,button,1342246667 +Control4=IDC_BUTTON_ROUND_4,button,1342246667 +Control5=IDC_BUTTON_ROUND_5,button,1342246667 +Control6=IDC_BUTTON_WITH_TEXT_1,button,1342246155 +Control7=IDC_BUTTON_WITH_TEXT_3,button,1342246667 +Control8=IDC_BUTTON_WITH_TEXT_2,button,1342246411 +Control9=IDC_BUTTON_WITH_TEXT_MULTILINE_CUSTOM,button,1342254859 +Control10=IDC_BUTTON_WITH_IMAGE_1,button,1342246155 +Control11=IDC_BUTTON_WITH_IMAGE_2,button,1342246155 +Control12=IDC_BUTTON_WITH_IMAGE_3,button,1342246155 +Control13=IDC_BUTTON_WITH_IMAGE_4,button,1342246155 +Control14=IDC_BUTTON_WITH_IMAGE_5,button,1342246155 +Control15=IDC_BUTTON_WITH_IMAGE_6,button,1342246155 +Control16=IDC_BUTTON_WITH_IMAGE_7,button,1342246155 +Control17=IDC_BUTTON_TOGGLE_1,button,1342246155 +Control18=IDC_BUTTON_TOGGLE_2,button,1342246155 +Control19=IDC_BUTTON_TOGGLE_3,button,1342246155 +Control20=IDC_BUTTON_TOGGLE_4,button,1342246155 +Control21=IDC_STATIC_ROUND_BUTTONS,static,1342312448 +Control22=IDC_STATIC_BUTTONS_WITH_TEXT,static,1342312448 +Control23=IDC_STATIC_BUTTONS_WITH_IMAGES,static,1342312448 +Control24=IDC_STATIC_BUTTONS_TOGGLE,static,1342312448 + +[CLS:CRoundedButtonSamplesDlg] +Type=0 +HeaderFile=RoundedButtonSamplesDlg.h +ImplementationFile=RoundedButtonSamplesDlg.cpp +BaseClass=CPropertyPage +Filter=D +VirtualFilter=idWC +LastObject=CRoundedButtonSamplesDlg + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.cpp new file mode 100644 index 0000000..a48abaf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.cpp @@ -0,0 +1,86 @@ +// RoundedButton.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "RoundedButton.h" +#include "RoundedButtonSht.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonApp + +BEGIN_MESSAGE_MAP(CRoundedButtonApp, CWinApp) + //{{AFX_MSG_MAP(CRoundedButtonApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonApp construction + +CRoundedButtonApp::CRoundedButtonApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRoundedButtonApp object + +CRoundedButtonApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonApp initialization + +BOOL CRoundedButtonApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CRoundedButtonSheet sheet(_T("Rounded buttons")); + m_pMainWnd = &sheet; + sheet.DoModal(); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CRoundedButtonApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsp new file mode 100644 index 0000000..cf301b8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsp @@ -0,0 +1,357 @@ +# Microsoft Developer Studio Project File - Name="RoundedButton" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RoundedButton - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RoundedButton.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RoundedButton.mak" CFG="RoundedButton - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RoundedButton - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RoundedButton - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RoundedButton - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "RoundedButton - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "RoundedButton - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RoundedButton - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RoundedButton.exe" + +!ELSEIF "$(CFG)" == "RoundedButton - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RoundedButton.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "RoundedButton - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_Shared" +# PROP BASE Intermediate_Dir "Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RoundedButton.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RoundedButton.exe" + +!ELSEIF "$(CFG)" == "RoundedButton - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Unicode_Debug" +# PROP BASE Intermediate_Dir "Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RoundedButton.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"RoundedButton.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "RoundedButton - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Unicode_Release" +# PROP BASE Intermediate_Dir "Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RoundedButton.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"RoundedButton.exe" + +!ENDIF + +# Begin Target + +# Name "RoundedButton - Win32 Release" +# Name "RoundedButton - Win32 Debug" +# Name "RoundedButton - Win32 Release_Shared" +# Name "RoundedButton - Win32 Unicode_Debug" +# Name "RoundedButton - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGraphics.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRoundedButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\RoundedButton.cpp +# End Source File +# Begin Source File + +SOURCE=.\RoundedButton.rc +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonSamplesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonSht.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXGraphics.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRoundedButton.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\RoundedButton.h +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonDlg.h +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonSamplesDlg.h +# End Source File +# Begin Source File + +SOURCE=.\RoundedButtonSht.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\check_mark.ico +# End Source File +# Begin Source File + +SOURCE=.\res\earth.ico +# End Source File +# Begin Source File + +SOURCE=.\res\exclamation.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon_off.ico +# End Source File +# Begin Source File + +SOURCE=.\res\info.ico +# End Source File +# Begin Source File + +SOURCE=.\res\jupiter.ico +# End Source File +# Begin Source File + +SOURCE=.\res\moon.ico +# End Source File +# Begin Source File + +SOURCE=.\res\question.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RoundedButton.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RoundedButton.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\sphere.ico +# End Source File +# Begin Source File + +SOURCE=.\res\spiral.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\RoundedButton.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsw new file mode 100644 index 0000000..e51efb2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RoundedButton"=".\RoundedButton.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/RoundedButton", EBJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.h new file mode 100644 index 0000000..947646b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.h @@ -0,0 +1,50 @@ +// RoundedButton.h : main header file for the ROUNDEDBUTTON application +// + +#if !defined(AFX_ROUNDEDBUTTON_H__9B0A917A_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) +#define AFX_ROUNDEDBUTTON_H__9B0A917A_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonApp: +// See RoundedButton.cpp for the implementation of this class +// + +class CRoundedButtonApp : public CWinApp +{ +public: + CRoundedButtonApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoundedButtonApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CRoundedButtonApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ROUNDEDBUTTON_H__9B0A917A_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.rc new file mode 100644 index 0000000..e1d20e9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.rc @@ -0,0 +1,279 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\RoundedButton.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXpopupBarCtrl.rc""\r\n" + "\r\n" + "#include ""UTSampleAbout.rc"" \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\\RoundedButton.ico" +IDI_ICON_EARTH ICON "res\\earth.ico" +IDI_ICON_JUPITER ICON "res\\jupiter.ico" +IDI_ICON_MOON ICON "res\\moon.ico" +IDI_ICON_INFO ICON "res\\info.ico" +IDI_ICON_EXCLAMATION ICON "res\\exclamation.ico" +IDI_ICON_QUESTION ICON "res\\question.ico" +IDI_ICON_CHECK ICON "res\\check_mark.ico" +IDI_ICON_OFF ICON "res\\icon1.ico" +IDI_ICON_ON ICON "res\\icon_off.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG DIALOGEX 0, 0, 340, 170 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Customize Rounded Button" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Rounded Button",IDC_BUTTON_ROUND,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,12,91,33 + CONTROL "\nChoose button color",IDC_BUTTON_COLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,23,80,56,16 + EDITTEXT IDC_EDIT_RADIUS_EXT,24,117,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_RADIUS_EXT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,65,117,11,12 + EDITTEXT IDC_EDIT_RADIUS_INT,24,150,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_RADIUS_INT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,65,150,11,12 + CONTROL "\nChoose light color",IDC_LIGHT_COLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,117,80,56,16 + EDITTEXT IDC_EDIT_THETTA,117,116,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_THETTA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,159,116,11,12 + EDITTEXT IDC_EDIT_PHI,117,150,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_PHI,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,159,150,11,12 + EDITTEXT IDC_EDIT_LIGHT_INTENSITY,211,81,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_LIGHT_INTENSITY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,253,81,11,12 + EDITTEXT IDC_EDIT_PHONG,211,116,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_PHONG,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,253,116,11,12 + EDITTEXT IDC_EDIT_MIRROR,211,150,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_MIRROR,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,253,150,11,12 + EDITTEXT IDC_EDIT_DIFFUSE,276,81,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_DIFFUSE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,318,81,11,12 + EDITTEXT IDC_EDIT_AMBIENT,277,116,41,12,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN_AMBIENT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,319,116,11,12 + LTEXT "External Radius",IDC_STATIC,23,105,50,8 + LTEXT "Vertical angle",IDC_STATIC,118,105,44,8 + LTEXT "Light intensity",IDC_STATIC,211,69,44,8 + LTEXT "Spot size",IDC_STATIC,211,105,30,8 + LTEXT "Spot intensity",IDC_STATIC,211,139,43,8 + LTEXT "Diffuse lighting",IDC_STATIC,276,69,47,8 + LTEXT "Ambient lighting",IDC_STATIC,277,105,50,8 + LTEXT "Button color",IDC_STATIC,23,68,39,8 + LTEXT "Light source color",IDC_STATIC,117,68,57,8 + LTEXT "Internal Radius",IDC_STATIC,23,139,48,8 + LTEXT "Play with button settings to get the best results for different button colors applied. In general, default settings are appropriate while displaying most colors, but for too bright or too light colors you might would like to use different set of values",IDC_STATIC,112,13,221,33 + RTEXT "Button settings",IDC_STATIC_BUTTON_SETTINGS,7,68,12,95,SS_SUNKEN + LTEXT "",IDC_STATIC_SEPARATOR,112,48,221,8,SS_SUNKEN + RTEXT "Light source",IDC_STATIC_LIGHTSOURCE_SETTINGS,101,68,12,95,SS_SUNKEN + LTEXT "Horizontal angle",IDC_STATIC,118,139,52,8 + RTEXT "Surface settings",IDC_STATIC_SURFACE_SETTINGS,195,68,12,95,SS_SUNKEN +END + +IDD_ROUNDEDBUTTON_SAMPLES_DIALOG DIALOGEX 0, 0, 340, 170 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Rounded Button Samples" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "1",IDC_BUTTON_ROUND_1,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,7,17,25,22 + CONTROL "2",IDC_BUTTON_ROUND_2,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,37,17,25,22 + CONTROL "3",IDC_BUTTON_ROUND_3,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,67,17,25,22 + CONTROL "4",IDC_BUTTON_ROUND_4,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,97,17,25,22 + CONTROL "5",IDC_BUTTON_ROUND_5,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,127,17,25,22 + CONTROL "Left",IDC_BUTTON_WITH_TEXT_1,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,188,17,44,23 + CONTROL "Centered",IDC_BUTTON_WITH_TEXT_3,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,236,17,48,23 + CONTROL "Right",IDC_BUTTON_WITH_TEXT_2,"Button",BS_OWNERDRAW | BS_RIGHT | BS_VCENTER | WS_TABSTOP,289,17,44,23 + CONTROL "Multiline text with custom font and text color",IDC_BUTTON_WITH_TEXT_MULTILINE_CUSTOM, + "Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,188,44,145,41 + CONTROL "Earth",IDC_BUTTON_WITH_IMAGE_1,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,7,62,68,33 + CONTROL "Moon",IDC_BUTTON_WITH_IMAGE_2,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,7,96,68,33 + CONTROL "Jupiter",IDC_BUTTON_WITH_IMAGE_3,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,7,129,68,33 + CONTROL "",IDC_BUTTON_WITH_IMAGE_4,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,80,63,34,30 + CONTROL "",IDC_BUTTON_WITH_IMAGE_5,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,118,85,34,30 + CONTROL "",IDC_BUTTON_WITH_IMAGE_6,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,79,107,34,30 + CONTROL "",IDC_BUTTON_WITH_IMAGE_7,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,118,130,34,30 + CONTROL "Option 1",IDC_BUTTON_TOGGLE_1,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,188,105,65,23 + CONTROL "Option 2",IDC_BUTTON_TOGGLE_2,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,268,105,65,23 + CONTROL "Option 3",IDC_BUTTON_TOGGLE_3,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,188,132,65,23 + CONTROL "Option 3",IDC_BUTTON_TOGGLE_4,"Button",BS_OWNERDRAW | BS_LEFT | BS_VCENTER | WS_TABSTOP,268,132,65,23 + LTEXT "Round buttons",IDC_STATIC_ROUND_BUTTONS,7,7,145,9,SS_SUNKEN + LTEXT "Buttons with text",IDC_STATIC_BUTTONS_WITH_TEXT,188,7,145,9,SS_SUNKEN + LTEXT "Buttons with images",IDC_STATIC_BUTTONS_WITH_IMAGES,7,51,145,9,SS_SUNKEN + LTEXT "Toggle buttons",IDC_STATIC_BUTTONS_TOGGLE,188,93,145,9,SS_SUNKEN +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 "040904B0" + BEGIN + VALUE "FileDescription", "RoundedButton MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "RoundedButton" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "RoundedButton.EXE" + VALUE "ProductName", "RoundedButton Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 333 + TOPMARGIN, 7 + BOTTOMMARGIN, 163 + END + + IDD_ROUNDEDBUTTON_SAMPLES_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 333 + TOPMARGIN, 7 + BOTTOMMARGIN, 162 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About RoundedButton..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Rounded Button Demo" + ID_DESCRIPTION_FILE "RoundedButtonInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\RoundedButton.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXBitmapButton.rc" +#include "OXpopupBarCtrl.rc" + +#include "UTSampleAbout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.vcproj new file mode 100644 index 0000000..68a1c50 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButton.vcproj @@ -0,0 +1,1382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.cpp new file mode 100644 index 0000000..586cf0d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.cpp @@ -0,0 +1,166 @@ +// RoundedButtonDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "RoundedButton.h" +#include "RoundedButtonDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonDlg dialog + +CRoundedButtonDlg::CRoundedButtonDlg():CPropertyPage(CRoundedButtonDlg::IDD) +{ + //{{AFX_DATA_INIT(CRoundedButtonDlg) + m_fAmbient = 0.0f; + m_fDiffuse = 0.0f; + m_fLightIntensityCoef = 0.0f; + m_fMirror = 0.0f; + m_fPhi = 0.0f; + m_nPhong = 0; + m_nSphereExtRadius = 0; + m_nSphereIntRadius = 0; + m_fThetta = 0.0f; + //}}AFX_DATA_INIT +} + +void CRoundedButtonDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRoundedButtonDlg) + DDX_Control(pDX, IDC_SPIN_THETTA, m_spinThetta); + DDX_Control(pDX, IDC_SPIN_RADIUS_INT, m_spinIntRadius); + DDX_Control(pDX, IDC_SPIN_RADIUS_EXT, m_spinExtRadius); + DDX_Control(pDX, IDC_SPIN_PHONG, m_spinPhong); + DDX_Control(pDX, IDC_SPIN_PHI, m_spinPhi); + DDX_Control(pDX, IDC_SPIN_MIRROR, m_spinMirror); + DDX_Control(pDX, IDC_SPIN_LIGHT_INTENSITY, m_spinLightIntensity); + DDX_Control(pDX, IDC_SPIN_DIFFUSE, m_spinDiffuse); + DDX_Control(pDX, IDC_SPIN_AMBIENT, m_spinAmbient); + DDX_Control(pDX, IDC_STATIC_SEPARATOR, m_separator); + DDX_Control(pDX, IDC_STATIC_SURFACE_SETTINGS, m_sepSurfaceSettings); + DDX_Control(pDX, IDC_STATIC_LIGHTSOURCE_SETTINGS, m_sepLightSourceSettings); + DDX_Control(pDX, IDC_STATIC_BUTTON_SETTINGS, m_sepButtonSettings); + DDX_Control(pDX, IDC_LIGHT_COLOR, m_btnLightColor); + DDX_Control(pDX, IDC_BUTTON_COLOR, m_btnButtonColor); + DDX_Control(pDX, IDC_BUTTON_ROUND, m_btnRound); + DDX_Text(pDX, IDC_EDIT_AMBIENT, m_fAmbient); + DDX_Text(pDX, IDC_EDIT_DIFFUSE, m_fDiffuse); + DDX_Text(pDX, IDC_EDIT_LIGHT_INTENSITY, m_fLightIntensityCoef); + DDX_Text(pDX, IDC_EDIT_MIRROR, m_fMirror); + DDX_Text(pDX, IDC_EDIT_PHI, m_fPhi); + DDX_Text(pDX, IDC_EDIT_PHONG, m_nPhong); + DDX_Text(pDX, IDC_EDIT_RADIUS_EXT, m_nSphereExtRadius); + DDX_Text(pDX, IDC_EDIT_RADIUS_INT, m_nSphereIntRadius); + DDX_Text(pDX, IDC_EDIT_THETTA, m_fThetta); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_COLOR, m_clrButton); + DDX_ColorPicker(pDX, IDC_LIGHT_COLOR, m_clrLight); +} + +BEGIN_MESSAGE_MAP(CRoundedButtonDlg, CPropertyPage) + //{{AFX_MSG_MAP(CRoundedButtonDlg) + ON_BN_CLICKED(IDC_BUTTON_COLOR, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_AMBIENT, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_DIFFUSE, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_LIGHT_INTENSITY, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_MIRROR, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_PHI, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_PHONG, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_RADIUS_EXT, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_RADIUS_INT, OnUpdate) + ON_EN_CHANGE(IDC_EDIT_THETTA, OnUpdate) + ON_BN_CLICKED(IDC_LIGHT_COLOR, OnUpdate) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonDlg message handlers + +BOOL CRoundedButtonDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + + VERIFY(m_btnRound.LoadIcon(IDR_MAINFRAME,FALSE,16,16)); + + static CFont fontVertEnabled; + VERIFY(fontVertEnabled.CreatePointFont(120,_T("Times New Roman"))); + m_sepButtonSettings.SetTextColor(RGB(128,0,0)); + m_sepButtonSettings.SetVertOriented(); + m_sepButtonSettings.SetFont(&fontVertEnabled); + m_sepSurfaceSettings.SetTextColor(RGB(128,0,0)); + m_sepSurfaceSettings.SetVertOriented(); + m_sepSurfaceSettings.SetFont(&fontVertEnabled); + m_sepLightSourceSettings.SetTextColor(RGB(128,0,0)); + m_sepLightSourceSettings.SetVertOriented(); + m_sepLightSourceSettings.SetFont(&fontVertEnabled); + + m_spinThetta.SetRange(-360,360); + m_spinPhi.SetRange(-360,360); + m_spinIntRadius.SetRange(0,100); + m_spinExtRadius.SetRange(0,100); + m_spinPhong.SetRange(0,100); + m_spinMirror.SetRange(0,100); + m_spinLightIntensity.SetRange(0,100); + m_spinDiffuse.SetRange(0,100); + m_spinAmbient.SetRange(0,100); + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CRoundedButtonDlg::GetVars() +{ + m_fAmbient=m_btnRound.GetAmbientCoef()*10; + m_fDiffuse=m_btnRound.GetDiffuseCoef()*10; + m_fLightIntensityCoef=m_btnRound.GetLightIntensityCoef()*10; + m_fMirror=m_btnRound.GetMirrorCoef()*10; + m_fPhi=m_btnRound.GetPhi(); + m_nPhong=m_btnRound.GetPhong(); + m_nSphereExtRadius=m_btnRound.GetSphereExternalRadius(); + m_nSphereIntRadius=m_btnRound.GetSphereInternalRadius(); + m_fThetta=m_btnRound.GetThetta(); + m_clrButton=m_btnRound.GetButtonColor(); + m_clrLight=m_btnRound.GetLightColor(); + + UpdateData(FALSE); +} + +void CRoundedButtonDlg::SetVars() +{ + if(!::IsWindow(m_btnRound.GetSafeHwnd())) + return; + + if(!UpdateData()) + return; + + m_btnRound.SetAmbientCoef(m_fAmbient/10,FALSE); + m_btnRound.SetDiffuseCoef(m_fDiffuse/10,FALSE); + m_btnRound.SetLightIntensityCoef(m_fLightIntensityCoef/10,FALSE); + m_btnRound.SetMirrorCoef(m_fMirror/10,FALSE); + m_btnRound.SetPhi(m_fPhi,FALSE); + m_btnRound.SetPhong(m_nPhong,FALSE); + m_btnRound.SetSphereExternalRadius(m_nSphereExtRadius,FALSE); + m_btnRound.SetSphereInternalRadius(m_nSphereIntRadius,FALSE); + m_btnRound.SetThetta(m_fThetta,FALSE); + m_btnRound.SetButtonColor(m_clrButton,FALSE); + m_btnRound.SetLightColor(m_clrLight,FALSE); + + m_btnRound.RedrawWindow(); +} + + + +void CRoundedButtonDlg::OnUpdate() +{ + // TODO: Add your control notification handler code here + SetVars(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.h new file mode 100644 index 0000000..e754a85 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonDlg.h @@ -0,0 +1,79 @@ +// RoundedButtonDlg.h : header file +// + +#if !defined(AFX_ROUNDEDBUTTONDLG_H__9B0A917C_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) +#define AFX_ROUNDEDBUTTONDLG_H__9B0A917C_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXRoundedButton.h" +#include "OXColorPickerButton.h" +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonDlg dialog + +class CRoundedButtonDlg : public CPropertyPage +{ +// Construction +public: + CRoundedButtonDlg(); // standard constructor + +// Dialog Data + //{{AFX_DATA(CRoundedButtonDlg) + enum { IDD = IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG }; + CSpinButtonCtrl m_spinThetta; + CSpinButtonCtrl m_spinIntRadius; + CSpinButtonCtrl m_spinExtRadius; + CSpinButtonCtrl m_spinPhong; + CSpinButtonCtrl m_spinPhi; + CSpinButtonCtrl m_spinMirror; + CSpinButtonCtrl m_spinLightIntensity; + CSpinButtonCtrl m_spinDiffuse; + CSpinButtonCtrl m_spinAmbient; + COXSeparator m_separator; + COXSeparator m_sepSurfaceSettings; + COXSeparator m_sepLightSourceSettings; + COXSeparator m_sepButtonSettings; + COXColorPickerButton m_btnLightColor; + COXColorPickerButton m_btnButtonColor; + COXRoundedButton m_btnRound; + float m_fAmbient; + float m_fDiffuse; + float m_fLightIntensityCoef; + float m_fMirror; + float m_fPhi; + int m_nPhong; + int m_nSphereExtRadius; + int m_nSphereIntRadius; + float m_fThetta; + //}}AFX_DATA + COLORREF m_clrButton; + COLORREF m_clrLight; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoundedButtonDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void GetVars(); + void SetVars(); + + // Generated message map functions + //{{AFX_MSG(CRoundedButtonDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnUpdate(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ROUNDEDBUTTONDLG_H__9B0A917C_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonInfo.rtf new file mode 100644 index 0000000..1c72266 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonInfo.rtf @@ -0,0 +1,59 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} +{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2901855}{\*\generator Micro +soft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr17\min17}{\revtim\yr2005\mo1\dy17\hr17\min17}{\version2}{\edmins0}{\nofpages2}{\nofwords371}{\nofchars2118}{\*\company Dundas India}{\nofcharsws2485} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot2901855 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid2901855 COXRoundedButton}{\b\fs48\insrsid2901855 +\par }{\b\fs16\insrsid2901855 Copyright \'a9}{\b\fs16\insrsid2901855 The Code Project 1997 - 2005}{\b\fs16\insrsid2901855 , All Rights Reserved +\par }{\insrsid2901855 +\par COXRoundedButton is COXBitmapButton derived class that makes use of the +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 DrawRoundedButton() +\par }{\insrsid2901855 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 function found in }{\ul\cf2\insrsid2901855 COXGraphics}{\insrsid2901855 + class. This function allows us to draw 3D rounded rectangles. We use it in order to draw the button's background. +\par +\par As long as COXRoundedButton is derived from COXBitmapButton class, all functionality found in COXBitmapButton class applied to COXRoundedButton +\par as well (custom text font and color, images, including 256> colors, tooltips and much more. Refer to the documentation on COXBitmapButton class for details). +\par +\par Actually, COXRoundedButton class handles only the process of drawing of the background. You +can specify the base color that should be used in order to fill the button rectangle and other settings that influence the appearance of the button using the following functions: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 void SetButtonColor(); +\par void SetLightColor(); +\par void SetSphereExternalRadius(); +\par void SetSphereInternalRadius(); +\par void SetLightIntensityCoef(); +\par void SetThetta(); +\par void SetPhi(); +\par void SetPhong(); +\par void SetMirrorCoef(); +\par void SetDiffuseCoef(); +\par void SetAmbientCoef(); +\par }{\insrsid2901855 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 No doubt, most of this function wouldn't tell you anything about the way they change the appearance of the button's background. If you would like to +\par understand the meaning of all settings you might refer to the following book: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid2901855 "Computer Graphics, principle and practice" by James D. Foley, Andries van Dam, Steven K. Feiner, John F. Hughes +\par Addison-Wesley publishing company. ISBN 0-201-84840-6. Chapter 16 "Illumination and Shading". +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 Most people wouldn't care about it so we came up with a set of default values that would produce pretty good results for most colors. It means, that in order +\par to use the class you only have to specify the button color using the following function: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 void SetButtonColor() +\par }{\insrsid2901855 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 Other than that you should treat COXRoundedButton as COXBitmapButton object. +\par +\par Although we have to note that if you are going to use too dark or too light colors you might would like to use different settings. In order to simplify the +\par process of finding of set of appropriate values we provide "}{\b\insrsid2901855 Customize Rounded Button}{\insrsid2901855 " page in our }{\b\insrsid2901855 RoundedButton}{\insrsid2901855 sample that can be found in the +\par }{\b\insrsid2901855 .\\Samples\\gui\\RoundedButton}{\insrsid2901855 subdirectory of your Ultimate Toolbox directory. On this page you can easily apply different combination of all settings. +\par This sample also demonstrate COXRoundedButton samples (refer to "}{\b\insrsid2901855 Rounded Button Samples}{\insrsid2901855 " page). +\par }{\fs20\insrsid2901855 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.cpp new file mode 100644 index 0000000..ea460d9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.cpp @@ -0,0 +1,247 @@ +// RoundedButtonSamplesDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "RoundedButton.h" +#include "RoundedButtonSamplesDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSamplesDlg property page + +IMPLEMENT_DYNCREATE(CRoundedButtonSamplesDlg, CPropertyPage) + +CRoundedButtonSamplesDlg::CRoundedButtonSamplesDlg() : CPropertyPage(CRoundedButtonSamplesDlg::IDD) +{ + //{{AFX_DATA_INIT(CRoundedButtonSamplesDlg) + //}}AFX_DATA_INIT +} + +CRoundedButtonSamplesDlg::~CRoundedButtonSamplesDlg() +{ +} + +void CRoundedButtonSamplesDlg::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRoundedButtonSamplesDlg) + DDX_Control(pDX, IDC_STATIC_BUTTONS_TOGGLE, m_sepToggleButtons); + DDX_Control(pDX, IDC_BUTTON_TOGGLE_4, m_btnToggle4); + DDX_Control(pDX, IDC_BUTTON_TOGGLE_3, m_btnToggle3); + DDX_Control(pDX, IDC_BUTTON_TOGGLE_2, m_btnToggle2); + DDX_Control(pDX, IDC_BUTTON_TOGGLE_1, m_btnToggle1); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_7, m_btnWithImage7); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_6, m_btnWithImage6); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_5, m_btnWithImage5); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_4, m_btnWithImage4); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_3, m_btnWithImage3); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_2, m_btnWithImage2); + DDX_Control(pDX, IDC_BUTTON_WITH_IMAGE_1, m_btnWithImage1); + DDX_Control(pDX, IDC_STATIC_BUTTONS_WITH_IMAGES, m_sepButtonsWithImages); + DDX_Control(pDX, IDC_BUTTON_WITH_TEXT_MULTILINE_CUSTOM, m_btnWithTextMultilineCustom); + DDX_Control(pDX, IDC_STATIC_BUTTONS_WITH_TEXT, m_sepButtonsWithText); + DDX_Control(pDX, IDC_BUTTON_WITH_TEXT_3, m_btnWithText3); + DDX_Control(pDX, IDC_BUTTON_WITH_TEXT_2, m_btnWithText2); + DDX_Control(pDX, IDC_BUTTON_WITH_TEXT_1, m_btnWithText1); + DDX_Control(pDX, IDC_BUTTON_ROUND_5, m_btnRound5); + DDX_Control(pDX, IDC_BUTTON_ROUND_4, m_btnRound4); + DDX_Control(pDX, IDC_BUTTON_ROUND_3, m_btnRound3); + DDX_Control(pDX, IDC_BUTTON_ROUND_2, m_btnRound2); + DDX_Control(pDX, IDC_BUTTON_ROUND_1, m_btnRound1); + DDX_Control(pDX, IDC_STATIC_ROUND_BUTTONS, m_sepRoundButtons); + //}}AFX_DATA_MAP + DDX_Toggle(pDX, IDC_BUTTON_TOGGLE_1, m_bOption1); + DDX_Toggle(pDX, IDC_BUTTON_TOGGLE_2, m_bOption2); + DDX_Toggle(pDX, IDC_BUTTON_TOGGLE_3, m_bOption3); + DDX_Toggle(pDX, IDC_BUTTON_TOGGLE_4, m_bOption4); +} + + +BEGIN_MESSAGE_MAP(CRoundedButtonSamplesDlg, CPropertyPage) + //{{AFX_MSG_MAP(CRoundedButtonSamplesDlg) + //}}AFX_MSG_MAP + ON_NOTIFY_RANGE(OXBBN_TOGGLE, IDC_BUTTON_TOGGLE_1, IDC_BUTTON_TOGGLE_4, OnToggle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSamplesDlg message handlers + +BOOL CRoundedButtonSamplesDlg::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // TODO: Add extra initialization here + + // separators + m_sepRoundButtons.SetTextColor(RGB(128, 128, 128)); + m_sepButtonsWithText.SetTextColor(RGB(128, 128, 128)); + m_sepButtonsWithImages.SetTextColor(RGB(128, 128, 128)); + m_sepToggleButtons.SetTextColor(RGB(128, 128, 128)); + + // setup round buttons + SetupRoundButton(&m_btnRound1,RGB(0xB0, 0xB0, 0xB0)); // light grey + SetupRoundButton(&m_btnRound2,RGB(0x00, 0x93, 0x00)); // green + SetupRoundButton(&m_btnRound3,RGB(0xFF, 0x68, 0x20)); // orange + SetupRoundButton(&m_btnRound4,RGB(0x7B, 0x7B, 0xC0)); // blue-grey + SetupRoundButton(&m_btnRound5,RGB(0x8B, 0x8B, 0x00)); // dark yellow + // + ////////////////////////////// + + // setup buttons with text + m_btnWithText1.SetButtonColor(RGB(0x38, 0x8E, 0x8E)); // teal + m_btnWithText2.SetButtonColor(RGB(0x38, 0x8E, 0x8E)); // teal + m_btnWithText3.SetButtonColor(RGB(0x3C, 0xB3, 0x71)); // sea green + + m_btnWithTextMultilineCustom.SetButtonColor(RGB(0xFF, 0xAD, 0x5B)); // light orange + m_btnWithTextMultilineCustom.SetTextColor(RGB(128,0,0)); + static CFont fontCustom; + fontCustom.CreatePointFont(140,_T("Times New Roman")); + m_btnWithTextMultilineCustom.SetTextFont(&fontCustom); + // + //////////////////////////////// + + // setup buttons with images + static CFont fontImage; + fontImage.CreatePointFont(100,_T("Tahoma")); + VERIFY(m_btnWithImage1.LoadIcon(IDI_ICON_EARTH,FALSE,32,32)); + m_btnWithImage1.SetButtonColor(RGB(0x68, 0x83, 0x8B)); // pale blue + m_btnWithImage1.SetTextFont(&fontImage); + VERIFY(m_btnWithImage2.LoadIcon(IDI_ICON_MOON,FALSE,32,32)); + m_btnWithImage2.SetButtonColor(RGB(0x68, 0x83, 0x8B)); // pale blue + m_btnWithImage2.SetTextFont(&fontImage); + VERIFY(m_btnWithImage3.LoadIcon(IDI_ICON_JUPITER,FALSE,32,32)); + m_btnWithImage3.SetButtonColor(RGB(0x68, 0x83, 0x8B)); // pale blue + m_btnWithImage3.SetTextFont(&fontImage); + + SetupImageButton(&m_btnWithImage4,IDI_ICON_INFO); + SetupImageButton(&m_btnWithImage5,IDI_ICON_QUESTION); + SetupImageButton(&m_btnWithImage6,IDI_ICON_EXCLAMATION); + SetupImageButton(&m_btnWithImage7,IDI_ICON_CHECK); + // + ///////////////////////////////////////// + + // setup toggle buttons + SetupToggleButton(&m_btnToggle1); + SetupToggleButton(&m_btnToggle2); + SetupToggleButton(&m_btnToggle3); + SetupToggleButton(&m_btnToggle4); + + m_bOption1=TRUE; + m_bOption2=FALSE; + m_bOption3=FALSE; + m_bOption4=FALSE; + ResetImages(TRUE); + // + ///////////////////////////////////////// + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + + +void CRoundedButtonSamplesDlg::SetupRoundButton(COXRoundedButton* pButton, + COLORREF clr) +{ + ASSERT(pButton!=NULL); + ASSERT(::IsWindow(pButton->GetSafeHwnd())); + + pButton->SetButtonColor(clr); + + CRect rect; + pButton->GetWindowRect(rect); + int nRadius=rect.Width()/2; + pButton->SetSphereExternalRadius(nRadius); + pButton->SetSphereInternalRadius(nRadius-5); +} + + +void CRoundedButtonSamplesDlg::SetupImageButton(COXRoundedButton* pButton, + UINT nIconID) +{ + ASSERT(pButton!=NULL); + ASSERT(::IsWindow(pButton->GetSafeHwnd())); + + VERIFY(pButton->LoadIcon(nIconID,FALSE,32,32)); + + CRect rect; + pButton->GetWindowRect(rect); + int nRadius=rect.Width()/2; + pButton->SetSphereExternalRadius(nRadius); + pButton->SetSphereInternalRadius(nRadius-5); +} + + +void CRoundedButtonSamplesDlg::SetupToggleButton(COXRoundedButton* pButton) +{ + pButton->SetButtonColor(RGB(0xD2, 0xB4, 0x8C)); // tan + pButton->SetStyleEx(OXBB_EX_TOGGLE); + VERIFY(pButton->LoadIcon(IDI_ICON_OFF,FALSE,16,16)); +} + + +void CRoundedButtonSamplesDlg::OnToggle(UINT id, NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + ResetImages(FALSE); + + m_bOption1=FALSE; + m_bOption2=FALSE; + m_bOption3=FALSE; + m_bOption4=FALSE; + + switch(id) + { + case IDC_BUTTON_TOGGLE_1: + m_bOption1=TRUE; + break; + case IDC_BUTTON_TOGGLE_2: + m_bOption2=TRUE; + break; + case IDC_BUTTON_TOGGLE_3: + m_bOption3=TRUE; + break; + case IDC_BUTTON_TOGGLE_4: + m_bOption4=TRUE; + break; + default: + ASSERT(FALSE); + } + ResetImages(TRUE); + + UpdateData(FALSE); + + *result=0; +} + + +void CRoundedButtonSamplesDlg::ResetImages(BOOL bSet) +{ + if(m_bOption1) + { + VERIFY(m_btnToggle1.LoadIcon((bSet ? IDI_ICON_ON : IDI_ICON_OFF),FALSE,16,16)); + m_btnToggle1.RedrawWindow(); + } + else if(m_bOption2) + { + VERIFY(m_btnToggle2.LoadIcon((bSet ? IDI_ICON_ON : IDI_ICON_OFF),FALSE,16,16)); + m_btnToggle2.RedrawWindow(); + } + else if(m_bOption3) + { + VERIFY(m_btnToggle3.LoadIcon((bSet ? IDI_ICON_ON : IDI_ICON_OFF),FALSE,16,16)); + m_btnToggle3.RedrawWindow(); + } + else if(m_bOption4) + { + VERIFY(m_btnToggle4.LoadIcon((bSet ? IDI_ICON_ON : IDI_ICON_OFF),FALSE,16,16)); + m_btnToggle4.RedrawWindow(); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.h new file mode 100644 index 0000000..cab6dce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSamplesDlg.h @@ -0,0 +1,87 @@ +#if !defined(AFX_ROUNDEDBUTTONSAMPLESDLG_H__9B0A9184_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) +#define AFX_ROUNDEDBUTTONSAMPLESDLG_H__9B0A9184_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXRoundedButton.h" +#include "OXSeparator.h" + +// RoundedButtonSamplesDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSamplesDlg dialog + +class CRoundedButtonSamplesDlg : public CPropertyPage +{ + DECLARE_DYNCREATE(CRoundedButtonSamplesDlg) + +// Construction +public: + CRoundedButtonSamplesDlg(); + ~CRoundedButtonSamplesDlg(); + +// Dialog Data + //{{AFX_DATA(CRoundedButtonSamplesDlg) + enum { IDD = IDD_ROUNDEDBUTTON_SAMPLES_DIALOG }; + COXSeparator m_sepToggleButtons; + COXRoundedButton m_btnToggle4; + COXRoundedButton m_btnToggle3; + COXRoundedButton m_btnToggle2; + COXRoundedButton m_btnToggle1; + COXRoundedButton m_btnWithImage7; + COXRoundedButton m_btnWithImage6; + COXRoundedButton m_btnWithImage5; + COXRoundedButton m_btnWithImage4; + COXRoundedButton m_btnWithImage3; + COXRoundedButton m_btnWithImage2; + COXRoundedButton m_btnWithImage1; + COXSeparator m_sepButtonsWithImages; + COXRoundedButton m_btnWithTextMultilineCustom; + COXSeparator m_sepButtonsWithText; + COXRoundedButton m_btnWithText3; + COXRoundedButton m_btnWithText2; + COXRoundedButton m_btnWithText1; + COXRoundedButton m_btnRound5; + COXRoundedButton m_btnRound4; + COXRoundedButton m_btnRound3; + COXRoundedButton m_btnRound2; + COXRoundedButton m_btnRound1; + COXSeparator m_sepRoundButtons; + //}}AFX_DATA + BOOL m_bOption1; + BOOL m_bOption2; + BOOL m_bOption3; + BOOL m_bOption4; + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CRoundedButtonSamplesDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void SetupRoundButton(COXRoundedButton* pButton, COLORREF clr); + void SetupImageButton(COXRoundedButton* pButton, UINT nIconID); + void SetupToggleButton(COXRoundedButton* pButton); + void ResetImages(BOOL bSet); + + // Generated message map functions + //{{AFX_MSG(CRoundedButtonSamplesDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + afx_msg void OnToggle(UINT id, NMHDR* pNotifyStruct, LRESULT* result); + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ROUNDEDBUTTONSAMPLESDLG_H__9B0A9184_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.cpp new file mode 100644 index 0000000..2308589 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.cpp @@ -0,0 +1,116 @@ +#include "stdafx.h" +#include "RoundedButton.h" +#include "RoundedButtonSht.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSheet + +IMPLEMENT_DYNAMIC(CRoundedButtonSheet, CPropertySheet) + +CRoundedButtonSheet::CRoundedButtonSheet(UINT nIDCaption, CWnd* pParentWnd, + UINT iSelectPage) + :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) +{ + // TODO :: Add the pages for the rest of the controls here. + AddControlPages(); +} + +CRoundedButtonSheet::CRoundedButtonSheet(LPCTSTR pszCaption, CWnd* pParentWnd, + UINT iSelectPage) + :CPropertySheet(pszCaption, pParentWnd, iSelectPage) +{ + AddControlPages(); +} + +CRoundedButtonSheet::~CRoundedButtonSheet() +{ +} + +void CRoundedButtonSheet::AddControlPages() +{ + // Add icon and remove "Apply" button + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_psh.dwFlags |= PSP_USEHICON; + m_psh.dwFlags|=PSH_NOAPPLYNOW; + m_psh.hIcon = m_hIcon; + + // add property pages + AddPage(&roundedButtonSamples); + AddPage(&roundedButtonCustomize); +} + +BEGIN_MESSAGE_MAP(CRoundedButtonSheet, CPropertySheet) + //{{AFX_MSG_MAP(CRoundedButtonSheet) + ON_WM_QUERYDRAGICON() + ON_WM_SYSCOMMAND() + //}}AFX_MSG_MAP + ON_BN_CLICKED(IDHELP, OnAppAbout) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSheet message handlers + +BOOL CRoundedButtonSheet::OnInitDialog() +{ + CMenu* pSysMenu = GetSystemMenu(FALSE); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + SetIcon(m_hIcon, TRUE); + SetIcon(m_hIcon, FALSE); + + // rename standard Help button + CWnd* pButtonCancel=GetDlgItem(IDHELP); + pButtonCancel->SetWindowText(_T("About...")); + + return CPropertySheet::OnInitDialog(); +} + +HCURSOR CRoundedButtonSheet::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CRoundedButtonSheet::OnSysCommand(UINT nID, LPARAM lParam) +{ + // TODO: Add your message handler code here and/or call default + + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnAppAbout(); + } + else + { + CPropertySheet::OnSysCommand(nID, lParam); + } +} + +void CRoundedButtonSheet::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.h new file mode 100644 index 0000000..0cd7ddb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/RoundedButtonSht.h @@ -0,0 +1,52 @@ +#include "RoundedButtonDlg.h" +#include "RoundedButtonSamplesDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CRoundedButtonSheet + +class CRoundedButtonSheet : public CPropertySheet +{ + DECLARE_DYNAMIC(CRoundedButtonSheet) + +// Construction +public: + CRoundedButtonSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, + UINT iSelectPage = 0); + CRoundedButtonSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, + UINT iSelectPage = 0); + +protected: + void AddControlPages(void); + +// Attributes +public: + CRoundedButtonDlg roundedButtonCustomize; + CRoundedButtonSamplesDlg roundedButtonSamples; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoundedButtonSheet) + //}}AFX_VIRTUAL + afx_msg void OnAppAbout(); + +// Implementation +public: + virtual ~CRoundedButtonSheet(); + virtual BOOL OnInitDialog(); + + // Generated message map functions +protected: + + HICON m_hIcon; + + //{{AFX_MSG(CRoundedButtonSheet) + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.cpp new file mode 100644 index 0000000..0c8b810 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// RoundedButton.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.h new file mode 100644 index 0000000..5fe05fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__9B0A917E_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__9B0A917E_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__9B0A917E_D23B_11D2_A7D8_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/3rings.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/3rings.ico new file mode 100644 index 0000000..3b024f5 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/3rings.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.rc2 new file mode 100644 index 0000000..3a85006 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/RoundedButton.rc2 @@ -0,0 +1,13 @@ +// +// ROUNDEDBUTTON.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_down.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_down.ico new file mode 100644 index 0000000..27209be Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_down.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_leftright.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_leftright.ico new file mode 100644 index 0000000..99aafbf Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_leftright.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_up.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_up.ico new file mode 100644 index 0000000..d6ecedb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_up.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_updown.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_updown.ico new file mode 100644 index 0000000..7804c2d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/arrow_updown.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/audio.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/audio.ico new file mode 100644 index 0000000..ccf1d8c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/audio.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/ball.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/ball.ico new file mode 100644 index 0000000..0753185 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/ball.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bomb.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bomb.ico new file mode 100644 index 0000000..8407a85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bomb.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/book.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/book.ico new file mode 100644 index 0000000..9721580 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/book.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bookshelf.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bookshelf.ico new file mode 100644 index 0000000..216d919 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/bookshelf.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/calendar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/calendar.ico new file mode 100644 index 0000000..f791093 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/calendar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_cross.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_cross.ico new file mode 100644 index 0000000..fbfbaf0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_cross.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_mark.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_mark.ico new file mode 100644 index 0000000..76a811f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/check_mark.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/checkbox.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/checkbox.ico new file mode 100644 index 0000000..9424950 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/checkbox.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/clock.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/clock.ico new file mode 100644 index 0000000..fb09bdc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/clock.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/crossbones.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/crossbones.ico new file mode 100644 index 0000000..0e321f8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/crossbones.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/date_time.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/date_time.ico new file mode 100644 index 0000000..cfe8262 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/date_time.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/documents.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/documents.ico new file mode 100644 index 0000000..1d3f158 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/documents.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/earth.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/earth.ico new file mode 100644 index 0000000..452f3d9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/earth.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/essential_file.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/essential_file.ico new file mode 100644 index 0000000..f82225f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/essential_file.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/exclamation.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/exclamation.ico new file mode 100644 index 0000000..c82e72e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/exclamation.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/extinguisher.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/extinguisher.ico new file mode 100644 index 0000000..88fcece Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/extinguisher.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/files.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/files.ico new file mode 100644 index 0000000..0a0f317 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/files.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/gears.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/gears.ico new file mode 100644 index 0000000..d769658 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/gears.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/globe.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/globe.ico new file mode 100644 index 0000000..e1ad971 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/globe.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/graph.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/graph.ico new file mode 100644 index 0000000..63ecde9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/graph.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon1.ico new file mode 100644 index 0000000..123dcb3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon_off.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon_off.ico new file mode 100644 index 0000000..403ffd3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/icon_off.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/important_files.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/important_files.ico new file mode 100644 index 0000000..859e812 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/important_files.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/info.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/info.ico new file mode 100644 index 0000000..4ca3fe8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/info.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/jupiter.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/jupiter.ico new file mode 100644 index 0000000..a870d66 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/jupiter.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/leak.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/leak.ico new file mode 100644 index 0000000..783ccdb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/leak.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/letter.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/letter.ico new file mode 100644 index 0000000..6eae856 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/letter.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/lightning.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/lightning.ico new file mode 100644 index 0000000..ac555bf Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/lightning.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/links.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/links.ico new file mode 100644 index 0000000..8de64ff Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/links.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/moon.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/moon.ico new file mode 100644 index 0000000..c391b4e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/moon.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/note.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/note.ico new file mode 100644 index 0000000..d93b922 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/note.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/organizer.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/organizer.ico new file mode 100644 index 0000000..1d6005b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/organizer.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/pie_graph.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/pie_graph.ico new file mode 100644 index 0000000..0c3fd66 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/pie_graph.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/plugged.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/plugged.ico new file mode 100644 index 0000000..53e1a5e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/plugged.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/production.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/production.ico new file mode 100644 index 0000000..5ab7563 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/production.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/question.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/question.ico new file mode 100644 index 0000000..112d099 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/question.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/security.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/security.ico new file mode 100644 index 0000000..9629c48 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/security.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/shield.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/shield.ico new file mode 100644 index 0000000..2c3ac39 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/shield.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sphere.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sphere.ico new file mode 100644 index 0000000..7133c85 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sphere.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/spiral.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/spiral.ico new file mode 100644 index 0000000..dc524ad Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/spiral.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/stop.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/stop.ico new file mode 100644 index 0000000..b92538e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/stop.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sun.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sun.ico new file mode 100644 index 0000000..59dd3ad Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/sun.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/toilet_paper.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/toilet_paper.ico new file mode 100644 index 0000000..25dfa06 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/toilet_paper.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/tools.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/tools.ico new file mode 100644 index 0000000..b523cea Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/tools.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/traffic_lights.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/traffic_lights.ico new file mode 100644 index 0000000..6a3367c Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/traffic_lights.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yenyang.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yenyang.ico new file mode 100644 index 0000000..e5955c4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yenyang.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yield.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yield.ico new file mode 100644 index 0000000..aeae05e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/yield.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/zoom.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/zoom.ico new file mode 100644 index 0000000..8c1f426 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/res/zoom.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/resource.h new file mode 100644 index 0000000..caa2361 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RoundedButton/resource.h @@ -0,0 +1,79 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RoundedButton.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_ROUNDEDBUTTON_CUSTOMIZE_DIALOG 102 +#define IDD_ROUNDEDBUTTON_SAMPLES_DIALOG 103 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDI_ICON_EARTH 132 +#define IDI_ICON_JUPITER 133 +#define IDI_ICON_MOON 134 +#define IDI_ICON_INFO 135 +#define IDI_ICON_EXCLAMATION 136 +#define IDI_ICON_QUESTION 137 +#define IDI_ICON_CHECK 138 +#define IDI_ICON_OFF 139 +#define IDI_ICON_ON 140 +#define IDC_BUTTON_ROUND 1000 +#define IDC_BUTTON_COLOR 1009 +#define IDC_LIGHT_COLOR 1010 +#define IDC_EDIT_RADIUS_EXT 1011 +#define IDC_EDIT_THETTA 1012 +#define IDC_EDIT_PHI 1013 +#define IDC_EDIT_LIGHT_INTENSITY 1014 +#define IDC_EDIT_PHONG 1015 +#define IDC_EDIT_MIRROR 1016 +#define IDC_EDIT_DIFFUSE 1017 +#define IDC_EDIT_AMBIENT 1018 +#define IDC_SPIN_RADIUS_EXT 1019 +#define IDC_SPIN_THETTA 1020 +#define IDC_SPIN_PHI 1021 +#define IDC_SPIN_AMBIENT 1022 +#define IDC_SPIN_MIRROR 1023 +#define IDC_SPIN_DIFFUSE 1024 +#define IDC_SPIN_LIGHT_INTENSITY 1025 +#define IDC_SPIN_PHONG 1026 +#define IDC_EDIT_RADIUS_INT 1027 +#define IDC_SPIN_RADIUS_INT 1028 +#define IDC_STATIC_BUTTON_SETTINGS 1032 +#define IDC_STATIC_SEPARATOR 1033 +#define IDC_STATIC_LIGHTSOURCE_SETTINGS 1034 +#define IDC_STATIC_ROUND_BUTTONS 1034 +#define IDC_STATIC_SURFACE_SETTINGS 1035 +#define IDC_BUTTON_ROUND_1 1035 +#define IDC_BUTTON_ROUND_2 1036 +#define IDC_BUTTON_ROUND_3 1037 +#define IDC_BUTTON_ROUND_4 1038 +#define IDC_BUTTON_ROUND_5 1039 +#define IDC_STATIC_BUTTONS_WITH_TEXT 1040 +#define IDC_BUTTON_WITH_TEXT_1 1041 +#define IDC_BUTTON_WITH_TEXT_2 1042 +#define IDC_BUTTON_WITH_TEXT_3 1043 +#define IDC_BUTTON_WITH_TEXT_MULTILINE_CUSTOM 1045 +#define IDC_STATIC_BUTTONS_WITH_IMAGES 1046 +#define IDC_BUTTON_WITH_IMAGE_1 1047 +#define IDC_BUTTON_WITH_IMAGE_2 1048 +#define IDC_BUTTON_WITH_IMAGE_3 1049 +#define IDC_BUTTON_WITH_IMAGE_4 1050 +#define IDC_BUTTON_WITH_IMAGE_5 1051 +#define IDC_BUTTON_WITH_IMAGE_6 1052 +#define IDC_BUTTON_WITH_IMAGE_7 1053 +#define IDC_STATIC_BUTTONS_TOGGLE 1054 +#define IDC_BUTTON_TOGGLE_1 1055 +#define IDC_BUTTON_TOGGLE_2 1056 +#define IDC_BUTTON_TOGGLE_3 1057 +#define IDC_BUTTON_TOGGLE_4 1058 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 141 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1036 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.cpp new file mode 100644 index 0000000..da344b7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "RulerBar.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.h new file mode 100644 index 0000000..02ef007 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__12E49E8F_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_CHILDFRM_H__12E49E8F_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__12E49E8F_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.cpp new file mode 100644 index 0000000..c01ce38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.cpp @@ -0,0 +1,58 @@ +// CustomizeRulersDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "RulerBar.h" +#include "CustomizeRulersDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeRulersDlg dialog + + +CCustomizeRulersDlg::CCustomizeRulersDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeRulersDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeRulersDlg) + m_bShowHorz = FALSE; + m_bShowVert = FALSE; + m_nUnit = -1; + m_nSize = 0; + //}}AFX_DATA_INIT +} + + +void CCustomizeRulersDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeRulersDlg) + DDX_Check(pDX, IDC_CHECK_HORZ, m_bShowHorz); + DDX_Check(pDX, IDC_CHECK_VERT, m_bShowVert); + DDX_CBIndex(pDX, IDC_COMBO_UNIT, m_nUnit); + DDX_Text(pDX, IDC_EDIT_SIZE, m_nSize); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeRulersDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeRulersDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeRulersDlg message handlers + +BOOL CCustomizeRulersDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.h new file mode 100644 index 0000000..5340860 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/CustomizeRulersDlg.h @@ -0,0 +1,49 @@ +#if !defined(AFX_CUSTOMIZERULERSDLG_H__12E49EA1_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_CUSTOMIZERULERSDLG_H__12E49EA1_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// CustomizeRulersDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeRulersDlg dialog + +class CCustomizeRulersDlg : public CDialog +{ +// Construction +public: + CCustomizeRulersDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeRulersDlg) + enum { IDD = IDD_DIALOG_RULERS }; + BOOL m_bShowHorz; + BOOL m_bShowVert; + int m_nUnit; + UINT m_nSize; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeRulersDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeRulersDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZERULERSDLG_H__12E49EA1_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.cpp new file mode 100644 index 0000000..adcef5f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.cpp @@ -0,0 +1,143 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "RulerBar.h" + +#include "MainFrm.h" +#include "CustomizeRulersDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_CUSTOMIZE_RULERS, OnViewCustomizeRulers) + //}}AFX_MSG_MAP +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 + + m_bShowHorz=TRUE; + m_bShowVert=TRUE; + m_nUnit=0; + m_nSize=18; +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this, + WS_CHILD|WS_VISIBLE|CBRS_TOP|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 + + +void CMainFrame::OnViewCustomizeRulers() +{ + // TODO: Add your command handler code here + + CCustomizeRulersDlg customizeDlg; + customizeDlg.m_bShowHorz=m_bShowHorz; + customizeDlg.m_bShowVert=m_bShowVert; + customizeDlg.m_nUnit=m_nUnit; + customizeDlg.m_nSize=m_nSize; + if(customizeDlg.DoModal()==IDOK) + { + m_bShowHorz=customizeDlg.m_bShowHorz; + m_bShowVert=customizeDlg.m_bShowVert; + m_nUnit=customizeDlg.m_nUnit; + m_nSize=customizeDlg.m_nSize; + + // update all views + CRulerBarApp* pApp=(CRulerBarApp*)AfxGetApp(); + POSITION posTemplate=pApp->GetFirstDocTemplatePosition(); + while(posTemplate!=NULL) + { + CDocTemplate* pTemplate=pApp->GetNextDocTemplate(posTemplate); + POSITION posDoc=pTemplate->GetFirstDocPosition(); + while(posDoc!=NULL) + { + CDocument* pDoc=pTemplate->GetNextDoc(posDoc); + pDoc->UpdateAllViews(NULL); + } + } + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.h new file mode 100644 index 0000000..638b1dc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/MainFrm.h @@ -0,0 +1,63 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__12E49E8D_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__12E49E8D_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXCoolToolBar.h" + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + BOOL m_bShowHorz; + BOOL m_bShowVert; + int m_nUnit; + UINT m_nSize; + + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnViewCustomizeRulers(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__12E49E8D_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ReadMe.txt new file mode 100644 index 0000000..9f6b156 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/ReadMe.txt @@ -0,0 +1,123 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : RulerBar +======================================================================== + + +AppWizard has created this RulerBar 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 RulerBar application. + +RulerBar.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +RulerBar.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CRulerBarApp application class. + +RulerBar.cpp + This is the main application source file that contains the application + class CRulerBarApp. + +RulerBar.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++. + +RulerBar.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\RulerBar.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file RulerBar.rc. + +res\RulerBar.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. + +RulerBar.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: + +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 RulerBar.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. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +RulerBarDoc.h, RulerBarDoc.cpp - the document + These files contain your CRulerBarDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CRulerBarDoc::Serialize). + +RulerBarView.h, RulerBarView.cpp - the view of the document + These files contain your CRulerBarView class. + CRulerBarView objects are used to view CRulerBarDoc objects. + +res\RulerBarDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CRulerBarDoc class. This icon is included by the main + resource file RulerBar.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named RulerBar.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.clw new file mode 100644 index 0000000..1cc1b47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.clw @@ -0,0 +1,159 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CRulerBarView +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "RulerBar.h" +LastPage=0 + +ClassCount=6 +Class1=CRulerBarApp +Class2=CRulerBarDoc +Class3=CRulerBarView +Class4=CMainFrame + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Class5=CChildFrame +Resource2=IDR_TEXTTYPE +Class6=CCustomizeRulersDlg +Resource3=IDD_DIALOG_RULERS + +[CLS:CRulerBarApp] +Type=0 +HeaderFile=RulerBar.h +ImplementationFile=RulerBar.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CRulerBarApp + +[CLS:CRulerBarDoc] +Type=0 +HeaderFile=RulerBarDoc.h +ImplementationFile=RulerBarDoc.cpp +Filter=N + +[CLS:CRulerBarView] +Type=0 +HeaderFile=RulerBarView.h +ImplementationFile=RulerBarView.cpp +Filter=C +BaseClass=CEditView +VirtualFilter=VWC +LastObject=CRulerBarView + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CMDIFrameWnd +VirtualFilter=fWC +LastObject=CMainFrame + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M + + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_TEXTTYPE] +Type=1 +Class=CRulerBarView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_VIEW_CUSTOMIZE_RULERS +Command18=ID_WINDOW_NEW +Command19=ID_WINDOW_CASCADE +Command20=ID_WINDOW_TILE_HORZ +Command21=ID_WINDOW_ARRANGE +Command22=ID_APP_ABOUT +CommandCount=22 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_DIALOG_RULERS] +Type=1 +Class=CCustomizeRulersDlg +ControlCount=8 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK_HORZ,button,1342242819 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_COMBO_UNIT,combobox,1344339971 +Control6=IDC_CHECK_VERT,button,1342242819 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_EDIT_SIZE,edit,1350631552 + +[CLS:CCustomizeRulersDlg] +Type=0 +HeaderFile=CustomizeRulersDlg.h +ImplementationFile=CustomizeRulersDlg.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=CCustomizeRulersDlg + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.cpp new file mode 100644 index 0000000..c0f5d77 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.cpp @@ -0,0 +1,146 @@ +// RulerBar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "RulerBar.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "RulerBarDoc.h" +#include "RulerBarView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarApp + +BEGIN_MESSAGE_MAP(CRulerBarApp, CWinApp) + //{{AFX_MSG_MAP(CRulerBarApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarApp construction + +CRulerBarApp::CRulerBarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRulerBarApp object + +CRulerBarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarApp initialization + +BOOL CRulerBarApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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_TEXTTYPE, + RUNTIME_CLASS(CRulerBarDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CRulerBarView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + + +// App command to run the dialog +void CRulerBarApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarApp message handlers + + +int CRulerBarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsp new file mode 100644 index 0000000..00bb1a0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsp @@ -0,0 +1,412 @@ +# Microsoft Developer Studio Project File - Name="RulerBar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RulerBar - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RulerBar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RulerBar.mak" CFG="RulerBar - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RulerBar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RulerBar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RulerBar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "RulerBar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "RulerBar - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RulerBar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RulerBar.exe" + +!ELSEIF "$(CFG)" == "RulerBar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RulerBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "RulerBar - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RulerBar___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "RulerBar___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "RulerBar___Win32_Release_Shared" +# PROP Intermediate_Dir "RulerBar___Win32_Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RulerBar.exe" + +!ELSEIF "$(CFG)" == "RulerBar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RulerBar___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "RulerBar___Win32_Unicode_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RulerBar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"RulerBar.exe" + +!ELSEIF "$(CFG)" == "RulerBar - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "RulerBar___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "RulerBar___Win32_Unicode_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RulerBar.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"RulerBar.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "RulerBar - Win32 Release" +# Name "RulerBar - Win32 Debug" +# Name "RulerBar - Win32 Release_Shared" +# Name "RulerBar - Win32 Unicode_Release" +# Name "RulerBar - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRulerOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeRulersDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\RulerBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\RulerBar.rc +# End Source File +# Begin Source File + +SOURCE=.\RulerBarDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\RulerBarView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeRulersDlg.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRulerOrganizer.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\RulerBar.h +# End Source File +# Begin Source File + +SOURCE=.\RulerBarDoc.h +# End Source File +# Begin Source File + +SOURCE=.\RulerBarView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\RulerBar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RulerBar.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\RulerBarDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\RulerBar.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\RulerBar.reg +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsw new file mode 100644 index 0000000..9fe8b8e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RulerBar"=".\RulerBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/RulerBar", DEJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.h new file mode 100644 index 0000000..4050bd6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.h @@ -0,0 +1,50 @@ +// RulerBar.h : main header file for the RULERBAR application +// + +#if !defined(AFX_RULERBAR_H__12E49E89_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_RULERBAR_H__12E49E89_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarApp: +// See RulerBar.cpp for the implementation of this class +// + +class CRulerBarApp : public CWinApp +{ +public: + CRulerBarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRulerBarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CRulerBarApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_RULERBAR_H__12E49E89_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.rc new file mode 100644 index 0000000..b1726b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.rc @@ -0,0 +1,454 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\RulerBar.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" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXCoolToolBar.rc""\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\\RulerBar.ico" +IDR_TEXTTYPE ICON "res\\RulerBarDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "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 RulerBar...", ID_APP_ABOUT + END +END + +IDR_TEXTTYPE 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 + MENUITEM SEPARATOR + MENUITEM "&Customize Ruler Bars", ID_VIEW_CUSTOMIZE_RULERS + 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 RulerBar...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "RulerBar MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "RulerBar" + VALUE "LegalCopyright", "Copyright (C) 1999" + VALUE "OriginalFilename", "RulerBar.EXE" + VALUE "ProductName", "RulerBar Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_RULERS DIALOG 0, 0, 207, 70 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Ruler Bars" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,150,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,150,25,50,14 + CONTROL "Show horizontal ruler bar",IDC_CHECK_HORZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,8,93,10 + LTEXT "Base unit",IDC_STATIC,7,36,30,8 + COMBOBOX IDC_COMBO_UNIT,44,33,54,45,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Show vertical ruler bar",IDC_CHECK_VERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,86,10 + LTEXT "Size of the bars",IDC_STATIC,7,52,50,8 + EDITTEXT IDC_EDIT_SIZE,63,50,34,12,ES_AUTOHSCROLL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_RULERS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 200 + TOPMARGIN, 7 + BOTTOMMARGIN, 63 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_DIALOG_RULERS DLGINIT +BEGIN + IDC_COMBO_UNIT, 0x403, 5, 0 +0x6e69, 0x6863, "\000" + IDC_COMBO_UNIT, 0x403, 11, 0 +0x6563, 0x746e, 0x6d69, 0x7465, 0x7265, "\000" + IDC_COMBO_UNIT, 0x403, 11, 0 +0x696d, 0x6c6c, 0x6d69, 0x7465, 0x7265, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "RulerBar" + IDR_TEXTTYPE "\nText\nText\nText Files (*.txt)\n.txt\nRulerBar.Document\nText Document" + ID_DESCRIPTION_FILE "RulerBarInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "RulerBar" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\RulerBar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "UTSampleAbout.rc" +#include "OXCoolToolBar.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.reg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.reg new file mode 100644 index 0000000..4449ed0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.reg @@ -0,0 +1,14 @@ +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\.txt = RulerBar.Document +HKEY_CLASSES_ROOT\RulerBar.Document\shell\open\command = RULERBAR.EXE %1 +HKEY_CLASSES_ROOT\RulerBar.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\RulerBar.Document\shell\open\ddeexec\application = RULERBAR + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\RulerBar.Document = Text Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.vcproj new file mode 100644 index 0000000..5cd93c4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBar.vcproj @@ -0,0 +1,2338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.cpp new file mode 100644 index 0000000..3f0f5f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.cpp @@ -0,0 +1,78 @@ +// RulerBarDoc.cpp : implementation of the CRulerBarDoc class +// + +#include "stdafx.h" +#include "RulerBar.h" + +#include "RulerBarDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarDoc + +IMPLEMENT_DYNCREATE(CRulerBarDoc, CDocument) + +BEGIN_MESSAGE_MAP(CRulerBarDoc, CDocument) + //{{AFX_MSG_MAP(CRulerBarDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarDoc construction/destruction + +CRulerBarDoc::CRulerBarDoc() +{ + // TODO: add one-time construction code here + +} + +CRulerBarDoc::~CRulerBarDoc() +{ +} + +BOOL CRulerBarDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarDoc serialization + +void CRulerBarDoc::Serialize(CArchive& ar) +{ + // CEditView contains an edit control which handles all serialization + ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarDoc diagnostics + +#ifdef _DEBUG +void CRulerBarDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CRulerBarDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.h new file mode 100644 index 0000000..86f98a3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarDoc.h @@ -0,0 +1,57 @@ +// RulerBarDoc.h : interface of the CRulerBarDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_RULERBARDOC_H__12E49E91_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_RULERBARDOC_H__12E49E91_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CRulerBarDoc : public CDocument +{ +protected: // create from serialization only + CRulerBarDoc(); + DECLARE_DYNCREATE(CRulerBarDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRulerBarDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRulerBarDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CRulerBarDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_RULERBARDOC_H__12E49E91_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarInfo.rtf new file mode 100644 index 0000000..72dd3a7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarInfo.rtf @@ -0,0 +1,108 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} +{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2045420\rsid3091920 +\rsid11024440\rsid12255586}{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr17\min20}{\revtim\yr2005\mo1\dy17\hr17\min20}{\version5}{\edmins0}{\nofpages3}{\nofwords667}{\nofchars3807} +{\*\company Dundas India}{\nofcharsws4466}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3 +\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot11024440 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3 +\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain +\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs42\cf2\insrsid12255586\charrsid2045420 COXRulerBar & COXRulerOrganizer}{\b\fs42\insrsid12255586\charrsid2045420 +\par }{\b\fs16\insrsid12255586 Copyright \'a9 }{\b\fs16\insrsid11024440 The Code Project}{\b\fs16\insrsid3091920 1997 - 2005}{\b\fs16\insrsid12255586 , All Rights Reserved +\par }{\insrsid12255586 +\par We introduce a couple of classes that allows you to display horizontal and/or vertical ruler bars attached to }{\b\insrsid12255586 any}{\insrsid12255586 + window. By definition the ruler bar is rectangular area with scale. Ruler bar has base unit (by default we use 1 inch as base unit) and every base unit is designated by corresponding number on the scale. If distance between two units is big enough the ti +cks will be drawn on the scale. +\par +\par Ruler bars are drawn in the non-client area of the attached window, much the same like scroll bars. +\par +\par Let's go to the details about the classes that implement the support for ruler bars. +\par +\par First of all, we've got the class that implements all the functionality that has to do with the appearance of the ruler bar. This class is called }{\ul\cf2\insrsid12255586 COXRulerBar}{\insrsid12255586 . Refer to the }{\ul\cf2\insrsid12255586 description} +{\insrsid12255586 of the class and }{\ul\cf2\insrsid12255586 function reference}{\insrsid12255586 for details on this class. Briefly, COXRulerBar provides the functionality of drawing the ruler bar. using this class you can }{\insrsid12255586 highlight} +{\insrsid12255586 any area on the ruler bar, define any base unit to be used on ruler bar scale, zoom and scroll the contents of the ruler bar. +\par +\par COXRulerBar itself is useful control but in most cases you would be +interested in using it in combination with another window. The analogy with scroll bar comes here in handy.You can use the CScrollBar control independently but in most cases you want to associate it with some window that supports scrolling functionality a +nd use it without caring to much about creating the scroll bars, positioning them and constantly updating them. +\par +\par The same story with ruler bars. Wouldn't it be nice to have automatic support for horizontal and/or vertical ruler bars for any window? +\par +\par The COXRulerOrganizer class provides that kind of functionality. +\par +\par +\par In order to provide ruler bars for any window you have to do the following: +\par +\par 1)\~\~\~ declare an object of COXRulerOrganizer class so the lifetime of such object would be at least the same as the lifetime of the window for which ruler bars support must be provided. +\par }{\i\cf1\insrsid12255586 \~\~\~ class CMyView : public CView +\par \~\~\~ \{ +\par \~\~\~ . . . . . . . . . . . . . . . +\par \~\~\~ protected: +\par \~\~\~\~\~\~\~ COXRulerOrganizer m_ruler; +\par \~\~\~ . . . . . . . . . . . . . . . +\par \~\~\~ \} +\par }{\insrsid12255586 +\par 2)\~\~\~ Attach the window to COXRulerOrganizer object using }{\ul\cf2\insrsid12255586 Attach()}{\insrsid12255586 function. In this function you can specify what ruler bars (horizontal and/or vertical) should be shown from the very beginning. +\par }{\i\cf1\insrsid12255586 \~\~\~ int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct) +\par \~\~\~ \{ +\par \~\~\~\~\~\~\~ if (CMyView::OnCreate(lpCreateStruct) == -1) +\par \~\~\~\~\~\~\~\~\~\~\~ return -1; +\par \~\~\~\~\~\~\~ . . . . . . . . . . . . . . . }{\i\cf6\insrsid12255586 +\par \~\~\~\~\~\~\~ }{\i\cf11\insrsid12255586 // atach view to the COXRulerOrganizer object and display +\par \~\~\~\~\~\~\~ // bot horizontal and vertical ruler bars}{\i\cf6\insrsid12255586 +\par }{\i\cf1\insrsid12255586 \~\~\~\~\~\~\~ VERIFY(m_ruler.Attach(this,TRUE,TRUE)); +\par \~\~\~\~\~\~\~ . . . . . . . . . . . . . . . +\par \~\~\~\~\~\~\~ return 0; +\par \~\~\~ \} +\par }{\insrsid12255586 \~\~\~ +\par +\par }{\b\insrsid12255586 That's it}{\insrsid12255586 . +\par After attaching the window all its mouse movements will be traced and displayed on the ruler bars and if this window supports scrolling the ruler bars will be scrolled correspondingly. +\par +\par After a window is attached to the COXRulerOrganizer object you can use a lot of COXRulerOrganizer functions that would allow you to utilize this class functionality to the full extent. +\par +\par 1)\~\~\~ }{\b\insrsid12255586 Show/hide ruler bars}{\insrsid12255586 . In order to do that call the following functions: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid12255586 SetShowHorzRulerBar(); +\par SetShowVertRulerBar();}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 2)\~\~ }{\b\insrsid12255586 Change height/width of the bars}{\insrsid12255586 . Call the following functions: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid12255586 SetHorzRulerBarHeight(); +\par SetVertRulerBarWidth();}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 3)\~\~\~ }{\b\insrsid12255586 Retrieve the position of the ruler bars:}{\insrsid12255586 +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid12255586 GetHorzRulerBarRect(); +\par GetVertRulerBarRect();}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 4)\~\~ }{\b\insrsid12255586 Direct access to the underlying COXRulerBar objects:}{\insrsid12255586 +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid12255586 GetHorzRulerBar(); +\par GetVertRulerBar();}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 5)\~\~ }{\b\insrsid12255586 Set of wrapper functions that call corresponding COXRulerBar functions:}{\insrsid12255586 +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\insrsid12255586 // hilite area on the ruler bar +\par }{\ul\cf2\insrsid12255586 HiliteRuler(); +\par }{\insrsid12255586 +\par // change base unit +\par }{\ul\cf2\insrsid12255586 CalibrateRuler(); +\par }{\insrsid12255586 +\par // scroll the contents of the ruler bar +\par }{\ul\cf2\insrsid12255586 ScrollRuler(); +\par }{\insrsid12255586 +\par // zoom in or zoom out the contents of the ruler +\par }{\ul\cf2\insrsid12255586 ZoomRuler();}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 \~ +\par You can use these function at any time in your code as long as some window is attached to the corresponding COXRulerOrganizer object. For example: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\cf11\insrsid12255586 // hide horizontal ruler +\par }{\i\cf1\insrsid12255586 m_ruler.SetShowHorzRulerBar(FALSE); +\par }{\i\cf6\insrsid12255586 +\par }{\i\cf11\insrsid12255586 //use centimeters as base units for the horizontal and vertical ruler bars +\par }{\i\cf1\insrsid12255586 m_ruler.CalibrateRuler(254,TRUE); +\par m_ruler.CalibrateRuler(254,FALSE);}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 \~ +\par +\par }{\b\insrsid12255586 Dependency: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\cf6\insrsid12255586 "OXRulerOrganizer.h"}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid12255586 \~ +\par }{\b\insrsid12255586 Source code files: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\cf6\insrsid12255586 "OXRulerOrganizer.cpp" +\par "OXHookWnd.cpp" \~\~\~\~\~\~\~\~\~\~\~ implementation of the COXRulerOrganizer parent class - COXHookWnd}{\insrsid12255586 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\fs20\insrsid12255586 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.cpp new file mode 100644 index 0000000..f653c39 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.cpp @@ -0,0 +1,195 @@ +// RulerBarView.cpp : implementation of the CRulerBarView class +// + +#include "stdafx.h" +#include "RulerBar.h" + +#include "RulerBarDoc.h" +#include "RulerBarView.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView + +IMPLEMENT_DYNCREATE(CRulerBarView, CEditView) + +BEGIN_MESSAGE_MAP(CRulerBarView, CEditView) + //{{AFX_MSG_MAP(CRulerBarView) + ON_WM_CREATE() + ON_WM_CONTEXTMENU() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView construction/destruction + +CRulerBarView::CRulerBarView() +{ + // TODO: add construction code here + +} + +CRulerBarView::~CRulerBarView() +{ +} + +BOOL CRulerBarView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping + + return bPreCreated; +} + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView drawing + +void CRulerBarView::OnDraw(CDC* pDC) +{ + CRulerBarDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here + + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView printing + +BOOL CRulerBarView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default CEditView preparation + return CEditView::OnPreparePrinting(pInfo); +} + +void CRulerBarView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView begin printing. + CEditView::OnBeginPrinting(pDC, pInfo); +} + +void CRulerBarView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView end printing + CEditView::OnEndPrinting(pDC, pInfo); +} + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView diagnostics + +#ifdef _DEBUG +void CRulerBarView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CRulerBarView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CRulerBarDoc* CRulerBarView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRulerBarDoc))); + return (CRulerBarDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRulerBarView message handlers + +int CRulerBarView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CEditView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + VERIFY(m_ruler.Attach(this,TRUE,TRUE)); + + UpdateRulerBars(); + + return 0; +} + +void CRulerBarView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) +{ + // TODO: Add your specialized code here and/or call the base class + UNREFERENCED_PARAMETER(pSender); + UNREFERENCED_PARAMETER(lHint); + UNREFERENCED_PARAMETER(pHint); + + UpdateRulerBars(); +} + +void CRulerBarView::UpdateRulerBars() +{ + ASSERT(m_ruler.IsAttached()); + + CMainFrame* pMainFrame=(CMainFrame*)AfxGetMainWnd(); + + m_ruler.SetShowHorzRulerBar(pMainFrame->m_bShowHorz); + m_ruler.SetShowVertRulerBar(pMainFrame->m_bShowVert); + + m_ruler.SetVertRulerBarWidth(pMainFrame->m_nSize); + m_ruler.SetHorzRulerBarHeight(pMainFrame->m_nSize); + + switch(pMainFrame->m_nUnit) + { + case 0: + { + m_ruler.CalibrateRuler(100,TRUE,FALSE); + m_ruler.CalibrateRuler(100,FALSE,FALSE); + m_ruler.RedrawAttached(); + + break; + } + case 1: + { + m_ruler.GetHorzRulerBar()->SetCalibrate(254,FALSE); + m_ruler.GetVertRulerBar()->SetCalibrate(254,FALSE); + m_ruler.RedrawAttached(); + + break; + } + case 2: + { + m_ruler.GetHorzRulerBar()->SetCalibrate(2540,FALSE); + m_ruler.GetVertRulerBar()->SetCalibrate(2540,FALSE); + m_ruler.RedrawAttached(); + + break; + } + default: + ASSERT(FALSE); + } +} + + +void CRulerBarView::OnContextMenu(CWnd* pWnd, CPoint point) +{ + UNREFERENCED_PARAMETER(pWnd); + + // TODO: Add your message handler code here + CMenu menu; + if(menu.CreatePopupMenu()) + { + menu.AppendMenu(MF_STRING,ID_VIEW_CUSTOMIZE_RULERS, + _T("&Customize Ruler Bars")); + + menu.TrackPopupMenu(TPM_LEFTALIGN,point.x,point.y,AfxGetMainWnd()); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.h new file mode 100644 index 0000000..eaf2500 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/RulerBarView.h @@ -0,0 +1,74 @@ +// RulerBarView.h : interface of the CRulerBarView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_RULERBARVIEW_H__12E49E93_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_RULERBARVIEW_H__12E49E93_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXRulerOrganizer.h" + + +class CRulerBarView : public CEditView +{ +protected: // create from serialization only + CRulerBarView(); + DECLARE_DYNCREATE(CRulerBarView) + +// Attributes +public: + CRulerBarDoc* GetDocument(); + +protected: + COXRulerOrganizer m_ruler; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRulerBarView) + 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); + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRulerBarView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + void UpdateRulerBars(); + +// Generated message map functions +protected: + //{{AFX_MSG(CRulerBarView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in RulerBarView.cpp +inline CRulerBarDoc* CRulerBarView::GetDocument() + { return (CRulerBarDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_RULERBARVIEW_H__12E49E93_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.cpp new file mode 100644 index 0000000..569324a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// RulerBar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.h new file mode 100644 index 0000000..87c1fc9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__12E49E8B_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__12E49E8B_E788_11D2_A7F6_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__12E49E8B_E788_11D2_A7F6_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.rc2 new file mode 100644 index 0000000..86abc42 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBar.rc2 @@ -0,0 +1,13 @@ +// +// RULERBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBarDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBarDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/RulerBarDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/resource.h new file mode 100644 index 0000000..f96427a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/RulerBar/resource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RulerBar.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_TEXTTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDD_DIALOG_RULERS 130 +#define IDC_CHECK_HORZ 1000 +#define IDC_COMBO_UNIT 1001 +#define IDC_CHECK_VERT 1002 +#define IDC_EDIT_SIZE 1003 +#define ID_VIEW_CUSTOMIZE_RULERS 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32772 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/ReadMe.txt new file mode 100644 index 0000000..fff2f21 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : Separator +======================================================================== + + +AppWizard has created this Separator 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 Separator application. + +Separator.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSeparatorApp application class. + +Separator.cpp + This is the main application source file that contains the application + class CSeparatorApp. + +Separator.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 + Developer Studio. + +res\Separator.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file Separator.rc. + +res\Separator.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +Separator.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +SeparatorDlg.h, SeparatorDlg.cpp - the dialog + These files contain your CSeparatorDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in Separator.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Separator.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.clw new file mode 100644 index 0000000..6940a97 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.clw @@ -0,0 +1,57 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSeparatorDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "Separator.h" + +ClassCount=2 +Class1=CSeparatorApp +Class2=CSeparatorDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_SEPARATOR_DIALOG + +[CLS:CSeparatorApp] +Type=0 +HeaderFile=Separator.h +ImplementationFile=Separator.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CSeparatorApp + +[CLS:CSeparatorDlg] +Type=0 +HeaderFile=SeparatorDlg.h +ImplementationFile=SeparatorDlg.cpp +Filter=D +LastObject=CSeparatorDlg +BaseClass=CDialog +VirtualFilter=dWC + +[DLG:IDD_SEPARATOR_DIALOG] +Type=1 +Class=CSeparatorDlg +ControlCount=17 +Control1=IDC_SEPARATOR_HEADER,static,1342312449 +Control2=IDC_SEPARATOR_HORZPLAIN,static,1342312449 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_SEPARATOR_HORZLEFT,static,1342312448 +Control6=IDC_SEPARATOR_HORZCENTER,static,1342312449 +Control7=IDC_SEPARATOR_HORZRIGHT,static,1342312450 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_SEPARATOR_VERTPLAIN,static,1342312449 +Control10=IDC_SEPARATOR_VERTLEFT,static,1342312448 +Control11=IDC_SEPARATOR_VERTCENTER,static,1342312449 +Control12=IDC_SEPARATOR_VERTRIGHT,static,1342312450 +Control13=IDC_STATIC,static,1342308353 +Control14=IDC_SEPARATOR_CUSTOMLINE,static,1342312449 +Control15=IDC_SEPARATOR_CUSTOMTEXT,static,1342312449 +Control16=IDOK,button,1342242817 +Control17=IDC_BUTTON_ABOUT,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.cpp new file mode 100644 index 0000000..e8fd138 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.cpp @@ -0,0 +1,91 @@ +// Separator.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Separator.h" +#include "SeparatorDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorApp + +BEGIN_MESSAGE_MAP(CSeparatorApp, CWinApp) + //{{AFX_MSG_MAP(CSeparatorApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorApp construction + +CSeparatorApp::CSeparatorApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSeparatorApp object + +CSeparatorApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorApp initialization + +BOOL CSeparatorApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CSeparatorDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSeparatorApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsp new file mode 100644 index 0000000..d8b9eeb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsp @@ -0,0 +1,261 @@ +# Microsoft Developer Studio Project File - Name="Separator" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Separator - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Separator.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Separator.mak" CFG="Separator - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Separator - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Separator - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Separator - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Separator - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Separator - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Separator - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Separator.exe" + +!ELSEIF "$(CFG)" == "Separator - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Separator.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Separator - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Separato" +# PROP BASE Intermediate_Dir "Separato" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Separator.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Separator.exe" + +!ELSEIF "$(CFG)" == "Separator - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Separat0" +# PROP BASE Intermediate_Dir "Separat0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "_UNICODE" /D "_AFXDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Separator.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Separator.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "Separator - Win32 Unicode_Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Separat1" +# PROP BASE Intermediate_Dir "Separat1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Separator.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Separator.exe" + +!ENDIF + +# Begin Target + +# Name "Separator - Win32 Release" +# Name "Separator - Win32 Debug" +# Name "Separator - Win32 Release_Shared" +# Name "Separator - Win32 Unicode_Debug" +# Name "Separator - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Separator.cpp +# End Source File +# Begin Source File + +SOURCE=.\Separator.rc +# End Source File +# Begin Source File + +SOURCE=.\SeparatorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXSeparator.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\Separator.h +# End Source File +# Begin Source File + +SOURCE=.\SeparatorDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Separator.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Separator.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\Separator.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsw new file mode 100644 index 0000000..4d88613 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Separator"=".\Separator.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/Separator", PGJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.h new file mode 100644 index 0000000..fc42fde --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.h @@ -0,0 +1,50 @@ +// Separator.h : main header file for the SEPARATOR application +// + +#if !defined(AFX_SEPARATOR_H__354BA845_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) +#define AFX_SEPARATOR_H__354BA845_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorApp: +// See Separator.cpp for the implementation of this class +// + +class CSeparatorApp : public CWinApp +{ +public: + CSeparatorApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSeparatorApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSeparatorApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SEPARATOR_H__354BA845_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.rc new file mode 100644 index 0000000..ebdc95c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.rc @@ -0,0 +1,201 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Separator.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""utsampleabout.rc""\r\n" + "#endif\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\\Separator.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SEPARATOR_DIALOG DIALOGEX 0, 0, 324, 242 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Separators in Dialogs" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CTEXT "Separators",IDC_SEPARATOR_HEADER,7,1,310,12,SS_SUNKEN + CTEXT "",IDC_SEPARATOR_HORZPLAIN,59,31,258,8,SS_SUNKEN + LTEXT "Plain separator",IDC_STATIC,7,26,35,18 + LTEXT "Text in separators",IDC_STATIC,7,76,39,18 + LTEXT "Left oriented",IDC_SEPARATOR_HORZLEFT,59,63,258,10,SS_SUNKEN + CTEXT "Center oriented",IDC_SEPARATOR_HORZCENTER,59,80,258,10,SS_SUNKEN + RTEXT "Right oriented",IDC_SEPARATOR_HORZRIGHT,59,97,258,10,SS_SUNKEN + LTEXT "Vertically oriented separators",IDC_STATIC,7,127,36,26 + CTEXT "",IDC_SEPARATOR_VERTPLAIN,48,127,11,108,SS_SUNKEN + LTEXT "Left oriented",IDC_SEPARATOR_VERTLEFT,75,127,11,108,SS_SUNKEN + CTEXT "Center oriented",IDC_SEPARATOR_VERTCENTER,102,127,11,108,SS_SUNKEN + RTEXT "Right oriented",IDC_SEPARATOR_VERTRIGHT,129,127,11,108,SS_SUNKEN + CTEXT "Customized separators",IDC_STATIC,176,126,139,8 + CTEXT "",IDC_SEPARATOR_CUSTOMLINE,174,140,143,8,SS_SUNKEN + CTEXT "",IDC_SEPARATOR_CUSTOMTEXT,174,156,143,8,SS_SUNKEN + DEFPUSHBUTTON "OK",IDOK,174,221,54,14 + PUSHBUTTON "&About...",IDC_BUTTON_ABOUT,263,221,54,14 +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 "040904B0" + BEGIN + VALUE "FileDescription", "Separator MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "Separator" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "Separator.EXE" + VALUE "ProductName", "Separator Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_SEPARATOR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 317 + TOPMARGIN, 7 + BOTTOMMARGIN, 235 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About Separator..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Separators" + ID_DESCRIPTION_FILE "SeparatorInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Separator.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "utsampleabout.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.vcproj new file mode 100644 index 0000000..b3b0686 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/Separator.vcproj @@ -0,0 +1,876 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.cpp new file mode 100644 index 0000000..357968e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.cpp @@ -0,0 +1,173 @@ +// SeparatorDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Separator.h" +#include "SeparatorDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorDlg dialog + +CSeparatorDlg::CSeparatorDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSeparatorDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSeparatorDlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSeparatorDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSeparatorDlg) + DDX_Control(pDX, IDC_SEPARATOR_VERTRIGHT, m_ctlSepVertRight); + DDX_Control(pDX, IDC_SEPARATOR_VERTPLAIN, m_ctlSepVertPlain); + DDX_Control(pDX, IDC_SEPARATOR_VERTLEFT, m_ctlSepVertLeft); + DDX_Control(pDX, IDC_SEPARATOR_VERTCENTER, m_ctlSepVertCenter); + DDX_Control(pDX, IDC_SEPARATOR_HORZRIGHT, m_ctlSepHorzRight); + DDX_Control(pDX, IDC_SEPARATOR_HORZPLAIN, m_ctlSepHorzPlain); + DDX_Control(pDX, IDC_SEPARATOR_HORZLEFT, m_ctlSepHorzLeft); + DDX_Control(pDX, IDC_SEPARATOR_HORZCENTER, m_ctlSepHorzCenter); + DDX_Control(pDX, IDC_SEPARATOR_CUSTOMTEXT, m_ctlSepCustomText); + DDX_Control(pDX, IDC_SEPARATOR_CUSTOMLINE, m_ctlSepCusomLine); + DDX_Control(pDX, IDC_SEPARATOR_HEADER, m_ctlSeparatorHeader); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSeparatorDlg, CDialog) + //{{AFX_MSG_MAP(CSeparatorDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_ABOUT, OnButtonAbout) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorDlg message handlers + +BOOL CSeparatorDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // set text color and font for separator + static CFont fontHeader; + VERIFY(fontHeader.CreatePointFont(140,_T("Times New Roman"))); + m_ctlSeparatorHeader.SetFont(&fontHeader); + m_ctlSeparatorHeader.SetTextColor(RGB(128,0,0)); + ///////////////////// + + // setup vertically oriented separators + static CFont fontVertEnabled; + VERIFY(fontVertEnabled.CreatePointFont(120,_T("Times New Roman"))); + m_ctlSepVertRight.SetVertOriented(); + m_ctlSepVertRight.SetFont(&fontVertEnabled); + m_ctlSepVertPlain.SetVertOriented(); + m_ctlSepVertLeft.SetVertOriented(); + m_ctlSepVertLeft.SetFont(&fontVertEnabled); + m_ctlSepVertCenter.SetVertOriented(); + m_ctlSepVertCenter.SetFont(&fontVertEnabled); + ///////////////////// + + // setup customized separators + static CFont fontCustom; + VERIFY(fontCustom.CreatePointFont(120,_T("Arial"))); + m_ctlSepCustomText.SetFont(&fontCustom); + m_ctlSepCustomText.SetTextColor(RGB(0,0,128)); + m_ctlSepCustomText.SetWindowText(_T("Font and Color")); + + m_ctlSepCusomLine.SetSeparatorColors(RGB(128,0,128),RGB(0,255,0)); + /////////////////////// + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSeparatorDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OnButtonAbout(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSeparatorDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSeparatorDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSeparatorDlg::OnButtonAbout() +{ + // TODO: Add your control notification handler code here + + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.h new file mode 100644 index 0000000..4fca789 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorDlg.h @@ -0,0 +1,62 @@ +// SeparatorDlg.h : header file +// + +#if !defined(AFX_SEPARATORDLG_H__354BA847_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) +#define AFX_SEPARATORDLG_H__354BA847_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXSeparator.h" + +///////////////////////////////////////////////////////////////////////////// +// CSeparatorDlg dialog + +class CSeparatorDlg : public CDialog +{ +// Construction +public: + CSeparatorDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSeparatorDlg) + enum { IDD = IDD_SEPARATOR_DIALOG }; + COXSeparator m_ctlSepVertRight; + COXSeparator m_ctlSepVertPlain; + COXSeparator m_ctlSepVertLeft; + COXSeparator m_ctlSepVertCenter; + COXSeparator m_ctlSepHorzRight; + COXSeparator m_ctlSepHorzPlain; + COXSeparator m_ctlSepHorzLeft; + COXSeparator m_ctlSepHorzCenter; + COXSeparator m_ctlSepCustomText; + COXSeparator m_ctlSepCusomLine; + COXSeparator m_ctlSeparatorHeader; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSeparatorDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CSeparatorDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SEPARATORDLG_H__354BA847_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorInfo.rtf new file mode 100644 index 0000000..9683bd6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/SeparatorInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.cpp new file mode 100644 index 0000000..6c60c3d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Separator.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.h new file mode 100644 index 0000000..8943e78 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__354BA849_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__354BA849_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__354BA849_6F3F_11D2_A75E_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.rc2 new file mode 100644 index 0000000..b2407f4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/res/Separator.rc2 @@ -0,0 +1,13 @@ +// +// SEPARATOR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/resource.h new file mode 100644 index 0000000..7512f24 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Separator/resource.h @@ -0,0 +1,32 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Separator.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_SEPARATOR_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_BUTTON_ABOUT 130 +#define IDC_SEPARATOR_HEADER 1000 +#define IDC_SEPARATOR_HORZPLAIN 1004 +#define IDC_SEPARATOR_HORZLEFT 1006 +#define IDC_SEPARATOR_HORZCENTER 1007 +#define IDC_SEPARATOR_HORZRIGHT 1008 +#define IDC_SEPARATOR_VERTPLAIN 1009 +#define IDC_SEPARATOR_VERTLEFT 1010 +#define IDC_SEPARATOR_VERTCENTER 1011 +#define IDC_SEPARATOR_VERTRIGHT 1012 +#define IDC_SEPARATOR_CUSTOMLINE 1013 +#define IDC_SEPARATOR_CUSTOMTEXT 1014 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ReadMe.txt new file mode 100644 index 0000000..55bc31e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ShortcutBar +======================================================================== + + +AppWizard has created this ShortcutBar 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 ShortcutBar application. + +ShortcutBar.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CShortcutBarApp application class. + +ShortcutBar.cpp + This is the main application source file that contains the application + class CShortcutBarApp. + +ShortcutBar.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 + Developer Studio. + +res\ShortcutBar.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ShortcutBar.rc. + +res\ShortcutBar.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ShortcutBar.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ShortcutBarDlg.h, ShortcutBarDlg.cpp - the dialog + These files contain your CShortcutBarDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ShortcutBar.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ShortcutBar.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.cpp new file mode 100644 index 0000000..8dd2e8d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.cpp @@ -0,0 +1,281 @@ +// SHBPropertiesDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ShortcutBar.h" +#include "SHBPropertiesDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg dialog + + +CSHBPropertiesDlg::CSHBPropertiesDlg(COXShortcutBar* pShortcutBar, + CWnd* pParent /*=NULL*/) + : CDialog(CSHBPropertiesDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSHBPropertiesDlg) + m_bApplyOnlyToExpanded = TRUE; + m_nBottomMargin = 0; + m_nGroupMargin = 0; + m_nRightMargin = 0; + m_nLeftMargin = 0; + m_nScrollBtnHeight = 0; + m_nScrollBtnWidth = 0; + m_nTopMargin = 0; + m_sNameTextFont = _T(""); + m_sNameHeaderFont = _T(""); + m_nHeaderHeight = 0; + //}}AFX_DATA_INIT + + ASSERT(pShortcutBar); + m_pShortcutBar=pShortcutBar; +} + + +void CSHBPropertiesDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSHBPropertiesDlg) + DDX_Control(pDX, IDC_NAMETEXTFONT, m_ctlNameTextFont); + DDX_Control(pDX, IDC_NAMEHDRFONT, m_ctlNameHeaderFont); + DDX_Control(pDX, IDC_HDRCLRBACK, m_btnHeaderClrBack); + DDX_Control(pDX, IDC_CLRBACK, m_btnClrBack); + DDX_Check(pDX, IDC_CHECK_APPLYTOEXPANDED, m_bApplyOnlyToExpanded); + DDX_Text(pDX, IDC_EDIT_BOTTOMMARGIN, m_nBottomMargin); + DDX_Text(pDX, IDC_EDIT_GRPMARGIN, m_nGroupMargin); + DDX_Text(pDX, IDC_EDIT_RIGHTMARGIN, m_nRightMargin); + DDX_Text(pDX, IDC_EDIT_LEFTMARGIN, m_nLeftMargin); + DDX_Text(pDX, IDC_EDIT_SCROLLBTNHEIGHT, m_nScrollBtnHeight); + DDX_Text(pDX, IDC_EDIT_SCROLLBTNWIDTH, m_nScrollBtnWidth); + DDX_Text(pDX, IDC_EDIT_TOPMARGIN, m_nTopMargin); + DDX_Text(pDX, IDC_NAMETEXTFONT, m_sNameTextFont); + DDX_Text(pDX, IDC_NAMEHDRFONT, m_sNameHeaderFont); + DDX_Text(pDX, IDC_EDIT_HDRHEIGHT, m_nHeaderHeight); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_CLRBACK, m_clrBackground); + DDX_ColorPicker(pDX, IDC_HDRCLRBACK, m_clrHeaderBackground); +} + + +BEGIN_MESSAGE_MAP(CSHBPropertiesDlg, CDialog) + //{{AFX_MSG_MAP(CSHBPropertiesDlg) + ON_BN_CLICKED(IDC_HDRFONT, OnHdrfont) + ON_BN_CLICKED(IDC_TEXTFONT, OnTextfont) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg message handlers + +void CSHBPropertiesDlg::OnHdrfont() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + // Use font common dialog + CFontDialog fontDlg(&m_lfHeader); + fontDlg.m_cf.rgbColors=m_clrHeaderText; + if(fontDlg.DoModal()==IDOK) + { + m_clrHeaderText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&m_lfHeader); + m_sNameHeaderFont.Format(_T("%d pt, %s"),fontDlg.GetSize()/10, + m_lfHeader.lfFaceName); + m_ctlNameHeaderFont.SetTextLogFont(&m_lfHeader); + m_ctlNameHeaderFont.SetTextColor(m_clrHeaderText,TRUE); + UpdateData(FALSE); + } +} + +void CSHBPropertiesDlg::OnTextfont() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + // Use font common dialog + CFontDialog fontDlg(&m_lfText); + fontDlg.m_cf.rgbColors=m_clrText; + if(fontDlg.DoModal()==IDOK) + { + m_clrText=fontDlg.GetColor(); + fontDlg.GetCurrentFont(&m_lfText); + m_sNameTextFont.Format(_T("%d pt, %s"),fontDlg.GetSize()/10, + m_lfText.lfFaceName); + m_ctlNameTextFont.SetTextLogFont(&m_lfText); + m_ctlNameTextFont.SetTextColor(m_clrText); + UpdateData(FALSE); + } +} + +void CSHBPropertiesDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +BOOL CSHBPropertiesDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CSHBPropertiesDlg::GetVars() +{ + m_nLeftMargin=m_pShortcutBar->GetChildWndMargins().left; + m_nTopMargin=m_pShortcutBar->GetChildWndMargins().top; + m_nRightMargin=m_pShortcutBar->GetChildWndMargins().right; + m_nBottomMargin=m_pShortcutBar->GetChildWndMargins().bottom; + + m_nGroupMargin=m_pShortcutBar->GetGroupMargin(); + + m_nScrollBtnHeight=m_pShortcutBar->GetScrollButtonSize().cy; + m_nScrollBtnWidth=m_pShortcutBar->GetScrollButtonSize().cx; + + HSHBGROUP hGroup=m_pShortcutBar->GetExpandedGroup(); + ASSERT(hGroup); + + m_nHeaderHeight=m_pShortcutBar->GetGroupHeaderHeight(hGroup); + + m_clrBackground=m_pShortcutBar->GetGroupBkColor(hGroup); + m_clrHeaderBackground=m_pShortcutBar->GetGroupHeaderBkColor(hGroup); + m_clrText=m_pShortcutBar->GetGroupTextColor(hGroup); + m_clrHeaderText=m_pShortcutBar->GetGroupHeaderTextColor(hGroup); + + CFont font; + LPLOGFONT plf=m_pShortcutBar->GetGroupTextFont(hGroup); + ASSERT(plf); + VERIFY(font.CreateFontIndirect(plf)); + VERIFY(font.GetLogFont(&m_lfText)); + + plf=m_pShortcutBar->GetGroupHeaderTextFont(hGroup); + ASSERT(plf); + if((HFONT)font) + font.DeleteObject(); + VERIFY(font.CreateFontIndirect(plf)); + VERIFY(font.GetLogFont(&m_lfHeader)); + + m_sNameTextFont.Format(_T("%d pt, %s"), + (ConvertLogUnitToPoint(m_lfText.lfHeight)+5)/10,m_lfText.lfFaceName); + m_ctlNameTextFont.SetTextColor(m_clrText); + m_ctlNameTextFont.SetTextLogFont(&m_lfText); + + m_sNameHeaderFont.Format(_T("%d pt, %s"), + (ConvertLogUnitToPoint(m_lfHeader.lfHeight)+5)/10,m_lfHeader.lfFaceName); + m_ctlNameHeaderFont.SetTextColor(m_clrHeaderText); + m_ctlNameHeaderFont.SetTextLogFont(&m_lfHeader); + + m_btnHeaderClrBack.SetDefaultColor(::GetSysColor(COLOR_BTNFACE)); + m_btnClrBack.SetDefaultColor(::GetSysColor(COLOR_3DSHADOW)); + + UpdateData(FALSE); + + ShowControls(); +} + +void CSHBPropertiesDlg::SetVars() +{ + UpdateData(); + + m_pShortcutBar->SetChildWndMargins(CRect(m_nLeftMargin,m_nTopMargin, + m_nRightMargin,m_nBottomMargin)); + m_pShortcutBar->SetGroupMargin(m_nGroupMargin); + + m_pShortcutBar->SetScrollButtonSize(CSize(m_nScrollBtnWidth,m_nScrollBtnHeight)); + + HSHBGROUP hGroup=NULL; + if(m_bApplyOnlyToExpanded) + { + hGroup=m_pShortcutBar->GetExpandedGroup(); + ASSERT(hGroup); + } + + m_pShortcutBar->SetGroupHeaderHeight(hGroup,m_nHeaderHeight); + + m_pShortcutBar->SetGroupBkColor(hGroup,m_clrBackground); + m_pShortcutBar->SetGroupHeaderBkColor(hGroup,m_clrHeaderBackground); + m_pShortcutBar->SetGroupTextColor(hGroup,m_clrText); + m_pShortcutBar->SetGroupHeaderTextColor(hGroup,m_clrHeaderText); + + m_pShortcutBar->SetGroupHeaderTextFont(hGroup,&m_lfHeader); + m_pShortcutBar->SetGroupTextFont(hGroup,&m_lfText); + + m_pShortcutBar->RedrawBar(); +} + +void CSHBPropertiesDlg::ShowControls() +{ +} + +int CSHBPropertiesDlg::ConvertPointToLogUnit(const int nPointSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + // convert nPointSize to logical units based on pDC + POINT pt; + pt.y=::GetDeviceCaps(hDC,LOGPIXELSY)*nPointSize; + pt.y/=720; // 72 points/inch, 10 decipoints/point + ::DPtoLP(hDC,&pt,1); + POINT ptOrg = {0,0}; + ::DPtoLP(hDC,&ptOrg,1); + + if(pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return -abs(pt.y-ptOrg.y); +} + +int CSHBPropertiesDlg::ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC/*=NULL*/) +{ + HDC hDC; + if (pDC!=NULL) + { + ASSERT_VALID(pDC); + ASSERT(pDC->m_hAttribDC != NULL); + hDC=pDC->m_hAttribDC; + } + else + hDC=::GetDC(NULL); + + POINT ptOrg={0,0}; + ::DPtoLP(hDC,&ptOrg,1); + POINT pt={0,0}; + + pt.y=abs(nLogUnitSize)+ptOrg.y; + ::LPtoDP(hDC,&pt,1); + pt.y*=720; // 72 points/inch, 10 decipoints/point + + int nPointSize=(pt.y)/(::GetDeviceCaps(hDC,LOGPIXELSY)); + + if (pDC==NULL) + ::ReleaseDC(NULL,hDC); + + return nPointSize; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.h new file mode 100644 index 0000000..387c7a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/SHBPropertiesDlg.h @@ -0,0 +1,82 @@ +#if !defined(AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_) +#define AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// SHBPropertiesDlg.h : header file +// + +#include "OXColorPickerButton.h" +#include "OXStatic.h" +#include "OXShortcutBar.h" + +///////////////////////////////////////////////////////////////////////////// +// CSHBPropertiesDlg dialog + +class CSHBPropertiesDlg : public CDialog +{ +// Construction +public: + CSHBPropertiesDlg(COXShortcutBar* pShortcutBar, CWnd* pParent = NULL); + +// Dialog Data + //{{AFX_DATA(CSHBPropertiesDlg) + enum { IDD = IDD_SHBPROPERTIES_DIALOG }; + COXStatic m_ctlNameTextFont; + COXStatic m_ctlNameHeaderFont; + COXColorPickerButton m_btnHeaderClrBack; + COXColorPickerButton m_btnClrBack; + BOOL m_bApplyOnlyToExpanded; + int m_nBottomMargin; + int m_nGroupMargin; + int m_nRightMargin; + int m_nLeftMargin; + UINT m_nScrollBtnHeight; + UINT m_nScrollBtnWidth; + int m_nTopMargin; + CString m_sNameTextFont; + CString m_sNameHeaderFont; + int m_nHeaderHeight; + //}}AFX_DATA + COLORREF m_clrBackground; + COLORREF m_clrHeaderBackground; + COLORREF m_clrText; + COLORREF m_clrHeaderText; + LOGFONT m_lfText; + LOGFONT m_lfHeader; + +protected: + COXShortcutBar* m_pShortcutBar; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSHBPropertiesDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void GetVars(); + void SetVars(); + void ShowControls(); + + int ConvertPointToLogUnit(const int nPointSize, CDC* pDC=NULL); + int ConvertLogUnitToPoint(const int nLogUnitSize, CDC* pDC=NULL); + + // Generated message map functions + //{{AFX_MSG(CSHBPropertiesDlg) + afx_msg void OnHdrfont(); + afx_msg void OnTextfont(); + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SHBPROPERTIESDLG_H__BAAEE534_09DB_11D2_887D_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.clw new file mode 100644 index 0000000..a82d427 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.clw @@ -0,0 +1,206 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CShortcutBarApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "shortcutbar.h" +LastPage=0 + +ClassCount=6 +Class1=COXSHBEdit +Class2=COXSHBListCtrl +Class3=COXShortcutBar +Class4=CSHBPropertiesDlg +Class5=CShortcutBarApp +Class6=CShortcutBarDlg + +ResourceCount=4 +Resource1=IDD_SHORTCUTBAR_DIALOG (English (U.S.)) +Resource2=IDD_SHBPROPERTIES_DIALOG +Resource3=IDD_SHORTCUTBAR_DIALOG +Resource4=IDD_SHBPROPERTIES_DIALOG (English (Canada)) + +[CLS:COXSHBEdit] +Type=0 +BaseClass=CEdit +HeaderFile=\Ultimate Toolbox\Include\OXShortcutBar.h +ImplementationFile=\Ultimate Toolbox\Source\OXShortcutBar.cpp +LastObject=COXSHBEdit + +[CLS:COXSHBListCtrl] +Type=0 +BaseClass=CListCtrl +HeaderFile=\Ultimate Toolbox\Include\OXShortcutBar.h +ImplementationFile=\Ultimate Toolbox\Source\OXShortcutBar.cpp +LastObject=COXSHBListCtrl +Filter=W +VirtualFilter=FWC + +[CLS:COXShortcutBar] +Type=0 +BaseClass=CWnd +HeaderFile=\Ultimate Toolbox\Include\OXShortcutBar.h +ImplementationFile=\Ultimate Toolbox\Source\OXShortcutBar.cpp +Filter=W +VirtualFilter=WC +LastObject=COXShortcutBar + +[CLS:CSHBPropertiesDlg] +Type=0 +BaseClass=CDialog +HeaderFile=SHBPropertiesDlg.h +ImplementationFile=SHBPropertiesDlg.cpp + +[CLS:CShortcutBarApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ShortcutBar.h +ImplementationFile=ShortcutBar.cpp +Filter=N +VirtualFilter=AC +LastObject=CShortcutBarApp + +[CLS:CShortcutBarDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ShortcutBarDlg.h +ImplementationFile=ShortcutBarDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=CShortcutBarDlg + +[DLG:IDD_SHBPROPERTIES_DIALOG] +Type=1 +Class=CSHBPropertiesDlg +ControlCount=32 +Control1=IDC_CLRBACK,button,1342242827 +Control2=IDC_HDRCLRBACK,button,1342242827 +Control3=IDC_TEXTFONT,button,1342242816 +Control4=IDC_HDRFONT,button,1342242816 +Control5=IDC_EDIT_HDRHEIGHT,edit,1350631552 +Control6=IDC_CHECK_APPLYTOEXPANDED,button,1342242819 +Control7=IDC_EDIT_GRPMARGIN,edit,1350631552 +Control8=IDC_EDIT_LEFTMARGIN,edit,1350631552 +Control9=IDC_EDIT_TOPMARGIN,edit,1350631552 +Control10=IDC_EDIT_RIGHTMARGIN,edit,1350631552 +Control11=IDC_EDIT_BOTTOMMARGIN,edit,1350631552 +Control12=IDC_EDIT_SCROLLBTNWIDTH,edit,1350631552 +Control13=IDC_EDIT_SCROLLBTNHEIGHT,edit,1350631552 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_NAMETEXTFONT,static,1342312972 +Control21=IDC_NAMEHDRFONT,static,1342312972 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 + +[DLG:IDD_SHORTCUTBAR_DIALOG] +Type=1 +Class=CShortcutBarDlg +ControlCount=25 +Control1=IDC_SHORTCUT_BAR,static,1342308352 +Control2=IDC_DESCRIPTION,static,1342308353 +Control3=IDC_DISABLEDRAGITEM,button,1342242819 +Control4=IDC_DISABLEDDRAGDROPHEADER,button,1342242819 +Control5=IDC_EDITITEMS,button,1342242819 +Control6=IDC_EDITHEADERS,button,1342242819 +Control7=IDC_INFOTIP,button,1342242819 +Control8=IDC_NOSCROLL,button,1342242819 +Control9=IDC_BOLDEXPANDEDGROUP,button,1342242819 +Control10=IDC_UNDERLINEHOTITEM,button,1342242819 +Control11=IDC_SHOWACTIVEALWAYS,button,1342242819 +Control12=IDC_DRAWHEADERDRAGIMAGE,button,1342242819 +Control13=IDC_DRAWITEMDRAGIMAGE,button,1342242819 +Control14=IDC_AUTOSCROLL,button,1342242819 +Control15=IDC_ANIMATEEXPAND,button,1342242819 +Control16=IDC_AUTOEXPAND,button,1342242819 +Control17=IDC_NO_SORT,button,1342373897 +Control18=IDC_ASCENDING,button,1342242825 +Control19=IDC_DESCENDING,button,1342242825 +Control20=IDC_HANDLENOTIFICATIONS,button,1342242819 +Control21=IDOK,button,1342242817 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 +Control24=IDC_STATIC,button,1342177287 +Control25=IDC_DISABLEDROPITEM,button,1342242819 + +[DLG:IDD_SHORTCUTBAR_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=24 +Control1=IDC_SHORTCUT_BAR,static,1342308352 +Control2=IDC_DESCRIPTION,static,1342308353 +Control3=IDC_DISABLEDDRAGDROPITEM,button,1342242819 +Control4=IDC_DISABLEDDRAGDROPHEADER,button,1342242819 +Control5=IDC_EDITITEMS,button,1342242819 +Control6=IDC_EDITHEADERS,button,1342242819 +Control7=IDC_INFOTIP,button,1342242819 +Control8=IDC_NOSCROLL,button,1342242819 +Control9=IDC_BOLDEXPANDEDGROUP,button,1342242819 +Control10=IDC_UNDERLINEHOTITEM,button,1342242819 +Control11=IDC_SHOWACTIVEALWAYS,button,1342242819 +Control12=IDC_DRAWHEADERDRAGIMAGE,button,1342242819 +Control13=IDC_DRAWITEMDRAGIMAGE,button,1342242819 +Control14=IDC_AUTOSCROLL,button,1342242819 +Control15=IDC_ANIMATEEXPAND,button,1342242819 +Control16=IDC_AUTOEXPAND,button,1342242819 +Control17=IDC_NO_SORT,button,1342373897 +Control18=IDC_ASCENDING,button,1342242825 +Control19=IDC_DESCENDING,button,1342242825 +Control20=IDC_HANDLENOTIFICATIONS,button,1342242819 +Control21=IDOK,button,1342242817 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,button,1342177287 +Control24=IDC_STATIC,button,1342177287 + +[DLG:IDD_SHBPROPERTIES_DIALOG (English (Canada))] +Type=1 +Class=? +ControlCount=32 +Control1=IDC_CLRBACK,button,1342242827 +Control2=IDC_HDRCLRBACK,button,1342242827 +Control3=IDC_TEXTFONT,button,1342242816 +Control4=IDC_HDRFONT,button,1342242816 +Control5=IDC_EDIT_HDRHEIGHT,edit,1350631552 +Control6=IDC_CHECK_APPLYTOEXPANDED,button,1342242819 +Control7=IDC_EDIT_GRPMARGIN,edit,1350631552 +Control8=IDC_EDIT_LEFTMARGIN,edit,1350631552 +Control9=IDC_EDIT_TOPMARGIN,edit,1350631552 +Control10=IDC_EDIT_RIGHTMARGIN,edit,1350631552 +Control11=IDC_EDIT_BOTTOMMARGIN,edit,1350631552 +Control12=IDC_EDIT_SCROLLBTNWIDTH,edit,1350631552 +Control13=IDC_EDIT_SCROLLBTNHEIGHT,edit,1350631552 +Control14=IDOK,button,1342242817 +Control15=IDCANCEL,button,1342242816 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,button,1342177287 +Control20=IDC_NAMETEXTFONT,static,1342312972 +Control21=IDC_NAMEHDRFONT,static,1342312972 +Control22=IDC_STATIC,button,1342177287 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_STATIC,static,1342308352 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_STATIC,static,1342308352 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,static,1342308352 +Control32=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.cpp new file mode 100644 index 0000000..08f2eff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.cpp @@ -0,0 +1,108 @@ +// ShortcutBar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ShortcutBar.h" +#include "ShortcutBarDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarApp + +BEGIN_MESSAGE_MAP(CShortcutBarApp, CWinApp) + //{{AFX_MSG_MAP(CShortcutBarApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarApp construction + +CShortcutBarApp::CShortcutBarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CShortcutBarApp object + +CShortcutBarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarApp initialization + +BOOL CShortcutBarApp::InitInstance() +{ + // 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. + + // Initialize OLE libraries + if (!AfxOleInit()) + { + TRACE(_T("CShortcutBarApp::InitInstance: failed to initialize OLE libraries")); + return FALSE; + } + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CShortcutBarDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CShortcutBarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsp new file mode 100644 index 0000000..f75898e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsp @@ -0,0 +1,404 @@ +# Microsoft Developer Studio Project File - Name="ShortcutBar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ShortcutBar - Win32 Unicode Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ShortcutBar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ShortcutBar.mak" CFG="ShortcutBar - Win32 Unicode Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ShortcutBar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ShortcutBar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ShortcutBar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ShortcutBar - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "ShortcutBar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ShortcutBar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ShortcutBar.exe" + +!ELSEIF "$(CFG)" == "ShortcutBar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ShortcutBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ShortcutBar - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Shortcut" +# PROP BASE Intermediate_Dir "Shortcut" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ShortcutBar.exe" + +!ELSEIF "$(CFG)" == "ShortcutBar - Win32 Unicode Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Shortcu1" +# PROP BASE Intermediate_Dir "Shortcu1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ShortcutBar.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ShortcutBar.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ShortcutBar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Shortcu0" +# PROP BASE Intermediate_Dir "Shortcu0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ShortcutBar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ShortcutBar.exe" + +!ENDIF + +# Begin Target + +# Name "ShortcutBar - Win32 Release" +# Name "ShortcutBar - Win32 Debug" +# Name "ShortcutBar - Win32 Release_Shared" +# Name "ShortcutBar - Win32 Unicode Debug" +# Name "ShortcutBar - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXLayoutManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\SHBPropertiesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBar.rc +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBarDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXShortcutBar.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SHBPropertiesDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBar.h +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBarDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\large.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ShortcutBar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ShortcutBar.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\small.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\TreeImages.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\ShortcutBar.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsw new file mode 100644 index 0000000..659b1e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ShortcutBar"=".\ShortcutBar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/Shortcutbar", IHJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.h new file mode 100644 index 0000000..50155dc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.h @@ -0,0 +1,50 @@ +// ShortcutBar.h : main header file for the SHORTCUTBAR application +// + +#if !defined(AFX_SHORTCUTBAR_H__427CC918_FEDC_11D1_8872_0080C83F712F__INCLUDED_) +#define AFX_SHORTCUTBAR_H__427CC918_FEDC_11D1_8872_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarApp: +// See ShortcutBar.cpp for the implementation of this class +// + +class CShortcutBarApp : public CWinApp +{ +public: + CShortcutBarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CShortcutBarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CShortcutBarApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SHORTCUTBAR_H__427CC918_FEDC_11D1_8872_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.rc new file mode 100644 index 0000000..0809f17 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.rc @@ -0,0 +1,314 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SHORTCUTBAR_DIALOG DIALOGEX 0, 0, 366, 281 +STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_APPWINDOW +CAPTION "ShortcutBar" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Static",IDC_SHORTCUT_BAR,7,7,102,267 + CTEXT "Static",IDC_DESCRIPTION,124,15,230,26 + CONTROL "Disable drag item (SHBS_DISABLEDRAGITEM)",IDC_DISABLEDRAGITEM, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,56,167,10 + CONTROL "Disable drag'n'drop header (SHBS_DISABLEDRAGDROPHEADER)",IDC_DISABLEDDRAGDROPHEADER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,78,229,10 + CONTROL "Edit Items (SHBS_EDITITEMS)",IDC_EDITITEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,89,115,10 + CONTROL "Edit Headers (SHBS_EDITHEADERS)",IDC_EDITHEADERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,100,137,10 + CONTROL "Info tips (SHBS_INFOTIP)",IDC_INFOTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,111,98,10 + CONTROL "No scroll (SHBS_NOSCROLL)",IDC_NOSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,122,111,10 + CONTROL "Bold Expanded Group (SHBS_BOLDEXPANDEDGROUP)",IDC_BOLDEXPANDEDGROUP, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,133,199,10 + CONTROL "Underline hot item (SHBS_UNDERLINEHOTITEM)",IDC_UNDERLINEHOTITEM, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,144,177,10 + CONTROL "Show Active Always (SHBS_SHOWACTIVEALWAYS)",IDC_SHOWACTIVEALWAYS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,155,187,10 + CONTROL "Draw Header Drag Image (SHBS_DRAWHEADERDRAGIMAGE)",IDC_DRAWHEADERDRAGIMAGE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,166,222,10 + CONTROL "Draw Item Drag Image (SHBS_DRAWITEMDRAGIMAGE)",IDC_DRAWITEMDRAGIMAGE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,177,199,10 + CONTROL "Auto scrolling (SHBS_AUTOSCROLL)",IDC_AUTOSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,188,135,10 + CONTROL "Animate group expansion (SHBS_ANIMATEEXPAND)",IDC_ANIMATEEXPAND, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,199,186,10 + CONTROL "Autoexpand group after delay (SHBS_AUTOEXPAND)",IDC_AUTOEXPAND, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,211,187,10 + CONTROL "No sorting",IDC_NO_SORT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,123,240,48,10 + CONTROL "Ascending",IDC_ASCENDING,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,251,48,10 + CONTROL "Descending",IDC_DESCENDING,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,262,54,10 + CONTROL "Display TRACE messages on all notifications",IDC_HANDLENOTIFICATIONS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,203,233,156,10 + DEFPUSHBUTTON "Close",IDOK,309,260,50,14 + GROUPBOX "Description",IDC_STATIC,118,7,241,38 + GROUPBOX "Styles",IDC_STATIC,118,47,241,178 + GROUPBOX "Group Sorting",IDC_STATIC,118,230,65,44 + CONTROL "Disable drop item (SHBS_DISABLEDROPITEM)",IDC_DISABLEDROPITEM, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,67,167,10 +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 "040904B0" + BEGIN + VALUE "FileDescription", "ShortcutBar MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ShortcutBar" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "ShortcutBar.EXE" + VALUE "ProductName", "ShortcutBar Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_SHORTCUTBAR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 359 + TOPMARGIN, 7 + BOTTOMMARGIN, 274 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ShortcutBar..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ShortcutBar" + ID_DESCRIPTION_FILE "ShortcutBarInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SHBPROPERTIES_DIALOG DIALOGEX 0, 0, 280, 146 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "ShortcutBar properties" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_CLRBACK,"Button",BS_OWNERDRAW | WS_TABSTOP,87,16,55,14 + CONTROL "",IDC_HDRCLRBACK,"Button",BS_OWNERDRAW | WS_TABSTOP,87,33,55,14 + PUSHBUTTON "Text...",IDC_TEXTFONT,13,68,39,13 + PUSHBUTTON "Header...",IDC_HDRFONT,13,85,39,13 + EDITTEXT IDC_EDIT_HDRHEIGHT,61,108,27,12,ES_AUTOHSCROLL + CONTROL "Apply to expanded group only",IDC_CHECK_APPLYTOEXPANDED, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,126,109,10 + EDITTEXT IDC_EDIT_GRPMARGIN,242,18,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_LEFTMARGIN,183,50,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_TOPMARGIN,242,50,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_RIGHTMARGIN,183,66,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_BOTTOMMARGIN,242,66,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SCROLLBTNWIDTH,183,101,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SCROLLBTNHEIGHT,242,101,26,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,154,125,50,14 + PUSHBUTTON "Cancel",IDCANCEL,223,125,50,14 + GROUPBOX "Colors",IDC_STATIC,7,7,141,44 + LTEXT "Background",IDC_STATIC,14,19,40,8 + LTEXT "Header Background",IDC_STATIC,14,36,65,8 + GROUPBOX "Fonts",IDC_STATIC,7,56,141,48 + CONTROL "Static",IDC_NAMETEXTFONT,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,61,68,81,12,WS_EX_STATICEDGE + CONTROL "Static",IDC_NAMEHDRFONT,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,61,85,81,12,WS_EX_STATICEDGE + GROUPBOX "Static",IDC_STATIC,154,7,119,112 + LTEXT "Margin between groups",IDC_STATIC,161,20,75,8 + LTEXT "Child Window Margins",IDC_STATIC,161,38,71,8 + LTEXT "Left",IDC_STATIC,161,52,13,8 + LTEXT "Top",IDC_STATIC,216,52,14,8 + LTEXT "Right",IDC_STATIC,161,68,18,8 + LTEXT "Bottom",IDC_STATIC,216,68,23,8 + LTEXT "Scroll Button Size",IDC_STATIC,160,90,56,8 + LTEXT "Width",IDC_STATIC,161,103,20,8 + LTEXT "Height",IDC_STATIC,216,103,22,8 + LTEXT "Header Height",IDC_STATIC,7,111,47,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_SHBPROPERTIES_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 273 + TOPMARGIN, 7 + BOTTOMMARGIN, 139 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ShortcutBar.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXShortcutBar.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\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\\ShortcutBar.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_LARGE BITMAP "res\\large.bmp" +IDB_SMALL BITMAP "res\\small.bmp" +IDB_TREE BITMAP "res\\TreeImages.bmp" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ShortcutBar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXShortcutBar.rc" +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.vcproj new file mode 100644 index 0000000..f09788e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBar.vcproj @@ -0,0 +1,2371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.cpp new file mode 100644 index 0000000..d789368 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.cpp @@ -0,0 +1,974 @@ +// ShortcutBarDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ShortcutBar.h" +#include "ShortcutBarDlg.h" +#include "SHBPropertiesDlg.h" + +#include "UTSampleAbout.h" +#include "UTBStrOp.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarDlg dialog + +CShortcutBarDlg::CShortcutBarDlg(CWnd* pParent /*=NULL*/) + : CDialog(CShortcutBarDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CShortcutBarDlg) + m_bAutoScroll = FALSE; + m_bBoldExpandedGroup = FALSE; + m_sDescription = _T(""); + m_bDisableDragDropHeader = FALSE; + m_bEditHeaders = FALSE; + m_bEditItems = FALSE; + m_bHandleNotifications = TRUE; + m_bInfoTip = FALSE; + m_nSorting = 0; + m_bNoScroll = FALSE; + m_bShowActiveAlways = FALSE; + m_bUnderlineHotItem = FALSE; + m_bAnimateExpand = FALSE; + m_bAutoExpand = FALSE; + m_bDrawHeaderDragImage = FALSE; + m_bDrawItemDragImage = FALSE; + m_bDisableDragItem = FALSE; + m_bDisableDropItem = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_bItemDroped=FALSE; +} + +void CShortcutBarDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CShortcutBarDlg) + DDX_Check(pDX, IDC_AUTOSCROLL, m_bAutoScroll); + DDX_Check(pDX, IDC_BOLDEXPANDEDGROUP, m_bBoldExpandedGroup); + DDX_Text(pDX, IDC_DESCRIPTION, m_sDescription); + DDX_Check(pDX, IDC_DISABLEDDRAGDROPHEADER, m_bDisableDragDropHeader); + DDX_Check(pDX, IDC_EDITHEADERS, m_bEditHeaders); + DDX_Check(pDX, IDC_EDITITEMS, m_bEditItems); + DDX_Check(pDX, IDC_HANDLENOTIFICATIONS, m_bHandleNotifications); + DDX_Check(pDX, IDC_INFOTIP, m_bInfoTip); + DDX_Radio(pDX, IDC_NO_SORT, m_nSorting); + DDX_Check(pDX, IDC_NOSCROLL, m_bNoScroll); + DDX_Check(pDX, IDC_SHOWACTIVEALWAYS, m_bShowActiveAlways); + DDX_Check(pDX, IDC_UNDERLINEHOTITEM, m_bUnderlineHotItem); + DDX_Check(pDX, IDC_ANIMATEEXPAND, m_bAnimateExpand); + DDX_Check(pDX, IDC_AUTOEXPAND, m_bAutoExpand); + DDX_Check(pDX, IDC_DRAWHEADERDRAGIMAGE, m_bDrawHeaderDragImage); + DDX_Check(pDX, IDC_DRAWITEMDRAGIMAGE, m_bDrawItemDragImage); + DDX_Check(pDX, IDC_DISABLEDRAGITEM, m_bDisableDragItem); + DDX_Check(pDX, IDC_DISABLEDROPITEM, m_bDisableDropItem); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CShortcutBarDlg, CDialog) + //{{AFX_MSG_MAP(CShortcutBarDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_ASCENDING, OnAscending) + ON_BN_CLICKED(IDC_AUTOSCROLL, OnAutoscroll) + ON_BN_CLICKED(IDC_BOLDEXPANDEDGROUP, OnBoldexpandedgroup) + ON_BN_CLICKED(IDC_DESCENDING, OnDescending) + ON_BN_CLICKED(IDC_DISABLEDDRAGDROPHEADER, OnDisableddragdropheader) + ON_BN_CLICKED(IDC_EDITHEADERS, OnEditheaders) + ON_BN_CLICKED(IDC_EDITITEMS, OnEdititems) + ON_BN_CLICKED(IDC_HANDLENOTIFICATIONS, OnHandlenotifications) + ON_BN_CLICKED(IDC_INFOTIP, OnInfotip) + ON_BN_CLICKED(IDC_NO_SORT, OnNoSort) + ON_BN_CLICKED(IDC_NOSCROLL, OnNoscroll) + ON_BN_CLICKED(IDC_SHOWACTIVEALWAYS, OnShowactivealways) + ON_BN_CLICKED(IDC_UNDERLINEHOTITEM, OnUnderlinehotitem) + ON_BN_CLICKED(IDC_AUTOEXPAND, OnAutoexpand) + ON_BN_CLICKED(IDC_ANIMATEEXPAND, OnAnimateexpand) + ON_BN_CLICKED(IDC_DRAWITEMDRAGIMAGE, OnDrawitemdragimage) + ON_BN_CLICKED(IDC_DRAWHEADERDRAGIMAGE, OnDrawheaderdragimage) + ON_BN_CLICKED(IDC_DISABLEDRAGITEM, OnDisabledragitem) + ON_BN_CLICKED(IDC_DISABLEDROPITEM, OnDisabledropitem) + //}}AFX_MSG_MAP + + ON_NOTIFY(SHBN_BEGINDRAGHEADER,IDC_SHORTCUT_BAR,OnBeginDragHeader) + ON_NOTIFY(SHBN_BEGINHEADEREDIT,IDC_SHORTCUT_BAR,OnBeginHeaderEdit) + ON_NOTIFY(SHBN_DELETEGROUP,IDC_SHORTCUT_BAR,OnDeleteGroup) + ON_NOTIFY(SHBN_ENDHEADEREDIT,IDC_SHORTCUT_BAR,OnEndHeaderEdit) + ON_NOTIFY(SHBN_GETHEADERINFOTIP,IDC_SHORTCUT_BAR,OnGetHeaderInfoTip) + ON_NOTIFY(SHBN_GROUPEXPANDED,IDC_SHORTCUT_BAR,OnGroupExpanded) + ON_NOTIFY(SHBN_GROUPEXPANDING,IDC_SHORTCUT_BAR,OnGroupExpanding) + ON_NOTIFY(SHBN_DRAWHEADER,IDC_SHORTCUT_BAR,OnDrawHeader) + ON_NOTIFY(SHBN_DROPGROUP,IDC_SHORTCUT_BAR,OnDropGroup) + + ON_NOTIFY(SHBN_BEGINDRAGITEM,IDC_SHORTCUT_BAR,OnBeginDragItem) + ON_NOTIFY(SHBN_BEGINITEMEDIT,IDC_SHORTCUT_BAR,OnBeginItemEdit) + ON_NOTIFY(SHBN_DELETEITEM,IDC_SHORTCUT_BAR,OnDeleteItem) + ON_NOTIFY(SHBN_DELETEALLITEMS,IDC_SHORTCUT_BAR,OnDeleteAllItems) + ON_NOTIFY(SHBN_ENDITEMEDIT,IDC_SHORTCUT_BAR,OnEndItemEdit) + ON_NOTIFY(SHBN_GETITEMINFOTIP,IDC_SHORTCUT_BAR,OnGetItemInfoTip) + ON_NOTIFY(SHBN_INSERTITEM,IDC_SHORTCUT_BAR,OnInsertItem) + ON_NOTIFY(SHBN_SELECTITEM,IDC_SHORTCUT_BAR,OnSelectItem) + ON_NOTIFY(SHBN_ACTIVATEITEM,IDC_SHORTCUT_BAR,OnActivateItem) + ON_NOTIFY(SHBN_HOTITEM,IDC_SHORTCUT_BAR,OnHotItem) + ON_NOTIFY(SHBN_DRAWITEM,IDC_SHORTCUT_BAR,OnDrawItem) + ON_NOTIFY(SHBN_DROP,IDC_SHORTCUT_BAR,OnDropItem) + ON_NOTIFY(SHBN_ENDDRAGDROPITEM,IDC_SHORTCUT_BAR,OnEndDragDropItem) + + ON_NOTIFY(SHBN_CONTEXTMENU,IDC_SHORTCUT_BAR,OnSHBContextMenu) + + ON_COMMAND(SHB_IDMPROPERTIES, OnSHBProperties) + +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarDlg message handlers + +BOOL CShortcutBarDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + InitShortcutBar(); + + GetVars(); + + m_LayoutManager.Attach(this); + + CRect rect; + GetClientRect(rect); + CRect rectBar; + m_ctlShortcutBar.GetWindowRect(rectBar); + ScreenToClient(rectBar); + m_LayoutManager.SetConstraint(IDC_SHORTCUT_BAR, OX_LMS_LEFT, OX_LMT_SAME, + rectBar.left-rect.left); + m_LayoutManager.SetConstraint(IDC_SHORTCUT_BAR, OX_LMS_TOP, OX_LMT_SAME, + rectBar.top-rect.top); + m_LayoutManager.SetConstraint(IDC_SHORTCUT_BAR, OX_LMS_RIGHT, OX_LMT_SAME, + rectBar.right-rect.right); + m_LayoutManager.SetConstraint(IDC_SHORTCUT_BAR, OX_LMS_BOTTOM, OX_LMT_SAME, + rectBar.bottom-rect.bottom); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CShortcutBarDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CShortcutBarDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CShortcutBarDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CShortcutBarDlg::OnAscending() +{ + // TODO: Add your control notification handler code here + + m_nSorting=1; + m_ctlShortcutBar.SortGroups(1); + m_ctlShortcutBar.RedrawBar(); + + UpdateData(FALSE); +} + +void CShortcutBarDlg::OnAutoscroll() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bAutoScroll) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_AUTOSCROLL); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_AUTOSCROLL); +} + +void CShortcutBarDlg::OnBoldexpandedgroup() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bBoldExpandedGroup) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_BOLDEXPANDEDGROUP); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_BOLDEXPANDEDGROUP); + m_ctlShortcutBar.RedrawBar(); +} + +void CShortcutBarDlg::OnDescending() +{ + // TODO: Add your control notification handler code here + + m_nSorting=2; + m_ctlShortcutBar.SortGroups(-1); + m_ctlShortcutBar.RedrawBar(); + + UpdateData(FALSE); +} + +void CShortcutBarDlg::OnDisableddragdropheader() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bDisableDragDropHeader) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_DISABLEDRAGDROPHEADER); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_DISABLEDRAGDROPHEADER); +} + +void CShortcutBarDlg::OnDisabledragitem() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bDisableDragItem) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()| + SHBS_DISABLEDRAGITEM); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()& + ~SHBS_DISABLEDRAGITEM); +} + +void CShortcutBarDlg::OnDisabledropitem() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bDisableDropItem) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()| + SHBS_DISABLEDROPITEM); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()& + ~SHBS_DISABLEDROPITEM); +} + +void CShortcutBarDlg::OnEditheaders() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bEditHeaders) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_EDITHEADERS); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_EDITHEADERS); +} + +void CShortcutBarDlg::OnEdititems() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bEditItems) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_EDITITEMS); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_EDITITEMS); +} + +void CShortcutBarDlg::OnHandlenotifications() +{ + // TODO: Add your control notification handler code here + + UpdateData(); +} + +void CShortcutBarDlg::OnInfotip() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bInfoTip) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_INFOTIP); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_INFOTIP); +} + +void CShortcutBarDlg::OnNoSort() +{ + // TODO: Add your control notification handler code here + + m_nSorting=0; + m_ctlShortcutBar.SortGroups(0); + m_ctlShortcutBar.RedrawBar(); + + UpdateData(FALSE); +} + +void CShortcutBarDlg::OnNoscroll() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bNoScroll) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_NOSCROLL); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_NOSCROLL); + m_ctlShortcutBar.RedrawBar(); +} + +void CShortcutBarDlg::OnShowactivealways() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bShowActiveAlways) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_SHOWACTIVEALWAYS); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_SHOWACTIVEALWAYS); + m_ctlShortcutBar.RedrawBar(); +} + +void CShortcutBarDlg::OnUnderlinehotitem() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bUnderlineHotItem) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_UNDERLINEHOTITEM); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_UNDERLINEHOTITEM); + m_ctlShortcutBar.RedrawBar(); +} + +void CShortcutBarDlg::InitShortcutBar() +{ + CWnd *pFrame=GetDlgItem(IDC_SHORTCUT_BAR); + CRect rcWnd; + pFrame->GetWindowRect(rcWnd); + pFrame->DestroyWindow(); //pFrame was just a placeholder anyway. + ScreenToClient(rcWnd); + m_ctlShortcutBar.Create(this,rcWnd,SHBS_EDITHEADERS|SHBS_EDITITEMS| + SHBS_DISABLEDRAGDROPITEM|SHBS_DISABLEDRAGDROPHEADER,IDC_SHORTCUT_BAR); + + // create tree control + m_tree.Create(TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_EDITLABELS, + CRect(0,0,0,0),&m_ctlShortcutBar,IDC_TREE); + + TV_INSERTSTRUCT tvstruct; + TCHAR rgszItems[][20]={_T("Mail Box"),_T("Calendar"),_T("Deleted Items"), + _T("Inbox"),_T("Journal"),_T("Notes"),_T("Outbox"),_T("Sent Items")}; + VERIFY(m_ilTree.Create(IDB_TREE,16,8,RGB(255,0,255))); + m_tree.SetImageList(&m_ilTree,TVSIL_NORMAL); + + HTREEITEM hParent=NULL; + int nIndex=0; + for(nIndex=0; nIndex<(sizeof(rgszItems)/sizeof(rgszItems[0])); nIndex++) + { + tvstruct.hParent=nIndex==0 ? NULL : hParent; + tvstruct.hInsertAfter=TVI_LAST; + tvstruct.item.iImage=nIndex; + tvstruct.item.iSelectedImage=nIndex; + tvstruct.item.pszText=rgszItems[nIndex]; + tvstruct.item.mask=TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_TEXT; + HTREEITEM hItem=m_tree.InsertItem(&tvstruct); + hParent=hParent==NULL ? hItem : hParent; + } + + + // populate shortcut bar + m_ctlShortcutBar.SetImageList(&m_ilTree); + + + + SHB_GROUPINFO shbGroup; + CString sText; + + // create image lists + VERIFY(m_ilLarge.Create(IDB_LARGE,32,11,RGB(128,128,128))); + VERIFY(m_ilSmall.Create(IDB_SMALL,16,11,RGB(128,128,128))); + + // outlook group + sText=_T("Outlook"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + m_ctlShortcutBar.InsertGroup(&shbGroup); + + // mail group + sText=_T("Mail"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + m_ctlShortcutBar.InsertGroup(&shbGroup); + + // group with tree control child window + sText=_T("Other"); + shbGroup.nMask=SHBIF_TEXT|SHBIF_CHILDWND; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + shbGroup.pszText[sText.GetLength()] = 0; + sText.ReleaseBuffer(); + shbGroup.hwndChild=m_tree.GetSafeHwnd(); + m_ctlShortcutBar.InsertGroup(&shbGroup); + + // fill standard list controls + TCHAR shbszItems[][20]={_T("Inbox"),_T("Calendar"),_T("Contracts"), + _T("Tasks"),_T("Journal"),_T("Notes"),_T("Deleted Items"),_T("Inbox"), + _T("Sent Items"),_T("Outbox"),_T("Deleted Items")}; + + // find outlook group and populate it + sText=_T("Outlook"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + HSHBGROUP hGroup=m_ctlShortcutBar.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_ctlShortcutBar.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_ctlShortcutBar.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + + for(int i=0 ; i<10; i++) + for(nIndex=0; nIndex<7 ; nIndex++) + { + CString sText=shbszItems[nIndex]; + m_ctlShortcutBar.InsertLCItem(hGroup,nIndex+7*i,sText,nIndex); + } + m_ctlShortcutBar.ExpandGroup(hGroup); + + // find mail group and populate it + sText=_T("Mail"); + shbGroup.nMask=SHBIF_TEXT; + shbGroup.nTextMax=sText.GetLength(); + shbGroup.pszText=sText.GetBuffer(shbGroup.nTextMax); + sText.ReleaseBuffer(); + hGroup=m_ctlShortcutBar.FindGroup(&shbGroup); + ASSERT(hGroup); + + m_ctlShortcutBar.SetLCImageList(hGroup,&m_ilLarge,LVSIL_NORMAL); + m_ctlShortcutBar.SetLCImageList(hGroup,&m_ilSmall,LVSIL_SMALL); + + for(nIndex=7; nIndex<(sizeof(shbszItems)/sizeof(shbszItems[0])); nIndex++) + { + CString sText=shbszItems[nIndex]; + LV_ITEM lvi; + lvi.iItem=nIndex-7; + lvi.iSubItem=0; + lvi.mask=LVIF_TEXT|LVIF_IMAGE; + lvi.iImage=nIndex; + lvi.cchTextMax=sText.GetLength(); + lvi.pszText=sText.GetBuffer(lvi.cchTextMax); + sText.ReleaseBuffer(); + m_ctlShortcutBar.InsertLCItem(hGroup,&lvi); + } + + DWORD dwBarStyle=m_ctlShortcutBar.GetBarStyle(); + dwBarStyle&=~(SHBS_DISABLEDRAGDROPHEADER|SHBS_DISABLEDRAGDROPITEM); + dwBarStyle|=SHBS_DRAWITEMDRAGIMAGE|SHBS_DRAWHEADERDRAGIMAGE|SHBS_INFOTIP| + SHBS_AUTOEXPAND|SHBS_ANIMATEEXPAND; + m_ctlShortcutBar.SetBarStyle(dwBarStyle); +} + +void CShortcutBarDlg::GetVars() +{ + m_bAutoScroll=(m_ctlShortcutBar.GetBarStyle()&SHBS_AUTOSCROLL)!=0; + m_bBoldExpandedGroup=(m_ctlShortcutBar.GetBarStyle()&SHBS_BOLDEXPANDEDGROUP)!=0; + m_bDisableDragDropHeader=(m_ctlShortcutBar.GetBarStyle()& + SHBS_DISABLEDRAGDROPHEADER)!=0; + m_bDisableDragItem=(m_ctlShortcutBar.GetBarStyle()& + SHBS_DISABLEDRAGITEM)!=0; + m_bDisableDropItem=(m_ctlShortcutBar.GetBarStyle()& + SHBS_DISABLEDROPITEM)!=0; + m_bDrawItemDragImage=(m_ctlShortcutBar.GetBarStyle()&SHBS_DRAWITEMDRAGIMAGE)!=0; + m_bDrawHeaderDragImage=(m_ctlShortcutBar.GetBarStyle()&SHBS_DRAWHEADERDRAGIMAGE)!=0; + m_bEditHeaders=(m_ctlShortcutBar.GetBarStyle()&SHBS_EDITHEADERS)!=0; + m_bEditItems=(m_ctlShortcutBar.GetBarStyle()&SHBS_EDITITEMS)!=0; + m_bInfoTip=(m_ctlShortcutBar.GetBarStyle()&SHBS_INFOTIP)!=0; + m_bNoScroll=(m_ctlShortcutBar.GetBarStyle()&SHBS_NOSCROLL)!=0; + m_bShowActiveAlways=(m_ctlShortcutBar.GetBarStyle()&SHBS_SHOWACTIVEALWAYS)!=0; + m_bUnderlineHotItem=(m_ctlShortcutBar.GetBarStyle()&SHBS_UNDERLINEHOTITEM)!=0; + m_bAutoExpand=(m_ctlShortcutBar.GetBarStyle()&SHBS_AUTOEXPAND)!=0; + m_bAnimateExpand=(m_ctlShortcutBar.GetBarStyle()&SHBS_ANIMATEEXPAND)!=0; + + HSHBGROUP hGroup=m_ctlShortcutBar.GetExpandedGroup(); + int nCount= PtrToInt(m_ctlShortcutBar.GetGroupCount()); + if(nCount==0) + m_sDescription=_T("There is no groups in the shortcut bar"); + else + { + CString sGroupCount; + if(nCount>1) + sGroupCount.Format(_T("There are %d groups in the shortcut bar."),nCount); + else + sGroupCount.Format(_T("There is 1 group in the shortcut bar.")); + + if(hGroup==NULL) + m_sDescription.Format(_T("%s There is no any expanded group."),sGroupCount); + else + m_sDescription.Format(_T("%s Group %s is expanded, it's order is %d. Child window is %s and it is in %s view."), + sGroupCount,m_ctlShortcutBar.GetGroupText(hGroup), + m_ctlShortcutBar.GetGroupOrder(hGroup), + ((m_ctlShortcutBar.GetGroupChildWnd(hGroup)==NULL) ? + _T("standard list control") : _T("special defined window")), + ((m_ctlShortcutBar.GetGroupView(hGroup)==SHB_LARGEICON) ? + _T("Large Icons") : _T("Small Icons"))); + } + + UpdateData(FALSE); + + ShowControls(); +} + +void CShortcutBarDlg::ShowControls() +{ +} + +void CShortcutBarDlg::OnBeginDragHeader(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnBeginDragHeader - SHBN_BEGINDRAGHEADER\n")); + + *result=0; +} + +void CShortcutBarDlg::OnBeginHeaderEdit(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnBeginHeaderEdit - SHBN_BEGINHEADEREDIT\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDeleteGroup(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDeleteGroup - SHBN_DELETEGROUP\n")); + + GetVars(); + UpdateData(); + + *result=0; +} + +void CShortcutBarDlg::OnEndHeaderEdit(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnEndHeaderEdit - SHBN_ENDHEADEREDIT\n")); + + *result=0; +} + +void CShortcutBarDlg::OnGetHeaderInfoTip(NMHDR* pNotifyStruct, LRESULT* result) +{ + if(m_bHandleNotifications) + TRACE(_T("OnGetHeaderInfoTip - SHBN_GETHEADERINFOTIP\n")); + + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + HSHBGROUP hGroup=pNMSHB->hGroup; + CString sText; + sText.Format(_T("Tooltip for group '%s' which order is - %d"), + m_ctlShortcutBar.GetGroupText(hGroup),m_ctlShortcutBar.GetGroupOrder(hGroup)); + + LPSHBINFOTIP pSHBIT=(LPSHBINFOTIP)pNMSHB->lParam; + UTBStr::tcsncpy(pSHBIT->szText,countof(pSHBIT->szText),sText.GetBuffer(sText.GetLength()),countof(pSHBIT->szText)); + sText.ReleaseBuffer(); + + *result=1; +} + +void CShortcutBarDlg::OnGroupExpanded(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnGroupExpanded - SHBN_GROUPEXPANDED\n")); + + GetVars(); + UpdateData(); + + *result=0; +} + +void CShortcutBarDlg::OnGroupExpanding(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnGroupExpanding - SHBN_GROUPEXPANDING\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDrawHeader(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDrawHeader - SHBN_DRAWHEADER\n")); + + *result=0; +} + + +void CShortcutBarDlg::OnBeginDragItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnBeginDragItem - SHBN_BEGINDRAGITEM\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDropGroup(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDropGroup - SHBN_DROPGROUP\n")); + + *result=0; +} + +void CShortcutBarDlg::OnBeginItemEdit(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnBeginItemEdit - SHBN_BEGINITEMEDIT\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDeleteItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDeleteItem - SHBN_DELETEITEM\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDeleteAllItems(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDeleteAllItems - SHBN_DELETEALLITEMS\n")); + + *result=0; +} + +void CShortcutBarDlg::OnEndItemEdit(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnEndItemEdit - SHBN_ENDITEMEDIT\n")); + + *result=0; +} + +void CShortcutBarDlg::OnGetItemInfoTip(NMHDR* pNotifyStruct, LRESULT* result) +{ + if(m_bHandleNotifications) + TRACE(_T("OnGetItemInfoTip - SHBN_GETITEMINFOTIP\n")); + + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + int nItem=pNMSHB->nItem; + CString sText; + sText.Format(_T("Tooltip for item '%s'"), + m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)->GetItemText(nItem,0)); + + LPSHBINFOTIP pSHBIT=(LPSHBINFOTIP)pNMSHB->lParam; + UTBStr::tcsncpy(pSHBIT->szText,countof(pSHBIT->szText),sText.GetBuffer(sText.GetLength()),countof(pSHBIT->szText)); + sText.ReleaseBuffer(); + + *result=0; +} + +void CShortcutBarDlg::OnInsertItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + if(m_bHandleNotifications) + TRACE(_T("OnInsertItem - SHBN_INSERTITEM\n")); + + static DWORD lParam=0; + if(m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)-> + GetItemData(pNMSHB->nItem)==0) + { + lParam++; + m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)-> + SetItemData(pNMSHB->nItem,lParam); + } + + GetVars(); + UpdateData(); + + if(m_bItemDroped) + m_dwDropedItemData=m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)-> + GetItemData(pNMSHB->nItem); + *result=0; +} + +void CShortcutBarDlg::OnSelectItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + if(m_bHandleNotifications) + TRACE(_T("OnSelectItem - SHBN_SELECTITEM\n")); + + if(pNMSHB->nItem!=-1) + m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup)-> + GetItemData(pNMSHB->nItem); + + *result=0; +} + +void CShortcutBarDlg::OnActivateItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnActivateItem - SHBN_ACTIVATEITEM\n")); + + *result=0; +} + +void CShortcutBarDlg::OnHotItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnHotItem - SHBN_HOTITEM\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDrawItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDrawItem - SHBN_DRAWITEM\n")); + + *result=0; +} + +void CShortcutBarDlg::OnDropItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + UNREFERENCED_PARAMETER(pNotifyStruct); + + if(m_bHandleNotifications) + TRACE(_T("OnDropItem - SHBN_DROP\n")); + + m_bItemDroped=TRUE; + + *result=0; +} + +void CShortcutBarDlg::OnEndDragDropItem(NMHDR* pNotifyStruct, LRESULT* result) +{ + LPNMSHORTCUTBAR pNMSHB=(LPNMSHORTCUTBAR)pNotifyStruct; + ASSERT(pNMSHB!=NULL); + + if(m_bHandleNotifications) + TRACE(_T("OnEndDragDropItem - SHBN_ENDDRAGDROPITEM\n")); + + if(m_bItemDroped && (DROPEFFECT)pNMSHB->lParam!=DROPEFFECT_NONE) + { + COXSHBListCtrl* pListCtrl=m_ctlShortcutBar.GetGroupListCtrl(pNMSHB->hGroup); + ASSERT(pListCtrl); + + LV_FINDINFO lvfi; + lvfi.flags=LVFI_PARAM; + lvfi.lParam=m_dwDropedItemData; + int nItem=pListCtrl->FindItem(&lvfi); + ASSERT(nItem!=-1); + + if(pListCtrl->GetItemText(nItem,0).IsEmpty()) + pListCtrl->PostMessage(LVM_EDITLABEL,(WPARAM)nItem); + } + m_bItemDroped=FALSE; + + *result=0; +} + + +void CShortcutBarDlg::OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* result) +{ + if(m_bHandleNotifications) + TRACE(_T("OnSHBContextMenu - SHBN_CONTEXTMENU\n")); + + LPSHBCONTEXTMENU pSHBCM= + (LPSHBCONTEXTMENU)((LPNMSHORTCUTBAR)pNotifyStruct)->lParam; + if(pSHBCM->pShortcutBar==&m_ctlShortcutBar && + m_ctlShortcutBar.GetExpandedGroup()!=NULL) + { + CMenu* pMenu=pSHBCM->pMenu; + if(pMenu->GetMenuItemCount()>0) + pMenu->AppendMenu(MF_SEPARATOR); + pMenu->AppendMenu(MF_STRING,SHB_IDMPROPERTIES,_T("Properties...")); + } + + *result=0; +} + +void CShortcutBarDlg::OnSHBProperties() +{ + CSHBPropertiesDlg propertiesDlg(&m_ctlShortcutBar); + propertiesDlg.DoModal(); +} + +void CShortcutBarDlg::OnAutoexpand() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bAutoExpand) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_AUTOEXPAND); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_AUTOEXPAND); +} + +void CShortcutBarDlg::OnAnimateexpand() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bAnimateExpand) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_ANIMATEEXPAND); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_ANIMATEEXPAND); +} + +void CShortcutBarDlg::OnDrawitemdragimage() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bDrawItemDragImage) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_DRAWITEMDRAGIMAGE); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_DRAWITEMDRAGIMAGE); +} + +void CShortcutBarDlg::OnDrawheaderdragimage() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData()) + return; + + if(m_bDrawHeaderDragImage) + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()|SHBS_DRAWHEADERDRAGIMAGE); + else + m_ctlShortcutBar.SetBarStyle(m_ctlShortcutBar.GetBarStyle()&~SHBS_DRAWHEADERDRAGIMAGE); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.h new file mode 100644 index 0000000..369920d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarDlg.h @@ -0,0 +1,135 @@ +// ShortcutBarDlg.h : header file +// + +#if !defined(AFX_SHORTCUTBARDLG_H__427CC91A_FEDC_11D1_8872_0080C83F712F__INCLUDED_) +#define AFX_SHORTCUTBARDLG_H__427CC91A_FEDC_11D1_8872_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXShortcutBar.h" +#include "OXLayoutManager.h" +#include "UTB64Bit.h" + +#define IDC_TREE 1000 +#define SHB_IDMPROPERTIES SHB_IDMUSER+1 + +///////////////////////////////////////////////////////////////////////////// +// CShortcutBarDlg dialog + +class CShortcutBarDlg : public CDialog +{ +// Construction +public: + CShortcutBarDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CShortcutBarDlg) + enum { IDD = IDD_SHORTCUTBAR_DIALOG }; + COXShortcutBar m_ctlShortcutBar; + BOOL m_bAutoScroll; + BOOL m_bBoldExpandedGroup; + CString m_sDescription; + BOOL m_bDisableDragDropHeader; + BOOL m_bEditHeaders; + BOOL m_bEditItems; + BOOL m_bHandleNotifications; + BOOL m_bInfoTip; + int m_nSorting; + BOOL m_bNoScroll; + BOOL m_bShowActiveAlways; + BOOL m_bUnderlineHotItem; + BOOL m_bAnimateExpand; + BOOL m_bAutoExpand; + BOOL m_bDrawHeaderDragImage; + BOOL m_bDrawItemDragImage; + BOOL m_bDisableDragItem; + BOOL m_bDisableDropItem; + //}}AFX_DATA + CImageList m_ilLarge; + CImageList m_ilSmall; + + CTreeCtrl m_tree; + CImageList m_ilTree; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CShortcutBarDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXLayoutManager m_LayoutManager; + + BOOL m_bItemDroped; + DWORD_PTR m_dwDropedItemData; + + void InitShortcutBar(); + void GetVars(); + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CShortcutBarDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnAscending(); + afx_msg void OnAutoscroll(); + afx_msg void OnBoldexpandedgroup(); + afx_msg void OnDescending(); + afx_msg void OnDisableddragdropheader(); + afx_msg void OnEditheaders(); + afx_msg void OnEdititems(); + afx_msg void OnHandlenotifications(); + afx_msg void OnInfotip(); + afx_msg void OnNoSort(); + afx_msg void OnNoscroll(); + afx_msg void OnShowactivealways(); + afx_msg void OnUnderlinehotitem(); + afx_msg void OnAutoexpand(); + afx_msg void OnAnimateexpand(); + afx_msg void OnDrawitemdragimage(); + afx_msg void OnDrawheaderdragimage(); + afx_msg void OnDisabledragitem(); + afx_msg void OnDisabledropitem(); + //}}AFX_MSG + + afx_msg void OnBeginDragHeader(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnBeginHeaderEdit(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDeleteGroup(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnEndHeaderEdit(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnGetHeaderInfoTip(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnGroupExpanded(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnGroupExpanding(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDrawHeader(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDropGroup(NMHDR* pNotifyStruct, LRESULT* result); + + afx_msg void OnBeginDragItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnBeginItemEdit(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDeleteItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDeleteAllItems(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnEndItemEdit(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnGetItemInfoTip(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnInsertItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnSelectItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnActivateItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnHotItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDrawItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnDropItem(NMHDR* pNotifyStruct, LRESULT* result); + afx_msg void OnEndDragDropItem(NMHDR* pNotifyStruct, LRESULT* result); + + afx_msg void OnSHBContextMenu(NMHDR* pNotifyStruct, LRESULT* result); + + afx_msg void OnSHBProperties(); + + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SHORTCUTBARDLG_H__427CC91A_FEDC_11D1_8872_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarInfo.rtf new file mode 100644 index 0000000..3ad0dd8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/ShortcutBarInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.cpp new file mode 100644 index 0000000..1d7ec78 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ShortcutBar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.h new file mode 100644 index 0000000..1a3d683 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__427CC91C_FEDC_11D1_8872_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__427CC91C_FEDC_11D1_8872_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__427CC91C_FEDC_11D1_8872_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.rc2 new file mode 100644 index 0000000..0458ccd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/ShortcutBar.rc2 @@ -0,0 +1,13 @@ +// +// SHORTCUTBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/TreeImages.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/TreeImages.bmp new file mode 100644 index 0000000..a54ea46 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/TreeImages.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/large.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/large.bmp new file mode 100644 index 0000000..9088f99 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/large.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/small.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/small.bmp new file mode 100644 index 0000000..1fcabdd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/res/small.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/resource.h new file mode 100644 index 0000000..e2f3c56 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/Shortcutbar/resource.h @@ -0,0 +1,66 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ShortcutBar.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SHORTCUTBAR_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDB_LARGE 129 +#define ID_DESCRIPTION_FILE 129 +#define IDB_SMALL 130 +#define IDB_TREE 131 +#define IDD_SHBPROPERTIES_DIALOG 132 +#define IDC_SHORTCUT_BAR 1001 +#define IDC_SCROLL_DOWN 1004 +#define IDC_SCROLL_UP 1005 +#define IDC_EDIT1 1006 +#define IDC_DESCRIPTION 1007 +#define IDC_DISABLEDRAGITEM 1008 +#define IDC_DISABLEDDRAGDROPHEADER 1009 +#define IDC_EDITITEMS 1010 +#define IDC_EDITHEADERS 1011 +#define IDC_INFOTIP 1012 +#define IDC_NOSCROLL 1013 +#define IDC_BOLDEXPANDEDGROUP 1014 +#define IDC_UNDERLINEHOTITEM 1015 +#define IDC_SHOWACTIVEALWAYS 1016 +#define IDC_DRAWDRAGIMAGE 1017 +#define IDC_DRAWHEADERDRAGIMAGE 1017 +#define IDC_AUTOSCROLL 1018 +#define IDC_NO_SORT 1019 +#define IDC_ASCENDING 1020 +#define IDC_DESCENDING 1021 +#define IDC_HANDLENOTIFICATIONS 1022 +#define IDC_CLRBACK 1023 +#define IDC_ANIMATEEXPAND 1023 +#define IDC_TEXTFONT 1024 +#define IDC_AUTOEXPAND 1024 +#define IDC_DRAWITEMDRAGIMAGE 1025 +#define IDC_HDRCLRBACK 1026 +#define IDC_DISABLEDROPITEM 1026 +#define IDC_NAMETEXTFONT 1027 +#define IDC_CHECK_APPLYTOEXPANDED 1028 +#define IDC_EDIT_GRPMARGIN 1029 +#define IDC_HDRFONT 1030 +#define IDC_LIST_TEST 1030 +#define IDC_NAMEHDRFONT 1031 +#define IDC_EDIT_LEFTMARGIN 1032 +#define IDC_EDIT_TOPMARGIN 1033 +#define IDC_EDIT_RIGHTMARGIN 1034 +#define IDC_EDIT_BOTTOMMARGIN 1035 +#define IDC_EDIT_SCROLLBTNWIDTH 1036 +#define IDC_EDIT_SCROLLBTNHEIGHT 1037 +#define IDC_EDIT_HDRHEIGHT 1038 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 135 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1031 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.cpp new file mode 100644 index 0000000..77e88fe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.cpp @@ -0,0 +1,143 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "SideBySideToolbars.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_BUTTON1, OnButton1) + ON_COMMAND(ID_BUTTON2, OnButton2) + ON_COMMAND(ID_BUTTON3, OnButton3) + ON_COMMAND(ID_BUTTON4, OnButton4) + //}}AFX_MSG_MAP +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 (CFrameWnd::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_wndToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP + | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar1.LoadToolBar(IDR_TOOLBAR1)) + { + 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); + m_wndToolBar1.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + m_wndToolBar1.DockControlBarLeftOf(&m_wndToolBar); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + + +void CMainFrame::OnButton1() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnButton2() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnButton3() +{ + // TODO: Add your command handler code here + +} + +void CMainFrame::OnButton4() +{ + // TODO: Add your command handler code here + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.h new file mode 100644 index 0000000..a5339fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/MainFrm.h @@ -0,0 +1,63 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__A626721A_A1E9_43B0_B3D2_6091937617DA__INCLUDED_) +#define AFX_MAINFRM_H__A626721A_A1E9_43B0_B3D2_6091937617DA__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXCoolToolbar.h" + +class CMainFrame : public CFrameWnd +{ + +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + COXCoolToolBar m_wndToolBar1; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnButton1(); + afx_msg void OnButton2(); + afx_msg void OnButton3(); + afx_msg void OnButton4(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__A626721A_A1E9_43B0_B3D2_6091937617DA__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/ReadMe.txt new file mode 100644 index 0000000..ce269ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/ReadMe.txt @@ -0,0 +1,105 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : SideBySideToolbars +======================================================================== + + +AppWizard has created this SideBySideToolbars 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 SideBySideToolbars application. + +SideBySideToolbars.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +SideBySideToolbars.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSideBySideToolbarsApp application class. + +SideBySideToolbars.cpp + This is the main application source file that contains the application + class CSideBySideToolbarsApp. + +SideBySideToolbars.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++. + +SideBySideToolbars.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\SideBySideToolbars.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file SideBySideToolbars.rc. + +res\SideBySideToolbars.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. + + + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +MainFrm.h, MainFrm.cpp + These files contain the frame class CMainFrame, which is derived from + CFrameWnd and controls all SDI 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 SideBySideToolbars.rc to add + toolbar buttons. +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +SideBySideToolbarsDoc.h, SideBySideToolbarsDoc.cpp - the document + These files contain your CSideBySideToolbarsDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CSideBySideToolbarsDoc::Serialize). + +SideBySideToolbarsView.h, SideBySideToolbarsView.cpp - the view of the document + These files contain your CSideBySideToolbarsView class. + CSideBySideToolbarsView objects are used to view CSideBySideToolbarsDoc objects. + + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named SideBySideToolbars.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.cpp new file mode 100644 index 0000000..86ac06c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.cpp @@ -0,0 +1,155 @@ +// SideBySideToolbars.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SideBySideToolbars.h" + +#include "MainFrm.h" +#include "SideBySideToolbarsDoc.h" +#include "SideBySideToolbarsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsApp + +BEGIN_MESSAGE_MAP(CSideBySideToolbarsApp, CWinApp) + //{{AFX_MSG_MAP(CSideBySideToolbarsApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsApp construction + +CSideBySideToolbarsApp::CSideBySideToolbarsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSideBySideToolbarsApp object + +CSideBySideToolbarsApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsApp initialization + +BOOL CSideBySideToolbarsApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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. + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CSideBySideToolbarsDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CSideBySideToolbarsView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The one and only window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + + return TRUE; +} + + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CSideBySideToolbarsApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsApp message handlers + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsp new file mode 100644 index 0000000..9c6af3f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsp @@ -0,0 +1,292 @@ +# Microsoft Developer Studio Project File - Name="SideBySideToolbars" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SideBySideToolbars - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SideBySideToolbars.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SideBySideToolbars.mak" CFG="SideBySideToolbars - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SideBySideToolbars - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SideBySideToolbars - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SideBySideToolbars - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "SideBySideToolbars - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "SideBySideToolbars - Win32 Release" +# Name "SideBySideToolbars - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Ultimate ToolBox Source" + +# PROP Default_Filter "*.cpp" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbars.cpp +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbars.rc +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbarsDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbarsView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbars.h +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbarsDoc.h +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbarsView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\SideBySideToolbars.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SideBySideToolbars.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\SideBySideToolbarsDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\SideBySideToolbars.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsw new file mode 100644 index 0000000..5472b18 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SideBySideToolbars"=".\SideBySideToolbars.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/SideBySideToolbars", HIJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.h new file mode 100644 index 0000000..d9956c0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.h @@ -0,0 +1,49 @@ +// SideBySideToolbars.h : main header file for the SIDEBYSIDETOOLBARS application +// + +#if !defined(AFX_SIDEBYSIDETOOLBARS_H__CBFF3C32_86AA_4263_9145_FC903122B611__INCLUDED_) +#define AFX_SIDEBYSIDETOOLBARS_H__CBFF3C32_86AA_4263_9145_FC903122B611__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsApp: +// See SideBySideToolbars.cpp for the implementation of this class +// + +class CSideBySideToolbarsApp : public CWinApp +{ +public: + CSideBySideToolbarsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSideBySideToolbarsApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CSideBySideToolbarsApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SIDEBYSIDETOOLBARS_H__CBFF3C32_86AA_4263_9145_FC903122B611__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.rc new file mode 100644 index 0000000..2b1f341 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.rc @@ -0,0 +1,396 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\SideBySideToolbars.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. +IDR_MAINFRAME ICON "res\\SideBySideToolbars.ico" +IDR_SIDEBYTYPE ICON "res\\SideBySideToolbarsDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDR_TOOLBAR1 BITMAP "res\\toolbar1.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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_TOOLBAR1 TOOLBAR 16, 15 +BEGIN + BUTTON ID_BUTTON1 + BUTTON ID_BUTTON2 + BUTTON ID_BUTTON3 + BUTTON ID_BUTTON4 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + 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 "&Help" + BEGIN + MENUITEM "&About SideBySideToolbars...", 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 DIALOG 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About SideBySideToolbars" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "SideBySideToolbars Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2002",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,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 "040904B0" + BEGIN + VALUE "FileDescription", "SideBySideToolbars MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "SideBySideToolbars" + VALUE "LegalCopyright", "Copyright (C) 2002" + VALUE "OriginalFilename", "SideBySideToolbars.EXE" + VALUE "ProductName", "SideBySideToolbars Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + 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 + IDR_MAINFRAME "SideBySideToolbars\n\nSideBy\n\n\nSideBySideToolbars.Document\nSideBy Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "SideBySideToolbars" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + ID_WINDOW_SPLIT "Split the active window into panes\nSplit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\SideBySideToolbars.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.vcproj new file mode 100644 index 0000000..854b24e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbars.vcproj @@ -0,0 +1,964 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.cpp new file mode 100644 index 0000000..43ca1ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.cpp @@ -0,0 +1,84 @@ +// SideBySideToolbarsDoc.cpp : implementation of the CSideBySideToolbarsDoc class +// + +#include "stdafx.h" +#include "SideBySideToolbars.h" + +#include "SideBySideToolbarsDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsDoc + +IMPLEMENT_DYNCREATE(CSideBySideToolbarsDoc, CDocument) + +BEGIN_MESSAGE_MAP(CSideBySideToolbarsDoc, CDocument) + //{{AFX_MSG_MAP(CSideBySideToolbarsDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsDoc construction/destruction + +CSideBySideToolbarsDoc::CSideBySideToolbarsDoc() +{ + // TODO: add one-time construction code here + +} + +CSideBySideToolbarsDoc::~CSideBySideToolbarsDoc() +{ +} + +BOOL CSideBySideToolbarsDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsDoc serialization + +void CSideBySideToolbarsDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsDoc diagnostics + +#ifdef _DEBUG +void CSideBySideToolbarsDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CSideBySideToolbarsDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.h new file mode 100644 index 0000000..9dbb929 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsDoc.h @@ -0,0 +1,57 @@ +// SideBySideToolbarsDoc.h : interface of the CSideBySideToolbarsDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SIDEBYSIDETOOLBARSDOC_H__CF4D52F1_FC9A_46C5_83CF_D6BDEACFF985__INCLUDED_) +#define AFX_SIDEBYSIDETOOLBARSDOC_H__CF4D52F1_FC9A_46C5_83CF_D6BDEACFF985__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CSideBySideToolbarsDoc : public CDocument +{ +protected: // create from serialization only + CSideBySideToolbarsDoc(); + DECLARE_DYNCREATE(CSideBySideToolbarsDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSideBySideToolbarsDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSideBySideToolbarsDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CSideBySideToolbarsDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SIDEBYSIDETOOLBARSDOC_H__CF4D52F1_FC9A_46C5_83CF_D6BDEACFF985__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.cpp new file mode 100644 index 0000000..5cfc72d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.cpp @@ -0,0 +1,104 @@ +// SideBySideToolbarsView.cpp : implementation of the CSideBySideToolbarsView class +// + +#include "stdafx.h" +#include "SideBySideToolbars.h" + +#include "SideBySideToolbarsDoc.h" +#include "SideBySideToolbarsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView + +IMPLEMENT_DYNCREATE(CSideBySideToolbarsView, CView) + +BEGIN_MESSAGE_MAP(CSideBySideToolbarsView, CView) + //{{AFX_MSG_MAP(CSideBySideToolbarsView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView construction/destruction + +CSideBySideToolbarsView::CSideBySideToolbarsView() +{ + // TODO: add construction code here + +} + +CSideBySideToolbarsView::~CSideBySideToolbarsView() +{ +} + +BOOL CSideBySideToolbarsView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView drawing + +void CSideBySideToolbarsView::OnDraw(CDC* pDC) +{ + CSideBySideToolbarsDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView printing + +BOOL CSideBySideToolbarsView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CSideBySideToolbarsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CSideBySideToolbarsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView diagnostics + +#ifdef _DEBUG +void CSideBySideToolbarsView::AssertValid() const +{ + CView::AssertValid(); +} + +void CSideBySideToolbarsView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CSideBySideToolbarsDoc* CSideBySideToolbarsView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSideBySideToolbarsDoc))); + return (CSideBySideToolbarsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSideBySideToolbarsView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.h new file mode 100644 index 0000000..7554b61 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/SideBySideToolbarsView.h @@ -0,0 +1,67 @@ +// SideBySideToolbarsView.h : interface of the CSideBySideToolbarsView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SIDEBYSIDETOOLBARSVIEW_H__09162242_5044_44AB_A504_766AC6324B49__INCLUDED_) +#define AFX_SIDEBYSIDETOOLBARSVIEW_H__09162242_5044_44AB_A504_766AC6324B49__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CSideBySideToolbarsView : public CView +{ +protected: // create from serialization only + CSideBySideToolbarsView(); + DECLARE_DYNCREATE(CSideBySideToolbarsView) + +// Attributes +public: + CSideBySideToolbarsDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSideBySideToolbarsView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CSideBySideToolbarsView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CSideBySideToolbarsView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in SideBySideToolbarsView.cpp +inline CSideBySideToolbarsDoc* CSideBySideToolbarsView::GetDocument() + { return (CSideBySideToolbarsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SIDEBYSIDETOOLBARSVIEW_H__09162242_5044_44AB_A504_766AC6324B49__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.cpp new file mode 100644 index 0000000..5937b2b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// SideBySideToolbars.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.h new file mode 100644 index 0000000..bc7fe4a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__84F20BA9_33D7_4C85_A9F4_4671F560B2B7__INCLUDED_) +#define AFX_STDAFX_H__84F20BA9_33D7_4C85_A9F4_4671F560B2B7__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#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 + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__84F20BA9_33D7_4C85_A9F4_4671F560B2B7__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.rc2 new file mode 100644 index 0000000..7084b7b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbars.rc2 @@ -0,0 +1,13 @@ +// +// SIDEBYSIDETOOLBARS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbarsDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbarsDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/SideBySideToolbarsDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/toolbar1.bmp new file mode 100644 index 0000000..c2de5df Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/resource.h new file mode 100644 index 0000000..f71e691 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/SideBySideToolbars/resource.h @@ -0,0 +1,24 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SideBySideToolbars.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_SIDEBYTYPE 129 +#define IDR_TOOLBAR1 130 +#define ID_BUTTON1 32771 +#define ID_BUTTON2 32772 +#define ID_BUTTON3 32773 +#define ID_BUTTON4 32774 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32775 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.cpp new file mode 100644 index 0000000..5cd0047 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Statusbar.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.cpp new file mode 100644 index 0000000..0d7aa32 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.cpp @@ -0,0 +1,201 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Statusbar.h" + +#include "MainFrm.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + ON_WM_TIMER() + ON_WM_CLOSE() + //}}AFX_MSG_MAP + + ON_MESSAGE(WM_STAT_DBLCLICK, OnClickStatusBar) + +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_XFER, + ID_INDICATOR_MAIL, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, + ID_INDICATOR_CT, +}; + +///////////////////////////////////////////////////////////////////////////// +// 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.Create(this) || + !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 + } + + UINT nID, nStyle; + int cxWidth; + m_wndStatusBar.GetPaneInfo( 1, nID, nStyle, cxWidth); + nStyle |= SBPS_PERCENT; + m_wndStatusBar.SetPaneInfo( 1, nID, nStyle, 100); + + ShowWindow(SW_SHOW); + if (!m_wndStatusBar.SetUpBar(1, TRUE, TRUE)) + { + return -1; + } + + if (SetTimer(1, 1000, NULL) == 0) + { + TRACE(_T("*** ERROR not able to set Timer in OnCreate\n")); + return -1; + } + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::OnTimer(UINT nIDEvent) + { + if(nIDEvent == 1) + { + TCHAR buffer[30]; + + time_t lTime; + struct tm datetime; + + time(&lTime); + +#if _MSC_VER >=1400 + localtime_s(&datetime, &lTime); +#else + datetime = *localtime(&lTime); +#endif + wsprintf(buffer, _T("%02.2d:%02.2d:%02.2d"), + datetime.tm_hour, datetime.tm_min, datetime.tm_sec); + + if (datetime.tm_sec == 0 || datetime.tm_sec == 30) + { + m_wndStatusBar.ResetBar(1); + m_wndStatusBar.SetBarProgress(1, TRUE, 30, 0); + } + else + { + m_wndStatusBar.SetBarProgress(1, TRUE, 31, datetime.tm_sec % 30); + } + + if((datetime.tm_sec % 2) == 0) + m_wndStatusBar.SetPaneText( 5, (LPCTSTR)buffer, RGB(255,0,0), TRUE); + else + m_wndStatusBar.SetPaneText( 5, (LPCTSTR)buffer); + + } + + CMDIFrameWnd::OnTimer(nIDEvent); + } + +void CMainFrame::OnClose() +{ + KillTimer(1); + + CMDIFrameWnd::OnClose(); +} + +LRESULT CMainFrame::OnClickStatusBar(WPARAM wParam, LPARAM lParam) + { + UNREFERENCED_PARAMETER(lParam); + if (wParam != NULL) + { + switch(wParam) + { + case ID_INDICATOR_MAIL: +// if(time(0)%2) +// m_wndStatusBar.SetPaneBitmap(2, IDB_NEWMAIL, EO_CenterFit, RGB(0,128,128)); + m_wndStatusBar.SetPaneBitmap(2, IDB_GREEN_LIGHT, EO_CenterFit, RGB(0,128,128)); +// else +// m_wndStatusBar.SetPaneBitmap(2, IDB_RED_LIGHT, EO_CenterFit, RGB(0,128,128)); + break; + default: + break; + } + } + + return 0L; + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.h new file mode 100644 index 0000000..360ae6d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/MainFrm.h @@ -0,0 +1,52 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#include "xstatus4.h" + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + COXStatusBar m_wndStatusBar; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + CToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnClose(); + //}}AFX_MSG + + afx_msg LRESULT OnClickStatusBar(WPARAM wParam, LPARAM lParam); // user message + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusarInfo.rtf new file mode 100644 index 0000000..86576b7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusarInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.clw new file mode 100644 index 0000000..bc4ded1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.clw @@ -0,0 +1,198 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CStatusbarView +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "statusbar.h" +LastPage=0 + +ClassCount=5 +Class1=CChildFrame +Class2=CMainFrame +Class3=CStatusbarApp +Class4=CStatusbarDoc +Class5=CStatusbarView + +ResourceCount=6 +Resource1=IDR_MAINFRAME +Resource2=IDR_STATUSTYPE +Resource3=IDD_STATUSBAR_FORM +Resource4=IDR_MAINFRAME (English (U.S.)) +Resource5=IDR_STATUSTYPE (English (U.S.)) +Resource6=IDD_STATUSBAR_FORM (English (U.S.)) + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CStatusbarApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Statusbar.h +ImplementationFile=Statusbar.cpp +Filter=N +VirtualFilter=AC +LastObject=CStatusbarApp + +[CLS:CStatusbarDoc] +Type=0 +BaseClass=CDocument +HeaderFile=StatusbarDoc.h +ImplementationFile=StatusbarDoc.cpp + +[CLS:CStatusbarView] +Type=0 +BaseClass=CFormView +HeaderFile=StatusbarView.h +ImplementationFile=StatusbarView.cpp +LastObject=IDC_APPLYBUTTON + +[DLG:IDD_STATUSBAR_FORM] +Type=1 +Class=CStatusbarView +ControlCount=14 +Control1=IDC_FONTCHECK,button,1342242819 +Control2=IDC_CURSORCHECK,button,1342242819 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_STRETCHRADIO,button,1342308361 +Control5=IDC_LFITRADIO,button,1342177289 +Control6=IDC_CFITRADIO,button,1342177289 +Control7=IDC_RFITRADIO,button,1342177289 +Control8=IDC_LCLIPRADIO,button,1342177289 +Control9=IDC_CCLIPRADIO,button,1342177289 +Control10=IDC_RCLIPRADIO2,button,1342177289 +Control11=IDC_APPLYBUTTON,button,1342373888 +Control12=IDC_CHECK1,button,1342242819 +Control13=IDC_CHECK3,button,1342242819 +Control14=IDC_CHECK4,button,1342242819 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_ABOUT +CommandCount=2 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_TOOLBAR +Command4=ID_VIEW_STATUS_BAR +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_STATUSTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_CLOSE +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_WINDOW_NEW +Command7=ID_WINDOW_CASCADE +Command8=ID_WINDOW_TILE_HORZ +Command9=ID_WINDOW_ARRANGE +Command10=ID_APP_ABOUT +CommandCount=10 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[DLG:IDD_STATUSBAR_FORM (English (U.S.))] +Type=1 +Class=CStatusbarView +ControlCount=14 +Control1=IDC_FONTCHECK,button,1342242819 +Control2=IDC_CURSORCHECK,button,1342242819 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_STRETCHRADIO,button,1342308361 +Control5=IDC_LFITRADIO,button,1342177289 +Control6=IDC_CFITRADIO,button,1342177289 +Control7=IDC_RFITRADIO,button,1342177289 +Control8=IDC_LCLIPRADIO,button,1342177289 +Control9=IDC_CCLIPRADIO,button,1342177289 +Control10=IDC_RCLIPRADIO2,button,1342177289 +Control11=IDC_APPLYBUTTON,button,1342373888 +Control12=IDC_CHECK1,button,1342242819 +Control13=IDC_CHECK3,button,1342242819 +Control14=IDC_CHECK4,button,1342242819 + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_ABOUT +CommandCount=2 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_TOOLBAR +Command4=ID_VIEW_STATUS_BAR +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_STATUSTYPE (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_CLOSE +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_WINDOW_NEW +Command7=ID_WINDOW_CASCADE +Command8=ID_WINDOW_TILE_HORZ +Command9=ID_WINDOW_ARRANGE +Command10=ID_APP_ABOUT +CommandCount=10 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.cpp new file mode 100644 index 0000000..29f2d5e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.cpp @@ -0,0 +1,130 @@ +// Statusbar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Statusbar.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "StatusbarDoc.h" +#include "StatusbarView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarApp + +BEGIN_MESSAGE_MAP(CStatusbarApp, CWinApp) + //{{AFX_MSG_MAP(CStatusbarApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarApp construction + +CStatusbarApp::CStatusbarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CStatusbarApp object + +CStatusbarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarApp initialization + +BOOL CStatusbarApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + LoadStdProfileSettings(); // 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_STATUSTYPE, + RUNTIME_CLASS(CStatusbarDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CStatusbarView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CStatusbarApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarApp commands + +int CStatusbarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsp new file mode 100644 index 0000000..1bdeec0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsp @@ -0,0 +1,405 @@ +# Microsoft Developer Studio Project File - Name="Statusbar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Statusbar - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Statusbar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Statusbar.mak" CFG="Statusbar - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Statusbar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Statusbar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Statusbar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Statusbar - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Statusbar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Statusbar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Statusbar.exe" + +!ELSEIF "$(CFG)" == "Statusbar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Statusbar.exe" + +!ELSEIF "$(CFG)" == "Statusbar - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Statusba" +# PROP BASE Intermediate_Dir "Statusba" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Statusbar.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Statusbar.exe" + +!ELSEIF "$(CFG)" == "Statusbar - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Statusb0" +# PROP BASE Intermediate_Dir "Statusb0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Statusbar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Statusbar.exe" + +!ELSEIF "$(CFG)" == "Statusbar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Statusb1" +# PROP BASE Intermediate_Dir "Statusb1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Statusbar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Statusbar.exe" + +!ENDIF + +# Begin Target + +# Name "Statusbar - Win32 Release" +# Name "Statusbar - Win32 Debug" +# Name "Statusbar - Win32 Release_Shared" +# Name "Statusbar - Win32 Unicode_Debug" +# Name "Statusbar - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\Statusbar.cpp +# End Source File +# Begin Source File + +SOURCE=.\Statusbar.rc +# End Source File +# Begin Source File + +SOURCE=.\StatusbarDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\StatusbarView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\Statusbar.h +# End Source File +# Begin Source File + +SOURCE=.\StatusbarDoc.h +# End Source File +# Begin Source File + +SOURCE=.\StatusbarView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\XSTATUS4.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\GreenLight.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\NEW_MAIL.BMP +# End Source File +# Begin Source File + +SOURCE=.\nodrop.cur +# End Source File +# Begin Source File + +SOURCE=.\res\RedLight.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Statusbar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Statusbar.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\StatusbarDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Statusbar.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsw new file mode 100644 index 0000000..f75c8f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Statusbar"=".\Statusbar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/StatBar", ZJJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.h new file mode 100644 index 0000000..3c16730 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.h @@ -0,0 +1,39 @@ +// Statusbar.h : main header file for the STATUSBAR application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarApp: +// See Statusbar.cpp for the implementation of this class +// + +class CStatusbarApp : public CWinApp +{ +public: + CStatusbarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatusbarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CStatusbarApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.rc new file mode 100644 index 0000000..196b31a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.rc @@ -0,0 +1,435 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_STATUSTYPE ICON "res\\StatusbarDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" +IDB_NEWMAIL BITMAP "RES\\NEW_MAIL.BMP" +IDB_GREEN_LIGHT BITMAP "res\\GreenLight.bmp" +IDB_RED_LIGHT BITMAP "res\\RedLight.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR 16, 15 +BEGIN + BUTTON ID_FILE_NEW + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + 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 Statusbar...", ID_APP_ABOUT + END +END + +IDR_STATUSTYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + 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 Statusbar...", 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 + "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_STATUSBAR_FORM DIALOG 0, 0, 303, 112 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Special Font in stretchy pane",IDC_FONTCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,175,37,110,10 + CONTROL "Special Cursor over stretchy pane",IDC_CURSORCHECK, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,175,55,122,10 + GROUPBOX "Bitmap Layout",IDC_STATIC,10,31,157,72 + CONTROL "Stretch",IDC_STRETCHRADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,18,44,42,10 + CONTROL "Left Fit",IDC_LFITRADIO,"Button",BS_AUTORADIOBUTTON,18,55,42,10 + CONTROL "Center Fit",IDC_CFITRADIO,"Button",BS_AUTORADIOBUTTON,63,55,42,10 + CONTROL "Right Fit",IDC_RFITRADIO,"Button",BS_AUTORADIOBUTTON,115,55,42,10 + CONTROL "Left Clip",IDC_LCLIPRADIO,"Button",BS_AUTORADIOBUTTON,18,66,42,10 + CONTROL "Center Clip",IDC_CCLIPRADIO,"Button",BS_AUTORADIOBUTTON,63,66,47,10 + CONTROL "Right Clip",IDC_RCLIPRADIO2,"Button",BS_AUTORADIOBUTTON,115,66,42,10 + PUSHBUTTON "Apply",IDC_APPLYBUTTON,67,82,42,12,WS_GROUP + CONTROL "Percent Text in progress pane",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,175,73,109,9 + CONTROL "Click here when you forgot your glasses",IDC_CHECK3, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,10,142,11 + CONTROL "Enable Tooltips",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,175,90,67,10 +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 "040904b0" + BEGIN + VALUE "FileDescription", "STATUSBAR Ultimate Toolbox Demo" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "STATUSBAR" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "STATUSBAR.EXE" + VALUE "ProductName", "STATUSBAR Ultimate Toolbox Demo" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_STATUSBAR_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 296 + TOPMARGIN, 7 + BOTTOMMARGIN, 105 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Cursor +// + +IDC_NODROP CURSOR "nodrop.cur" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Statusbar" + IDR_STATUSTYPE "\nStatus\nStatus\n\n\nStatusbar.Document\nStatus Document" + ID_INDICATOR_XFER "Progress Pane" + ID_INDICATOR_MAIL "DoubleClick here for bitmap" + ID_INDICATOR_CT "00:00:00" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Statusbar" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + ID_DESCRIPTION_FILE "StatusarInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\Statusbar.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Statusbar.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Statusbar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.vcproj new file mode 100644 index 0000000..7343182 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/Statusbar.vcproj @@ -0,0 +1,2193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.cpp new file mode 100644 index 0000000..43362eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.cpp @@ -0,0 +1,82 @@ +// StatusbarDoc.cpp : implementation of the CStatusbarDoc class +// + +#include "stdafx.h" +#include "Statusbar.h" + +#include "StatusbarDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarDoc + +IMPLEMENT_DYNCREATE(CStatusbarDoc, CDocument) + +BEGIN_MESSAGE_MAP(CStatusbarDoc, CDocument) + //{{AFX_MSG_MAP(CStatusbarDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarDoc construction/destruction + +CStatusbarDoc::CStatusbarDoc() +{ + // TODO: add one-time construction code here + +} + +CStatusbarDoc::~CStatusbarDoc() +{ +} + +BOOL CStatusbarDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarDoc serialization + +void CStatusbarDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarDoc diagnostics + +#ifdef _DEBUG +void CStatusbarDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CStatusbarDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.h new file mode 100644 index 0000000..52cdf4e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarDoc.h @@ -0,0 +1,44 @@ +// StatusbarDoc.h : interface of the CStatusbarDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CStatusbarDoc : public CDocument +{ +protected: // create from serialization only + CStatusbarDoc(); + DECLARE_DYNCREATE(CStatusbarDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatusbarDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CStatusbarDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CStatusbarDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.cpp new file mode 100644 index 0000000..fa8b2f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.cpp @@ -0,0 +1,176 @@ +// StatusbarView.cpp : implementation of the CStatusbarView class +// + +#include "stdafx.h" +#include "Statusbar.h" + +#include "StatusbarDoc.h" +#include "StatusbarView.h" +#include "mainfrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarView + +IMPLEMENT_DYNCREATE(CStatusbarView, CFormView) + +BEGIN_MESSAGE_MAP(CStatusbarView, CFormView) + //{{AFX_MSG_MAP(CStatusbarView) + ON_BN_CLICKED(IDC_APPLYBUTTON, OnApplybutton) + ON_BN_CLICKED(IDC_CHECK1, OnCheck1) + ON_BN_CLICKED(IDC_CHECK3, OnCheck3) + ON_BN_CLICKED(IDC_CHECK4, OnCheck4) + ON_BN_CLICKED(IDC_CURSORCHECK, OnCursorcheck) + ON_BN_CLICKED(IDC_FONTCHECK, OnFontcheck) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarView construction/destruction + +CStatusbarView::CStatusbarView() + : CFormView(CStatusbarView::IDD) +{ + //{{AFX_DATA_INIT(CStatusbarView) + m_bFont = FALSE; + m_bCursor = FALSE; + m_bProcent = TRUE; + m_bGlasses = FALSE; + m_bTooltips = FALSE; + m_nLayout = 2; + //}}AFX_DATA_INIT + // TODO: add construction code here + +} + +CStatusbarView::~CStatusbarView() +{ +} + +void CStatusbarView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CStatusbarView) + DDX_Check(pDX, IDC_FONTCHECK, m_bFont); + DDX_Check(pDX, IDC_CURSORCHECK, m_bCursor); + DDX_Check(pDX, IDC_CHECK1, m_bProcent); + DDX_Check(pDX, IDC_CHECK3, m_bGlasses); + DDX_Check(pDX, IDC_CHECK4, m_bTooltips); + DDX_Radio(pDX, IDC_STRETCHRADIO, m_nLayout); + //}}AFX_DATA_MAP +} + +BOOL CStatusbarView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFormView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarView diagnostics + +#ifdef _DEBUG +void CStatusbarView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CStatusbarView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CStatusbarDoc* CStatusbarView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CStatusbarDoc))); + return (CStatusbarDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CStatusbarView message handlers + +void CStatusbarView::OnApplybutton() + { + if (UpdateData(TRUE)) +// ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneBitmap(2, IDB_NEWMAIL, (EOrientation)(m_nLayout + 1), RGB(0,128,128)); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneBitmap(2, IDB_GREEN_LIGHT, (EOrientation)(m_nLayout + 1), RGB(0,128,128)); + + } + +void CStatusbarView::OnCheck1() +{ + if (UpdateData(TRUE)) + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetUpBar(1, TRUE, m_bProcent); + +} + +void CStatusbarView::OnCheck3() +{ + if (UpdateData(TRUE)) + if (m_bGlasses) + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.GetStatusBarCtrl().SetMinHeight(40); + else + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.GetStatusBarCtrl().SetMinHeight(0); + + + ((CMainFrame*)AfxGetMainWnd())->RecalcLayout(); + +} + +void CStatusbarView::OnCheck4() +{ + if (UpdateData(TRUE)) + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.ActivatePaneTips(m_bTooltips); + +} + +void CStatusbarView::OnCursorcheck() +{ + if (UpdateData(TRUE)) + { + if (m_bCursor) + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneCursor(0, IDC_NODROP); + else + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneCursor(0, 0); + + } +} + +void CStatusbarView::OnFontcheck() +{ + if (UpdateData(TRUE)) + { + if (m_bFont) + { + CFont TestFont; + TestFont.CreateStockObject(ANSI_FIXED_FONT); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneFont(0, &TestFont); + } + else + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneFont(0, NULL); + + } + +} + +void CStatusbarView::OnInitialUpdate() +{ + CFormView::OnInitialUpdate(); + + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(0, _T("The Stretchy pane")); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(1, _T("The Progress pane")); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(2, _T("The Bitmap pane")); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(3, _T("The Numlock pane")); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(4, _T("The Scrolllock pane")); + ((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.SetPaneTip(5, _T("The Time pane")); + + ResizeParentToFit(FALSE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.h new file mode 100644 index 0000000..dc68ea5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StatusbarView.h @@ -0,0 +1,67 @@ +// StatusbarView.h : interface of the CStatusbarView class +// +///////////////////////////////////////////////////////////////////////////// + +class CStatusbarView : public CFormView +{ +protected: // create from serialization only + CStatusbarView(); + DECLARE_DYNCREATE(CStatusbarView) + +public: + //{{AFX_DATA(CStatusbarView) + enum { IDD = IDD_STATUSBAR_FORM }; + BOOL m_bFont; + BOOL m_bCursor; + BOOL m_bProcent; + BOOL m_bGlasses; + BOOL m_bTooltips; + int m_nLayout; + //}}AFX_DATA + +// Attributes +public: + CStatusbarDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatusbarView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CStatusbarView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CStatusbarView) + afx_msg void OnApplybutton(); + afx_msg void OnCheck1(); + afx_msg void OnCheck3(); + afx_msg void OnCheck4(); + afx_msg void OnCursorcheck(); + afx_msg void OnFontcheck(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in StatusbarView.cpp +inline CStatusbarDoc* CStatusbarView::GetDocument() + { return (CStatusbarDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.cpp new file mode 100644 index 0000000..058ab0d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Statusbar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.h new file mode 100644 index 0000000..b1c404c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +#include "OXAdvancedAssert.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/nodrop.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/nodrop.cur new file mode 100644 index 0000000..a299255 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/nodrop.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/GreenLight.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/GreenLight.bmp new file mode 100644 index 0000000..2375ea2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/GreenLight.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/NEW_MAIL.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/NEW_MAIL.BMP new file mode 100644 index 0000000..db3ddc9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/NEW_MAIL.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/RedLight.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/RedLight.bmp new file mode 100644 index 0000000..cb1f251 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/RedLight.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.rc2 new file mode 100644 index 0000000..589c8bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Statusbar.rc2 @@ -0,0 +1,13 @@ +// +// STATUSBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/StatusbarDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/StatusbarDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/StatusbarDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Toolbar.bmp new file mode 100644 index 0000000..9768f99 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/resource.h new file mode 100644 index 0000000..2549a99 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StatBar/resource.h @@ -0,0 +1,41 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Statusbar.rc +// +#define ID_DESCRIPTION_FILE 3 +#define IDD_ABOUTBOX 100 +#define IDD_STATUSBAR_FORM 101 +#define IDC_NODROP 106 +#define IDR_MAINFRAME 128 +#define IDR_STATUSTYPE 129 +#define IDB_GREEN_LIGHT 131 +#define ID_INDICATOR_XFER 132 +#define IDB_RED_LIGHT 132 +#define ID_INDICATOR_MAIL 133 +#define ID_INDICATOR_CT 134 +#define IDB_NEWMAIL 323 +#define IDC_CHECK1 1002 +#define IDC_CHECK3 1007 +#define IDC_CHECK4 1012 +#define IDC_FONTCHECK 1013 +#define IDC_CURSORCHECK 1014 +#define IDC_STRETCHRADIO 1016 +#define IDC_APPLYBUTTON 1017 +#define IDC_LFITRADIO 1018 +#define IDC_RFITRADIO 1019 +#define IDC_CFITRADIO 1020 +#define IDC_LCLIPRADIO 1021 +#define IDC_CCLIPRADIO 1022 +#define IDC_RCLIPRADIO2 1023 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 104 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.cpp new file mode 100644 index 0000000..d58eac3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.cpp @@ -0,0 +1,48 @@ +// CustomizableStatic.cpp : implementation file +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "CustomizeStaticDlg.h" +#include "CustomizableStatic.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStatic + +CCustomizableStatic::CCustomizableStatic() +{ +} + +CCustomizableStatic::~CCustomizableStatic() +{ +} + + +BEGIN_MESSAGE_MAP(CCustomizableStatic, COXStatic) + //{{AFX_MSG_MAP(CCustomizableStatic) + ON_WM_RBUTTONDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStatic message handlers + +void CCustomizableStatic::OnRButtonDown(UINT nFlags, CPoint point) +{ + COXStatic::OnRButtonDown(nFlags, point); + + // TODO: Add your message handler code here and/or call default + CCustomizeStaticDlg customizeDlg; + customizeDlg.m_pStatic=this; + if(customizeDlg.DoModal()==IDOK) + { + AdjustToFitText(); + FormatToolTipText(); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.h new file mode 100644 index 0000000..f9f5efa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStatic.h @@ -0,0 +1,50 @@ +#if !defined(AFX_CUSTOMIZABLESTATIC_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZABLESTATIC_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizableStatic.h : header file +// + +#include "OXStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStatic window + +class CCustomizableStatic : public COXStatic +{ +// Construction +public: + CCustomizableStatic(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizableStatic) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCustomizableStatic(); + + // Generated message map functions +protected: + //{{AFX_MSG(CCustomizableStatic) + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZABLESTATIC_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.cpp new file mode 100644 index 0000000..07bd325 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.cpp @@ -0,0 +1,48 @@ +// CustomizableStaticHyperLink.cpp : implementation file +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "CustomizeSHLDlg.h" +#include "CustomizableStaticHyperLink.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStaticHyperLink + +CCustomizableStaticHyperLink::CCustomizableStaticHyperLink() +{ +} + +CCustomizableStaticHyperLink::~CCustomizableStaticHyperLink() +{ +} + + +BEGIN_MESSAGE_MAP(CCustomizableStaticHyperLink, COXStaticHyperLink) + //{{AFX_MSG_MAP(CCustomizableStaticHyperLink) + ON_WM_RBUTTONDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStaticHyperLink message handlers + +void CCustomizableStaticHyperLink::OnRButtonDown(UINT nFlags, CPoint point) +{ + COXStaticHyperLink::OnRButtonDown(nFlags, point); + + // TODO: Add your message handler code here and/or call default + CCustomizeSHLDlg customizeDlg; + customizeDlg.m_pStaticHyperLink=this; + if(customizeDlg.DoModal()==IDOK) + { + AdjustToFitText(); + FormatToolTipText(); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.h new file mode 100644 index 0000000..325d66f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizableStaticHyperLink.h @@ -0,0 +1,50 @@ +#if !defined(AFX_CUSTOMIZABLESTATICHYPERLINK_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_) +#define AFX_CUSTOMIZABLESTATICHYPERLINK_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizableStaticHyperLink.h : header file +// + +#include "OXStaticHyperLink.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizableStaticHyperLink window + +class CCustomizableStaticHyperLink : public COXStaticHyperLink +{ +// Construction +public: + CCustomizableStaticHyperLink(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizableStaticHyperLink) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCustomizableStaticHyperLink(); + + // Generated message map functions +protected: + //{{AFX_MSG(CCustomizableStaticHyperLink) + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZABLESTATICHYPERLINK_H__0F70C422_AD5C_11D1_B475_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.cpp new file mode 100644 index 0000000..5737dbb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.cpp @@ -0,0 +1,273 @@ +// CustomizeSHLDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "CustomizeSHLDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeSHLDlg dialog + + +CCustomizeSHLDlg::CCustomizeSHLDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeSHLDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeSHLDlg) + m_sDefaultDirectory = _T(""); + m_bErrorNotify = FALSE; + m_bFitToText = FALSE; + m_bShowToolTip = FALSE; + m_bUseWindowText = FALSE; + m_sFile = _T(""); + m_sParameters = _T(""); + m_sToolTipText = _T(""); + m_clrUnvisited = 0; + m_nActionID = -1; + m_nCallbackMsgID = 0; + m_clrVisited = 0; + m_sFontName = _T(""); + m_sWindowText = _T(""); + m_bUseSpecialCursor = FALSE; + //}}AFX_DATA_INIT +} + + +void CCustomizeSHLDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeSHLDlg) + DDX_Control(pDX, IDC_EDIT_WINDOW_TEXT, m_ctlEditWindowText); + DDX_Control(pDX, IDC_COMBO_ACTION, m_ctlComboAction); + DDX_Control(pDX, IDC_EDIT_TOOLTIP_TEXT, m_ctlEditToolTipText); + DDX_Text(pDX, IDC_EDIT_DEFAULT_DIRECTORY, m_sDefaultDirectory); + DDX_Check(pDX, IDC_CHECK_ERROR_NOTIFY, m_bErrorNotify); + DDX_Check(pDX, IDC_CHECK_FIT_TO_TEXT, m_bFitToText); + DDX_Check(pDX, IDC_CHECK_SHOW_TOOLTIP, m_bShowToolTip); + DDX_Check(pDX, IDC_CHECK_USE_WINDOW_TEXT, m_bUseWindowText); + DDX_Text(pDX, IDC_EDIT_FILE, m_sFile); + DDX_Text(pDX, IDC_EDIT_PARAMETERS, m_sParameters); + DDX_Text(pDX, IDC_EDIT_TOOLTIP_TEXT, m_sToolTipText); + DDX_Text(pDX, IDC_EDIT_UNVISITED_COLOR, m_clrUnvisited); + DDX_CBIndex(pDX, IDC_COMBO_ACTION, m_nActionID); + DDX_Text(pDX, IDC_EDIT_CALLBACK_MESSAGE_ID, m_nCallbackMsgID); + DDX_Text(pDX, IDC_EDIT_VISITED_COLOR, m_clrVisited); + DDX_Text(pDX, IDC_EDIT_FONT_NAME, m_sFontName); + DDX_Text(pDX, IDC_EDIT_WINDOW_TEXT, m_sWindowText); + DDX_Check(pDX, IDC_CHECK_USE_SPECIAL_CURSOR, m_bUseSpecialCursor); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeSHLDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeSHLDlg) + ON_BN_CLICKED(IDC_BUTTON_CLR_UNVISITED, OnButtonClrUnvisited) + ON_BN_CLICKED(IDC_BUTTON_CLR_VISITED, OnButtonClrVisited) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_BN_CLICKED(IDC_CHECK_SHOW_TOOLTIP, OnCheckShowTooltip) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeSHLDlg message handlers + +void CCustomizeSHLDlg::OnButtonClrUnvisited() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use color common dialog + CColorDialog colorDlg(m_clrUnvisited); + if(colorDlg.DoModal()==IDOK) + { + m_clrUnvisited=colorDlg.GetColor(); + UpdateData(FALSE); + } +} + +void CCustomizeSHLDlg::OnButtonClrVisited() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use color common dialog + CColorDialog colorDlg(m_clrVisited); + if(colorDlg.DoModal()==IDOK) + { + m_clrVisited=colorDlg.GetColor(); + UpdateData(FALSE); + } +} + +void CCustomizeSHLDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use font common dialog + CFontDialog fontDlg(&m_lf); + if(fontDlg.DoModal()==IDOK) + { + fontDlg.GetCurrentFont(&m_lf); + m_sFontName=m_lf.lfFaceName; + UpdateData(FALSE); + } +} + +void CCustomizeSHLDlg::OnCheckShowTooltip() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +BOOL CCustomizeSHLDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + if(m_pStaticHyperLink->IsStaticText(m_pStaticHyperLink)) + { + CString sText; + m_pStaticHyperLink->GetWindowText(sText); + if(!sText.IsEmpty()) + { + sText=_T("Customize: ")+sText; + SetWindowText(sText); + } + } + + for(int nIndex=0; nIndexGetAction(); + + m_nActionID=hla.GetActionID(); + m_sFile=hla.GetFile(); + m_sParameters=hla.GetParameters(); + m_sDefaultDirectory=hla.GetDefaultDirectory(); + m_nCallbackMsgID=hla.GetCallbackMsg(); + + m_bUseSpecialCursor=m_pStaticHyperLink->GetLinkCursor()==NULL ? FALSE : TRUE; + m_bErrorNotify=m_pStaticHyperLink->GetErrorNotify(); + m_bFitToText=m_pStaticHyperLink->GetFitToText(); + m_bShowToolTip=m_pStaticHyperLink->GetShowToolTip(); + m_bUseWindowText=m_pStaticHyperLink->GetUseWindowText(); + m_sToolTipText=m_pStaticHyperLink->GetToolTipText(); + m_clrUnvisited=m_pStaticHyperLink->GetUnvisitedColor(); + m_clrVisited=m_pStaticHyperLink->GetVisitedColor(); + if(m_pStaticHyperLink->GetTextLogFont(&m_lf)) + { + m_sFontName=m_lf.lfFaceName; + } + else + { + m_sFontName.Empty(); + } + + if(m_pStaticHyperLink->IsStaticText(m_pStaticHyperLink)) + { + m_pStaticHyperLink->GetWindowText(m_sWindowText); + } + else + { + m_sWindowText.Empty(); + } + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeSHLDlg::SetVars() +{ + UpdateData(); + + COXHyperLinkAction hla=m_pStaticHyperLink->GetAction(); + hla.SetActionID(m_nActionID); + hla.SetFile(m_sFile); + hla.SetParameters(m_sParameters); + hla.SetDefaultDirectory(m_sDefaultDirectory); + hla.SetCallbackMsg(m_nCallbackMsgID); + m_pStaticHyperLink->SetAction(hla); + + if(m_bUseSpecialCursor) + { + m_pStaticHyperLink->SetDefaultLinkCursor(); + } + else + { + m_pStaticHyperLink->SetLinkCursor(NULL); + } + m_pStaticHyperLink->SetErrorNotify(m_bErrorNotify); + m_pStaticHyperLink->SetFitToText(m_bFitToText); + m_pStaticHyperLink->SetShowToolTip(m_bShowToolTip); + m_pStaticHyperLink->SetUseWindowText(m_bUseWindowText); + m_pStaticHyperLink->SetToolTipText(m_sToolTipText); + m_pStaticHyperLink->SetUnvisitedColor(m_clrUnvisited); + m_pStaticHyperLink->SetVisitedColor(m_clrVisited); + + if(!m_sFontName.IsEmpty()) + { + m_pStaticHyperLink->SetTextLogFont(&m_lf); + } + else + { + m_pStaticHyperLink->SetTextLogFont(NULL); + } + + if(m_pStaticHyperLink->IsStaticText(m_pStaticHyperLink)) + { + m_pStaticHyperLink->SetWindowText(m_sWindowText); + } +} + +void CCustomizeSHLDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditToolTipText.EnableWindow(m_bShowToolTip); + m_ctlEditWindowText.EnableWindow(m_pStaticHyperLink-> + IsStaticText(m_pStaticHyperLink)); +} + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.h new file mode 100644 index 0000000..11fe2a4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeSHLDlg.h @@ -0,0 +1,76 @@ +#if !defined(AFX_CUSTOMIZESHLDLG_H__FA57A4C2_ADC7_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_CUSTOMIZESHLDLG_H__FA57A4C2_ADC7_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeSHLDlg.h : header file +// + +#include "OXStaticHyperLink.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeSHLDlg dialog + +class CCustomizeSHLDlg : public CDialog +{ +// Construction +public: + CCustomizeSHLDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeSHLDlg) + enum { IDD = IDD_CUSTOMIZESTATICHYPERLINK_DIALOG }; + CEdit m_ctlEditWindowText; + CComboBox m_ctlComboAction; + CEdit m_ctlEditToolTipText; + CString m_sDefaultDirectory; + BOOL m_bErrorNotify; + BOOL m_bFitToText; + BOOL m_bShowToolTip; + BOOL m_bUseWindowText; + CString m_sFile; + CString m_sParameters; + CString m_sToolTipText; + DWORD m_clrUnvisited; + int m_nActionID; + UINT m_nCallbackMsgID; + DWORD m_clrVisited; + CString m_sFontName; + CString m_sWindowText; + BOOL m_bUseSpecialCursor; + //}}AFX_DATA + COXStaticHyperLink* m_pStaticHyperLink; + LOGFONT m_lf; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeSHLDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void GetVars(); + void SetVars(); + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CCustomizeSHLDlg) + afx_msg void OnButtonClrUnvisited(); + afx_msg void OnButtonClrVisited(); + afx_msg void OnButtonFont(); + afx_msg void OnCheckShowTooltip(); + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZESHLDLG_H__FA57A4C2_ADC7_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.cpp new file mode 100644 index 0000000..e22398b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.cpp @@ -0,0 +1,191 @@ +// CustomizeStaticDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "CustomizeStaticDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeStaticDlg dialog + + +CCustomizeStaticDlg::CCustomizeStaticDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeStaticDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeStaticDlg) + m_bFitToText = FALSE; + m_bShowToolTip = FALSE; + m_sToolTipText = _T(""); + m_clr = 0; + m_sFontName = _T(""); + m_sWindowText = _T(""); + //}}AFX_DATA_INIT +} + + +void CCustomizeStaticDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeStaticDlg) + DDX_Control(pDX, IDC_EDIT_WINDOW_TEXT, m_ctlEditWindowText); + DDX_Control(pDX, IDC_EDIT_TOOLTIP_TEXT, m_ctlEditToolTipText); + DDX_Check(pDX, IDC_CHECK_FIT_TO_TEXT, m_bFitToText); + DDX_Check(pDX, IDC_CHECK_SHOW_TOOLTIP, m_bShowToolTip); + DDX_Text(pDX, IDC_EDIT_TOOLTIP_TEXT, m_sToolTipText); + DDX_Text(pDX, IDC_EDIT_COLOR, m_clr); + DDX_Text(pDX, IDC_EDIT_FONT_NAME, m_sFontName); + DDX_Text(pDX, IDC_EDIT_WINDOW_TEXT, m_sWindowText); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeStaticDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeStaticDlg) + ON_BN_CLICKED(IDC_BUTTON_COLOR, OnButtonColor) + ON_BN_CLICKED(IDC_BUTTON_FONT, OnButtonFont) + ON_BN_CLICKED(IDC_CHECK_SHOW_TOOLTIP, OnCheckShowTooltip) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeStaticDlg message handlers +void CCustomizeStaticDlg::OnButtonColor() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use color common dialog + CColorDialog colorDlg(m_clr); + if(colorDlg.DoModal()==IDOK) + { + m_clr=colorDlg.GetColor(); + UpdateData(FALSE); + } +} + +void CCustomizeStaticDlg::OnButtonFont() +{ + // TODO: Add your control notification handler code here + + UpdateData(TRUE); + + // Use font common dialog + CFontDialog fontDlg(&m_lf); + if(fontDlg.DoModal()==IDOK) + { + fontDlg.GetCurrentFont(&m_lf); + m_sFontName=m_lf.lfFaceName; + UpdateData(FALSE); + } +} + +void CCustomizeStaticDlg::OnCheckShowTooltip() +{ + // TODO: Add your control notification handler code here + + ShowControls(); +} + +BOOL CCustomizeStaticDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + if(m_pStatic->IsStaticText(m_pStatic)) + { + CString sText; + m_pStatic->GetWindowText(sText); + if(!sText.IsEmpty()) + { + sText=_T("Customize: ")+sText; + SetWindowText(sText); + } + } + + GetVars(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CCustomizeStaticDlg::OnOK() +{ + // TODO: Add extra validation here + + SetVars(); + + CDialog::OnOK(); +} + +void CCustomizeStaticDlg::GetVars() +{ + m_bFitToText=m_pStatic->GetFitToText(); + m_bShowToolTip=m_pStatic->GetShowToolTip(); + m_sToolTipText=m_pStatic->GetToolTipText(); + m_clr=m_pStatic->GetTextColor(); + if(m_pStatic->GetTextLogFont(&m_lf)) + { + m_sFontName=m_lf.lfFaceName; + } + else + { + m_sFontName.Empty(); + } + + if(m_pStatic->IsStaticText(m_pStatic)) + { + m_pStatic->GetWindowText(m_sWindowText); + } + else + { + m_sWindowText.Empty(); + } + + UpdateData(FALSE); + + ShowControls(); +} + +void CCustomizeStaticDlg::SetVars() +{ + UpdateData(); + + m_pStatic->SetFitToText(m_bFitToText); + m_pStatic->SetShowToolTip(m_bShowToolTip); + m_pStatic->SetToolTipText(m_sToolTipText); + m_pStatic->SetTextColor(m_clr); + + if(!m_sFontName.IsEmpty()) + { + m_pStatic->SetTextLogFont(&m_lf); + } + else + { + m_pStatic->SetTextLogFont(NULL); + } + + if(m_pStatic->IsStaticText(m_pStatic)) + { + m_pStatic->SetWindowText(m_sWindowText); + } +} + +void CCustomizeStaticDlg::ShowControls() +{ + UpdateData(TRUE); + + m_ctlEditToolTipText.EnableWindow(m_bShowToolTip); + m_ctlEditWindowText.EnableWindow(m_pStatic-> + IsStaticText(m_pStatic)); +} + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.h new file mode 100644 index 0000000..3c6b866 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/CustomizeStaticDlg.h @@ -0,0 +1,65 @@ +#if !defined(AFX_CUSTOMIZESTATICDLG_H__804A9323_C115_11D1_B475_3C3908C10000__INCLUDED_) +#define AFX_CUSTOMIZESTATICDLG_H__804A9323_C115_11D1_B475_3C3908C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeStaticDlg.h : header file +// + +#include "OXStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeStaticDlg dialog + +class CCustomizeStaticDlg : public CDialog +{ +// Construction +public: + CCustomizeStaticDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeStaticDlg) + enum { IDD = IDD_CUSTOMIZESTATIC_DIALOG }; + CEdit m_ctlEditWindowText; + CEdit m_ctlEditToolTipText; + BOOL m_bFitToText; + BOOL m_bShowToolTip; + CString m_sToolTipText; + DWORD m_clr; + CString m_sFontName; + CString m_sWindowText; + //}}AFX_DATA + COXStatic* m_pStatic; + LOGFONT m_lf; + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeStaticDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + void GetVars(); + void SetVars(); + void ShowControls(); + + // Generated message map functions + //{{AFX_MSG(CCustomizeStaticDlg) + afx_msg void OnButtonColor(); + afx_msg void OnButtonFont(); + afx_msg void OnCheckShowTooltip(); + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZESTATICDLG_H__804A9323_C115_11D1_B475_3C3908C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.clw new file mode 100644 index 0000000..e1141d5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.clw @@ -0,0 +1,240 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CStaticHyperLinkDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "statichyperlink.h" +LastPage=0 + +ClassCount=6 +Class1=CCustomizableStatic +Class2=CCustomizableStaticHyperLink +Class3=CCustomizeSHLDlg +Class4=CCustomizeStaticDlg +Class5=CStaticHyperLinkApp +Class6=CStaticHyperLinkDlg + +ResourceCount=6 +Resource1=IDD_CUSTOMIZESTATICHYPERLINK_DIALOG +Resource2=IDD_CUSTOMIZESTATICHYPERLINK_DIALOG (English (Canada)) +Resource3=IDD_CUSTOMIZESTATIC_DIALOG +Resource4=IDD_STATICHYPERLINK_DIALOG +Resource5=IDD_STATICHYPERLINK_DIALOG (English (U.S.)) +Resource6=IDD_CUSTOMIZESTATIC_DIALOG (English (Canada)) + +[CLS:CCustomizableStatic] +Type=0 +BaseClass=COXStatic +HeaderFile=CustomizableStatic.h +ImplementationFile=CustomizableStatic.cpp +LastObject=CCustomizableStatic + +[CLS:CCustomizableStaticHyperLink] +Type=0 +BaseClass=COXStaticHyperLink +HeaderFile=CustomizableStaticHyperLink.h +ImplementationFile=CustomizableStaticHyperLink.cpp + +[CLS:CCustomizeSHLDlg] +Type=0 +BaseClass=CDialog +HeaderFile=CustomizeSHLDlg.h +ImplementationFile=CustomizeSHLDlg.cpp + +[CLS:CCustomizeStaticDlg] +Type=0 +BaseClass=CDialog +HeaderFile=CustomizeStaticDlg.h +ImplementationFile=CustomizeStaticDlg.cpp +LastObject=65535 + +[CLS:CStaticHyperLinkApp] +Type=0 +BaseClass=CWinApp +HeaderFile=StaticHyperLink.h +ImplementationFile=StaticHyperLink.cpp +Filter=N +VirtualFilter=AC +LastObject=CStaticHyperLinkApp + +[CLS:CStaticHyperLinkDlg] +Type=0 +BaseClass=CDialog +HeaderFile=StaticHyperLinkDlg.h +ImplementationFile=StaticHyperLinkDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=CStaticHyperLinkDlg + +[DLG:IDD_CUSTOMIZESTATICHYPERLINK_DIALOG] +Type=1 +Class=CCustomizeSHLDlg +ControlCount=31 +Control1=IDC_EDIT_WINDOW_TEXT,edit,1350631552 +Control2=IDC_COMBO_ACTION,combobox,1344339971 +Control3=IDC_EDIT_FILE,edit,1350631552 +Control4=IDC_EDIT_PARAMETERS,edit,1350631552 +Control5=IDC_EDIT_DEFAULT_DIRECTORY,edit,1350631552 +Control6=IDC_EDIT_CALLBACK_MESSAGE_ID,edit,1350633600 +Control7=IDC_BUTTON_CLR_UNVISITED,button,1342242816 +Control8=IDC_EDIT_UNVISITED_COLOR,edit,1350633600 +Control9=IDC_BUTTON_CLR_VISITED,button,1342242816 +Control10=IDC_EDIT_VISITED_COLOR,edit,1350633600 +Control11=IDC_BUTTON_FONT,button,1342242816 +Control12=IDC_EDIT_FONT_NAME,edit,1350633600 +Control13=IDC_CHECK_USE_WINDOW_TEXT,button,1342242819 +Control14=IDC_CHECK_ERROR_NOTIFY,button,1342242819 +Control15=IDC_CHECK_FIT_TO_TEXT,button,1342242819 +Control16=IDC_CHECK_USE_SPECIAL_CURSOR,button,1342242819 +Control17=IDC_CHECK_SHOW_TOOLTIP,button,1342242819 +Control18=IDC_EDIT_TOOLTIP_TEXT,edit,1350631552 +Control19=IDOK,button,1342242817 +Control20=IDCANCEL,button,1342242816 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,button,1342177287 +Control27=IDC_STATIC,button,1342177287 +Control28=IDC_STATIC,button,1342177287 +Control29=IDC_STATIC,button,1342177287 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,button,1342177287 + +[DLG:IDD_CUSTOMIZESTATIC_DIALOG] +Type=1 +Class=CCustomizeStaticDlg +ControlCount=14 +Control1=IDC_EDIT_WINDOW_TEXT,edit,1350631552 +Control2=IDC_BUTTON_COLOR,button,1342242816 +Control3=IDC_EDIT_COLOR,edit,1350633600 +Control4=IDC_BUTTON_FONT,button,1342242816 +Control5=IDC_EDIT_FONT_NAME,edit,1350633600 +Control6=IDC_CHECK_FIT_TO_TEXT,button,1342242819 +Control7=IDC_CHECK_SHOW_TOOLTIP,button,1342242819 +Control8=IDC_EDIT_TOOLTIP_TEXT,edit,1350631552 +Control9=IDOK,button,1342242817 +Control10=IDCANCEL,button,1342242816 +Control11=65535,static,1342308352 +Control12=65535,button,1342177287 +Control13=65535,button,1342177287 +Control14=65535,button,1342177287 + +[DLG:IDD_STATICHYPERLINK_DIALOG] +Type=1 +Class=CStaticHyperLinkDlg +ControlCount=25 +Control1=IDC_STATIC_WEB_UT,static,1342177283 +Control2=IDC_SAMPLE_CAPTION,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC_BILL_GATES,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC_EMAIL_ANDREI,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC_ABOUT,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC_WEB_DUNDAS,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_STATIC_FAX,static,1342308352 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC_EMAIL_SALES,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC_SOLITAIRE,static,1342308352 +Control23=IDC_STATIC_CLOSE,static,1342308865 +Control24=IDC_STATIC_HINT,static,1342308352 +Control25=IDC_STATIC,static,1342308608 + +[DLG:IDD_STATICHYPERLINK_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=25 +Control1=IDC_STATIC_WEB_UT,static,1342177283 +Control2=IDC_SAMPLE_CAPTION,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC_BILL_GATES,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC_EMAIL_ANDREI,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_STATIC_ABOUT,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC_WEB_DUNDAS,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_STATIC_FAX,static,1342308352 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC_EMAIL_SALES,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC_SOLITAIRE,static,1342308352 +Control23=IDC_STATIC_CLOSE,static,1342308865 +Control24=IDC_STATIC_HINT,static,1342308352 +Control25=IDC_STATIC,static,1342308608 + +[DLG:IDD_CUSTOMIZESTATICHYPERLINK_DIALOG (English (Canada))] +Type=1 +Class=? +ControlCount=31 +Control1=IDC_EDIT_WINDOW_TEXT,edit,1350631552 +Control2=IDC_COMBO_ACTION,combobox,1344339971 +Control3=IDC_EDIT_FILE,edit,1350631552 +Control4=IDC_EDIT_PARAMETERS,edit,1350631552 +Control5=IDC_EDIT_DEFAULT_DIRECTORY,edit,1350631552 +Control6=IDC_EDIT_CALLBACK_MESSAGE_ID,edit,1350633600 +Control7=IDC_BUTTON_CLR_UNVISITED,button,1342242816 +Control8=IDC_EDIT_UNVISITED_COLOR,edit,1350633600 +Control9=IDC_BUTTON_CLR_VISITED,button,1342242816 +Control10=IDC_EDIT_VISITED_COLOR,edit,1350633600 +Control11=IDC_BUTTON_FONT,button,1342242816 +Control12=IDC_EDIT_FONT_NAME,edit,1350633600 +Control13=IDC_CHECK_USE_WINDOW_TEXT,button,1342242819 +Control14=IDC_CHECK_ERROR_NOTIFY,button,1342242819 +Control15=IDC_CHECK_FIT_TO_TEXT,button,1342242819 +Control16=IDC_CHECK_USE_SPECIAL_CURSOR,button,1342242819 +Control17=IDC_CHECK_SHOW_TOOLTIP,button,1342242819 +Control18=IDC_EDIT_TOOLTIP_TEXT,edit,1350631552 +Control19=IDOK,button,1342242817 +Control20=IDCANCEL,button,1342242816 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_STATIC,button,1342177287 +Control27=IDC_STATIC,button,1342177287 +Control28=IDC_STATIC,button,1342177287 +Control29=IDC_STATIC,button,1342177287 +Control30=IDC_STATIC,static,1342308352 +Control31=IDC_STATIC,button,1342177287 + +[DLG:IDD_CUSTOMIZESTATIC_DIALOG (English (Canada))] +Type=1 +Class=CCustomizeStaticDlg +ControlCount=14 +Control1=IDC_EDIT_WINDOW_TEXT,edit,1350631552 +Control2=IDC_BUTTON_COLOR,button,1342242816 +Control3=IDC_EDIT_COLOR,edit,1350633600 +Control4=IDC_BUTTON_FONT,button,1342242816 +Control5=IDC_EDIT_FONT_NAME,edit,1350633600 +Control6=IDC_CHECK_FIT_TO_TEXT,button,1342242819 +Control7=IDC_CHECK_SHOW_TOOLTIP,button,1342242819 +Control8=IDC_EDIT_TOOLTIP_TEXT,edit,1350631552 +Control9=IDOK,button,1342242817 +Control10=IDCANCEL,button,1342242816 +Control11=65535,static,1342308352 +Control12=65535,button,1342177287 +Control13=65535,button,1342177287 +Control14=65535,button,1342177287 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.cpp new file mode 100644 index 0000000..e4fab39 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.cpp @@ -0,0 +1,91 @@ +// StaticHyperLink.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "StaticHyperLinkDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkApp + +BEGIN_MESSAGE_MAP(CStaticHyperLinkApp, CWinApp) + //{{AFX_MSG_MAP(CStaticHyperLinkApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkApp construction + +CStaticHyperLinkApp::CStaticHyperLinkApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CStaticHyperLinkApp object + +CStaticHyperLinkApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkApp initialization + +BOOL CStaticHyperLinkApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CStaticHyperLinkDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CStaticHyperLinkApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsp new file mode 100644 index 0000000..7d218bc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsp @@ -0,0 +1,309 @@ +# Microsoft Developer Studio Project File - Name="StaticHyperLink" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StaticHyperLink - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StaticHyperLink.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StaticHyperLink.mak" CFG="StaticHyperLink - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StaticHyperLink - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StaticHyperLink - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StaticHyperLink - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "StaticHyperLink - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "StaticHyperLink - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StaticHyperLink - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"StaticHyperLink.exe" + +!ELSEIF "$(CFG)" == "StaticHyperLink - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"StaticHyperLink.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "StaticHyperLink - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "StaticHy" +# PROP BASE Intermediate_Dir "StaticHy" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"StaticHyperLink.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"StaticHyperLink.exe" + +!ELSEIF "$(CFG)" == "StaticHyperLink - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "StaticH0" +# PROP BASE Intermediate_Dir "StaticH0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"StaticHyperLink.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"StaticHyperLink.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "StaticHyperLink - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "StaticH1" +# PROP BASE Intermediate_Dir "StaticH1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"StaticHyperLink.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"StaticHyperLink.exe" + +!ENDIF + +# Begin Target + +# Name "StaticHyperLink - Win32 Release" +# Name "StaticHyperLink - Win32 Debug" +# Name "StaticHyperLink - Win32 Release_Shared" +# Name "StaticHyperLink - Win32 Unicode_Debug" +# Name "StaticHyperLink - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHyperLinkAction.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CustomizableStatic.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizableStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeSHLDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeStaticDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLink.rc +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLinkDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CustomizableStatic.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizableStaticHyperLink.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeSHLDlg.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeStaticDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHyperLinkAction.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticHyperLink.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLink.h +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLinkDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\StaticHyperLink.ico +# End Source File +# Begin Source File + +SOURCE=.\res\StaticHyperLink.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StaticHyperLink.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsw new file mode 100644 index 0000000..6cd7937 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StaticHyperLink"=".\StaticHyperLink.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/StaticHyperLink", DLJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.h new file mode 100644 index 0000000..646ef95 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.h @@ -0,0 +1,50 @@ +// StaticHyperLink.h : main header file for the STATICHYPERLINK application +// + +#if !defined(AFX_STATICHYPERLINK_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STATICHYPERLINK_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkApp: +// See StaticHyperLink.cpp for the implementation of this class +// + +class CStaticHyperLinkApp : public CWinApp +{ +public: + CStaticHyperLinkApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStaticHyperLinkApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CStaticHyperLinkApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATICHYPERLINK_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.rc new file mode 100644 index 0000000..47cca92 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.rc @@ -0,0 +1,324 @@ +// 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 + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\StaticHyperLink.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXHyperLinkAction.rc""\r\n" + "#endif\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\\StaticHyperLink.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_STATICHYPERLINK_DIALOG DIALOGEX 0, 0, 185, 237 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "StaticHyperLink" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC_WEB_UT,7,7,20,20,0,WS_EX_CLIENTEDGE + LTEXT "COXStatic && COXStaticHyperLink",IDC_SAMPLE_CAPTION,35,14,133,8 + LTEXT "If you don't like it write to our pal ",IDC_STATIC,7,37,104,8 + LTEXT "Bill Gates",IDC_STATIC_BILL_GATES,112,37,30,8 + LTEXT "about it",IDC_STATIC,143,37,24,8 + LTEXT "If you like it write to ",IDC_STATIC,7,49,63,8 + LTEXT "us",IDC_STATIC_EMAIL_ANDREI,70,49,8,8 + LTEXT "immediately, make us happy!",IDC_STATIC,80,49,91,8 + LTEXT "Here you will find some boring info ",IDC_STATIC,7,62,110,8 + LTEXT "About the sample",IDC_STATIC_ABOUT,117,62,56,8 + LTEXT "Check out The Code Project",IDC_STATIC,8,78,91,8 + LTEXT "www.codeproject.com",IDC_STATIC_WEB_DUNDAS,104,78,72,8 + LTEXT "The easiest way to check if your fax works properly:",IDC_STATIC,7,92,164,8 + LTEXT "1) Prepare a sheet with order of any Dundas product ",IDC_STATIC,7,103,168,8 + LTEXT "2) Fax it to: ",IDC_STATIC,7,114,38,8 + LTEXT "416.422.4801",IDC_STATIC_FAX,46,114,45,8 + LTEXT "Need an advice on how to save some money, here is ",IDC_STATIC,7,126,170,8 + LTEXT "sales@theUltimateToolbox.com",IDC_STATIC_EMAIL_SALES,68,142,100,8 + LTEXT "the address to ask:",IDC_STATIC,7,135,61,8 + LTEXT "This demo application has friendly user interface:",IDC_STATIC,7,154,154,8 + LTEXT "you don't have to go anywhere to run the ",IDC_STATIC,8,163,132,8 + LTEXT "Solitaire",IDC_STATIC_SOLITAIRE,140,163,26,8 + CTEXT "Close",IDC_STATIC_CLOSE,83,211,18,8,SS_CENTERIMAGE + LTEXT "Hint:",IDC_STATIC_HINT,7,183,16,8 + LTEXT "right click over static control to customize it ",IDC_STATIC,28,183,138,8,SS_NOTIFY +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 "040904B0" + BEGIN + VALUE "FileDescription", "StaticHyperLink MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "StaticHyperLink" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "StaticHyperLink.EXE" + VALUE "ProductName", "StaticHyperLink Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_STATICHYPERLINK_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 230 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About StaticHyperLink..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "StaticHyperLink" + ID_DESCRIPTION_FILE "StaticHyperLinkInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZESTATICHYPERLINK_DIALOG DIALOG 0, 0, 264, 303 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize StaticHyperLink" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT_WINDOW_TEXT,14,13,236,12,ES_AUTOHSCROLL + COMBOBOX IDC_COMBO_ACTION,68,37,154,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_FILE,85,64,154,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_PARAMETERS,85,80,154,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_DEFAULT_DIRECTORY,85,96,154,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_CALLBACK_MESSAGE_ID,85,113,58,12,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "&Unvisited...",IDC_BUTTON_CLR_UNVISITED,19,154,51,14 + EDITTEXT IDC_EDIT_UNVISITED_COLOR,77,155,51,12,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "&Visited...",IDC_BUTTON_CLR_VISITED,19,171,51,14 + EDITTEXT IDC_EDIT_VISITED_COLOR,77,172,51,12,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "&Font...",IDC_BUTTON_FONT,139,154,50,14 + EDITTEXT IDC_EDIT_FONT_NAME,140,172,111,12,ES_AUTOHSCROLL | ES_READONLY + CONTROL "U&se window text as file name ",IDC_CHECK_USE_WINDOW_TEXT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,193,109,10 + CONTROL "&Notify about errors during execution of HyperLinkAction",IDC_CHECK_ERROR_NOTIFY, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,205,189,10 + CONTROL "Ad&just the size of window to match the size of the text",IDC_CHECK_FIT_TO_TEXT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,217,184,10 + CONTROL "&Use special cursor while moving mouse over the StaticHyperLink",IDC_CHECK_USE_SPECIAL_CURSOR, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,229,219,10 + CONTROL "Show &Tooltip",IDC_CHECK_SHOW_TOOLTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,244,57,10 + EDITTEXT IDC_EDIT_TOOLTIP_TEXT,59,256,184,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,60,283,50,14 + PUSHBUTTON "Cancel",IDCANCEL,152,283,50,14 + LTEXT "&Action",IDC_STATIC,42,39,21,8 + LTEXT "&File",IDC_STATIC,15,67,12,8 + LTEXT "&Parameters",IDC_STATIC,15,83,36,8 + LTEXT "Default &Directory",IDC_STATIC,15,99,54,8 + LTEXT "Tooltip te&xt",IDC_STATIC,21,258,36,8 + GROUPBOX "Text Color",IDC_STATIC,14,144,121,46 + GROUPBOX "HyperLinkAction Parameters",IDC_STATIC,7,54,249,77 + GROUPBOX "StaticHyperLink Parameters",IDC_STATIC,7,135,249,143 + GROUPBOX "",IDC_STATIC,14,237,237,35 + LTEXT "&Callback message ID",IDC_STATIC,15,115,68,8 + GROUPBOX "Window Text",IDC_STATIC,7,3,250,28 +END + +IDD_CUSTOMIZESTATIC_DIALOG DIALOG 0, 0, 264, 178 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize OXStatic" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT_WINDOW_TEXT,14,19,236,12,ES_AUTOHSCROLL + PUSHBUTTON "Text &color...",IDC_BUTTON_COLOR,13,55,61,14 + EDITTEXT IDC_EDIT_COLOR,14,73,61,12,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "&Font...",IDC_BUTTON_FONT,88,54,61,14 + EDITTEXT IDC_EDIT_FONT_NAME,88,73,162,12,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Ad&just the size of window to match the size of the text",IDC_CHECK_FIT_TO_TEXT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,93,184,10 + CONTROL "Show &Tooltip",IDC_CHECK_SHOW_TOOLTIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,112,57,10 + EDITTEXT IDC_EDIT_TOOLTIP_TEXT,59,125,184,12,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,60,158,50,14 + PUSHBUTTON "Cancel",IDCANCEL,152,158,50,14 + LTEXT "Tooltip te&xt",-1,21,127,36,8 + GROUPBOX "OXStatic Parameters",-1,7,42,249,107 + GROUPBOX "",-1,14,103,236,40 + GROUPBOX "Window Text",-1,7,7,250,33 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_CUSTOMIZESTATICHYPERLINK_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 257 + TOPMARGIN, 7 + BOTTOMMARGIN, 297 + END + + IDD_CUSTOMIZESTATIC_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 257 + TOPMARGIN, 7 + BOTTOMMARGIN, 172 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\StaticHyperLink.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXHyperLinkAction.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.vcproj new file mode 100644 index 0000000..fd62d43 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLink.vcproj @@ -0,0 +1,1194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.cpp new file mode 100644 index 0000000..99f8946 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.cpp @@ -0,0 +1,238 @@ +// StaticHyperLinkDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "StaticHyperLink.h" +#include "StaticHyperLinkDlg.h" +#include "UTSampleAbout.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// message to react on "About" action +static UINT g_nAboutMsgID=RegisterWindowMessage(_T("AboutHyperLink")); +// message to react on "Close" action +static UINT g_nCloseMsgID=RegisterWindowMessage(_T("CloseHyperLink")); + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkDlg dialog + +CStaticHyperLinkDlg::CStaticHyperLinkDlg(CWnd* pParent /*=NULL*/) + : CDialog(CStaticHyperLinkDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CStaticHyperLinkDlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CStaticHyperLinkDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CStaticHyperLinkDlg) + DDX_Control(pDX, IDC_STATIC_HINT, m_ctlStaticHint); + DDX_Control(pDX, IDC_SAMPLE_CAPTION, m_ctlStaticSampleCaption); + DDX_Control(pDX, IDC_STATIC_SOLITAIRE, m_ctlStaticSolitaire); + DDX_Control(pDX, IDC_STATIC_WEB_UT, m_ctlStaticWebUT); + DDX_Control(pDX, IDC_STATIC_WEB_DUNDAS, m_ctlStaticWebDundas); + DDX_Control(pDX, IDC_STATIC_FAX, m_ctlStaticFax); + DDX_Control(pDX, IDC_STATIC_EMAIL_SALES, m_ctlStaticEmailSales); + DDX_Control(pDX, IDC_STATIC_EMAIL_ANDREI, m_ctlStaticEmailAndrei); + DDX_Control(pDX, IDC_STATIC_CLOSE, m_ctlStaticClose); + DDX_Control(pDX, IDC_STATIC_BILL_GATES, m_ctlStaticBillGates); + DDX_Control(pDX, IDC_STATIC_ABOUT, m_ctlStaticAbout); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CStaticHyperLinkDlg, CDialog) + //{{AFX_MSG_MAP(CStaticHyperLinkDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP + // map messages with corresponding handlers + ON_REGISTERED_MESSAGE(g_nAboutMsgID,OnAboutActivated) + ON_REGISTERED_MESSAGE(g_nCloseMsgID,OnCloseActivated) + ON_STN_CLICKED(IDC_STATIC_EMAIL_ANDREI, OnStnClickedStaticEmailAndrei) + ON_STN_CLICKED(IDC_STATIC_FAX, OnStnClickedStaticFax) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkDlg message handlers + +BOOL CStaticHyperLinkDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // set new LOGINFO of the font of the COXStaticHyperLink object + LOGFONT lf; + GetFont()->GetObject(sizeof(lf), &lf); + lf.lfUnderline=TRUE; + lf.lfWeight=1000; + lf.lfHeight=-18; + CFont font; + font.CreateFontIndirect(&lf); + m_ctlStaticClose.SetTextFont(&font); + // set action as userdefined + // don't forget to set callback message and handle to recipient window + m_ctlStaticClose.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nCloseMsgID,GetSafeHwnd()); +// m_ctlStaticClose.SetLinkCursor(NULL); + + // set action as userdefined + // don't forget to set callback message and handle to recipient window + m_ctlStaticAbout.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nAboutMsgID,GetSafeHwnd()); + + // open website + m_ctlStaticWebUT.SetAction(ID_HLACTION_OPEN,_T("www.codeproject.com")); + // open new e-mail message + m_ctlStaticBillGates.SetAction(ID_HLACTION_OPEN,_T("mailto:billg@microsoft.com")); + // open new e-mail message + m_ctlStaticEmailAndrei.SetAction(ID_HLACTION_OPEN,_T("mailto:info@theUltimateToolbox.com")); + // open new e-mail message, use window text as address of mail recipient + m_ctlStaticEmailSales.SetAction(ID_HLACTION_EMAIL); + + // run sol.exe (Solitaire) + m_ctlStaticSolitaire.SetAction(ID_HLACTION_OPEN,_T("sol.exe")); + + // run dialer.exe (Phone Dialer) + m_ctlStaticFax.SetAction(ID_HLACTION_OPEN,_T("dialer.exe")); + + // set properties of COXStatic controls + // + lf.lfUnderline=FALSE; + lf.lfItalic=TRUE; + lf.lfWeight=1000; + lf.lfHeight=-14; + UTBStr::tcscpy(lf.lfFaceName, LF_FACESIZE, _T("Times New Roman")); + m_ctlStaticSampleCaption.SetTextLogFont(&lf); + m_ctlStaticSampleCaption.SetTextColor(RGB(0,0,128)); + m_ctlStaticSampleCaption.SetShowToolTip(TRUE); + m_ctlStaticSampleCaption.SetToolTipText(_T("Why do we need tool tip here?")); + m_ctlStaticSampleCaption.SetFitToText(TRUE); + + if(m_ctlStaticHint.GetTextLogFont(&lf)) + { + lf.lfWeight=1000; + lf.lfUnderline=TRUE; + m_ctlStaticHint.SetTextLogFont(&lf); + } + m_ctlStaticHint.SetTextColor(RGB(128,0,0)); + m_ctlStaticHint.SetFitToText(TRUE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CStaticHyperLinkDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CStaticHyperLinkDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CStaticHyperLinkDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +// "About" action was activated +LONG CStaticHyperLinkDlg::OnAboutActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + + return (LONG)1; +} + +// "Close" action was activated +LONG CStaticHyperLinkDlg::OnCloseActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + // just close the dialog + EndDialog(IDOK); + + return (LONG)1; +} + +void CStaticHyperLinkDlg::OnStnClickedStaticEmailAndrei() +{ + // TODO: Add your control notification handler code here +} + +void CStaticHyperLinkDlg::OnStnClickedStaticFax() +{ + // TODO: Add your control notification handler code here +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.h new file mode 100644 index 0000000..c94f9c4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkDlg.h @@ -0,0 +1,67 @@ +// StaticHyperLinkDlg.h : header file +// + +#include "CustomizableStaticHyperLink.h" +#include "CustomizableStatic.h" + +#if !defined(AFX_STATICHYPERLINKDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STATICHYPERLINKDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CStaticHyperLinkDlg dialog + +class CStaticHyperLinkDlg : public CDialog +{ +// Construction +public: + CStaticHyperLinkDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CStaticHyperLinkDlg) + enum { IDD = IDD_STATICHYPERLINK_DIALOG }; + CCustomizableStatic m_ctlStaticHint; + CCustomizableStatic m_ctlStaticSampleCaption; + CCustomizableStaticHyperLink m_ctlStaticSolitaire; + CCustomizableStaticHyperLink m_ctlStaticWebUT; + CCustomizableStaticHyperLink m_ctlStaticWebDundas; + CCustomizableStaticHyperLink m_ctlStaticFax; + CCustomizableStaticHyperLink m_ctlStaticEmailSales; + CCustomizableStaticHyperLink m_ctlStaticEmailAndrei; + CCustomizableStaticHyperLink m_ctlStaticClose; + CCustomizableStaticHyperLink m_ctlStaticBillGates; + CCustomizableStaticHyperLink m_ctlStaticAbout; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStaticHyperLinkDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CStaticHyperLinkDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + afx_msg LONG OnAboutActivated(UINT wParam, LONG lParam); + afx_msg LONG OnCloseActivated(UINT wParam, LONG lParam); + DECLARE_MESSAGE_MAP() +public: + afx_msg void OnStnClickedStaticEmailAndrei(); + afx_msg void OnStnClickedStaticFax(); +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATICHYPERLINKDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkInfo.rtf new file mode 100644 index 0000000..780a2a2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StaticHyperLinkInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.cpp new file mode 100644 index 0000000..2a4197c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// StaticHyperLink.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.h new file mode 100644 index 0000000..92958f7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.rc2 new file mode 100644 index 0000000..9d5056b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/res/StaticHyperLink.rc2 @@ -0,0 +1,13 @@ +// +// STATICHYPERLINK.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/resource.h new file mode 100644 index 0000000..3e113d6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticHyperLink/resource.h @@ -0,0 +1,54 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by StaticHyperLink.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_STATICHYPERLINK_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDD_CUSTOMIZESTATICHYPERLINK_DIALOG 130 +#define IDD_CUSTOMIZESTATIC_DIALOG 131 +#define IDC_STATIC_BILL_GATES 1000 +#define IDC_STATIC_EMAIL_ANDREI 1001 +#define IDC_STATIC_ABOUT 1002 +#define IDC_STATIC_WEB_UT 1003 +#define IDC_STATIC_WEB_DUNDAS 1004 +#define IDC_STATIC_FAX 1005 +#define IDC_STATIC_EMAIL_SALES 1006 +#define IDC_STATIC_SOLITAIRE 1007 +#define IDC_STATIC_CLOSE 1008 +#define IDC_COMBO_ACTION 1009 +#define IDC_BUTTON_CLR_VISITED 1010 +#define IDC_BUTTON_CLR_UNVISITED 1011 +#define IDC_BUTTON_FONT 1012 +#define IDC_CHECK_USE_WINDOW_TEXT 1013 +#define IDC_CHECK_ERROR_NOTIFY 1014 +#define IDC_CHECK_FIT_TO_TEXT 1015 +#define IDC_CHECK_SHOW_TOOLTIP 1016 +#define IDC_EDIT_FILE 1017 +#define IDC_EDIT_PARAMETERS 1018 +#define IDC_EDIT_DEFAULT_DIRECTORY 1019 +#define IDC_EDIT_TOOLTIP_TEXT 1020 +#define IDC_CHECK_USE_SPECIAL_CURSOR 1021 +#define IDC_EDIT_VISITED_COLOR 1023 +#define IDC_EDIT_UNVISITED_COLOR 1024 +#define IDC_EDIT_CALLBACK_MESSAGE_ID 1026 +#define IDC_EDIT_FONT_NAME 1027 +#define IDC_EDIT_WINDOW_TEXT 1028 +#define IDC_SAMPLE_CAPTION 1029 +#define IDC_BUTTON_COLOR 1030 +#define IDC_EDIT_COLOR 1031 +#define IDC_STATIC_HINT 1032 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1033 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.cpp new file mode 100644 index 0000000..2cd07fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.cpp @@ -0,0 +1,191 @@ +// AttrDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "StatText.h" +#include "AttrDialog.h" + +#include "OXStaticText.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAttrDialog dialog + + +CAttrDialog::CAttrDialog(CWnd* pParent /*=NULL*/) + : CDialog(CAttrDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CAttrDialog) + m_sCaption = _T(""); + m_sFont = _T(""); + m_BlueVal = 0; + m_GreenVal = 0; + m_RedVal = 0; + m_bkBlueVal = 0; + m_bkGreenVal = 0; + m_bkRedVal = 0; + m_Height = 0; + m_Bold = TRUE; + m_Italic = FALSE; + m_Under = FALSE; + m_Striked = FALSE; + m_OffsetVal = 0; + m_bEmboss = FALSE; + m_bRaised = FALSE; + //}}AFX_DATA_INIT + m_nEllipseMode = 0; +} + + +void CAttrDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAttrDialog) + DDX_Control(pDX, IDC_TEST_STATIC, m_TestStatic); + DDX_Control(pDX, IDC_OFFSET_SPIN, m_OffsetSpin); + DDX_Control(pDX, IDC_OFFSET_EDIT, m_OffsetEdit); + DDX_Control(pDX, IDC_HEIGHT_SPIN, m_HeightSpin); + DDX_Control(pDX, IDC_HEIGHT_EDIT, m_HeightEdit); + DDX_Control(pDX, IDC_BKRED_SPIN, m_bkRedSpin); + DDX_Control(pDX, IDC_BKRED_EDIT, m_bkRedEdit); + DDX_Control(pDX, IDC_BKGREEN_SPIN, m_bkGreenSpin); + DDX_Control(pDX, IDC_BKGREEN_EDIT, m_bkGreenEdit); + DDX_Control(pDX, IDC_BKBLUE_SPIN, m_bkBlueSpin); + DDX_Control(pDX, IDC_BKBLUE_EDIT, m_bkBlueEdit); + DDX_Control(pDX, IDC_RED_SPIN, m_RedSpin); + DDX_Control(pDX, IDC_GREEN_SPIN, m_GreenSpin); + DDX_Control(pDX, IDC_BLUE_SPIN, m_BlueSpin); + DDX_Control(pDX, IDC_RED_EDIT, m_RedEdit); + DDX_Control(pDX, IDC_GREEN_EDIT, m_GreenEdit); + DDX_Control(pDX, IDC_BLUE_EDIT, m_BlueEdit); + DDX_Text(pDX, IDC_CAPTION_EDIT, m_sCaption); + DDX_Text(pDX, IDC_FONT_EDIT, m_sFont); + DDX_Text(pDX, IDC_BLUE_EDIT, m_BlueVal); + DDV_MinMaxInt(pDX, m_BlueVal, 0, 255); + DDX_Text(pDX, IDC_GREEN_EDIT, m_GreenVal); + DDV_MinMaxInt(pDX, m_GreenVal, 0, 255); + DDX_Text(pDX, IDC_RED_EDIT, m_RedVal); + DDV_MinMaxInt(pDX, m_RedVal, 0, 255); + DDX_Text(pDX, IDC_BKBLUE_EDIT, m_bkBlueVal); + DDV_MinMaxInt(pDX, m_bkBlueVal, 0, 255); + DDX_Text(pDX, IDC_BKGREEN_EDIT, m_bkGreenVal); + DDV_MinMaxInt(pDX, m_bkGreenVal, 0, 255); + DDX_Text(pDX, IDC_BKRED_EDIT, m_bkRedVal); + DDV_MinMaxInt(pDX, m_bkRedVal, 0, 255); + DDX_Text(pDX, IDC_HEIGHT_EDIT, m_Height); + DDV_MinMaxInt(pDX, m_Height, 1, 100); + DDX_Check(pDX, IDC_BOLD_CHECK, m_Bold); + DDX_Check(pDX, IDC_ITALIC_CHECK, m_Italic); + DDX_Check(pDX, IDC_UNDER_CHECK, m_Under); + DDX_Check(pDX, IDC_STRIKE_CHECK, m_Striked); + DDX_Text(pDX, IDC_OFFSET_EDIT, m_OffsetVal); + DDV_MinMaxDWord(pDX, m_OffsetVal, 0, 100); + DDX_Check(pDX, IDC_EMBOSS_CHECK, m_bEmboss); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CAttrDialog, CDialog) + //{{AFX_MSG_MAP(CAttrDialog) + ON_BN_CLICKED(IDC_BEGREP_RADIO, OnBegrepRadio) + ON_BN_CLICKED(IDC_MIDREP_RADIO, OnMidrepRadio) + ON_BN_CLICKED(IDC_ENDREP_RADIO, OnEndrepRadio) + ON_BN_CLICKED(IDC_NOREP_RADIO, OnNorepRadio) + ON_BN_CLICKED(IDC_APPLY_BUTTON, OnApplyButton) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAttrDialog message handlers + +BOOL CAttrDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + + m_RedSpin.SetBuddy(&m_RedEdit); + m_RedSpin.SetRange(0, 255); + m_GreenSpin.SetBuddy(&m_GreenEdit); + m_GreenSpin.SetRange(0, 255); + m_BlueSpin.SetBuddy(&m_BlueEdit); + m_BlueSpin.SetRange(0, 255); + + m_bkRedSpin.SetBuddy(&m_bkRedEdit); + m_bkRedSpin.SetRange(0, 255); + m_bkGreenSpin.SetBuddy(&m_bkGreenEdit); + m_bkGreenSpin.SetRange(0, 255); + m_bkBlueSpin.SetBuddy(&m_bkBlueEdit); + m_bkBlueSpin.SetRange(0, 255); + + m_HeightSpin.SetBuddy(&m_HeightEdit); + m_HeightSpin.SetRange(1, 100); + + m_OffsetSpin.SetBuddy(&m_OffsetEdit); + m_OffsetSpin.SetRange(0, 100); + + switch ( m_nEllipseMode ) + { + case OX_BEGIN_ELLIPSES: + CheckRadioButton(IDC_BEGREP_RADIO, IDC_NOREP_RADIO, IDC_BEGREP_RADIO); + break; + case OX_MIDDLE_ELLIPSES: + CheckRadioButton(IDC_BEGREP_RADIO, IDC_NOREP_RADIO, IDC_MIDREP_RADIO); + break; + case OX_END_ELLIPSES: + CheckRadioButton(IDC_BEGREP_RADIO, IDC_NOREP_RADIO, IDC_ENDREP_RADIO); + break; + default: + CheckRadioButton(IDC_BEGREP_RADIO, IDC_NOREP_RADIO, IDC_NOREP_RADIO); + break; + } + + OnApplyButton(); + + m_TestStatic.SetStaticEdge(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CAttrDialog::OnBegrepRadio() +{ + m_nEllipseMode = OX_BEGIN_ELLIPSES; +} + +void CAttrDialog::OnMidrepRadio() +{ + m_nEllipseMode = OX_MIDDLE_ELLIPSES; +} + +void CAttrDialog::OnEndrepRadio() +{ + m_nEllipseMode = OX_END_ELLIPSES; +} + +void CAttrDialog::OnNorepRadio() +{ + m_nEllipseMode = OX_NO_ELLIPSES; +} + +void CAttrDialog::OnApplyButton() + { + if (!UpdateData(TRUE)) + return; + + m_TestStatic.SetWindowText(m_sCaption); + m_TestStatic.SetFontName(m_sFont); + m_TestStatic.SetTextColor(RGB(m_RedVal, m_GreenVal, m_BlueVal)); + m_TestStatic.SetBkColor(RGB(m_bkRedVal, m_bkGreenVal, m_bkBlueVal)); + m_TestStatic.SetFontHeight(m_Height); + m_TestStatic.SetFontAttr(OX_BOLD_FONT, m_Bold); + m_TestStatic.SetFontAttr(OX_ITALIC_FONT, m_Italic); + m_TestStatic.SetFontAttr(OX_UNDERLINED_FONT, m_Under); + m_TestStatic.SetFontAttr(OX_STRIKED_OUT_FONT, m_Striked); + m_TestStatic.Set3Doffset(m_OffsetVal); + m_TestStatic.SetEllipseMode(m_nEllipseMode); + m_TestStatic.SetEmboss(m_bEmboss, m_bRaised, TRUE); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.h new file mode 100644 index 0000000..1b32301 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/AttrDialog.h @@ -0,0 +1,87 @@ +#if !defined(AFX_ATTRDIALOG_H__48BCEDC6_5699_11D1_A990_0000929B340A__INCLUDED_) +#define AFX_ATTRDIALOG_H__48BCEDC6_5699_11D1_A990_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// AttrDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CAttrDialog dialog + +#include "OXSpinCtrl.h" +#include "OXStaticText.h" + +class CAttrDialog : public CDialog +{ +// Construction +public: + int m_nEllipseMode; + CAttrDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CAttrDialog) + enum { IDD = IDD_ATTR_DIALOG }; + COXStaticText m_TestStatic; + COXSpinCtrl m_OffsetSpin; + CEdit m_OffsetEdit; + COXSpinCtrl m_HeightSpin; + CEdit m_HeightEdit; + COXSpinCtrl m_bkRedSpin; + CEdit m_bkRedEdit; + COXSpinCtrl m_bkGreenSpin; + CEdit m_bkGreenEdit; + COXSpinCtrl m_bkBlueSpin; + CEdit m_bkBlueEdit; + COXSpinCtrl m_RedSpin; + COXSpinCtrl m_GreenSpin; + COXSpinCtrl m_BlueSpin; + CEdit m_RedEdit; + CEdit m_GreenEdit; + CEdit m_BlueEdit; + CString m_sCaption; + CString m_sFont; + int m_BlueVal; + int m_GreenVal; + int m_RedVal; + int m_bkBlueVal; + int m_bkGreenVal; + int m_bkRedVal; + int m_Height; + BOOL m_Bold; + BOOL m_Italic; + BOOL m_Under; + BOOL m_Striked; + DWORD m_OffsetVal; + BOOL m_bEmboss; + BOOL m_bRaised; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAttrDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CAttrDialog) + virtual BOOL OnInitDialog(); + afx_msg void OnBegrepRadio(); + afx_msg void OnMidrepRadio(); + afx_msg void OnEndrepRadio(); + afx_msg void OnNorepRadio(); + afx_msg void OnApplyButton(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ATTRDIALOG_H__48BCEDC6_5699_11D1_A990_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.clw new file mode 100644 index 0000000..d2b243e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.clw @@ -0,0 +1,246 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CStatTextApp +LastTemplate=CAnimateCtrl +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "stattext.h" +LastPage=0 + +ClassCount=3 +Class1=CAttrDialog +Class2=CStatTextApp +Class3=CStatTextDlg + +ResourceCount=4 +Resource1=IDD_ATTR_DIALOG +Resource2=IDD_STATTEXT_DIALOG (English (U.S.)) +Resource3=IDD_ATTR_DIALOG (English (U.S.)) +Resource4=IDD_STATTEXT_DIALOG + +[CLS:CAttrDialog] +Type=0 +BaseClass=CDialog +HeaderFile=AttrDialog.h +ImplementationFile=AttrDialog.cpp +LastObject=CAttrDialog + +[CLS:CStatTextApp] +Type=0 +BaseClass=CWinApp +HeaderFile=StatText.h +ImplementationFile=StatText.cpp +LastObject=CStatTextApp +Filter=N +VirtualFilter=AC + +[CLS:CStatTextDlg] +Type=0 +BaseClass=CDialog +HeaderFile=StatTextDlg.h +ImplementationFile=StatTextDlg.cpp +LastObject=CStatTextDlg +Filter=D +VirtualFilter=dWC + +[DLG:IDD_ATTR_DIALOG] +Type=1 +Class=CAttrDialog +ControlCount=46 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_CAPTION_EDIT,edit,1350631552 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_RED_EDIT,edit,1350639745 +Control6=IDC_RED_SPIN,msctls_updown32,1342177314 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_GREEN_EDIT,edit,1350639745 +Control9=IDC_GREEN_SPIN,msctls_updown32,1342177314 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_BLUE_EDIT,edit,1350639745 +Control12=IDC_BLUE_SPIN,msctls_updown32,1342177314 +Control13=IDC_STATIC,button,1342177287 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_BKRED_EDIT,edit,1350639745 +Control16=IDC_BKRED_SPIN,msctls_updown32,1342177314 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_BKGREEN_EDIT,edit,1350639745 +Control19=IDC_BKGREEN_SPIN,msctls_updown32,1342177314 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_BKBLUE_EDIT,edit,1350639745 +Control22=IDC_BKBLUE_SPIN,msctls_updown32,1342177314 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_HEIGHT_EDIT,edit,1350639745 +Control25=IDC_HEIGHT_SPIN,msctls_updown32,1342177314 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_FONT_EDIT,edit,1350631553 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_OFFSET_EDIT,edit,1350639745 +Control30=IDC_OFFSET_SPIN,msctls_updown32,1342177314 +Control31=IDC_BOLD_CHECK,button,1342242819 +Control32=IDC_ITALIC_CHECK,button,1342242819 +Control33=IDC_UNDER_CHECK,button,1342242819 +Control34=IDC_STRIKE_CHECK,button,1342242819 +Control35=IDC_STATIC,button,1342177287 +Control36=IDC_BEGREP_RADIO,button,1342242825 +Control37=IDC_MIDREP_RADIO,button,1342242825 +Control38=IDC_ENDREP_RADIO,button,1342242825 +Control39=IDC_NOREP_RADIO,button,1342242825 +Control40=IDOK,button,1342242817 +Control41=IDCANCEL,button,1342242816 +Control42=IDC_EMBOSS_CHECK,button,1342242819 +Control43=IDC_TEST_STATIC,static,1476526080 +Control44=IDC_APPLY_BUTTON,button,1342242817 +Control45=IDC_STATIC,button,1342177287 +Control46=IDC_STATIC,button,1342177287 + +[DLG:IDD_STATTEXT_DIALOG] +Type=1 +Class=CStatTextDlg +ControlCount=44 +Control1=IDC_RADIO_HORZ_LEFT,button,1342373897 +Control2=IDC_RADIO_HORZ_CENTER,button,1342242825 +Control3=IDC_RADIO_HORZ_RIGHT,button,1342242825 +Control4=IDC_RADIO_VERT_TOP,button,1342373897 +Control5=IDC_RADIO_VERT_CENTER,button,1342242825 +Control6=IDC_RADIO_VERT_BOTTOM,button,1342242825 +Control7=IDC_B_RAISED_RADIO,button,1342373897 +Control8=IDC_B_STATIC_RADIO,button,1342242825 +Control9=IDC_B_DOTTED_RADIO,button,1342242825 +Control10=IDC_B_NORMAL_RADIO,button,1342242825 +Control11=IDC_B_CLIENT_RADIO,button,1342242825 +Control12=IDC_COMPAT_RADIO,button,1342373897 +Control13=IDC_ADVAN_RADIO,button,1342242825 +Control14=IDC_ATTR_BUTTON,button,1342242816 +Control15=IDC_ANGLE_EDIT,edit,1350639745 +Control16=IDC_ANGLE_SPIN,msctls_updown32,1342177314 +Control17=IDC_ORIENT_EDIT,edit,1350639745 +Control18=IDC_ORIENT_SPIN,msctls_updown32,1342177314 +Control19=IDC_EDIT_GAP_WIDTH,edit,1350639745 +Control20=IDC_SPIN_GAP_WIDTH,msctls_updown32,1342177314 +Control21=IDC_EDIT_GAP_HEIGHT,edit,1350639745 +Control22=IDC_SPIN_GAP_HEIGHT,msctls_updown32,1342177314 +Control23=IDCANCEL,button,1342242816 +Control24=IDC_SCROLL_CHECK,button,1342250755 +Control25=IDC_SPEED_EDIT,edit,1350639745 +Control26=IDC_SPEED_SPIN,msctls_updown32,1342177314 +Control27=IDC_DIR_EDIT,edit,1350639745 +Control28=IDC_DIR_SPIN,msctls_updown32,1342177314 +Control29=IDC_RESTORE_BUTTON,button,1342242816 +Control30=IDC_STATIC,button,1342177287 +Control31=IDC_STATIC,button,1342308359 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,static,1342308352 +Control34=IDC_STATIC,button,1342177287 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,static,1342308352 +Control37=IDC_STATIC,button,1342177287 +Control38=IDC_STATIC,button,1342177287 +Control39=IDC_STATIC,static,1342308352 +Control40=IDC_STATIC,static,1342308352 +Control41=IDC_STATIC,static,1342308352 +Control42=IDC_STATIC,static,1342308352 +Control43=IDC_STATIC,static,1342308352 +Control44=IDC_STATIC_TEST,static,1342308352 + +[DLG:IDD_STATTEXT_DIALOG (English (U.S.))] +Type=1 +Class=CStatTextDlg +ControlCount=44 +Control1=IDC_RADIO_HORZ_LEFT,button,1342373897 +Control2=IDC_RADIO_HORZ_CENTER,button,1342242825 +Control3=IDC_RADIO_HORZ_RIGHT,button,1342242825 +Control4=IDC_RADIO_VERT_TOP,button,1342373897 +Control5=IDC_RADIO_VERT_CENTER,button,1342242825 +Control6=IDC_RADIO_VERT_BOTTOM,button,1342242825 +Control7=IDC_B_RAISED_RADIO,button,1342373897 +Control8=IDC_B_STATIC_RADIO,button,1342242825 +Control9=IDC_B_DOTTED_RADIO,button,1342242825 +Control10=IDC_B_NORMAL_RADIO,button,1342242825 +Control11=IDC_B_CLIENT_RADIO,button,1342242825 +Control12=IDC_COMPAT_RADIO,button,1342373897 +Control13=IDC_ADVAN_RADIO,button,1342242825 +Control14=IDC_ATTR_BUTTON,button,1342242816 +Control15=IDC_ANGLE_EDIT,edit,1350639745 +Control16=IDC_ANGLE_SPIN,msctls_updown32,1342177314 +Control17=IDC_ORIENT_EDIT,edit,1350639745 +Control18=IDC_ORIENT_SPIN,msctls_updown32,1342177314 +Control19=IDC_EDIT_GAP_WIDTH,edit,1350639745 +Control20=IDC_SPIN_GAP_WIDTH,msctls_updown32,1342177314 +Control21=IDC_EDIT_GAP_HEIGHT,edit,1350639745 +Control22=IDC_SPIN_GAP_HEIGHT,msctls_updown32,1342177314 +Control23=IDCANCEL,button,1342242816 +Control24=IDC_SCROLL_CHECK,button,1342250755 +Control25=IDC_SPEED_EDIT,edit,1350639745 +Control26=IDC_SPEED_SPIN,msctls_updown32,1342177314 +Control27=IDC_DIR_EDIT,edit,1350639745 +Control28=IDC_DIR_SPIN,msctls_updown32,1342177314 +Control29=IDC_RESTORE_BUTTON,button,1342242816 +Control30=IDC_STATIC,button,1342177287 +Control31=IDC_STATIC,button,1342308359 +Control32=IDC_STATIC,static,1342308352 +Control33=IDC_STATIC,static,1342308352 +Control34=IDC_STATIC,button,1342177287 +Control35=IDC_STATIC,static,1342308352 +Control36=IDC_STATIC,static,1342308352 +Control37=IDC_STATIC,button,1342177287 +Control38=IDC_STATIC,button,1342177287 +Control39=IDC_STATIC,static,1342308352 +Control40=IDC_STATIC,static,1342308352 +Control41=IDC_STATIC,static,1342308352 +Control42=IDC_STATIC,static,1342308352 +Control43=IDC_STATIC,static,1342308352 +Control44=IDC_STATIC_TEST,static,1342308352 + +[DLG:IDD_ATTR_DIALOG (English (U.S.))] +Type=1 +Class=CAttrDialog +ControlCount=46 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_CAPTION_EDIT,edit,1350631552 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_RED_EDIT,edit,1350639745 +Control6=IDC_RED_SPIN,msctls_updown32,1342177314 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_GREEN_EDIT,edit,1350639745 +Control9=IDC_GREEN_SPIN,msctls_updown32,1342177314 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_BLUE_EDIT,edit,1350639745 +Control12=IDC_BLUE_SPIN,msctls_updown32,1342177314 +Control13=IDC_STATIC,button,1342177287 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_BKRED_EDIT,edit,1350639745 +Control16=IDC_BKRED_SPIN,msctls_updown32,1342177314 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_BKGREEN_EDIT,edit,1350639745 +Control19=IDC_BKGREEN_SPIN,msctls_updown32,1342177314 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_BKBLUE_EDIT,edit,1350639745 +Control22=IDC_BKBLUE_SPIN,msctls_updown32,1342177314 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_HEIGHT_EDIT,edit,1350639745 +Control25=IDC_HEIGHT_SPIN,msctls_updown32,1342177314 +Control26=IDC_STATIC,static,1342308352 +Control27=IDC_FONT_EDIT,edit,1350631553 +Control28=IDC_STATIC,static,1342308352 +Control29=IDC_OFFSET_EDIT,edit,1350639745 +Control30=IDC_OFFSET_SPIN,msctls_updown32,1342177314 +Control31=IDC_BOLD_CHECK,button,1342242819 +Control32=IDC_ITALIC_CHECK,button,1342242819 +Control33=IDC_UNDER_CHECK,button,1342242819 +Control34=IDC_STRIKE_CHECK,button,1342242819 +Control35=IDC_STATIC,button,1342177287 +Control36=IDC_BEGREP_RADIO,button,1342242825 +Control37=IDC_MIDREP_RADIO,button,1342242825 +Control38=IDC_ENDREP_RADIO,button,1342242825 +Control39=IDC_NOREP_RADIO,button,1342242825 +Control40=IDOK,button,1342242817 +Control41=IDCANCEL,button,1342242816 +Control42=IDC_EMBOSS_CHECK,button,1342242819 +Control43=IDC_TEST_STATIC,static,1476526080 +Control44=IDC_APPLY_BUTTON,button,1342242817 +Control45=IDC_STATIC,button,1342177287 +Control46=IDC_STATIC,button,1342177287 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.cpp new file mode 100644 index 0000000..8ddec6e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.cpp @@ -0,0 +1,101 @@ +// StatText.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "StatText.h" +#include "StatTextDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatTextApp + +BEGIN_MESSAGE_MAP(CStatTextApp, CWinApp) + //{{AFX_MSG_MAP(CStatTextApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatTextApp construction + +CStatTextApp::CStatTextApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CStatTextApp object + +CStatTextApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CStatTextApp initialization + +BOOL CStatTextApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CStatTextDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CStatTextApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.h new file mode 100644 index 0000000..a6d1d8d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.h @@ -0,0 +1,50 @@ +// StatText.h : main header file for the STATTEXT application +// + +#if !defined(AFX_STATTEXT_H__A9D6005F_542B_11D1_A98F_0000929B340A__INCLUDED_) +#define AFX_STATTEXT_H__A9D6005F_542B_11D1_A98F_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CStatTextApp: +// See StatText.cpp for the implementation of this class +// + +class CStatTextApp : public CWinApp +{ +public: + CStatTextApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatTextApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CStatTextApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATTEXT_H__A9D6005F_542B_11D1_A98F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.rc new file mode 100644 index 0000000..c2f6144 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatText.rc @@ -0,0 +1,298 @@ +// 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" + "\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\StatText.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\r\n" + "#include ""OXSpinCtrl.rc"" // Spin ctrl resources\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\\StatText.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_STATTEXT_DIALOG DIALOGEX 0, 0, 287, 260 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "COXStaText Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Left",IDC_RADIO_HORZ_LEFT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,65,174,28,10 + CONTROL "Center-H",IDC_RADIO_HORZ_CENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,107,174,44,10 + CONTROL "Right",IDC_RADIO_HORZ_RIGHT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,156,174,33,10 + CONTROL "Top",IDC_RADIO_VERT_TOP,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,65,188,28,10 + CONTROL "Center-V",IDC_RADIO_VERT_CENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,107,188,43,10 + CONTROL "Bottom",IDC_RADIO_VERT_BOTTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,156,188,38,10 + CONTROL "Raised",IDC_B_RAISED_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,214,38,8 + CONTROL "Static",IDC_B_STATIC_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,54,214,34,8 + CONTROL "Dotted",IDC_B_DOTTED_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,88,214,37,8 + CONTROL "Normal",IDC_B_NORMAL_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,128,214,38,8 + CONTROL "Client",IDC_B_CLIENT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,169,214,38,8 + CONTROL "Compatible",IDC_COMPAT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,240,51,8 + CONTROL "Advanced",IDC_ADVAN_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,72,240,49,8 + PUSHBUTTON "Font attributes...",IDC_ATTR_BUTTON,134,232,76,21 + EDITTEXT IDC_ANGLE_EDIT,222,28,32,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_ANGLE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,255,28,22,12 + EDITTEXT IDC_ORIENT_EDIT,222,64,32,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_ORIENT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,255,64,22,12 + EDITTEXT IDC_EDIT_GAP_WIDTH,235,92,29,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_SPIN_GAP_WIDTH,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,267,92,11,12 + EDITTEXT IDC_EDIT_GAP_HEIGHT,235,107,29,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_SPIN_GAP_HEIGHT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,267,107,11,12 + PUSHBUTTON "Cancel",IDCANCEL,223,130,50,14 + CONTROL "Start",IDC_SCROLL_CHECK,"Button",BS_AUTOCHECKBOX | BS_CENTER | BS_VCENTER | BS_PUSHLIKE | WS_TABSTOP,223,147,50,14 + EDITTEXT IDC_SPEED_EDIT,223,193,38,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_SPEED_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,263,193,11,12 + EDITTEXT IDC_DIR_EDIT,223,217,38,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_DIR_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,263,217,11,12 + PUSHBUTTON "Restore pos.",IDC_RESTORE_BUTTON,223,232,51,14 + GROUPBOX "Border Style",IDC_STATIC,7,203,203,24 + GROUPBOX "Graphics Mode",IDC_STATIC,7,229,119,24,WS_GROUP + LTEXT "Escapement (degrees)",IDC_STATIC,224,10,48,17 + LTEXT "Orientation (degrees)",IDC_STATIC,224,45,52,17 + GROUPBOX "Scrolling",IDC_STATIC,219,163,61,90 + LTEXT "Speed (pixels/second)",IDC_STATIC,223,175,50,17 + LTEXT "Direction (deg)",IDC_STATIC,223,207,50,9 + GROUPBOX "",IDC_STATIC,219,3,61,122 + GROUPBOX "Alignment",IDC_STATIC,7,163,203,40 + LTEXT "Horizontal",IDC_STATIC,15,174,32,8 + LTEXT "Vertical",IDC_STATIC,15,188,24,8 + LTEXT "Gap (pixels)",IDC_STATIC,222,81,38,8 + LTEXT "W",IDC_STATIC,223,94,8,8 + LTEXT "H",IDC_STATIC,223,109,8,8 + LTEXT "",IDC_STATIC_TEST,7,7,203,152,0,WS_EX_STATICEDGE +END + +IDD_ATTR_DIALOG DIALOG 0, 0, 238, 202 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Font attributes" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Caption:",IDC_STATIC,7,9,27,8 + EDITTEXT IDC_CAPTION_EDIT,37,7,194,12,ES_AUTOHSCROLL + GROUPBOX "Font color",IDC_STATIC,7,20,106,55 + LTEXT "Red:",IDC_STATIC,14,32,22,8 + EDITTEXT IDC_RED_EDIT,44,30,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_RED_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,96,30,11,12 + LTEXT "Green:",IDC_STATIC,14,45,22,8 + EDITTEXT IDC_GREEN_EDIT,44,43,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_GREEN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,96,43,11,12 + LTEXT "Blue:",IDC_STATIC,14,59,22,8 + EDITTEXT IDC_BLUE_EDIT,44,57,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_BLUE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,96,57,11,12 + GROUPBOX "Background color",IDC_STATIC,125,20,106,55 + LTEXT "Red:",IDC_STATIC,132,32,22,8 + EDITTEXT IDC_BKRED_EDIT,162,30,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_BKRED_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,214,30,11,12 + LTEXT "Green:",IDC_STATIC,132,45,22,8 + EDITTEXT IDC_BKGREEN_EDIT,162,43,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_BKGREEN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,214,43,11,12 + LTEXT "Blue:",IDC_STATIC,132,59,22,8 + EDITTEXT IDC_BKBLUE_EDIT,162,57,51,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_BKBLUE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,214,57,11,12 + LTEXT "Height:",IDC_STATIC,7,82,24,8 + EDITTEXT IDC_HEIGHT_EDIT,34,79,50,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_HEIGHT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,84,80,11,12 + LTEXT "Font:",IDC_STATIC,105,83,18,8 + EDITTEXT IDC_FONT_EDIT,125,80,106,12,ES_CENTER | ES_AUTOHSCROLL + LTEXT "3D offset:",IDC_STATIC,138,103,31,8 + EDITTEXT IDC_OFFSET_EDIT,171,100,30,12,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_OFFSET_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,201,100,11,12 + CONTROL "Bold",IDC_BOLD_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,125,29,8 + CONTROL "Italic",IDC_ITALIC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,66,125,30,8 + CONTROL "Underlined",IDC_UNDER_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,172,125,47,8 + CONTROL "Striked out",IDC_STRIKE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,125,49,8 + GROUPBOX "Character replacing",IDC_STATIC,7,137,224,20 + CONTROL "Begin",IDC_BEGREP_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,146,32,8 + CONTROL "Middle",IDC_MIDREP_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,66,146,35,8 + CONTROL "End",IDC_ENDREP_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,123,146,27,8 + CONTROL "No replacing",IDC_NOREP_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,172,146,53,8 + DEFPUSHBUTTON "OK",IDOK,185,165,46,14 + PUSHBUTTON "Cancel",IDCANCEL,185,181,46,14 + CONTROL "Embossed",IDC_EMBOSS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,28,103,49,8 + LTEXT "Static",IDC_TEST_STATIC,7,163,107,32,WS_DISABLED + DEFPUSHBUTTON "Apply",IDC_APPLY_BUTTON,125,170,46,14 + GROUPBOX "Text Style",IDC_STATIC,7,115,224,22 + GROUPBOX "3D Text Style",IDC_STATIC,7,93,224,22 +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 "040904b0" + BEGIN + VALUE "CompanyName", "Dundas Software Ltd." + VALUE "FileDescription", "StatText MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "StatText" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "StatText.EXE" + VALUE "ProductName", "StatText Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_STATTEXT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 280 + TOPMARGIN, 7 + BOTTOMMARGIN, 253 + END + + IDD_ATTR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 231 + TOPMARGIN, 7 + BOTTOMMARGIN, 195 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About StatText..." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "StaticText" + ID_DESCRIPTION_FILE "StaticTextInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\StatText.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +#include "OXSpinCtrl.rc" // Spin ctrl resources +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.cpp new file mode 100644 index 0000000..5b5f57e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.cpp @@ -0,0 +1,444 @@ +// StatTextDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "StatText.h" +#include "StatTextDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#include "AttrDialog.h" + +///////////////////////////////////////////////////////////////////////////// +// CStatTextDlg dialog + +CStatTextDlg::CStatTextDlg(CWnd* pParent /*=NULL*/) + : CDialog(CStatTextDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CStatTextDlg) + m_nAngleValue = 0; + m_nOrientValue = 0; + m_nSpeedValue = 0; + m_bScroll = FALSE; + m_nDirValue = 0; + m_nHorzAlignment = 1; + m_nVertAlignment = 1; + m_nBorderStyle = 4; + m_nGraphicalMode = 0; + m_nGapHeight = 0; + m_nGapWidth = 0; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CStatTextDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CStatTextDlg) + DDX_Control(pDX, IDC_STATIC_TEST, m_StaticText); + DDX_Control(pDX, IDC_EDIT_GAP_WIDTH, m_ctlEditGapWidth); + DDX_Control(pDX, IDC_EDIT_GAP_HEIGHT, m_ctlEditGapHeight); + DDX_Control(pDX, IDC_SPIN_GAP_WIDTH, m_ctlSpinGapWidth); + DDX_Control(pDX, IDC_SPIN_GAP_HEIGHT, m_ctlSpinGapHeight); + DDX_Control(pDX, IDC_DIR_SPIN, m_DirSpin); + DDX_Control(pDX, IDC_DIR_EDIT, m_DirEdit); + DDX_Control(pDX, IDC_SPEED_SPIN, m_SpeedSpin); + DDX_Control(pDX, IDC_SPEED_EDIT, m_SpeedEdit); + DDX_Control(pDX, IDC_ORIENT_SPIN, m_OrientSpin); + DDX_Control(pDX, IDC_ORIENT_EDIT, m_OrientEdit); + DDX_Control(pDX, IDC_ANGLE_SPIN, m_AngleSpin); + DDX_Control(pDX, IDC_ANGLE_EDIT, m_AngleEdit); + DDX_Text(pDX, IDC_ANGLE_EDIT, m_nAngleValue); + DDV_MinMaxInt(pDX, m_nAngleValue, -180, 180); + DDX_Text(pDX, IDC_ORIENT_EDIT, m_nOrientValue); + DDV_MinMaxInt(pDX, m_nOrientValue, -180, 180); + DDX_Text(pDX, IDC_SPEED_EDIT, m_nSpeedValue); + DDV_MinMaxInt(pDX, m_nSpeedValue, 0, 100); + DDX_Check(pDX, IDC_SCROLL_CHECK, m_bScroll); + DDX_Text(pDX, IDC_DIR_EDIT, m_nDirValue); + DDV_MinMaxInt(pDX, m_nDirValue, -360, 360); + DDX_Radio(pDX, IDC_RADIO_HORZ_LEFT, m_nHorzAlignment); + DDX_Radio(pDX, IDC_RADIO_VERT_TOP, m_nVertAlignment); + DDX_Radio(pDX, IDC_B_RAISED_RADIO, m_nBorderStyle); + DDX_Radio(pDX, IDC_COMPAT_RADIO, m_nGraphicalMode); + DDX_Text(pDX, IDC_EDIT_GAP_HEIGHT, m_nGapHeight); + DDV_MinMaxInt(pDX, m_nGapHeight, 0, 100); + DDX_Text(pDX, IDC_EDIT_GAP_WIDTH, m_nGapWidth); + DDV_MinMaxInt(pDX, m_nGapWidth, 0, 100); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CStatTextDlg, CDialog) + //{{AFX_MSG_MAP(CStatTextDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_EN_CHANGE(IDC_ANGLE_EDIT, OnChangeAngleEdit) + ON_EN_CHANGE(IDC_ORIENT_EDIT, OnChangeOrientEdit) + ON_BN_CLICKED(IDC_ADVAN_RADIO, OnAdvanRadio) + ON_BN_CLICKED(IDC_COMPAT_RADIO, OnCompatRadio) + ON_EN_CHANGE(IDC_SPEED_EDIT, OnChangeSpeedEdit) + ON_BN_CLICKED(IDC_SCROLL_CHECK, OnScrollCheck) + ON_EN_CHANGE(IDC_DIR_EDIT, OnChangeDirEdit) + ON_BN_CLICKED(IDC_ATTR_BUTTON, OnAttrButton) + ON_BN_CLICKED(IDC_RESTORE_BUTTON, OnRestoreButton) + ON_BN_CLICKED(IDC_B_RAISED_RADIO, OnBRaisedRadio) + ON_BN_CLICKED(IDC_B_STATIC_RADIO, OnBStaticRadio) + ON_BN_CLICKED(IDC_B_DOTTED_RADIO, OnBDottedRadio) + ON_BN_CLICKED(IDC_B_NORMAL_RADIO, OnBNormalRadio) + ON_BN_CLICKED(IDC_B_CLIENT_RADIO, OnBClientRadio) + ON_BN_CLICKED(IDC_RADIO_HORZ_CENTER, OnRadioHorzCenter) + ON_BN_CLICKED(IDC_RADIO_HORZ_LEFT, OnRadioHorzLeft) + ON_BN_CLICKED(IDC_RADIO_HORZ_RIGHT, OnRadioHorzRight) + ON_BN_CLICKED(IDC_RADIO_VERT_BOTTOM, OnRadioVertBottom) + ON_BN_CLICKED(IDC_RADIO_VERT_CENTER, OnRadioVertCenter) + ON_BN_CLICKED(IDC_RADIO_VERT_TOP, OnRadioVertTop) + ON_EN_CHANGE(IDC_EDIT_GAP_HEIGHT, OnChangeEditGapHeight) + ON_EN_CHANGE(IDC_EDIT_GAP_WIDTH, OnChangeEditGapWidth) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatTextDlg message handlers + +BOOL CStatTextDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Set the Static Text window. + LPTSTR psText = _T("Static Text"); + int /*nTextLeft = 10, nTextTop = 10,*/ nTextHeight = 30; + m_StaticText.SetWindowText(psText); + m_StaticText.SetTextColor(RGB(0, 0, 0)); + m_StaticText.SetBkColor(RGB(192, 192, 192)); + + LOGFONT lf; + if(m_StaticText.GetLogFont(&lf)) + { + lf.lfHeight=nTextHeight; + lf.lfWidth=0; + lf.lfItalic=TRUE; + lf.lfWeight=900; + m_StaticText.SetLogFont(&lf); + } + m_StaticText.SetFontName(_T("Arial")); + + m_StaticText.SetEmboss(); + m_StaticText.SetClientEdge(); + m_StaticText.SetCharSet(ANSI_CHARSET,TRUE); + + // Set the String Angle (Escapement) spin. + m_AngleSpin.SetBuddy(&m_AngleEdit); + m_AngleSpin.SetRange(-180, 180); + m_AngleSpin.SetPos(0); + + // Set the Character Angle (Orientation) spin. + m_OrientSpin.SetBuddy(&m_OrientEdit); + m_OrientSpin.SetRange(-180, 180); + m_OrientSpin.SetPos(0); + + // Set the Speed spin. + m_SpeedSpin.SetBuddy(&m_SpeedEdit); + m_SpeedSpin.SetRange(0, 100); + m_SpeedSpin.SetPos(0); + + // Set the Direction spin. + m_DirSpin.SetBuddy(&m_DirEdit); + m_DirSpin.SetRange(-360, 360); + m_DirSpin.SetPos(0); + + // Set the GapSize spins. + m_ctlSpinGapWidth.SetBuddy(&m_ctlEditGapWidth); + m_ctlSpinGapWidth.SetRange(0, 100); + m_ctlSpinGapWidth.SetPos(0); + m_ctlSpinGapHeight.SetBuddy(&m_ctlEditGapHeight); + m_ctlSpinGapHeight.SetRange(0, 100); + m_ctlSpinGapHeight.SetPos(0); + + // Set other controls. + CheckRadioButton(IDC_COMPAT_RADIO, IDC_ADVAN_RADIO, IDC_COMPAT_RADIO); + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CStatTextDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CStatTextDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CStatTextDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CStatTextDlg::OnChangeAngleEdit() +// Set the Escapement (string angle) value. +{ + if (!UpdateData(TRUE)) + return; + m_StaticText.SetStringAngle(m_nAngleValue * 10, TRUE); +} + +void CStatTextDlg::OnChangeOrientEdit() +// Set the Orientation (character angle) value. +{ + if (!UpdateData(TRUE)) + return; + m_StaticText.SetCharAngle(m_nOrientValue * 10, TRUE); +} + +void CStatTextDlg::OnChangeSpeedEdit() +// Set the Speed [of text scrolling] value. +{ + if (!UpdateData(TRUE)) + return; + m_StaticText.SetScrollSpeed(m_nSpeedValue); +} + +void CStatTextDlg::OnChangeDirEdit() +// Set the Direction [of text scrolling] value. +{ + if (!UpdateData(TRUE)) + return; + + m_StaticText.SetScrollDirection(m_nDirValue, TRUE); +} + +void CStatTextDlg::OnAdvanRadio() +// Set graphics mode to "Advanced". +{ + m_StaticText.SetGraphicsMode(GM_ADVANCED, TRUE); +} + +void CStatTextDlg::OnCompatRadio() +// Set graphics mode to "Compatible". +{ + m_StaticText.SetGraphicsMode(GM_COMPATIBLE, TRUE); +} + +void CStatTextDlg::OnScrollCheck() +// Start/stop text scrolling. +{ + if (!UpdateData(TRUE)) + return; + m_StaticText.StartScrolling(m_bScroll); +} + +void CStatTextDlg::OnRestoreButton() +// Restore scrolled text position. +{ + m_bScroll = FALSE; + if (!UpdateData(TRUE)) + return; + + m_StaticText.StartScrolling(m_bScroll); + m_StaticText.RestoreTextPos(); +} + +void CStatTextDlg::OnAttrButton() +// View the dialog box to set the text attributes. +{ + CAttrDialog dlgAttr; + + dlgAttr.m_sCaption = m_StaticText.GetText(); + dlgAttr.m_sFont = m_StaticText.GetFontName(); + dlgAttr.m_RedVal = GetRValue(m_StaticText.GetTextColor()); + dlgAttr.m_GreenVal = GetGValue(m_StaticText.GetTextColor()); + dlgAttr.m_BlueVal = GetBValue(m_StaticText.GetTextColor()); + dlgAttr.m_bkRedVal = GetRValue(m_StaticText.GetBkColor()); + dlgAttr.m_bkGreenVal = GetGValue(m_StaticText.GetBkColor()); + dlgAttr.m_bkBlueVal = GetBValue(m_StaticText.GetBkColor()); + dlgAttr.m_Height = m_StaticText.GetFontHeight(); + dlgAttr.m_Bold = m_StaticText.IsBold(); + dlgAttr.m_Italic = m_StaticText.IsItalic(); + dlgAttr.m_Under = m_StaticText.IsUnderlined(); + dlgAttr.m_Striked = m_StaticText.IsStrikedOut(); + dlgAttr.m_OffsetVal = m_StaticText.Get3Doffset(); + dlgAttr.m_nEllipseMode = m_StaticText.GetEllipseMode(); + dlgAttr.m_bEmboss = m_StaticText.GetEmboss(); + + if ( dlgAttr.DoModal() == IDOK ) + { + m_StaticText.SetWindowText(dlgAttr.m_sCaption); + + m_StaticText.SetTextColor(RGB(dlgAttr.m_RedVal, dlgAttr.m_GreenVal, dlgAttr.m_BlueVal)); + m_StaticText.SetBkColor(RGB(dlgAttr.m_bkRedVal, dlgAttr.m_bkGreenVal, dlgAttr.m_bkBlueVal)); + + m_StaticText.SetFontName(dlgAttr.m_sFont); + m_StaticText.SetFontHeight(dlgAttr.m_Height); + m_StaticText.SetFontAttr(OX_BOLD_FONT, dlgAttr.m_Bold); + m_StaticText.SetFontAttr(OX_ITALIC_FONT, dlgAttr.m_Italic); + m_StaticText.SetFontAttr(OX_UNDERLINED_FONT, dlgAttr.m_Under); + m_StaticText.SetFontAttr(OX_STRIKED_OUT_FONT, dlgAttr.m_Striked); + + m_StaticText.SetEllipseMode(dlgAttr.m_nEllipseMode); + + m_StaticText.Set3Doffset(dlgAttr.m_OffsetVal); + m_StaticText.SetEmboss(dlgAttr.m_bEmboss, dlgAttr.m_bRaised, TRUE); + } +} + +void CStatTextDlg::OnBRaisedRadio() + { + m_StaticText.SetRaisedEdge(); + } + +void CStatTextDlg::OnBStaticRadio() + { + m_StaticText.SetStaticEdge(); + } + +void CStatTextDlg::OnBDottedRadio() + { + m_StaticText.SetDottedEdge(); + } + +void CStatTextDlg::OnBNormalRadio() + { + m_StaticText.SetPlainBorder(); + } + +void CStatTextDlg::OnBClientRadio() + { + m_StaticText.SetClientEdge(); + } + +void CStatTextDlg::OnRadioHorzCenter() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetHorzAlignment(OX_ALIGNHORZ_CENTER,TRUE); +} + +void CStatTextDlg::OnRadioHorzLeft() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetHorzAlignment(OX_ALIGNHORZ_LEFT,TRUE); +} + +void CStatTextDlg::OnRadioHorzRight() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetHorzAlignment(OX_ALIGNHORZ_RIGHT,TRUE); +} + +void CStatTextDlg::OnRadioVertBottom() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetVertAlignment(OX_ALIGNVERT_BOTTOM,TRUE); +} + +void CStatTextDlg::OnRadioVertCenter() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetVertAlignment(OX_ALIGNVERT_CENTER,TRUE); +} + +void CStatTextDlg::OnRadioVertTop() +{ + // TODO: Add your control notification handler code here + m_StaticText.SetVertAlignment(OX_ALIGNVERT_TOP,TRUE); +} + +void CStatTextDlg::OnChangeEditGapHeight() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + if(UpdateData()) + { + CSize szGapSize=m_StaticText.GetGapSize(); + szGapSize.cy=m_nGapHeight; + m_StaticText.SetGapSize(szGapSize,TRUE); + } +} + +void CStatTextDlg::OnChangeEditGapWidth() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function to send the EM_SETEVENTMASK message to the control + // with the ENM_CHANGE flag ORed into the lParam mask. + + // TODO: Add your control notification handler code here + if(UpdateData()) + { + CSize szGapSize=m_StaticText.GetGapSize(); + szGapSize.cx=m_nGapWidth; + m_StaticText.SetGapSize(szGapSize,TRUE); + } + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.h new file mode 100644 index 0000000..fd365a3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StatTextDlg.h @@ -0,0 +1,99 @@ +// StatTextDlg.h : header file +// + +#if !defined(AFX_STATTEXTDLG_H__A9D60061_542B_11D1_A98F_0000929B340A__INCLUDED_) +#define AFX_STATTEXTDLG_H__A9D60061_542B_11D1_A98F_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXSpinCtrl.h" +#include "OXStaticText.h" + +#define IDC_STATICTEXT WM_USER + 100 + +///////////////////////////////////////////////////////////////////////////// +// CStatTextDlg dialog + +class CStatTextDlg : public CDialog +{ +// Construction +public: + CStatTextDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CStatTextDlg) + enum { IDD = IDD_STATTEXT_DIALOG }; + COXStaticText m_StaticText; + CEdit m_ctlEditGapWidth; + CEdit m_ctlEditGapHeight; + COXSpinCtrl m_ctlSpinGapWidth; + COXSpinCtrl m_ctlSpinGapHeight; + COXSpinCtrl m_DirSpin; + CEdit m_DirEdit; + COXSpinCtrl m_SpeedSpin; + CEdit m_SpeedEdit; + COXSpinCtrl m_OrientSpin; + CEdit m_OrientEdit; + COXSpinCtrl m_AngleSpin; + CEdit m_AngleEdit; + int m_nAngleValue; + int m_nOrientValue; + int m_nSpeedValue; + BOOL m_bScroll; + int m_nDirValue; + int m_nHorzAlignment; + int m_nVertAlignment; + int m_nBorderStyle; + int m_nGraphicalMode; + int m_nGapHeight; + int m_nGapWidth; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatTextDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CStatTextDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnChangeAngleEdit(); + afx_msg void OnChangeOrientEdit(); + afx_msg void OnAdvanRadio(); + afx_msg void OnCompatRadio(); + afx_msg void OnChangeSpeedEdit(); + afx_msg void OnScrollCheck(); + afx_msg void OnChangeDirEdit(); + afx_msg void OnAttrButton(); + afx_msg void OnRestoreButton(); + afx_msg void OnBRaisedRadio(); + afx_msg void OnBStaticRadio(); + afx_msg void OnBDottedRadio(); + afx_msg void OnBNormalRadio(); + afx_msg void OnBClientRadio(); + afx_msg void OnRadioHorzCenter(); + afx_msg void OnRadioHorzLeft(); + afx_msg void OnRadioHorzRight(); + afx_msg void OnRadioVertBottom(); + afx_msg void OnRadioVertCenter(); + afx_msg void OnRadioVertTop(); + afx_msg void OnChangeEditGapHeight(); + afx_msg void OnChangeEditGapWidth(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATTEXTDLG_H__A9D60061_542B_11D1_A98F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsp new file mode 100644 index 0000000..3779969 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsp @@ -0,0 +1,269 @@ +# Microsoft Developer Studio Project File - Name="StaticText" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StaticText - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StaticText.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StaticText.mak" CFG="StaticText - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StaticText - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StaticText - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StaticText - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "StaticText - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "StaticText - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StaticText - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"StatText.exe" + +!ELSEIF "$(CFG)" == "StaticText - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"StatText.exe" + +!ELSEIF "$(CFG)" == "StaticText - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "StaticTe" +# PROP BASE Intermediate_Dir "StaticTe" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"StatText.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"StatText.exe" + +!ELSEIF "$(CFG)" == "StaticText - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "StaticT0" +# PROP BASE Intermediate_Dir "StaticT0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"StatText.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"StatText.exe" + +!ELSEIF "$(CFG)" == "StaticText - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "StaticT1" +# PROP BASE Intermediate_Dir "StaticT1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"StatText.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"StatText.exe" + +!ENDIF + +# Begin Target + +# Name "StaticText - Win32 Release" +# Name "StaticText - Win32 Debug" +# Name "StaticText - Win32 Release_Shared" +# Name "StaticText - Win32 Unicode_Debug" +# Name "StaticText - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticText.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\AttrDialog.cpp +# End Source File +# Begin Source File + +SOURCE=.\StatText.cpp +# End Source File +# Begin Source File + +SOURCE=.\StatText.rc +# End Source File +# Begin Source File + +SOURCE=.\StatTextDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\AttrDialog.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticText.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticText.inl +# End Source File +# Begin Source File + +SOURCE=.\StatText.h +# End Source File +# Begin Source File + +SOURCE=.\StatTextDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\StatText.ico +# End Source File +# Begin Source File + +SOURCE=.\res\StatText.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\StatText.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsw new file mode 100644 index 0000000..8943c02 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StaticText"=".\StaticText.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/StaticText", DNJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.vcproj new file mode 100644 index 0000000..be10312 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticText.vcproj @@ -0,0 +1,977 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticTextInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticTextInfo.rtf new file mode 100644 index 0000000..18db940 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StaticTextInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.cpp new file mode 100644 index 0000000..075d5ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// StatText.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.h new file mode 100644 index 0000000..15d50e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A9D60063_542B_11D1_A98F_0000929B340A__INCLUDED_) +#define AFX_STDAFX_H__A9D60063_542B_11D1_A98F_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A9D60063_542B_11D1_A98F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinHor.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinHor.cur new file mode 100644 index 0000000..d3c12ca Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinHor.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinVer.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinVer.cur new file mode 100644 index 0000000..f2f5139 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/OXSpinVer.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinHor.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinHor.cur new file mode 100644 index 0000000..d3c12ca Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinHor.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinVer.cur b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinVer.cur new file mode 100644 index 0000000..f2f5139 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/SpinVer.cur differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.rc2 new file mode 100644 index 0000000..4f8a3cd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/res/StatText.rc2 @@ -0,0 +1,13 @@ +// +// STATTEXT.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/resource.h new file mode 100644 index 0000000..71d2879 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/StaticText/resource.h @@ -0,0 +1,84 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by StatText.rc +// +#define IDC_APPLY_BUTTON 3 +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_STATTEXT_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_SPINVERCUR 129 +#define ID_DESCRIPTION_FILE 129 +#define IDC_SPINHORCUR 130 +#define IDD_ATTR_DIALOG 131 +#define IDC_ANGLE_EDIT 1000 +#define IDC_ANGLE_SPIN 1001 +#define IDC_ORIENT_EDIT 1002 +#define IDC_ORIENT_SPIN 1003 +#define IDC_COMPAT_RADIO 1004 +#define IDC_ADVAN_RADIO 1005 +#define IDC_GREEN_SPIN 1005 +#define IDC_SPEED_EDIT 1006 +#define IDC_GREEN_EDIT 1006 +#define IDC_SPEED_SPIN 1007 +#define IDC_RED_SPIN 1007 +#define IDC_SCROLL_CHECK 1008 +#define IDC_RED_EDIT 1008 +#define IDC_DIR_EDIT 1009 +#define IDC_BLUE_SPIN 1009 +#define IDC_DIR_SPIN 1010 +#define IDC_BLUE_EDIT 1010 +#define IDC_ATTR_BUTTON 1011 +#define IDC_BKRED_EDIT 1011 +#define IDC_CAPTION_EDIT 1012 +#define IDC_EDIT_GAP_WIDTH 1012 +#define IDC_FONT_EDIT 1013 +#define IDC_SPIN_GAP_WIDTH 1013 +#define IDC_BKRED_SPIN 1014 +#define IDC_EDIT_GAP_HEIGHT 1014 +#define IDC_BKGREEN_EDIT 1015 +#define IDC_SPIN_GAP_HEIGHT 1015 +#define IDC_BKGREEN_SPIN 1016 +#define IDC_BKBLUE_EDIT 1017 +#define IDC_BKBLUE_SPIN 1018 +#define IDC_HEIGHT_EDIT 1019 +#define IDC_BOLD_CHECK 1020 +#define IDC_ITALIC_CHECK 1021 +#define IDC_UNDER_CHECK 1022 +#define IDC_STRIKE_CHECK 1023 +#define IDC_HEIGHT_SPIN 1024 +#define IDC_OFFSET_EDIT 1025 +#define IDC_OFFSET_SPIN 1026 +#define IDC_MININT_EDIT 1027 +#define IDC_RESTORE_BUTTON 1028 +#define IDC_MININT_SPIN 1028 +#define IDC_BEGREP_RADIO 1029 +#define IDC_MIDREP_RADIO 1030 +#define IDC_B_RAISED_RADIO 1030 +#define IDC_ENDREP_RADIO 1031 +#define IDC_B_STATIC_RADIO 1031 +#define IDC_NOREP_RADIO 1032 +#define IDC_B_DOTTED_RADIO 1032 +#define IDC_EMBOSS_CHECK 1033 +#define IDC_B_NORMAL_RADIO 1033 +#define IDC_B_CLIENT_RADIO 1034 +#define IDC_TEST_STATIC 1035 +#define IDC_RADIO_HORZ_LEFT 1036 +#define IDC_RADIO_HORZ_CENTER 1037 +#define IDC_RADIO_HORZ_RIGHT 1038 +#define IDC_RADIO_VERT_TOP 1039 +#define IDC_RADIO_VERT_CENTER 1040 +#define IDC_RADIO_VERT_BOTTOM 1041 +#define IDC_STATIC_TEST 1042 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1043 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.cpp new file mode 100644 index 0000000..de60b99 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.cpp @@ -0,0 +1,104 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" +#include "StatisticsView.h" +#include "ChildFrm.h" +#include "MyFormView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + cs.lpszClass=AfxRegisterWndClass(CS_DBLCLKS,NULL,NULL, + AfxGetApp()->LoadIcon(IDR_TABVIETYPE)); + ASSERT(cs.lpszClass); + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + // TODO: Add your specialized code here and/or call the base class + + UNREFERENCED_PARAMETER(lpcs); + + if(!m_TabViewContainer.Create(this)) + return FALSE; + + if(!m_TabViewContainer.AddPage(pContext->m_pNewViewClass, + pContext,_T("Editor"))) + return FALSE; + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CHexView), + pContext,_T("HexView"))) + return FALSE; + + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CStatisticsView), + pContext,_T("Statistics"))) + return FALSE; + + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CMyFormView), + pContext,_T("FormView"))) + return FALSE; + + m_TabViewContainer.SetActivePageIndex(0); + + return TRUE; + +// return CMDIChildWnd::OnCreateClient(lpcs,pContext); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.h new file mode 100644 index 0000000..6d4b2b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ChildFrm.h @@ -0,0 +1,61 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXTabView.h" + + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXTabViewContainer m_TabViewContainer; + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__14C1632E_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.cpp new file mode 100644 index 0000000..668ff51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.cpp @@ -0,0 +1,187 @@ +// HexView.cpp : implementation file +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHexView + +IMPLEMENT_DYNCREATE(CHexView, CEditView) + +CHexView::CHexView() +{ +} + +CHexView::~CHexView() +{ +} + + +BEGIN_MESSAGE_MAP(CHexView, CEditView) + //{{AFX_MSG_MAP(CHexView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHexView diagnostics + +#ifdef _DEBUG +void CHexView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CHexView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CTabViewsDoc* CHexView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CHexView message handlers + +void CHexView::AddText(LPCTSTR pszText) +{ + LONG nWindowTextLength; + nWindowTextLength = GetEditCtrl().GetWindowTextLength(); + GetEditCtrl().SetSel(nWindowTextLength, nWindowTextLength); + GetEditCtrl().ReplaceSel(pszText); +} + + +BOOL CHexView::PreCreateWindow(CREATESTRUCT& cs) +{ + BOOL bRet = CEditView::PreCreateWindow(cs); + cs.style |= ES_READONLY; + return bRet; +} + +void CHexView::OnInitialUpdate() +{ + CEditView::OnInitialUpdate(); + + // Create a fixed size font + if((HFONT)m_font==NULL) + { + m_font.CreateFont( 0, // nHeight + 0, // nWidth + 0, // nEscapement + 0, // nOrientation + FW_DONTCARE, // nWeight + FALSE, // bItalic + FALSE, // bUnderline + 0, // cStrikeOut + DEFAULT_CHARSET, // nCharSet + OUT_DEFAULT_PRECIS, // nOutPrecision + CLIP_DEFAULT_PRECIS, // nClipPrecision + DEFAULT_QUALITY, // nQuality + FIXED_PITCH, // nPitchAndFamily + NULL); // lpszFacename + } + + GetEditCtrl().SetFont(&m_font, FALSE); + + TextToHex(TRUE); +} + +void CHexView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + if(bActivate && pActivateView==this) + { + SetRedraw(FALSE); + TextToHex(FALSE); + SetRedraw(TRUE); + } + + CEditView::OnActivateView(bActivate, pActivateView, pDeactiveView); + +} + +void CHexView::TextToHex(BOOL bForFirstTime/*=FALSE*/) +{ + CTabViewsDoc* pDoc=(CTabViewsDoc*)GetDocument(); + ASSERT_VALID(pDoc); + + CTabViewsView* pPrimaryView=(CTabViewsView*)pDoc->GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + + if(!bForFirstTime && !pPrimaryView->GetEditCtrl().GetModify()) + return; + + CString sText; + + UINT nMaxIndex=pPrimaryView->GetBufferLength(); + if(nMaxIndex>0) + { + if(GetBufferLength()>0) + { + GetEditCtrl().SetReadOnly(FALSE); + GetEditCtrl().SetSel(0,GetBufferLength(),TRUE); + GetEditCtrl().Clear(); + GetEditCtrl().SetReadOnly(TRUE); + } + + + LPCTSTR pData=pPrimaryView->LockBuffer(); + ASSERT(pData!=NULL); + + UINT nIndex=0; + CString sRaw; + CString sHex; + CString sHexTemp; + + while(nIndexUnlockBuffer(); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.h new file mode 100644 index 0000000..6432363 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/HexView.h @@ -0,0 +1,64 @@ +// HexView.h : header file +// + +#ifndef _HEXVIEW_H_ +#define _HEXVIEW_H_ + +#include "OXTabView.h" + +///////////////////////////////////////////////////////////////////////////// +// CHexView view + +class CHexView : public COXTabViewPage +{ +protected: + CHexView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CHexView) + +// Attributes +public: + CTabViewsDoc* GetDocument(); + +// Operations +public: + virtual ~CHexView(); + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHexView) + public: + virtual void OnInitialUpdate(); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +protected: + CFont m_font; + + void TextToHex(BOOL bForFirstTime=FALSE); + void AddText(LPCTSTR pszText); + + // Generated message map functions +protected: + //{{AFX_MSG(CHexView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in HexView.cpp +inline CTabViewsDoc* CHexView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +#endif // _HEXVIEW_H_ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.cpp new file mode 100644 index 0000000..a8158b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.cpp @@ -0,0 +1,147 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" +#include "StatisticsView.h" +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CMainFrameWindow) + +BEGIN_MESSAGE_MAP(CMainFrame, CMainFrameWindow) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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 (CMainFrameWindow::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this) || + !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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | CBRS_GRIPPER ); + + // 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); + + // Let the menu organizer fix our menus + Organizer.AttachFrameWnd(this); + // use button from toolbars with corresponding items in menu + Organizer.AutoSetMenuImage(); + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMainFrameWindow::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMainFrameWindow::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMainFrameWindow::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + + +BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) +{ + // TODO: Add your specialized code here and/or call the base class + +#ifndef _MDI_INTERFACE + UNREFERENCED_PARAMETER(lpcs); + + if(!m_TabViewContainer.Create(this)) + return FALSE; + + if(!m_TabViewContainer.AddPage(pContext->m_pNewViewClass, + pContext,_T("Editor"))) + return FALSE; + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CHexView), + pContext,_T("HexView"))) + return FALSE; + + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CStatisticsView), + pContext,_T("Statistics"))) + return FALSE; + + m_TabViewContainer.SetActivePageIndex(0); + + return TRUE; +#else + return COXMenuBarFrame:: + OnCreateClient(lpcs, pContext); +#endif +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.h new file mode 100644 index 0000000..e65f9f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MainFrm.h @@ -0,0 +1,74 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXBitmapMenuOrganizer.h" +#include "OXCoolToolBar.h" +#include "OXMenuBar.h" +#include "OXTabView.h" + + +class CMainFrame : public COXMenuBarFrame +{ + DECLARE_DYNCREATE(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// 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; + COXCoolToolBar m_wndToolBar; + + // to show bitmaps in menu + // just to make the framework look pretty + COXBitmapMenuOrganizer Organizer; + +#ifndef _MDI_INTERFACE + COXTabViewContainer m_TabViewContainer; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__14C1632C_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.cpp new file mode 100644 index 0000000..3040176 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.cpp @@ -0,0 +1,62 @@ +// MyFormView.cpp : implementation file +// + +#include "stdafx.h" +#include "tabviews.h" +#include "MyFormView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyFormView + +IMPLEMENT_DYNCREATE(CMyFormView, CFormView) + +CMyFormView::CMyFormView() + : COXTabViewPage(CMyFormView::IDD) +{ + //{{AFX_DATA_INIT(CMyFormView) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +CMyFormView::~CMyFormView() +{ +} + +void CMyFormView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMyFormView) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CMyFormView, CFormView) + //{{AFX_MSG_MAP(CMyFormView) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMyFormView diagnostics + +#ifdef _DEBUG +void CMyFormView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CMyFormView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMyFormView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.h new file mode 100644 index 0000000..dd11f01 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/MyFormView.h @@ -0,0 +1,65 @@ +#if !defined(AFX_MYFORMVIEW_H__82E1866F_87F1_4DE5_8D4A_81246B2F90B9__INCLUDED_) +#define AFX_MYFORMVIEW_H__82E1866F_87F1_4DE5_8D4A_81246B2F90B9__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// MyFormView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CMyFormView form view + +#ifndef __AFXEXT_H__ +#include +#endif + +#include "OXTabView.h" + +class CMyFormView : public COXTabViewPage +{ +protected: + CMyFormView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CMyFormView) + +// Form Data +public: + //{{AFX_DATA(CMyFormView) + enum { IDD = IDD_FORMVIEW }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyFormView) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CMyFormView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions + //{{AFX_MSG(CMyFormView) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MYFORMVIEW_H__82E1866F_87F1_4DE5_8D4A_81246B2F90B9__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ReadMe.txt new file mode 100644 index 0000000..279e16a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/ReadMe.txt @@ -0,0 +1,102 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : TabViews +======================================================================== + + +AppWizard has created this TabViews 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 TabViews application. + +TabViews.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CTabViewsApp application class. + +TabViews.cpp + This is the main application source file that contains the application + class CTabViewsApp. + +TabViews.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 + Developer Studio. + +res\TabViews.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file TabViews.rc. + +res\TabViews.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +TabViews.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +///////////////////////////////////////////////////////////////////////////// + +For the main frame window: + +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 along with the + array in MainFrm.cpp to add more toolbar buttons. + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one document type and one view: + +TabViewsDoc.h, TabViewsDoc.cpp - the document + These files contain your CTabViewsDoc class. Edit these files to + add your special document data and to implement file saving and loading + (via CTabViewsDoc::Serialize). + +TabViewsView.h, TabViewsView.cpp - the view of the document + These files contain your CTabViewsView class. + CTabViewsView objects are used to view CTabViewsDoc objects. + +res\TabViewsDoc.ico + This is an icon file, which is used as the icon for MDI child windows + for the CTabViewsDoc class. This icon is included by the main + resource file TabViews.rc. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named TabViews.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.cpp new file mode 100644 index 0000000..6dacb76 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.cpp @@ -0,0 +1,181 @@ +// StatisticsView.cpp : implementation file +// + +#include "stdafx.h" +#include "tabviews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "StatisticsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView + +IMPLEMENT_DYNCREATE(CStatisticsView, CListView) + +CStatisticsView::CStatisticsView() +{ +} + +CStatisticsView::~CStatisticsView() +{ +} + + +BEGIN_MESSAGE_MAP(CStatisticsView, CListView) + //{{AFX_MSG_MAP(CStatisticsView) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView drawing + +void CStatisticsView::OnDraw(CDC* pDC) +{ + // TODO: add draw code here + + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView diagnostics + +#ifdef _DEBUG +void CStatisticsView::AssertValid() const +{ + CListView::AssertValid(); +} + +void CStatisticsView::Dump(CDumpContext& dc) const +{ + CListView::Dump(dc); +} + +CTabViewsDoc* CStatisticsView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView message handlers + +BOOL CStatisticsView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Add your specialized code here and/or call the base class + + cs.style |= LVS_REPORT; + return CListView::PreCreateWindow(cs); +} + +void CStatisticsView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) +{ + // TODO: Add your specialized code here and/or call the base class + + if(bActivate && pActivateView==this) + { + SetRedraw(FALSE); + Populate(); + SetRedraw(TRUE); + RedrawWindow(); + } + + CListView::OnActivateView(bActivate, pActivateView, pDeactiveView); +} + +void CStatisticsView::OnInitialUpdate() +{ + CListView::OnInitialUpdate(); + + // TODO: Add your specialized code here and/or call the base class + Populate(TRUE); +} + +void CStatisticsView::Populate(BOOL bForFirstTime/*=FALSE*/) +{ + CTabViewsDoc* pDoc=(CTabViewsDoc*)GetDocument(); + ASSERT_VALID(pDoc); + + CTabViewsView* pPrimaryView=(CTabViewsView*)pDoc->GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + + if(!bForFirstTime && !pPrimaryView->GetEditCtrl().GetModify()) + return; + + GetListCtrl().DeleteAllItems(); + + CMap arrCharacters; + UINT nMaxIndex=pPrimaryView->GetBufferLength(); + LPCTSTR pData=pPrimaryView->LockBuffer(); + ASSERT(pData!=NULL); + + int nIndex=0; + for(nIndex=0; nIndex<(int)nMaxIndex; nIndex++) + { + if(_istprint(pData[nIndex])) + { + int nCount; + if(!arrCharacters.Lookup((TCHAR)pData[nIndex],nCount)) + nCount=0; + nCount++; + arrCharacters.SetAt((TCHAR)pData[nIndex],nCount); + } + } + + nIndex=0; + POSITION pos=arrCharacters.GetStartPosition(); + while(pos!=NULL) + { + int nCount; + TCHAR chr; + arrCharacters.GetNextAssoc(pos,chr,nCount); + CString sChar=chr; + if(chr==32) + { + sChar=_T("Space"); + } + + VERIFY(GetListCtrl().InsertItem(nIndex,sChar)!=-1); + + CString sCount; + sCount.Format(_T("%u"),nCount); + VERIFY(GetListCtrl().SetItemText(nIndex,1,sCount)); + + nIndex++; + } + + pPrimaryView->UnlockBuffer(); +} + +int CStatisticsView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CListView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + LV_COLUMN lvc; + lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; + lvc.fmt=LVCFMT_LEFT; + lvc.iSubItem=0; + lvc.cx=75; + lvc.pszText=_T("Character"); + GetListCtrl().InsertColumn(0,&lvc); + + lvc.mask=LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM|LVCF_FMT; + lvc.fmt=LVCFMT_CENTER; + lvc.iSubItem=1; + lvc.cx=50; + lvc.pszText=_T("Count"); + GetListCtrl().InsertColumn(1,&lvc); + + return 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.h new file mode 100644 index 0000000..bd0b110 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StatisticsView.h @@ -0,0 +1,69 @@ +#if !defined(AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_) +#define AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// StatisticsView.h : header file +// + +#include "OXTabView.h" + +///////////////////////////////////////////////////////////////////////////// +// CStatisticsView view + +class CStatisticsView : public COXTabViewPage +{ +protected: + CStatisticsView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CStatisticsView) + +// Attributes +public: + +// Operations +public: + CTabViewsDoc* GetDocument(); + +protected: + void Populate(BOOL bForFirstTime=FALSE); + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CStatisticsView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CStatisticsView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions +protected: + //{{AFX_MSG(CStatisticsView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in StatisticsView.cpp +inline CTabViewsDoc* CStatisticsView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STATISTICSVIEW_H__BC7A1604_77E6_11D2_A76E_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.cpp new file mode 100644 index 0000000..5f41789 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// TabViews.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.h new file mode 100644 index 0000000..1591fa3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__14C1632A_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.clw new file mode 100644 index 0000000..ced1e0e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.clw @@ -0,0 +1,240 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMyFormView +LastTemplate=CFormView +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "tabviews.h" +LastPage=0 + +ClassCount=8 +Class1=CChildFrame +Class2=CHexView +Class3=CMainFrame +Class4=CStatisticsView +Class5=CTabViewsApp +Class6=CTabViewsDoc +Class7=CTabViewsView + +ResourceCount=5 +Resource1=IDR_MAINFRAME (English (U.S.)) +Resource2=IDR_TABVIETYPE (English (U.S.)) +Resource3=IDR_TABVIETYPE +Resource4=IDR_MAINFRAME +Class8=CMyFormView +Resource5=IDD_FORMVIEW + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CHexView] +Type=0 +BaseClass=CEditView +HeaderFile=HexView.h +ImplementationFile=HexView.cpp +LastObject=CHexView +Filter=C +VirtualFilter=VWC + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +VirtualFilter=fWC +LastObject=CMainFrame + +[CLS:CTabViewsApp] +Type=0 +BaseClass=CWinApp +HeaderFile=TabViews.h +ImplementationFile=TabViews.cpp + +[CLS:CTabViewsDoc] +Type=0 +BaseClass=CDocument +HeaderFile=TabViewsDoc.h +ImplementationFile=TabViewsDoc.cpp + +[CLS:CTabViewsView] +Type=0 +BaseClass=CEditView +HeaderFile=TabViewsView.h +ImplementationFile=TabViewsView.cpp + +[TB:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_TABVIETYPE (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_VIEW_TOOLBAR +Command15=ID_VIEW_STATUS_BAR +Command16=ID_WINDOW_NEW +Command17=ID_WINDOW_CASCADE +Command18=ID_WINDOW_TILE_HORZ +Command19=ID_WINDOW_ARRANGE +Command20=ID_APP_ABOUT +CommandCount=20 + +[ACL:IDR_MAINFRAME (English (U.S.))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_TABVIETYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_SETUP +Command8=ID_FILE_MRU_FILE1 +Command9=ID_APP_EXIT +Command10=ID_EDIT_UNDO +Command11=ID_EDIT_CUT +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_VIEW_TOOLBAR +Command15=ID_VIEW_STATUS_BAR +Command16=ID_WINDOW_NEW +Command17=ID_WINDOW_CASCADE +Command18=ID_WINDOW_TILE_HORZ +Command19=ID_WINDOW_ARRANGE +Command20=ID_APP_ABOUT +CommandCount=20 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[CLS:CStatisticsView] +Type=0 +HeaderFile=StatisticsView.h +ImplementationFile=StatisticsView.cpp +BaseClass=CListView +Filter=C +LastObject=CStatisticsView +VirtualFilter=VWC + +[DLG:IDD_FORMVIEW] +Type=1 +Class=CMyFormView +ControlCount=8 +Control1=IDC_BUTTON1,button,1342242816 +Control2=IDC_EDIT1,edit,1350631552 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_COMBO1,combobox,1344340226 +Control6=IDC_BUTTON2,button,1342242816 +Control7=IDC_BUTTON3,button,1342242816 +Control8=IDC_BUTTON4,button,1342242816 + +[CLS:CMyFormView] +Type=0 +HeaderFile=MyFormView.h +ImplementationFile=MyFormView.cpp +BaseClass=CFormView +Filter=D +LastObject=CMyFormView + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.cpp new file mode 100644 index 0000000..331e0df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.cpp @@ -0,0 +1,140 @@ +// TabViews.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#include "UTSampleAbout.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp + +BEGIN_MESSAGE_MAP(CTabViewsApp, CWinApp) + //{{AFX_MSG_MAP(CTabViewsApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp construction + +CTabViewsApp::CTabViewsApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CTabViewsApp object + +CTabViewsApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp initialization + +BOOL CTabViewsApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + // Change the registry key under which our settings are stored. + // 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(8); // 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. + +#ifdef _MDI_INTERFACE + AddDocTemplate(new CMultiDocTemplate(IDR_TABVIETYPE, + RUNTIME_CLASS(CTabViewsDoc), RUNTIME_CLASS(CChildFrame), + RUNTIME_CLASS(CTabViewsView))); + m_pMainWnd = new CMainFrame; + ((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME); + m_pMainWnd->ShowWindow(m_nCmdShow); +#else + AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME, + RUNTIME_CLASS(CTabViewsDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CTabViewsView))); +#endif + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + +// if(cmdInfo.m_strFileName.IsEmpty()) +// cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing; + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // enable file manager drag/drop and DDE Execute open + m_pMainWnd->DragAcceptFiles(); + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + return TRUE; +} + +// App command to run the dialog +void CTabViewsApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp commands + +int CTabViewsApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsp new file mode 100644 index 0000000..c73eeb8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsp @@ -0,0 +1,413 @@ +# Microsoft Developer Studio Project File - Name="TabViews" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TabViews - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TabViews.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TabViews.mak" CFG="TabViews - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TabViews - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "TabViews - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TabViews - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"TabViews.exe" + +!ELSEIF "$(CFG)" == "TabViews - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"TabViews.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "TabViews - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "TabViews" +# PROP BASE Intermediate_Dir "TabViews" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x64 /subsystem:windows /machine:I386 /out:"TabViews.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"TabViews.exe" + +!ELSEIF "$(CFG)" == "TabViews - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "TabView0" +# PROP BASE Intermediate_Dir "TabView0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"TabViews.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"TabViews.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "TabViews - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "TabView1" +# PROP BASE Intermediate_Dir "TabView1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x64 /subsystem:windows /machine:I386 /out:"TabViews.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"TabViews.exe" + +!ENDIF + +# Begin Target + +# Name "TabViews - Win32 Release" +# Name "TabViews - Win32 Debug" +# Name "TabViews - Win32 Release_Shared" +# Name "TabViews - Win32 Unicode_Debug" +# Name "TabViews - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTabView.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\HexView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MyFormView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StatisticsView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TabViews.cpp +# End Source File +# Begin Source File + +SOURCE=.\TabViews.rc +# End Source File +# Begin Source File + +SOURCE=.\TabViewsDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\TabViewsView.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\HexView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MyFormView.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCoolToolBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMenuBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTabView.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StatisticsView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TabViews.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewsDoc.h +# End Source File +# Begin Source File + +SOURCE=.\TabViewsView.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\TabViews.ico +# End Source File +# Begin Source File + +SOURCE=.\res\TabViews.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\TabViewsDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\TabViews.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsw new file mode 100644 index 0000000..5dfd6cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TabViews"=".\TabViews.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Ultimate ToolBox/Working/samples/gui/TabViews", DTICAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.exe.manifest new file mode 100644 index 0000000..ccd74d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.exe.manifest @@ -0,0 +1,32 @@ + + + +Your app description here + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.h new file mode 100644 index 0000000..b4a3ca4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.h @@ -0,0 +1,59 @@ +// TabViews.h : main header file for the TABVIEWS application +// + +#if !defined(AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +#define _MDI_INTERFACE + +#ifdef _MDI_INTERFACE +#define CMainFrameWindow CMDIFrameWnd +#else +#define CMainFrameWindow CFrameWnd +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsApp: +// See TabViews.cpp for the implementation of this class +// + +class CTabViewsApp : public CWinApp +{ +public: + CTabViewsApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CTabViewsApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWS_H__14C16328_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.rc new file mode 100644 index 0000000..8b6bcc1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.rc @@ -0,0 +1,438 @@ +// 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 + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\TabViews.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" + "#include ""OXBitmapMenu.rc""\r\n" + "#include ""OXCoolToolBar.rc""\r\n" + "#include ""OXMenuBar.rc""\r\n" + "\r\n" + "#endif\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\\TabViews.ico" +IDR_TABVIETYPE ICON "res\\TabViewsDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "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 TabViews...", ID_APP_ABOUT + END +END + +IDR_TABVIETYPE 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 "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 TabViews...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "TabViews MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "TabViews" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "TabViews.EXE" + VALUE "ProductName", "TabViews Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_FORMVIEW DIALOG 0, 0, 271, 111 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Button1",IDC_BUTTON1,10,85,55,15 + EDITTEXT IDC_EDIT1,10,20,250,12,ES_AUTOHSCROLL + LTEXT "Edit box:",IDC_STATIC,10,10,75,8 + LTEXT "Combo box:",IDC_STATIC,10,45,100,8 + COMBOBOX IDC_COMBO1,10,55,250,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Button2",IDC_BUTTON2,75,85,55,15 + PUSHBUTTON "Button3",IDC_BUTTON3,140,85,55,15 + PUSHBUTTON "Button4",IDC_BUTTON4,205,85,55,15 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_FORMVIEW, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 264 + TOPMARGIN, 7 + BOTTOMMARGIN, 104 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "HexText Editor with TabViews" + IDR_TABVIETYPE "\nHText\nHText\n\n\nTabViews.Document\nHText Document" + ID_DESCRIPTION_FILE "TabViewsInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "TabViews" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\TabViews.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXBitmapMenu.rc" +#include "OXCoolToolBar.rc" +#include "OXMenuBar.rc" + +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.sln new file mode 100644 index 0000000..6787276 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabViews", "TabViews.vcproj", "{FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Debug|Win32.ActiveCfg = Debug|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Debug|Win32.Build.0 = Debug|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Release|Win32.ActiveCfg = Release|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Release|Win32.Build.0 = Release|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {FF5A6154-6D8B-49EC-8CB3-C80CFEF5928F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj new file mode 100644 index 0000000..c1561f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj @@ -0,0 +1,2390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj.vspscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj.vspscc new file mode 100644 index 0000000..6cb031b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViews.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.cpp new file mode 100644 index 0000000..80b8b73 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.cpp @@ -0,0 +1,94 @@ +// TabViewsDoc.cpp : implementation of the CTabViewsDoc class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" +#include "HexView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc + +IMPLEMENT_DYNCREATE(CTabViewsDoc, CDocument) + +BEGIN_MESSAGE_MAP(CTabViewsDoc, CDocument) + //{{AFX_MSG_MAP(CTabViewsDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc construction/destruction + +CTabViewsDoc::CTabViewsDoc() +{ + // TODO: add one-time construction code here + +} + +CTabViewsDoc::~CTabViewsDoc() +{ +} + +BOOL CTabViewsDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc serialization + +void CTabViewsDoc::Serialize(CArchive& ar) +{ + CTabViewsView* pPrimaryView=(CTabViewsView*)GetPrimaryView(); + ASSERT_VALID(pPrimaryView); + pPrimaryView->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc diagnostics + +#ifdef _DEBUG +void CTabViewsDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CTabViewsDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsDoc commands + +CEditView* CTabViewsDoc::GetPrimaryView() +{ + POSITION pos=m_viewList.GetHeadPosition(); + while(pos!=NULL) + { + CView* pView=(CView*)m_viewList.GetNext(pos); + if(pView->IsKindOf(RUNTIME_CLASS(CTabViewsView))) + return (CEditView*)pView; + } + + return NULL; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.h new file mode 100644 index 0000000..80969df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsDoc.h @@ -0,0 +1,59 @@ +// TabViewsDoc.h : interface of the CTabViewsDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + + +class CTabViewsDoc : public CDocument +{ +protected: // create from serialization only + CTabViewsDoc(); + DECLARE_DYNCREATE(CTabViewsDoc) + +// Attributes +public: + +// Operations +public: + + CEditView* GetPrimaryView(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CTabViewsDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CTabViewsDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWSDOC_H__14C16330_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsInfo.rtf new file mode 100644 index 0000000..40ab223 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsInfo.rtf @@ -0,0 +1,106 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f38\froman\fcharset238\fprq2 Times New Roman CE;} +{\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;}{\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f44\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid1966847\rsid7412567} +{\*\generator Microsoft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr18}{\revtim\yr2005\mo1\dy17\hr18}{\version3}{\edmins0}{\nofpages4}{\nofwords1122}{\nofchars6397}{\*\company Dundas India}{\nofcharsws7504} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot7412567 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid1966847 COXTabViewContainer}{\b\fs48\insrsid1966847 +\par }{\b\fs16\insrsid1966847 Copyright \'a9 }{\b\fs16\insrsid7412567 The Code Project}{\b\fs16\insrsid1966847 1997}{\b\fs16\insrsid7412567 -}{\b\fs16\insrsid1966847 }{\b\fs16\insrsid1966847 2005}{\b\fs16\insrsid1966847 , All Rights Reserved +\par }{\insrsid1966847 +\par For most applications it's not enough to use only one window to provide all output. There are different solutions for this problem like splitters or docking windows. But t +hey usually have common inconvenience: all windows are shown at the same time. They take a precious screen space while they may be rarely used. +\par +\par COXShortcutBar control can be used in order to show a number of child windows while keeping only one active (f +ully displayed) at a time. But COXShortcutBar was primarily designed to show icons and have a set of notifications that make sense only while using such controls as treeview or listview. +\par +\par Very good example of how the problem could be resolved can be found + in Developer Studio IDE. For instance "Output" window (with "Build", "Debug", "Find in Files..." panes) or "Result List" window (with "Search", "Lookup", "See Also" and "History" panes). We call them TabViews. +\par +\par TabViews can be a good alternative for splitter window when you need to have more than one view per document. Also TabViews can be used within docking window and used as a container for associated windows that are usually implemented as dialog bars. + +\par +\par So we designed new class that implements TabViews: COXTabViewContainer. +\par +\par COXTabViewContainer is easy to use. If you previously worked with splitter windows, the implementation of TabViews will be familiar to you. +\par Here is the list of steps that should be taken in order to deploy TabViews in your application: +\par +\par First Case: COXTabViewContainer will be used as a container for document view(s). +\par }\pard \ql \fi-360\li720\ri0\nowidctlpar\faauto\rin0\lin720\itap0 {\insrsid1966847 1.\tab Embed a COXTabViewContainer member variable in the parent frame (main frame window for SDI application, MDIChild window for MDI application). +\par 2.\tab Override the parent frame's CFrameWnd::OnCreateClient member function. +\par 3.\tab From within the overridden OnCreateClient, call the Create member function of COXTabViewContainer. In this function you have to specify the parent window and optionally you can specify the initial rectangle, window styles and window ID. +\par 4.\tab After COXTabViewContainer window was successfully created you can populate it with window objects using AddPage or InsertPage + function. If you are inserting view object you have to specify runtime class and context information in order not to break documentview architecture. If you are adding window object that is not a document view then you have to create it before adding to +COXTabViewContainer window. In AddPage or InsertPage functions you can specify text that will be used as page title in tab button. +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid1966847 +\par +\par Second Case: COXTabViewContainer will be used as a container for windows within control bar. +\par }\pard \ql \fi-360\li720\ri0\nowidctlpar\faauto\rin0\lin720\itap0 {\insrsid1966847 1.\tab Create your own CControlBar-derived class (you can use our COXSizeControlBar as parent class if you need sizable docking windows). Let's call CMyControlBar. +\par 2.\tab Embed a COXTabViewContainer member variable in this class. +\par 3.\tab Override CMyControlBar::OnCreate member function. +\par 4.\tab From within the overridden OnCreate, call the Create member function of COXTabViewContainer. In this function you have to specify the parent window and optionally you can specify the initial rectangle, window styles and window ID. +\par 5.\tab After COXTabViewContainer win +dow was successfully created you can populate it with window objects using AddPage or InsertPage function. You have to create window object before adding it to COXTabViewContainer. In AddPage or InsertPage functions you can specify text that will be used +as page title in tab button. +\par 6.\tab Override CMyControlBar::OnSize member function and resize in it COXTabViewContainer object as appropriate +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\b\insrsid1966847 +\par }{\insrsid1966847 \tab \tab \tab +\par The most challenging problem was to support scrolling functionality for windows that would be used as COXTabViewC +ontainer pages. Unfortunately, different windows object that support scrolling (CEdit, CTreeCtrl, CListBox, CListCtrl, CRichEditCtrl, CEditView, CTreeView, CListView, CScrollView to name just the standrad ones) implement it in a different way and the hand +l +ing of scrolling happens internally in these objects. So in order to control it we should have provided derivations for all of above mentioned classes. Luckily we managed to resolve this problem in different way so it doesn't require any efforts from prog +rammer's side. +\par +\par Actually, the only thing you have to do is to declare the class of window object that is going to be used as COXTabViewContainer page in a specific way. +\par If you declare you class as follows: +\par }{\b\insrsid1966847 \tab class CMyView : public CEditView}{\insrsid1966847 +\par now you have to do that in the following way: +\par }{\b\insrsid1966847 \tab class CMyView : public COXTabViewPage}{\insrsid1966847 +\par +\par or if you don't derive your own class and just use an object of existing one, e.g.: +\par }{\b\insrsid1966847 \tab CEdit m_edit; }{\insrsid1966847 +\par instead you have to define it as: +\par }{\b\insrsid1966847 \tab COXTabViewPage m_edit; +\par }{\insrsid1966847 +\par COXTabViewPage is internal template based Ultimate Toolbox class that was designed specifically to provide smooth integration of scrolling functionality for any +\par window within COXTabViewContainer object. All the details of implementation is hidden for different type of windows is hidden. There is no any public functions that you should specifically use. +\par +\par But there is one limitation. The base class that is used for derivation has to have default constructor. Some classes doesn't have it (e.g. CFormV +iew). You can resolve this problem through using intermediate class that will be derived from the one that doesn't have default constructor and implement it. Then you just derive your window object class that will be used as COXTabViewContainer page from +this intermediate class. Out of standard only CFormView doesn't have default constructor. +\par +\par Below you will find the steps that should be taken in order to derive classes from CFormView class. +\par }\pard \ql \fi-360\li720\ri0\nowidctlpar\faauto\rin0\lin720\itap0 {\insrsid1966847 1.\tab Use Class Wizard to build CFormView derived class on the base of dialog template as you usually do (let's call it CMyFormView) +\par 2.\tab CMyFormView will have default constructor which uses CFormView constructor with dialog ID specified. +\par 3.\tab define another class that will be used as view in your application: +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid1966847 +\par The steps that +should be taken in order to implement COXTabViewContainer in CControlBar derived window can be applied to the general case as well. We just decided to show it using CControlBar derived window because we feel it is going to be used as parent window for COX +TabViewContainer in most cases. +\par Above we described the process of creating and populating of COXTabViewContainer object. In most cases that would be all the code you need. For those who need to change dynamically the contents of COXTabViewContainer object +we provide a set of the following functions. +\par +\par In order to remove any page at run time you have to use }{\ul\cf2\insrsid1966847 DeletePage}{\insrsid1966847 function. +\par +\par To access scroll bar objects that we use internally in order to provide scrolling functionality for COXTabViewContainer pages you have to call }{\ul\cf2\insrsid1966847 GetHorzScrollBar}{\insrsid1966847 and }{\ul\cf2\insrsid1966847 GetVertScrollBar}{ +\insrsid1966847 functions. +\par +\par To set/retrieve the page title that is displayed in corresponding tab button use }{\ul\cf2\insrsid1966847 GetPageTitle}{\insrsid1966847 and }{\ul\cf2\insrsid1966847 SetPageTitle}{\insrsid1966847 functions. +\par +\par To set/retrive active page index call }{\ul\cf2\insrsid1966847 GetActivePageIndex}{\insrsid1966847 and }{\ul\cf2\insrsid1966847 SetActivepageIndex}{\insrsid1966847 functions. +\par +\par Refer to the }{\ul\cf2\insrsid1966847 class reference}{\insrsid1966847 for list and description of all public functions. +\par +\par +\par Also take look at the following }{\ul\cf2\insrsid1966847 samples}{\insrsid1966847 that can be found in .\\samples\\gui subdirectory of your ultimate Toolbox directory: +\par \tab TabViews\tab \tab - text editor with three panes: text editor, hex viewer, list view with statistics on number of unique symbols found in text. +\par \tab Dynamic TabViews \tab - MDI application that shows how to addremove pages dynamically +\par \~ +\par }{\fs20\insrsid1966847 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.cpp new file mode 100644 index 0000000..1b58a31 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.cpp @@ -0,0 +1,106 @@ +// TabViewsView.cpp : implementation of the CTabViewsView class +// + +#include "stdafx.h" +#include "TabViews.h" + +#include "TabViewsDoc.h" +#include "TabViewsView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView + +IMPLEMENT_DYNCREATE(CTabViewsView, CEditView) + +BEGIN_MESSAGE_MAP(CTabViewsView, CEditView) + //{{AFX_MSG_MAP(CTabViewsView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView construction/destruction + +CTabViewsView::CTabViewsView() +{ + // TODO: add construction code here + +} + +CTabViewsView::~CTabViewsView() +{ +} + +BOOL CTabViewsView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CEditView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView drawing + +void CTabViewsView::OnDraw(CDC* pDC) +{ + CTabViewsDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here + + UNREFERENCED_PARAMETER(pDC); +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView printing + +BOOL CTabViewsView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CTabViewsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CTabViewsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView diagnostics + +#ifdef _DEBUG +void CTabViewsView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CTabViewsView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CTabViewsDoc* CTabViewsView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabViewsDoc))); + return (CTabViewsDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CTabViewsView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.h new file mode 100644 index 0000000..64f8692 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/TabViewsView.h @@ -0,0 +1,68 @@ +// TabViewsView.h : interface of the CTabViewsView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_) +#define AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXTabView.h" + +class CTabViewsView : public COXTabViewPage +{ +protected: // create from serialization only + CTabViewsView(); + DECLARE_DYNCREATE(CTabViewsView) + +// Attributes +public: + CTabViewsDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabViewsView) + 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); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CTabViewsView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CTabViewsView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in TabViewsView.cpp +inline CTabViewsDoc* CTabViewsView::GetDocument() + { return (CTabViewsDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABVIEWSVIEW_H__14C16332_675D_11D2_A753_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.rc2 new file mode 100644 index 0000000..aa71142 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViews.rc2 @@ -0,0 +1,13 @@ +// +// TABVIEWS.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViewsDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViewsDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/TabViewsDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/resource.h new file mode 100644 index 0000000..c4d97ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TabViews/resource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by TabViews.rc +// +#define IDD_FORMVIEW 101 +#define IDR_MAINFRAME 128 +#define IDR_TABVIETYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_BUTTON1 1001 +#define IDC_EDIT1 1002 +#define IDC_COMBO1 1003 +#define IDC_BUTTON2 1004 +#define IDC_BUTTON3 1005 +#define IDC_BUTTON4 1006 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/DemoTaskbarIcon.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/DemoTaskbarIcon.h new file mode 100644 index 0000000..ecaddae --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/DemoTaskbarIcon.h @@ -0,0 +1,25 @@ + + +#include "OXTaskbarIcon.h" + +class CDemoTaskbarIcon : public COXTaskbarIcon +{ +public: + CDemoTaskbarIcon() { m_bDownFromDlbClk = FALSE; }; + void DoPopupMenu(LPCTSTR sDemoMenuText); + CWnd* m_pPopupOwner; + + //{{AFX_VIRTUAL(CDemoTaskbarIcon) + //}}AFX_VIRTUAL + + //{{AFX_MSG(CDemoTaskbarIcon) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnTimer(UINT nIDEvent); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +protected: + // to distinguish WM_LBUTTONDBLCLK from WM_LBUTTONDOWN + BOOL m_bDownFromDlbClk; +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.cpp new file mode 100644 index 0000000..9afc758 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Taskbar.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.h new file mode 100644 index 0000000..12f6912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.clw new file mode 100644 index 0000000..56bd64c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.clw @@ -0,0 +1,73 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CTaskbarApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "taskbar.h" +LastPage=0 + +ClassCount=3 +Class1=CDemoTaskbarIcon +Class2=CTaskbarApp +Class3=CTaskbarDlg + +ResourceCount=2 +Resource1=IDD_TASKBAR_DIALOG +Resource2=IDR_POPUPMENU + +[CLS:CDemoTaskbarIcon] +Type=0 +BaseClass=COXTaskbarIcon +HeaderFile=DemoTaskbarIcon.h +ImplementationFile=demotaskbaricon.cpp +LastObject=CDemoTaskbarIcon + +[CLS:CTaskbarApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Taskbar.h +ImplementationFile=Taskbar.cpp +Filter=N +VirtualFilter=AC +LastObject=CTaskbarApp + +[CLS:CTaskbarDlg] +Type=0 +BaseClass=CDialog +HeaderFile=TaskbarDlg.h +ImplementationFile=TaskbarDlg.cpp +LastObject=CTaskbarDlg + +[DLG:IDD_TASKBAR_DIALOG] +Type=1 +Class=CTaskbarDlg +ControlCount=19 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_TOGGLE_SHOW,button,1342242816 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_ICON1,button,1342373897 +Control6=IDC_ICON2,button,1342242825 +Control7=IDC_STATIC,static,1342308355 +Control8=IDC_STATIC,static,1342177283 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_EDIT_TOOLTIP,edit,1350631552 +Control11=IDC_SET_TOOLTIP,button,1342242816 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_ROUTE_TO_ME,button,1342242819 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_EDIT_CODES,edit,1350565892 +Control16=IDC_MINIMIZE,button,1342242817 +Control17=IDCANCEL,button,1342242816 +Control18=IDC_EDIT_MOUSEMSG,edit,1350631552 +Control19=IDC_STATIC,static,1342308352 + +[MNU:IDR_POPUPMENU] +Type=1 +Class=? +Command1=ID_OPEN +Command2=ID_POPUP_MOUSEMSG +CommandCount=2 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.cpp new file mode 100644 index 0000000..72b9f52 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.cpp @@ -0,0 +1,100 @@ +// Taskbar.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Taskbar.h" +#include "TaskbarDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarApp + +BEGIN_MESSAGE_MAP(CTaskbarApp, CWinApp) + //{{AFX_MSG_MAP(CTaskbarApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarApp construction + +CTaskbarApp::CTaskbarApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CTaskbarApp object + +CTaskbarApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarApp initialization + +BOOL CTaskbarApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CTaskbarDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CTaskbarApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsp new file mode 100644 index 0000000..7583c62 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsp @@ -0,0 +1,269 @@ +# Microsoft Developer Studio Project File - Name="Taskbar" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Taskbar - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Taskbar.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Taskbar.mak" CFG="Taskbar - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Taskbar - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Taskbar - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Taskbar - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Taskbar - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Taskbar - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Taskbar - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Taskbar.exe" + +!ELSEIF "$(CFG)" == "Taskbar - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Taskbar.exe" + +!ELSEIF "$(CFG)" == "Taskbar - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Taskbar_" +# PROP BASE Intermediate_Dir "Taskbar_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Taskbar.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Taskbar.exe" + +!ELSEIF "$(CFG)" == "Taskbar - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Taskbar0" +# PROP BASE Intermediate_Dir "Taskbar0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Taskbar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Taskbar.exe" + +!ELSEIF "$(CFG)" == "Taskbar - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Taskbar1" +# PROP BASE Intermediate_Dir "Taskbar1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Taskbar.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Taskbar.exe" + +!ENDIF + +# Begin Target + +# Name "Taskbar - Win32 Release" +# Name "Taskbar - Win32 Debug" +# Name "Taskbar - Win32 Release_Shared" +# Name "Taskbar - Win32 Unicode_Debug" +# Name "Taskbar - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\DemoTaskbarIcon.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\Taskbar.cpp +# End Source File +# Begin Source File + +SOURCE=.\Taskbar.rc +# End Source File +# Begin Source File + +SOURCE=.\TaskbarDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\DemoTaskbarIcon.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\Taskbar.h +# End Source File +# Begin Source File + +SOURCE=.\TaskbarDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\idr_icon.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Taskbar.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Taskbar.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Taskbar.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsw new file mode 100644 index 0000000..71b62cb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Taskbar"=".\Taskbar.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/TaskBarIcon", LPJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.h new file mode 100644 index 0000000..8827c41 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.h @@ -0,0 +1,38 @@ +// Taskbar.h : main header file for the TASKBAR application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarApp: +// See Taskbar.cpp for the implementation of this class +// + +class CTaskbarApp : public CWinApp +{ +public: + CTaskbarApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTaskbarApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CTaskbarApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.rc new file mode 100644 index 0000000..5b45696 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.rc @@ -0,0 +1,221 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Taskbar.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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\\Taskbar.ico" +IDI_ICON2 ICON "res\\icon1.ico" +IDI_ICON1 ICON "res\\idr_icon.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_TASKBAR_DIALOG DIALOGEX 0, 0, 188, 199 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Demo of COXTaskbarIcon" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Check out the new icon that will appear at the right hand side of of the Windows Taskbar ...",IDC_STATIC,7,7,168,19 + LTEXT "1. Toggle:",IDC_STATIC,7,31,33,8 + PUSHBUTTON "Show",IDC_TOGGLE_SHOW,48,28,55,14 + LTEXT "2. Icon:",IDC_STATIC,7,50,25,8 + CONTROL "",IDC_ICON1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,51,9,8 + CONTROL "",IDC_ICON2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,97,51,9,8 + ICON IDI_ICON1,IDC_STATIC,61,46,21,20,WS_GROUP + ICON IDI_ICON2,IDC_STATIC,113,46,21,20 + LTEXT "3. Tooltip Text:",IDC_STATIC,7,71,48,8 + EDITTEXT IDC_EDIT_TOOLTIP,61,68,87,14,ES_AUTOHSCROLL + PUSHBUTTON "Set",IDC_SET_TOOLTIP,155,68,26,14 + LTEXT "4. Route messages to:",IDC_STATIC,7,91,72,8 + CONTROL "Me",IDC_ROUTE_TO_ME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,87,91,26,10 + LTEXT "COXTaskbarIcon Member Function:",IDC_STATIC,15,110,114,8 + EDITTEXT IDC_EDIT_CODES,7,121,173,14,ES_MULTILINE | NOT WS_TABSTOP + DEFPUSHBUTTON "Minimize",IDC_MINIMIZE,41,178,50,14 + PUSHBUTTON "Exit",IDCANCEL,97,178,50,14 + EDITTEXT IDC_EDIT_MOUSEMSG,7,156,173,14,ES_AUTOHSCROLL + LTEXT "Mouse Messages:",IDC_STATIC,15,145,58,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 "040904B0" + BEGIN + VALUE "FileDescription", "TASKBAR MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "TASKBAR" + VALUE "LegalCopyright", "Copyright © 1996" + VALUE "OriginalFilename", "TASKBAR.EXE" + VALUE "ProductName", "TASKBAR Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_TASKBAR_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 181 + TOPMARGIN, 7 + BOTTOMMARGIN, 192 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_POPUPMENU MENU +BEGIN + POPUP "Popup" + BEGIN + MENUITEM "Open", ID_OPEN + MENUITEM SEPARATOR + MENUITEM "Mouse Msg", ID_POPUP_MOUSEMSG + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "About This" + ID_DESCRIPTION_FILE "taskbarInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "TaskBarDemo" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Taskbar.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.vcproj new file mode 100644 index 0000000..0c25686 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/Taskbar.vcproj @@ -0,0 +1,932 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.cpp new file mode 100644 index 0000000..8820b81 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.cpp @@ -0,0 +1,273 @@ +// TaskbarDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "Taskbar.h" +#include "TaskbarDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarDlg dialog + +CTaskbarDlg::CTaskbarDlg(CWnd* pParent /*=NULL*/) + : CDialog(CTaskbarDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTaskbarDlg) + m_sTooltipText = _T("The Code Project - COXTaskbarIcon Demo"); + m_bRouteToMe = FALSE; + m_nIcon = 0; + //}}AFX_DATA_INIT + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + //---------------- Demo Codes: all other codes were generated by AppWizard + + m_TaskbarIcon.Create(); + // When there is only one taskbar icon, you don't need to specify an ID. + // The ID is useful only when implementing two (or more) taskbar icons, AND you want + // to handle mouse messages from both icons within one message handler (therefore, you + // need that ID to tell which icon posted the msg). However, it might be a good idea to + // assign an ID, and check the ID in the message handler, especially when you may need + // to derive your classes (somebody else may add another taskbar icon). + + // Note: you don't need to detroy a taskbar icon. It's done in its own destructor. + + m_TaskbarIcon.m_pPopupOwner = this; + // let this dialog handle popup menu's message + // Note: m_pPopupOwner is NOT a member of COXTaskbarIcon. This is for demo only. + + //---------------- End of this block +} + +void CTaskbarDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTaskbarDlg) + DDX_Text(pDX, IDC_EDIT_TOOLTIP, m_sTooltipText); + DDX_Check(pDX, IDC_ROUTE_TO_ME, m_bRouteToMe); + DDX_Radio(pDX, IDC_ICON1, m_nIcon); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CTaskbarDlg, CDialog) + //{{AFX_MSG_MAP(CTaskbarDlg) + ON_WM_PAINT() + ON_WM_SYSCOMMAND() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_TOGGLE_SHOW, OnToggleShow) + ON_BN_CLICKED(IDC_ICON1, OnIcon1) + ON_BN_CLICKED(IDC_ICON2, OnIcon2) + ON_BN_CLICKED(IDC_SET_TOOLTIP, OnSetTooltip) + ON_BN_CLICKED(IDC_ROUTE_TO_ME, OnRouteToMe) + ON_BN_CLICKED(IDC_MINIMIZE, OnMinimize) + ON_MESSAGE(WM_NOTIFY_TASKBAR_ICON, OnNotifyTaskbarIcon) + ON_COMMAND(ID_OPEN, OnOpen) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarDlg message handlers + +BOOL CTaskbarDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + SetIcon(m_hIcon, TRUE); + SetIcon(m_hIcon, FALSE); + + return TRUE; +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CTaskbarDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +HCURSOR CTaskbarDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +//---------------- Demo Codes: all other codes were generated by AppWizard + +void CTaskbarDlg::OnToggleShow() +{ + if(m_TaskbarIcon.IsShowing()) + { + m_TaskbarIcon.Hide(); + SetDlgItemText(IDC_EDIT_CODES, _T("Hide()")); + } + else + { + UpdateData(); // pushing data exchange + + m_TaskbarIcon.SetIcon(m_nIcon == 0 ? IDI_ICON1 : IDI_ICON2); + // no need to specify bRefresh before showing a taskbar icon + m_TaskbarIcon.SetTooltipText(m_sTooltipText); + m_TaskbarIcon.Show(); + SetDlgItemText(IDC_EDIT_CODES, _T("Show()")); + } + + SetDlgItemText(IDC_TOGGLE_SHOW, m_TaskbarIcon.IsShowing() ? _T("Hide") : _T("Show")); +} +void CTaskbarDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + + +void CTaskbarDlg::OnIcon1() +{ + m_TaskbarIcon.SetIcon(IDI_ICON1); // taking the default TRUE value of bRefresh + // if the code is wriiten as + // m_TaskbarIcon.SetIcon(IDI_ICON1, FALSE); + // no instant refresh will occur. + + SetDlgItemText(IDC_EDIT_CODES, _T("SetIcon(IDI_ICON1)")); +} + +void CTaskbarDlg::OnIcon2() +{ + m_TaskbarIcon.SetIcon(IDI_ICON2); // instantly refresh its icon + SetDlgItemText(IDC_EDIT_CODES, _T("SetIcon(IDI_ICON2)")); +} + +void CTaskbarDlg::OnSetTooltip() +{ + UpdateData(); // pushing data exchange + m_TaskbarIcon.SetTooltipText(m_sTooltipText); // instantly refresh its tooltip text + SetDlgItemText(IDC_EDIT_CODES, + CString(_T("SetTooltipText(\"")) + m_sTooltipText + _T("\")")); +} + +void CTaskbarDlg::OnRouteToMe() +{ + UpdateData(); // pushing data exchange + if (m_bRouteToMe) + { + m_TaskbarIcon.SetOwner(this); // use message handlers in this class + SetDlgItemText(IDC_EDIT_CODES, _T("SetOwner(this)")); + } + else + { + m_TaskbarIcon.SetOwner(NULL); // use message handlers in taskbar icon class + SetDlgItemText(IDC_EDIT_CODES, _T("SetOwner(NULL)")); + SetDlgItemText(IDC_EDIT_MOUSEMSG, _T("")); + } +} + +void CTaskbarDlg::OnMinimize() +{ + if (!m_TaskbarIcon.IsShowing()) // don't hide all things from users + { + OnToggleShow(); + } + + if (m_bRouteToMe) // I'm sure I can't handle messages when I'm hidden + { + ((CButton*)GetDlgItem(IDC_ROUTE_TO_ME))->SetCheck(0); + m_TaskbarIcon.SetOwner(NULL); // let taskbar icon do it + SetDlgItemText(IDC_EDIT_MOUSEMSG, _T("")); + } + + ShowWindow(FALSE); + + // This is only one way to hide the dialog window. In real situation, you may + // want to try DestroyWindow() to conserve system resource if possible (in this + // demo, this dialog is the main window). +} + +// handling taskbar icon's notification here after SetOwner(this) +LRESULT CTaskbarDlg::OnNotifyTaskbarIcon(WPARAM wParam, LPARAM lParam) +{ + UINT uID = (UINT)wParam; // this is the ID you assigned to your taskbar icon + UINT uMouseMsg = (UINT)lParam; // mouse messages + + if (uID != 0) return 0; + // no ID was assigned when calling Create(), therefore, if a message has some value + // in uID, it may not from the expected taskbar icon. + // In real situation, you may write it in another way: + // if (uID == IDC_MYTASKBARICON) + // ... + + CString sOutput; + + switch (uMouseMsg) + { + case WM_LBUTTONDOWN: sOutput = _T("WM_LBUTTONDOWN"); break; + case WM_LBUTTONDBLCLK: sOutput = _T("WM_LBUTTONDBLCLK"); break; + case WM_RBUTTONDOWN: sOutput = _T("WM_RBUTTONDOWN"); break; + case WM_RBUTTONDBLCLK: sOutput = _T("WM_RBUTTONDBLCLK"); break; + case WM_MOUSEMOVE: sOutput = _T("WM_MOUSEMOVE"); break; + } + + // You may also use GetKeyState() here. + + if (!sOutput.IsEmpty()) SetDlgItemText(IDC_EDIT_MOUSEMSG, sOutput); + + return -1; // don't care value +} + +// handling popup menu commands sent by the taskbar icon object +void CTaskbarDlg::OnOpen() +{ + ShowWindow(TRUE); + BringWindowToTop(); +} + +//---------------- End of this block + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.h new file mode 100644 index 0000000..15d77db --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/TaskbarDlg.h @@ -0,0 +1,58 @@ +// TaskbarDlg.h : header file +// + +#include "resource.h" // main symbols + +#include "DemoTaskbarIcon.h" + +///////////////////////////////////////////////////////////////////////////// +// CTaskbarDlg dialog + +class CTaskbarDlg : public CDialog +{ +// Construction +public: + CTaskbarDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTaskbarDlg) + enum { IDD = IDD_TASKBAR_DIALOG }; + CString m_sTooltipText; + BOOL m_bRouteToMe; + int m_nIcon; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTaskbarDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + //---------------- Demo Codes: all other codes were generated by AppWizard + + CDemoTaskbarIcon m_TaskbarIcon; + + //---------------- End of this block + + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CTaskbarDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnToggleShow(); + afx_msg void OnIcon1(); + afx_msg void OnIcon2(); + afx_msg void OnSetTooltip(); + afx_msg void OnRouteToMe(); + afx_msg void OnMinimize(); + afx_msg LRESULT OnNotifyTaskbarIcon(WPARAM wParam, LPARAM lParam); + afx_msg void OnOpen(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/demotaskbaricon.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/demotaskbaricon.cpp new file mode 100644 index 0000000..568695f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/demotaskbaricon.cpp @@ -0,0 +1,80 @@ + +#include "stdafx.h" +#include "DemoTaskbarIcon.h" + +#include "resource.h" // main symbols + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDemoTaskbarIcon + +BEGIN_MESSAGE_MAP(CDemoTaskbarIcon, COXTaskbarIcon) + //{{AFX_MSG_MAP(CDemoTaskbarIcon) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONDBLCLK() + ON_WM_RBUTTONDOWN() + ON_WM_TIMER() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +void CDemoTaskbarIcon::OnLButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(point); + UNREFERENCED_PARAMETER(nFlags); + SetTimer(IDT_TIMER, 500, (TIMERPROC) NULL); + // half sec should be enough to tell a dblclk from a single clk +} + +void CDemoTaskbarIcon::OnRButtonDown(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(point); + UNREFERENCED_PARAMETER(nFlags); + // no dbl in our way, no need to implement a timer + CString sMenuText = _T("WM_RBUTTONDOWN"); + DoPopupMenu(sMenuText); +} + +void CDemoTaskbarIcon::OnLButtonDblClk(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(point); + UNREFERENCED_PARAMETER(nFlags); + m_bDownFromDlbClk = TRUE; + ::PostMessage(m_pPopupOwner->m_hWnd, WM_COMMAND, ID_OPEN, (LPARAM)m_hWnd); +} + +void CDemoTaskbarIcon::DoPopupMenu(LPCTSTR sDemoMenuText) +{ + CMenu popMenu; + VERIFY(popMenu.LoadMenu(IDR_POPUPMENU)); + + // show mouse msg in the menu text + popMenu.ModifyMenu(ID_POPUP_MOUSEMSG, MF_BYCOMMAND, ID_POPUP_MOUSEMSG, sDemoMenuText); + + CPoint posMouse; + GetCursorPos(&posMouse); + + m_pPopupOwner->SetActiveWindow(); + popMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, + posMouse.x, posMouse.y, m_pPopupOwner); +} + +void CDemoTaskbarIcon::OnTimer(UINT nIDEvent) +{ + KillTimer(nIDEvent); + + if (m_bDownFromDlbClk) + { + m_bDownFromDlbClk = FALSE; + } + else + { + CString sMenuText = _T("WM_LBUTTONDOWN"); + DoPopupMenu(sMenuText); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.rc2 new file mode 100644 index 0000000..74f538d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/Taskbar.rc2 @@ -0,0 +1,13 @@ +// +// TASKBAR.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/icon1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/icon1.ico new file mode 100644 index 0000000..1916711 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/icon1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/idr_icon.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/idr_icon.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/res/idr_icon.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/resource.h new file mode 100644 index 0000000..b337d9b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/resource.h @@ -0,0 +1,35 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Taskbar.rc +// +#define IDS_ABOUTBOX 1 +#define ID_DESCRIPTION_FILE 2 +#define IDM_ABOUTBOX 0x0010 +#define IDT_TIMER 101 +#define IDD_TASKBAR_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDI_ICON2 129 +#define IDI_ICON1 130 +#define IDR_POPUPMENU 131 +#define IDC_TOGGLE_SHOW 1000 +#define IDC_ICON1 1001 +#define IDC_ICON2 1002 +#define IDC_EDIT_TOOLTIP 1004 +#define IDC_SET_TOOLTIP 1005 +#define IDC_EDIT_CODES 1006 +#define IDC_MINIMIZE 1007 +#define IDC_ROUTE_TO_ME 1008 +#define IDC_EDIT_MOUSEMSG 1012 +#define ID_OPEN 32771 +#define ID_POPUP_MOUSEMSG 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/taskbarInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/taskbarInfo.rtf new file mode 100644 index 0000000..687c1f3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/TaskBarIcon/taskbarInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ReadMe.txt new file mode 100644 index 0000000..f7765c5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ToolTipEx +======================================================================== + + +AppWizard has created this ToolTipEx 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 ToolTipEx application. + +ToolTipEx.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CToolTipExApp application class. + +ToolTipEx.cpp + This is the main application source file that contains the application + class CToolTipExApp. + +ToolTipEx.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 + Developer Studio. + +res\ToolTipEx.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ToolTipEx.rc. + +res\ToolTipEx.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +ToolTipEx.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ToolTipExDlg.h, ToolTipExDlg.cpp - the dialog + These files contain your CToolTipExDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ToolTipEx.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ToolTipEx.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.cpp new file mode 100644 index 0000000..dbec577 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ToolTipEx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.h new file mode 100644 index 0000000..7fadc0f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__7FF81959_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) +#define AFX_STDAFX_H__7FF81959_1C44_11D2_965C_00A0C9668BF9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__7FF81959_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.clw new file mode 100644 index 0000000..6ad7825 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.clw @@ -0,0 +1,91 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CToolTipExDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "tooltipex.h" +LastPage=0 + +ClassCount=3 +Class1=COXToolTipCtrl +Class2=CToolTipExApp +Class3=CToolTipExDlg + +ResourceCount=3 +Resource1=IDD_ABOUTBOX (English (U.S.)) +Resource2=IDD_TOOLTIPEX_DIALOG (English (U.S.)) +Resource3=IDD_TOOLTIPEX_DIALOG + +[CLS:COXToolTipCtrl] +Type=0 +BaseClass=CWnd +HeaderFile=OXToolTipCtrl.h +ImplementationFile=OXToolTipCtrl.cpp +LastObject=COXToolTipCtrl + +[CLS:CToolTipExApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ToolTipEx.h +ImplementationFile=ToolTipEx.cpp +Filter=N +VirtualFilter=AC +LastObject=CToolTipExApp + +[CLS:CToolTipExDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ToolTipExDlg.h +ImplementationFile=ToolTipExDlg.cpp +LastObject=IDC_EDIT_MAX_WIDTH +Filter=D +VirtualFilter=dWC + +[DLG:IDD_TOOLTIPEX_DIALOG] +Type=1 +Class=CToolTipExDlg +ControlCount=18 +Control1=IDC_EDIT1,edit,1350631620 +Control2=IDC_TEXT1,static,1342308876 +Control3=IDC_COMBO1,combobox,1344340227 +Control4=IDC_CHECK1,button,1342242851 +Control5=IDC_RADIO1,button,1342177577 +Control6=IDC_LIST1,listbox,1353778049 +Control7=IDC_TREE1,SysTreeView32,1350631431 +Control8=IDC_BUTTON_TEXT_FONT_COLOR,button,1342242816 +Control9=IDC_BUTTON_COLOR_BACKGROUND,button,1342242827 +Control10=IDC_CHECK_SET_MAX_WIDTH,button,1342242819 +Control11=IDC_EDIT_MAX_WIDTH,edit,1350639744 +Control12=IDCANCEL,button,1342242816 +Control13=IDC_SEPARATOR_CUSTOMIZE,static,1342312448 +Control14=IDC_STATIC_TEXT_FONT_COLOR,static,1342312960 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_SEPARATOR_SAMPLES,static,1342312448 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=5 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 +Control5=IDC_STATIC,static,1342308352 + +[DLG:IDD_TOOLTIPEX_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=8 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_BUTTON1,button,1342242816 +Control3=IDC_TEXT1,static,1342308364 +Control4=IDC_LIST1,listbox,1353778049 +Control5=IDC_RADIO1,button,1342177577 +Control6=IDC_CHECK1,button,1342242851 +Control7=IDC_EDIT1,edit,1350631620 +Control8=IDC_COMBO1,combobox,1344340226 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.cpp new file mode 100644 index 0000000..7d0a181 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.cpp @@ -0,0 +1,94 @@ +// ToolTipEx.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ToolTipEx.h" +#include "ToolTipExDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExApp + +BEGIN_MESSAGE_MAP(CToolTipExApp, CWinApp) + //{{AFX_MSG_MAP(CToolTipExApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExApp construction + +CToolTipExApp::CToolTipExApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CToolTipExApp object + +CToolTipExApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExApp initialization + +BOOL CToolTipExApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + 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. + + CToolTipExDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CToolTipExApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsp new file mode 100644 index 0000000..e2a634f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsp @@ -0,0 +1,298 @@ +# Microsoft Developer Studio Project File - Name="ToolTipEx" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ToolTipEx - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ToolTipEx.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ToolTipEx.mak" CFG="ToolTipEx - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ToolTipEx - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ToolTipEx - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ToolTipEx - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ToolTipEx - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ToolTipEx - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ToolTipEx - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x411 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ToolTipEx.exe" + +!ELSEIF "$(CFG)" == "ToolTipEx - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x411 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ToolTipEx.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ToolTipEx - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ToolTipEx___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "ToolTipEx___Win32_DebugUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x411 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /incremental:no /debug /machine:I386 /out:"ToolTipEx.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ToolTipEx - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ToolTipEx___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "ToolTipEx___Win32_ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x411 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ToolTipEx.exe" + +!ELSEIF "$(CFG)" == "ToolTipEx - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ToolTipEx___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "ToolTipEx___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x411 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ToolTipEx.exe" + +!ENDIF + +# Begin Target + +# Name "ToolTipEx - Win32 Release" +# Name "ToolTipEx - Win32 Debug" +# Name "ToolTipEx - Win32 DebugUnicode" +# Name "ToolTipEx - Win32 ReleaseUnicode" +# Name "ToolTipEx - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFontPickerButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\ToolTipEx.cpp +# End Source File +# Begin Source File + +SOURCE=.\ToolTipEx.rc +# End Source File +# Begin Source File + +SOURCE=.\ToolTipExDlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXColorPickerCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXToolTipCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\ToolTipCtrlEx.h +# End Source File +# Begin Source File + +SOURCE=.\ToolTipEx.h +# End Source File +# Begin Source File + +SOURCE=.\ToolTipExDlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ToolTipEx.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ToolTipEx.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\ToolTipEx.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsw new file mode 100644 index 0000000..3b751f2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ToolTipEx"=".\ToolTipEx.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/ToolTipEx", HQJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.h new file mode 100644 index 0000000..722d212 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.h @@ -0,0 +1,50 @@ +// ToolTipEx.h : main header file for the TOOLTIPEX application +// + +#if !defined(AFX_TOOLTIPEX_H__7FF81955_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) +#define AFX_TOOLTIPEX_H__7FF81955_1C44_11D2_965C_00A0C9668BF9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExApp: +// See ToolTipEx.cpp for the implementation of this class +// + +class CToolTipExApp : public CWinApp +{ +public: + CToolTipExApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CToolTipExApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CToolTipExApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TOOLTIPEX_H__7FF81955_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.rc new file mode 100644 index 0000000..87efc5c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.rc @@ -0,0 +1,236 @@ +// 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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ToolTipEx.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXPopupBarCtrl.rc""\r\n" + "#endif\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\\ToolTipEx.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_TOOLTIPEX_DIALOG DIALOGEX 0, 0, 290, 202 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "CToolTipCtrlEx Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT1,7,22,71,23,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL + CONTROL "Static Text",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | WS_GROUP,7,49,71,11,WS_EX_STATICEDGE + COMBOBOX IDC_COMBO1,7,65,71,60,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "Check box",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,7,85,72,10 + CONTROL "Radio button",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_LEFTTEXT | BS_LEFT,7,99,71,10 + LISTBOX IDC_LIST1,99,32,61,73,LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + CONTROL "Tree1",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,167,32,115,74 + PUSHBUTTON "Change Text Font and Color...",IDC_BUTTON_TEXT_FONT_COLOR,7,143,112,15,0,WS_EX_NOPARENTNOTIFY + CONTROL "",IDC_BUTTON_COLOR_BACKGROUND,"Button",BS_OWNERDRAW | WS_TABSTOP,57,167,62,15 + CONTROL "Set maximum width of a tool window",IDC_CHECK_SET_MAX_WIDTH, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,169,129,10 + EDITTEXT IDC_EDIT_MAX_WIDTH,255,167,27,13,ES_AUTOHSCROLL | ES_NUMBER + PUSHBUTTON "Close",IDCANCEL,232,7,50,14 + LTEXT "Customize tool tip appearance",IDC_SEPARATOR_CUSTOMIZE,7,130,275,9,SS_SUNKEN + LTEXT "",IDC_STATIC_TEXT_FONT_COLOR,124,143,158,14,SS_CENTERIMAGE | SS_SUNKEN + LTEXT "Background color",IDC_STATIC,7,166,40,15 + LTEXT "Controls with extended tool tip support",IDC_SEPARATOR_SAMPLES,7,9,220,9,SS_SUNKEN + LTEXT "List box",IDC_STATIC,99,21,25,8 + LTEXT "Tree",IDC_STATIC,169,21,16,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 "040904B0" + BEGIN + VALUE "FileDescription", "ToolTipEx MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ToolTipEx" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "ToolTipEx.EXE" + VALUE "ProductName", "ToolTipEx Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_TOOLTIPEX_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 282 + TOPMARGIN, 7 + BOTTOMMARGIN, 195 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_TOOLTIPEX_DIALOG DLGINIT +BEGIN + IDC_COMBO1, 0x403, 6, 0 +0x6144, 0x6174, 0x0031, + IDC_COMBO1, 0x403, 6, 0 +0x6144, 0x6174, 0x0032, + IDC_COMBO1, 0x403, 6, 0 +0x6144, 0x6174, 0x0033, + IDC_COMBO1, 0x403, 6, 0 +0x6144, 0x6174, 0x0034, + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About ToolTipEx..." +END + +STRINGTABLE +BEGIN + IDCANCEL "Close button\rClose button extended text" +END + +STRINGTABLE +BEGIN + IDC_LIST1 "List Control\rYou can add strings here" + ID_DESCRIPTION_FILE "ToolTipExInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Extended Tool Tip Control" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ToolTipEx.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" +#include "OXPopupBarCtrl.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.vcproj new file mode 100644 index 0000000..f4bcf8b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipEx.vcproj @@ -0,0 +1,1230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.cpp new file mode 100644 index 0000000..0bb717d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.cpp @@ -0,0 +1,294 @@ +// ToolTipExDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ToolTipExDlg.h" + +#include "UTSampleAbout.h" +#include "UTBStrOp.h" +#include "UTB64Bit.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExDlg dialog + +CToolTipExDlg::CToolTipExDlg(CWnd* pParent /*=NULL*/) + : CDialog(CToolTipExDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CToolTipExDlg) + m_bBoldTips = FALSE; + m_bSetMaxWidth = FALSE; + m_nMaxWidth = 0; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CToolTipExDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CToolTipExDlg) + DDX_Control(pDX, IDC_TREE1, m_tree); + DDX_Control(pDX, IDC_SEPARATOR_SAMPLES, m_sepSamples); + DDX_Control(pDX, IDC_SEPARATOR_CUSTOMIZE, m_sepCustomize); + DDX_Control(pDX, IDC_BUTTON_COLOR_BACKGROUND, m_btnBkColor); + DDX_Control(pDX, IDC_BUTTON_TEXT_FONT_COLOR, m_btnTextFontColor); + DDX_Control(pDX, IDC_LIST1, m_ListBox); + DDX_Check(pDX, IDC_CHECK1, m_bBoldTips); + DDX_Check(pDX, IDC_CHECK_SET_MAX_WIDTH, m_bSetMaxWidth); + DDX_Text(pDX, IDC_EDIT_MAX_WIDTH, m_nMaxWidth); + //}}AFX_DATA_MAP + DDX_ColorPicker(pDX, IDC_BUTTON_COLOR_BACKGROUND, m_clrBackground); + DDX_FontPickerFont(pDX, IDC_BUTTON_TEXT_FONT_COLOR, &m_font); + DDX_FontPickerColor(pDX, IDC_BUTTON_TEXT_FONT_COLOR, m_clrText); +} + +BEGIN_MESSAGE_MAP(CToolTipExDlg, CDialog) + //{{AFX_MSG_MAP(CToolTipExDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_COLOR_BACKGROUND, OnButtonColorBackground) + ON_BN_CLICKED(IDC_BUTTON_TEXT_FONT_COLOR, OnButtonTextFontColor) + ON_BN_CLICKED(IDC_CHECK_SET_MAX_WIDTH, OnCheckSetMaxWidth) + ON_EN_CHANGE(IDC_EDIT_MAX_WIDTH, OnChangeEditMaxWidth) + //}}AFX_MSG_MAP + ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExDlg message handlers + +BOOL CToolTipExDlg::OnToolTipNotify(UINT /*id*/, NMHDR* pNMHDR, LRESULT* /*pResult*/) +{ + TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; + UINT nID = PtrToUint(pNMHDR->idFrom); + + if (nID == IDCANCEL) // Get text from string resource + { + pTTT->lpszText = MAKEINTRESOURCE(nID); + pTTT->hinst = AfxGetResourceHandle(); + return TRUE; + } + if (nID == IDC_RADIO1) // Supply a pointer to some text + { + pTTT->lpszText = _T("Radio Button Control"); + return TRUE; + } + if (nID == IDC_CHECK1) // Fill in the text buffer + { + UTBStr::tcscpy(pTTT->szText, 80, _T("Check Box Control\rCheck this if you want\ntooltips to be bold")); + return TRUE; + } + + return FALSE; +} + +BOOL CToolTipExDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + m_btnTextFontColor.SetBuddy(IDC_STATIC_TEXT_FONT_COLOR); + + GetDlgItem(IDC_EDIT_MAX_WIDTH)->EnableWindow(m_bSetMaxWidth); + + // initialize the tooltip + m_toolTip.Create( this ); + + // Use AddTool instead + m_toolTip.AddTool( GetDlgItem(IDC_EDIT1), + _T("Edit Control\rThis is the extended\ntext for the edit control")); + m_toolTip.AddTool( GetDlgItem(IDC_COMBO1), + _T("ComboBox Control\rComboBox Control\nData in the lists:\nData 1\nData 2\nData 2\nData 4")); + m_toolTip.AddTool( GetDlgItem(IDC_TEXT1), + _T("Text Control - not extended")); + m_toolTip.AddTool( GetDlgItem(IDC_LIST1), + IDC_LIST1); // _T("List Control\rYou can add strings here")); + m_toolTip.AddTool( GetDlgItem(IDC_CHECK1), + LPSTR_TEXTCALLBACK); // _T("Check Box Control\rCheck this if you want\ntooltips to be bold")); + m_toolTip.AddTool( GetDlgItem(IDC_RADIO1), + LPSTR_TEXTCALLBACK); // _T("Radio Button Control")); + m_toolTip.AddTool( GetDlgItem(IDCANCEL), + LPSTR_TEXTCALLBACK); // _T("Close Button Control")); + + m_toolTip.AddTool( GetDlgItem(IDC_TREE1), + _T("Tree Control\rHas only one root item")); + + m_toolTip.AddTool( GetDlgItem(IDC_BUTTON_TEXT_FONT_COLOR), + _T("Change Font\rAllows you to change the\nfont and text color\nof the tooltips")); + m_toolTip.AddTool( GetDlgItem(IDC_BUTTON_COLOR_BACKGROUND), + _T("Change Tool Tip background color")); + m_toolTip.AddTool( GetDlgItem(IDC_CHECK_SET_MAX_WIDTH), + _T("Check the box in order\nto limit the width of the\ntool tip window.\nIf zero is specified then\nthere is no limit on the\nwindow width")); + + m_ListBox.AddString(_T("Sample")); + m_ListBox.AddString(_T("Listbox")); + m_ListBox.AddString(_T("Items")); + m_ListBox.AddString(_T("tab\ttab\ttab")); + + HTREEITEM hRootItem=m_tree.InsertItem(_T("Root item"),-1,-1); + ASSERT(hRootItem!=NULL); + for(int nIndex=0; nIndex<20; nIndex++) + { + CString sItem; + sItem.Format(_T("Item %d"),nIndex); + VERIFY(m_tree.InsertItem(sItem,-1,-1,hRootItem)!=NULL); + } + + m_btnBkColor.SetDefaultColor(::GetSysColor(COLOR_INFOBK)); + m_clrBackground=m_toolTip.GetTipBkColor(); + m_clrText=m_toolTip.GetTipTextColor(); + LOGFONT lf; + CFont* pFont=m_toolTip.GetFont(); + ASSERT(pFont!=NULL); + VERIFY(pFont->GetLogFont(&lf)); + VERIFY(m_font.CreateFontIndirect(&lf)); + + // Change the color of one of the tooltips + OXTOOLINFO ToolInfo; + if (m_toolTip.GetToolInfo(ToolInfo, GetDlgItem(IDCANCEL))) + { + ToolInfo.clrBackColor = RGB(255, 255, 255); + ToolInfo.clrTextColor = RGB( 0, 0, 255); + m_toolTip.SetToolInfo(&ToolInfo); + } + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CToolTipExDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CToolTipExDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CToolTipExDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +BOOL CToolTipExDlg::PreTranslateMessage( MSG *pMsg ) +{ + m_toolTip.RelayEvent(pMsg); + + return CDialog::PreTranslateMessage(pMsg); +} + + +void CToolTipExDlg::OnButtonColorBackground() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + m_toolTip.SetTipBkColor(m_clrBackground); +} + +void CToolTipExDlg::OnButtonTextFontColor() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + m_toolTip.SetTipTextColor(m_clrText); + m_toolTip.SetFont(&m_font); +} + +void CToolTipExDlg::OnCheckSetMaxWidth() +{ + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + GetDlgItem(IDC_EDIT_MAX_WIDTH)->EnableWindow(m_bSetMaxWidth); + if(!m_bSetMaxWidth) + m_nMaxWidth=0; + m_toolTip.SetMaxTipWidth(m_nMaxWidth); +} + +void CToolTipExDlg::OnChangeEditMaxWidth() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + + if(!UpdateData(TRUE)) + return; + + m_toolTip.SetMaxTipWidth(m_nMaxWidth); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.h new file mode 100644 index 0000000..b9ca76f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExDlg.h @@ -0,0 +1,74 @@ +// ToolTipExDlg.h : header file +// + +#if !defined(AFX_TOOLTIPEXDLG_H__7FF81957_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) +#define AFX_TOOLTIPEXDLG_H__7FF81957_1C44_11D2_965C_00A0C9668BF9__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CToolTipExDlg dialog +#include "Resource.h" +#include "OXToolTipCtrl.h" +#include "OXSeparator.h" +#include "OXColorPickerButton.h" +#include "OXFontPickerButton.h" + +class CToolTipExDlg : public CDialog +{ +// Construction +public: + CToolTipExDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CToolTipExDlg) + enum { IDD = IDD_TOOLTIPEX_DIALOG }; + CTreeCtrl m_tree; + COXSeparator m_sepSamples; + COXSeparator m_sepCustomize; + COXColorPickerButton m_btnBkColor; + COXFontPickerButton m_btnTextFontColor; + CListBox m_ListBox; + BOOL m_bBoldTips; + BOOL m_bSetMaxWidth; + UINT m_nMaxWidth; + //}}AFX_DATA + COLORREF m_clrBackground; + COLORREF m_clrText; + CFont m_font; + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CToolTipExDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CToolTipExDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonColorBackground(); + afx_msg void OnButtonTextFontColor(); + afx_msg void OnCheckSetMaxWidth(); + afx_msg void OnChangeEditMaxWidth(); + //}}AFX_MSG + BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult); + virtual BOOL PreTranslateMessage( MSG* pMsg ); + DECLARE_MESSAGE_MAP() + +protected: + COXToolTipCtrl m_toolTip; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TOOLTIPEXDLG_H__7FF81957_1C44_11D2_965C_00A0C9668BF9__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExInfo.rtf new file mode 100644 index 0000000..6a7038b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/ToolTipExInfo.rtf @@ -0,0 +1,121 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f38\froman\fcharset238\fprq2 Times New Roman CE;} +{\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;}{\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f44\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid4475459}{\*\generator Micro +soft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr18\min11}{\revtim\yr2005\mo1\dy17\hr18\min11}{\version2}{\edmins0}{\nofpages3}{\nofwords674}{\nofchars3846}{\*\company Dundas India}{\nofcharsws4511} +{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot4475459 +\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid4475459 COXToolTipCtrl Overview}{\b\fs48\insrsid4475459 +\par }{\b\fs16\insrsid4475459 Copyright \'a9}{\b\fs16\insrsid4475459 The Code Project}{\b\fs16\insrsid4475459 1997-1999, All Rights Reserved +\par }{\insrsid4475459 +\par }{\b\insrsid4475459 COXToolTipCtrl}{\insrsid4475459 is an }{\b\insrsid4475459 extended tooltip control}{\insrsid4475459 that allows }{\b\insrsid4475459 multiline}{\insrsid4475459 tooltips, plus extended tooltip text. Extended tooltip text is }{ +\b\insrsid4475459 extra text}{\insrsid4475459 that is + displayed if the user clicks on the tooltip window. If the tooltip contains extended text (as well as a standard tooltip string) then the info window will contain a small arrow that prompts the user to click on the window. Once the window is clicked, the + extended text is shown. If the window is clicked again then the window reduces to showing just the standard text. +\par +\par The maximum width of the tooltips can be specified, and if the info text is too big to fit within these bounds then the text will be wrapped over multiple lines. The control also allows you to specify a different }{\b\insrsid4475459 +text and background colors}{\insrsid4475459 for the tooltips, and the }{\b\insrsid4475459 display font can also be changed}{\insrsid4475459 . +\par +\par +\par This class is a direct replacement for the }{\b\insrsid4475459 CToolTipCtrl}{\insrsid4475459 class. It incorporates the entire API of the standard CToolTipCtrl, and introduces new features not found in the standard tooltip. +\par +\par The control is used just like any other tooltip control. To use the tool simply call }{\ul\cf2\insrsid4475459 Create}{\insrsid4475459 (...) and specify the parent window of the tool, then add tools to the control using the }{\ul\cf2\insrsid4475459 AddTool +}{\insrsid4475459 (...) member function. eg. (In a formview or dialog) +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 tooltip.Create(this) +\par tooltip.AddTool(GetDlgItem(IDC_CONTROL), _T("Tooltip text\\rThis is the extended\\ntooltip text")); +\par }{\insrsid4475459 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid4475459 where ID_CONTROL is the ID of a control. +\par +\par To specify extended text for a tooltip, simply }{\b\insrsid4475459 append a '\\r'}{\insrsid4475459 after your tooltip text, and then append the extended tooltip info. +\par +\par As with the standard tooltip control you can specify the actual text for the tool at creation time (as shown above), or you can specify the LPSTR_TEXTCALLBACK value and provide a TTN_NEEDTEXT handler to return the text dynamically at runtime. +\par +\par To handle the TTN_NEEDTEXT message, you will need to add a message handler in the parent window, and an entry in the message map, eg. in you view or form +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 BEGIN_MESSAGE_MAP(CMyDlg, CDialog) +\par . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +\par ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify) +\par END_MESSAGE_MAP() +\par +\par BOOL CMyDlg::OnInitDialog() +\par \{ +\par \~\~\~ CDialog::OnInitDialog(); +\par \~\~\~ tooltip.Create(this); +\par \~\~\~ tooltip.AddTool(GetDlgItem(IDC_CONTROL), LPSTR_TEXTCALLBACK); +\par \~\~\~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +\par \} +\par +\par BOOL CMyDlg::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult) +\par \{ +\par \~\~\~ TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; +\par \~\~\~ UINT nID = pNMHDR->idFrom; +\par +\par \~\~\~ if (nID == IDC_CONTROL)\~\~\~ // Fill in the text buffer +\par \~\~\~ \{ +\par \~\~\~\~\~\~\~ _tcscpy(pTTT->szText, _T("Tooltip text\\rExtended tooltip text")); +\par \~\~\~\~\~\~\~ return TRUE; +\par \~\~\~ \} +\par +\par \~\~\~ return FALSE; +\par \} +\par }{\insrsid4475459 +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid4475459 You can also supply text two alternate ways, either by supplying a string resource +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 pTTT->lpszText = MAKEINTRESOURCE(nID); +\par pTTT->hinst = AfxGetResourceHandle(); +\par return TRUE; +\par }{\insrsid4475459 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid4475459 or by supplying a pointer to the text: +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 pTTT->lpszText = _T("Tooltip text\\rExtended tooltip text"); +\par return TRUE; +\par +\par }{\insrsid4475459 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\b\insrsid4475459 Newline characters ('\\n') can be embedded anywhere}{\insrsid4475459 + within the text or extended text to produce a multiline tooltip. If the width of the tooltip window is specified using }{\ul\cf2\insrsid4475459 SetMaxTipWidth}{\insrsid4475459 +() then the tooltip text will be wrapped to this length, and if necessary displayed on more than one line. +\par +\par To change the font of the tooltips simply use the }{\b\insrsid4475459 SetFont}{\insrsid4475459 () member function. +\par +\par The }{\ul\cf2\insrsid4475459 GetToolInfo}{\insrsid4475459 /}{\ul\cf2\insrsid4475459 SetToolInfo}{\insrsid4475459 functions, and the HitTest functions are very similar to the CToolTipCtrl versions except that they use a }{\b\insrsid4475459 OXTOOLINFO}{ +\insrsid4475459 structure instead of a TOOLINFO structure. This structure is defined as +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 struct OXTOOLINFO : public TOOLINFO +\par \{ +\par #if (_WIN32_IE < 0x0300) +\par \~\~\~ LPARAM lParam; }{\i\cf11\insrsid4475459 //Application defined value that is associated with the tool}{\i\insrsid4475459 +\par #endif +\par \~\~\~ int nWidth; }{\i\cf11\insrsid4475459 //Width of box, or 0 for default}{\i\insrsid4475459 +\par \~\~\~ COLORREF clrTextColor; }{\i\cf11\insrsid4475459 //text color}{\i\insrsid4475459 +\par \~\~\~ COLORREF clrBackColor; }{\i\cf11\insrsid4475459 //background color}{\i\insrsid4475459 +\par \} +\par }{\insrsid4475459 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid4475459 and so is very similar to the standard TOOLINFO, and is used in the same way, with the exception that the uFlags member is not (yet) used. +\par +\par To change the color of an individual tip, use the }{\ul\cf2\insrsid4475459 GetToolInfo}{\insrsid4475459 /}{\ul\cf2\insrsid4475459 SetToolInfo}{\insrsid4475459 functions +\par +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\i\insrsid4475459 OXTOOLINFO ToolInfo; +\par if (m_toolTip.GetToolInfo(ToolInfo, GetDlgItem(IDC_CONTROL))) +\par \{ +\par \~\~\~ ToolInfo.clrBackColor = RGB(255, 255, 255); +\par \~\~\~ ToolInfo.clrTextColor = RGB( 0, 0, 255); +\par \~\~\~ m_toolTip.SetToolInfo(&ToolInfo); +\par \}}{\insrsid4475459 +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid4475459 +\par +\par }{\b\insrsid4475459 Dependencies: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\insrsid4475459 #include "}{\cf6\insrsid4475459 OXToolTipCtrl.h}{\insrsid4475459 " +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\b\insrsid4475459 +\par Source code files: +\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\insrsid4475459 "}{\cf6\insrsid4475459 OXToolTipCtrl.cpp}{\insrsid4475459 " +\par +\par +\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\fs20\insrsid4475459 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.rc2 new file mode 100644 index 0000000..d4c436a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/res/ToolTipEx.rc2 @@ -0,0 +1,13 @@ +// +// TOOLTIPEX.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/resource.h new file mode 100644 index 0000000..25f77a2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/ToolTipEx/resource.h @@ -0,0 +1,34 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ToolTipEx.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_TOOLTIPEX_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_BUTTON_TEXT_FONT_COLOR 1000 +#define IDC_TEXT1 1001 +#define IDC_LIST1 1002 +#define IDC_RADIO1 1003 +#define ID_DESCRIPTION_FILE 1003 +#define IDC_CHECK1 1004 +#define IDC_EDIT1 1005 +#define IDC_COMBO1 1006 +#define IDC_SEPARATOR_CUSTOMIZE 1007 +#define IDC_STATIC_TEXT_FONT_COLOR 1008 +#define IDC_BUTTON_COLOR_BACKGROUND 1009 +#define IDC_CHECK_SET_MAX_WIDTH 1010 +#define IDC_EDIT_MAX_WIDTH 1011 +#define IDC_SEPARATOR_SAMPLES 1012 +#define IDC_TREE1 1013 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1014 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo.sln new file mode 100644 index 0000000..b00547d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XPPanelDemo", "XPPanelDemo\XPPanelDemo.vcproj", "{F2F558F6-E498-4F5D-89A9-AC5CC50B1306}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F2F558F6-E498-4F5D-89A9-AC5CC50B1306}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2F558F6-E498-4F5D-89A9-AC5CC50B1306}.Debug|Win32.Build.0 = Debug|Win32 + {F2F558F6-E498-4F5D-89A9-AC5CC50B1306}.Release|Win32.ActiveCfg = Release|Win32 + {F2F558F6-E498-4F5D-89A9-AC5CC50B1306}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.cpp new file mode 100644 index 0000000..5d3f6b7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.cpp @@ -0,0 +1,78 @@ +// XPPanelDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "XPPanelDemo.h" +#include "XPPanelDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CXPPanelDemoApp + +BEGIN_MESSAGE_MAP(CXPPanelDemoApp, CWinApp) + ON_COMMAND(ID_HELP, &CWinApp::OnHelp) +END_MESSAGE_MAP() + + +// CXPPanelDemoApp construction + +CXPPanelDemoApp::CXPPanelDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + + +// The one and only CXPPanelDemoApp object + +CXPPanelDemoApp theApp; + + +// CXPPanelDemoApp initialization + +BOOL CXPPanelDemoApp::InitInstance() +{ + // InitCommonControlsEx() 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. + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(InitCtrls); + // Set this to include all the common control classes you want to use + // in your application. + InitCtrls.dwICC = ICC_WIN95_CLASSES; + InitCommonControlsEx(&InitCtrls); + + CWinApp::InitInstance(); + + 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")); + + CXPPanelDemoDlg 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; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.h new file mode 100644 index 0000000..dbe5eb4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.h @@ -0,0 +1,31 @@ +// XPPanelDemo.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 + + +// CXPPanelDemoApp: +// See XPPanelDemo.cpp for the implementation of this class +// + +class CXPPanelDemoApp : public CWinApp +{ +public: + CXPPanelDemoApp(); + +// Overrides + public: + virtual BOOL InitInstance(); + +// Implementation + + DECLARE_MESSAGE_MAP() +}; + +extern CXPPanelDemoApp theApp; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.rc new file mode 100644 index 0000000..0a671fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.rc @@ -0,0 +1,220 @@ +// 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\\XPPanelDemo.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\\XPPanelDemo.ico" +IDI_NEWFOLDER ICON "C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\VS2005ImageLibrary\\VS2005ImageLibrary\\VS2005ImageLibrary\\icons\\WinXP\\newfolder.ico" +IDI_WHEEL ICON "C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\VS2005ImageLibrary\\VS2005ImageLibrary\\VS2005ImageLibrary\\icons\\WinXP\\otheroptions.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About XPPanelDemo" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "XPPanelDemo Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2006",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP +END + +IDD_XPPanelDemo_DIALOG DIALOGEX 0, 0, 320, 200 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "XPPanelDemo" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,263,7,50,16 + PUSHBUTTON "Cancel",IDCANCEL,263,25,50,16 +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", "XPPanelDemo.exe" + VALUE "LegalCopyright", "TODO: (c) . All rights reserved." + VALUE "OriginalFilename", "XPPanelDemo.exe" + VALUE "ProductName", "TODO: " + 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_XPPanelDemo_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 193 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About XPPanelDemo..." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_EXCEL ICON "res\\excel.ico" +IDI_WORD ICON "res\\word.ico" +#endif // English (Canada) 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\XPPanelDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.vcproj new file mode 100644 index 0000000..6ed3454 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemo.vcproj @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.cpp new file mode 100644 index 0000000..1fe8cc6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.cpp @@ -0,0 +1,212 @@ +// XPPanelDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "XPPanelDemo.h" +#include "XPPanelDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// 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() + + +// CXPPanelDemoDlg dialog + + + + +CXPPanelDemoDlg::CXPPanelDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CXPPanelDemoDlg::IDD, pParent) +{ + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CXPPanelDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CXPPanelDemoDlg, CDialog) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +// CXPPanelDemoDlg message handlers + +BOOL CXPPanelDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + CRect rect; + GetClientRect(&rect); + if(!m_TaskPanel.Create(rect,this, 1000)) + { + MessageBox(_T("Creation failed!")); + } + else + { + TaskGroup* it = m_TaskPanel.AddGroup(_T("File and Folder Tasks")); + + Item i1; + i1.m_nIconID = IDI_NEWFOLDER; + i1.m_strText = "Run Notepad"; + i1.m_strCmd = "notepad.exe"; + + Item i2; + i2.m_nIconID = IDI_WHEEL; + i2.m_strText = "Launch Google"; + i2.m_strCmd = "www.google.com"; + + it->AddItem(i1); + it->AddItem(i2); + + it = m_TaskPanel.AddGroup(_T("Other Places")); + + i1.m_strText = "Run Notepad"; + i1.m_strCmd = "notepad.exe"; + i2.m_strText = "Run Paintbrush"; + i2.m_strCmd = "mspaint.exe"; + it->AddItem(i1); + it->AddItem(i2); + + i1.m_strText = "The Code Project"; + i1.m_strCmd = "www.codeproject.com"; + i2.m_strText = "Run Notepad"; + i2.m_strCmd = "notepad.exe"; + it->AddItem(i1); + it->AddItem(i2); + + i1.m_strText = "Run Paintbrush"; + i1.m_strCmd = "mspaint.exe"; + i2.m_strText = "The Code Project"; + i2.m_strCmd = "www.codeproject.com"; + it->AddItem(i1); + it->AddItem(i2); + + it = m_TaskPanel.AddGroup(_T("Microsoft Office")); + i1.m_strText = "Run Word"; + i1.m_nIconID = IDI_WORD; + i1.m_strCmd = "winword.exe"; + it->AddItem(i1); + + i1.m_strText = "Run Excel"; + i1.m_nIconID = IDI_EXCEL; + i1.m_strCmd = "excel.exe"; + it->AddItem(i1); + + i1.m_strText = "Run Powerpoint"; + i1.m_strCmd = "powerpnt.exe"; + i1.m_nIconID = IDI_WHEEL; + it->AddItem(i1); + } + + return TRUE; +} + +void CXPPanelDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CXPPanelDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this function to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CXPPanelDemoDlg::OnQueryDragIcon() +{ + return static_cast(m_hIcon); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.h new file mode 100644 index 0000000..56b9e94 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/XPPanelDemoDlg.h @@ -0,0 +1,33 @@ +// XPPanelDemoDlg.h : header file +// + +#pragma once + +#include "OXTaskPanel.h" + +// CXPPanelDemoDlg dialog +class CXPPanelDemoDlg : public CDialog +{ +// Construction +public: + CXPPanelDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + enum { IDD = IDD_XPPanelDemo_DIALOG }; + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + + +// Implementation +protected: + HICON m_hIcon; + COXTaskPanel m_TaskPanel; + + // 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() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.ico new file mode 100644 index 0000000..8a84ca3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.rc2 new file mode 100644 index 0000000..66a4628 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/XPPanelDemo.rc2 @@ -0,0 +1,13 @@ +// +// XPPanelDemo.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/excel.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/excel.ico new file mode 100644 index 0000000..349387a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/excel.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/word.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/word.ico new file mode 100644 index 0000000..36acbf7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/res/word.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/resource.h new file mode 100644 index 0000000..eacd9a1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/resource.h @@ -0,0 +1,25 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by XPPanelDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_XPPanelDemo_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDI_NEWFOLDER 129 +#define IDI_WHEEL 130 +#define IDI_EXCEL 131 +#define IDI_ICON2 132 +#define IDI_WORD 132 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 133 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.cpp new file mode 100644 index 0000000..693c397 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.cpp @@ -0,0 +1,7 @@ +// stdafx.cpp : source file that includes just the standard includes +// XPPanelDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.h new file mode 100644 index 0000000..a0fabf3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/XPPanelDemo/XPPanelDemo/stdafx.h @@ -0,0 +1,73 @@ +// 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 _SECURE_ATL +#define _SECURE_ATL 1 +#endif + +#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 XP or later. +#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. +#endif + +#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. +#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows. +#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 6.0 or later. +#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. +#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 + + + +#ifndef _AFX_NO_OLE_SUPPORT +#include // MFC support for Internet Explorer 4 Common Controls +#endif +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + + + + + + +#ifdef _UNICODE +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_IA64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif +#endif + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.cpp new file mode 100644 index 0000000..ef3dd2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.cpp @@ -0,0 +1,68 @@ +// MaskedEditTest.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "MaskedEditTest.h" // CMaskedEditTestApp +#include "MaskedEditTestDlg.h" // CMaskedEditTestDlg + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__ ; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestApp + +BEGIN_MESSAGE_MAP(CMaskedEditTestApp, CWinApp) + //{{AFX_MSG_MAP(CMaskedEditTestApp) + //}}AFX_MSG +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestApp construction + +CMaskedEditTestApp::CMaskedEditTestApp() + { + } + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMaskedEditTestApp object + +CMaskedEditTestApp theApp ; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestApp initialization + +BOOL CMaskedEditTestApp::InitInstance() + { + // Standard initialization + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CMaskedEditTestDlg dlg ; + /*int nResponse = */dlg.DoModal() ; + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE ; + } + +int CMaskedEditTestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsp new file mode 100644 index 0000000..b2a6a40 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsp @@ -0,0 +1,249 @@ +# Microsoft Developer Studio Project File - Name="MaskedEditTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MaskedEditTest - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MaskedEditTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MaskedEditTest.mak" CFG="MaskedEditTest - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MaskedEditTest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MaskedEditTest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MaskedEditTest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "MaskedEditTest - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "MaskedEditTest - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MaskedEditTest - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MaskedEditTest.exe" + +!ELSEIF "$(CFG)" == "MaskedEditTest - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MaskedEditTest.exe" + +!ELSEIF "$(CFG)" == "MaskedEditTest - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MaskedEd" +# PROP BASE Intermediate_Dir "MaskedEd" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MaskedEditTest.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"MaskedEditTest.exe" + +!ELSEIF "$(CFG)" == "MaskedEditTest - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MaskedE0" +# PROP BASE Intermediate_Dir "MaskedE0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"MaskedEditTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"MaskedEditTest.exe" + +!ELSEIF "$(CFG)" == "MaskedEditTest - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MaskedE1" +# PROP BASE Intermediate_Dir "MaskedE1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"MaskedEditTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"MaskedEditTest.exe" + +!ENDIF + +# Begin Target + +# Name "MaskedEditTest - Win32 Release" +# Name "MaskedEditTest - Win32 Debug" +# Name "MaskedEditTest - Win32 Release_Shared" +# Name "MaskedEditTest - Win32 Unicode_Release" +# Name "MaskedEditTest - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMaskedEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MaskedEditTest.cpp +# End Source File +# Begin Source File + +SOURCE=.\MaskedEditTestDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\MaskedEditTestResource.rc +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\MaskedEditTest.h +# End Source File +# Begin Source File + +SOURCE=.\MaskedEditTestDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMaskedEdit.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\MaskedEditTest.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MaskedEditTest.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsw new file mode 100644 index 0000000..7c981ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MaskedEditTest"=".\MaskedEditTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.h new file mode 100644 index 0000000..7897afa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.h @@ -0,0 +1,38 @@ +// MaskedEditTest.h : main header file for the MASKEDEDITTEST application +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MaskedEditTest_h__ +#define __MaskedEditTest_h__ + +#ifndef __AFXWIN_H__ +#error include 'stdafx.h' before including this file for PCH +#endif + +#include "MaskedEditTestResource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestApp: See MaskedEditTest.cpp for the implementation of this class + +class CMaskedEditTestApp : public CWinApp + { + public: + CMaskedEditTestApp() ; + + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMaskedEditTestApp) + public: + virtual BOOL InitInstance() ; + virtual int ExitInstance(); + //}}AFX_VIRTUAL + + // Implementation + + //{{AFX_MSG(CMaskedEditTestApp) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + } ; + +#endif // __MaskedEditTest_h__ +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.vcproj new file mode 100644 index 0000000..e9c4dca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTest.vcproj @@ -0,0 +1,872 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.cpp new file mode 100644 index 0000000..186cacd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.cpp @@ -0,0 +1,222 @@ +// MaskedEditTestDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "MaskedEditTest.h" // CMaskedEditTestApp +#include "MaskedEditTestDlg.h" // CMaskedEditTestDlg +#include "OXMaskedEdit.h" // COXMaskedEdit + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__ ; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestDlg dialog + +CMaskedEditTestDlg::CMaskedEditTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CMaskedEditTestDlg::IDD, pParent)/*, + m_editMasked()*/ + { + //{{AFX_DATA_INIT(CMaskedEditTestDlg) + m_csPromptChar = _T(""); + m_bAutoTab = FALSE; + //}}AFX_DATA_INIT + m_hIcon = AfxGetApp()->LoadIcon ( IDR_MAINFRAME ) ; + } + +void CMaskedEditTestDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX) ; + //{{AFX_DATA_MAP(CMaskedEditTestDlg) + DDX_Control (pDX, IDC_EDIT_TEST , m_editMasked ) ; + DDX_Control (pDX, IDC_COMBO_MASKS, m_comboMasks ) ; + DDX_Text (pDX, IDC_EDIT_PROMPT, m_csPromptChar) ; + DDV_MaxChars(pDX, m_csPromptChar, 1) ; + DDX_Check(pDX, IDC_CHECK_AUTOTAB, m_bAutoTab); + //}}AFX_DATA_MAP + } + +BEGIN_MESSAGE_MAP(CMaskedEditTestDlg, CDialog) + //{{AFX_MSG_MAP(CMaskedEditTestDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_CBN_SELENDOK (IDC_COMBO_MASKS, OnSelendokMasks ) + ON_CBN_EDITCHANGE(IDC_COMBO_MASKS, OnEditchangeMasks) + ON_EN_CHANGE(IDC_EDIT_PROMPT, OnChangeEditPrompt) + ON_BN_CLICKED(IDC_BUTTON_EMPTY, OnButtonEmpty) + ON_BN_CLICKED(IDC_CHECK_AUTOTAB, OnCheckAutotab) + //}}AFX_MSG_MAP + ON_NOTIFY(OXMEN_VALIDATE,IDC_EDIT_TEST,OnValidateEditTest) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestDlg message handlers + +BOOL CMaskedEditTestDlg::OnInitDialog() + { + m_csPromptChar = m_editMasked.GetPromptSymbol() ; + m_bAutoTab=m_editMasked.GetAutoTab(); + + CDialog::OnInitDialog() ; + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + m_comboMasks.AddString ( _T("Digit Test: ###-####") ) ; + m_comboMasks.AddString ( _T("Decimal Test: ###.###.###.###") ) ; + m_comboMasks.AddString ( _T("Thousands Test: ##,###.##") ) ; + m_comboMasks.AddString ( _T("Time Test: ##:##") ) ; + m_comboMasks.AddString ( _T("Date Test: ##/##/####") ) ; + // Since the "C" programming language also uses the '\' as an escape character, + // you must use two in sequence to equal one switch for masking purposes. + m_comboMasks.AddString ( _T("\\Alphanumeric Test: AAAAAAAAAA\\, AAAAAAAA") ) ; + m_comboMasks.AddString ( _T("\\Alphabetic Test: ????????????????") ) ; + m_comboMasks.AddString ( _T("Uppercase Test: >>>>>>> ????????") ) ; + m_comboMasks.AddString ( _T("Lowercase Test: <<<<<<< ????????") ) ; + m_comboMasks.AddString ( _T("Phone:(###)###-#### Ext:####") ) ; + m_comboMasks.AddString ( _T("AAA-#######") ) ; + m_comboMasks.AddString ( _T("&####-##-## ##\\:##\\:##") ) ; + m_comboMasks.SetCurSel ( 0 ) ; + OnSelendokMasks() ; + return TRUE ; + } + +void CMaskedEditTestDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CMaskedEditTestDlg::OnPaint() + { + if ( IsIconic() ) + { + CPaintDC dc ( this ) ; // device context for painting + + SendMessage ( WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0 ) ; + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics ( SM_CXICON ) ; + int cyIcon = GetSystemMetrics ( SM_CYICON ) ; + + CRect rect ; + GetClientRect ( &rect ) ; + int x = (rect.Width () - cxIcon + 1) / 2 ; + int y = (rect.Height() - cyIcon + 1) / 2 ; + + // Draw the icon + dc.DrawIcon ( x, y, m_hIcon ) ; + } + else + { + CDialog::OnPaint() ; + } + } + +HCURSOR CMaskedEditTestDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon ; + } + +void CMaskedEditTestDlg::OnSelendokMasks() + { + TRACE(_T("CMaskedEditTestDlg::OnSelendokMasks()\n")); + + int nSelected = m_comboMasks.GetCurSel() ; + if ( nSelected >= 0 ) + { + CString csNewMask ; + m_comboMasks.GetLBText ( nSelected, csNewMask ) ; + m_editMasked.SetMask ( csNewMask ) ; + } + } + +void CMaskedEditTestDlg::OnEditchangeMasks() + { + TRACE(_T("CMaskedEditTestDlg::OnEditchangeMasks()\n")); + + CString csNewMask ; + m_comboMasks.GetWindowText ( csNewMask ) ; + m_editMasked.SetMask ( csNewMask ) ; + } + +void CMaskedEditTestDlg::OnChangeEditPrompt() + { + TRACE(_T("CMaskedEditTestDlg::OnChangeEditPrompt()\n")); + + UpdateData ( TRUE ) ; + if ( m_csPromptChar.GetLength() == 1 ) + m_editMasked.SetPromptSymbol ( m_csPromptChar[0] ) ; + } + +void CMaskedEditTestDlg::OnButtonEmpty() +{ + // TODO: Add your control notification handler code here + m_editMasked.EmptyData(TRUE); + UpdateData ( FALSE ) ; +} + +void CMaskedEditTestDlg::OnCheckAutotab() +{ + // TODO: Add your control notification handler code here + UpdateData(); + m_editMasked.SetAutoTab(m_bAutoTab); +} + +void CMaskedEditTestDlg::OnValidateEditTest(NMHDR * pNotifyStruct, LRESULT * result) +{ + LPMENMHDR pMENotifyStruct = (LPMENMHDR)pNotifyStruct; + + UpdateData(); + + CString sText=m_editMasked.GetInputData(); + + // just as an example: if user typed "345" then typed information is invalid, + // cursor will be set before first found "345" symbol + int nPos=sText.Find(_T("345")); + if(nPos!=-1) + { + pMENotifyStruct->bValid=FALSE; + pMENotifyStruct->nPosition=m_editMasked.LPtoRP(nPos); + } + else + { + pMENotifyStruct->bValid=TRUE; + pMENotifyStruct->bDefaultValidation=TRUE; + } + + *result=0; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.h new file mode 100644 index 0000000..1504570 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestDlg.h @@ -0,0 +1,57 @@ +// MaskedEditTestDlg.h : header file +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MaskedEditTestDlg_h__ +#define __MaskedEditTestDlg_h__ + + +#include "OXMaskedEdit.h" // COXMaskedEdit + +///////////////////////////////////////////////////////////////////////////// +// CMaskedEditTestDlg dialog + +class CMaskedEditTestDlg : public CDialog + { + // Construction + public: + CMaskedEditTestDlg(CWnd* pParent = NULL) ; + + // Dialog Data + protected: + //{{AFX_DATA(CMaskedEditTestDlg) + enum { IDD = IDD_MASKEDEDITTEST_DIALOG }; + COXMaskedEdit m_editMasked ; + CComboBox m_comboMasks ; + CString m_csPromptChar ; + BOOL m_bAutoTab; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMaskedEditTestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX) ; + //}}AFX_VIRTUAL + + // Implementation + protected: + HICON m_hIcon ; + + // Generated message map functions + //{{AFX_MSG(CMaskedEditTestDlg) + virtual BOOL OnInitDialog() ; + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint() ; + afx_msg HCURSOR OnQueryDragIcon() ; + afx_msg void OnSelendokMasks () ; + afx_msg void OnEditchangeMasks () ; + afx_msg void OnChangeEditPrompt() ; + afx_msg void OnButtonEmpty(); + afx_msg void OnCheckAutotab(); + //}}AFX_MSG + afx_msg void OnValidateEditTest(NMHDR * pNotifyStruct, LRESULT * result); + DECLARE_MESSAGE_MAP() + } ; + +#endif // __MaskedEditTestDlg_h__ +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestInfo.rtf new file mode 100644 index 0000000..31a5db4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.clw new file mode 100644 index 0000000..0d64f71 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.clw @@ -0,0 +1,49 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CMaskedEditTestDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "maskededittestresource.h" +LastPage=0 + +ClassCount=2 +Class1=CMaskedEditTestApp +Class2=CMaskedEditTestDlg + +ResourceCount=1 +Resource1=IDD_MASKEDEDITTEST_DIALOG + +[CLS:CMaskedEditTestApp] +Type=0 +BaseClass=CWinApp +HeaderFile=MaskedEditTest.h +ImplementationFile=MaskedEditTest.cpp +LastObject=CMaskedEditTestApp +Filter=N +VirtualFilter=AC + +[CLS:CMaskedEditTestDlg] +Type=0 +BaseClass=CDialog +HeaderFile=MaskedEditTestDlg.h +ImplementationFile=MaskedEditTestDlg.cpp +LastObject=CMaskedEditTestDlg +Filter=D +VirtualFilter=dWC + +[DLG:IDD_MASKEDEDITTEST_DIALOG] +Type=1 +Class=CMaskedEditTestDlg +ControlCount=9 +Control1=IDC_EDIT_TEST,edit,1350631552 +Control2=IDC_COMBO_MASKS,combobox,1344339971 +Control3=IDC_EDIT_PROMPT,edit,1350631552 +Control4=IDC_CHECK_AUTOTAB,button,1342242819 +Control5=IDC_BUTTON_EMPTY,button,1342242816 +Control6=IDCANCEL,button,1342242816 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.h new file mode 100644 index 0000000..012b675 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by MaskedEditTestResource.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_MASKEDEDITTEST_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDS_ABOUTBOX 130 +#define IDC_EDIT1 1000 +#define IDC_EDIT_TEST 1000 +#define IDC_COMBO_MASKS 1001 +#define IDC_BUTTON_EMPTY 1002 +#define IDC_EDIT_PROMPT 1003 +#define IDC_CHECK_AUTOTAB 1004 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1005 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.rc new file mode 100644 index 0000000..52df981 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/MaskedEditTestResource.rc @@ -0,0 +1,189 @@ +// Microsoft Visual C++ generated resource script. +// +#include "MaskedEditTestResource.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 + "MaskedEditTestResource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 "MaskedEditTest.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MASKEDEDITTEST_DIALOG DIALOGEX 0, 0, 290, 114 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "MaskedEditTest" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + EDITTEXT IDC_EDIT_TEST,47,23,157,14,ES_AUTOHSCROLL + COMBOBOX IDC_COMBO_MASKS,47,49,157,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_EDIT_PROMPT,47,75,40,14,ES_AUTOHSCROLL + CONTROL "AutoTab mode",IDC_CHECK_AUTOTAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,78,63,10 + PUSHBUTTON "Empty",IDC_BUTTON_EMPTY,233,22,50,14 + PUSHBUTTON "Close",IDCANCEL,233,49,50,14 + LTEXT "Test:",IDC_STATIC,13,25,29,8 + LTEXT "Masks:",IDC_STATIC,13,51,29,8 + LTEXT "Prompt:",IDC_STATIC,13,77,29,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 "040904b0" + BEGIN + VALUE "FileDescription", "MASKEDEDITTEST MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "MASKEDEDITTEST" + VALUE "LegalCopyright", "Copyright © 1997" + VALUE "OriginalFilename", "MASKEDEDITTEST.EXE" + VALUE "ProductName", "MASKEDEDITTEST Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MASKEDEDITTEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 283 + TOPMARGIN, 7 + BOTTOMMARGIN, 107 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "MaskedEdit Control Test" + ID_DESCRIPTION_FILE "MaskedEditTestInfo.rtf" + IDS_ABOUTBOX "&About MaskedEditTest..." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.cpp new file mode 100644 index 0000000..cfe083e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// MaskedEditTest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.h new file mode 100644 index 0000000..7e64df2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/maskededit/StdAfx.h @@ -0,0 +1,11 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC support for Windows Common Controls +#include // MFC Template-Based classes \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/AGREE.WMF b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/AGREE.WMF new file mode 100644 index 0000000..3083d08 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/AGREE.WMF differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.cpp new file mode 100644 index 0000000..bfa623a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Controls.icl b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Controls.icl new file mode 100644 index 0000000..1b1a17d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Controls.icl differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Firework.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Firework.bmp new file mode 100644 index 0000000..5159a3a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Firework.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.cpp new file mode 100644 index 0000000..be1919f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.cpp @@ -0,0 +1,91 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.h new file mode 100644 index 0000000..3b6ba60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/MainFrm.h @@ -0,0 +1,44 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.cpp new file mode 100644 index 0000000..c2e675b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.cpp @@ -0,0 +1,113 @@ +#include "stdafx.h" +#include "OXDocMgr.h" +#include "OXWinApp.h" + +IMPLEMENT_DYNAMIC(COXDocManager, CDocManager) + +static void AppendFilterSuffix(CString& filter, OPENFILENAME& ofn, + CDocTemplate* pTemplate, CString* pstrDefaultExt) +{ + ASSERT_VALID(pTemplate); + ASSERT_KINDOF(CDocTemplate, pTemplate); + + CString strFilterExt, strFilterName; + if (pTemplate->GetDocString(strFilterExt, CDocTemplate::filterExt) && + !strFilterExt.IsEmpty() && + pTemplate->GetDocString(strFilterName, CDocTemplate::filterName) && + !strFilterName.IsEmpty()) + { + // a file based document template - add to filter list +#ifndef _MAC + ASSERT(strFilterExt[0] == '.'); +#endif + if (pstrDefaultExt != NULL) + { + // set the default extension +#ifndef _MAC + *pstrDefaultExt = ((LPCTSTR)strFilterExt) + 1; // skip the '.' +#else + *pstrDefaultExt = strFilterExt; +#endif + ofn.lpstrDefExt = (LPTSTR)(LPCTSTR)(*pstrDefaultExt); + ofn.nFilterIndex = ofn.nMaxCustFilter + 1; // 1 based number + } + + // add to filter + filter += strFilterName; + ASSERT(!filter.IsEmpty()); // must have a file type name + filter += (TCHAR)'\0'; // next string please +#ifndef _MAC + filter += (TCHAR)'*'; +#endif + filter += strFilterExt; + filter += (TCHAR)'\0'; // next string please + ofn.nMaxCustFilter++; + } +} + +COXDocManager::COXDocManager() +{ +} + +BOOL COXDocManager::DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate) +{ + ASSERT(AfxGetApp()->IsKindOf(RUNTIME_CLASS(COXWinApp))); + + CFileDialog* pDlgFile = ((COXWinApp*)AfxGetApp())-> + NewFileDialog(bOpenFileDialog); + + CString title; + VERIFY(title.LoadString(nIDSTitle)); + + pDlgFile->m_ofn.Flags |= lFlags; + + CString strFilter; + CString strDefault; + if (pTemplate != NULL) + { + ASSERT_VALID(pTemplate); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, &strDefault); + } + else + { + // do for all doc template + POSITION pos = m_templateList.GetHeadPosition(); + BOOL bFirst = TRUE; + while (pos != NULL) + { + CDocTemplate* pTemplate = (CDocTemplate*)m_templateList.GetNext(pos); + AppendFilterSuffix(strFilter, pDlgFile->m_ofn, pTemplate, + bFirst ? &strDefault : NULL); + bFirst = FALSE; + } + } + + // append the "*.*" all files filter + CString allFilter; + VERIFY(allFilter.LoadString(AFX_IDS_ALLFILTER)); + strFilter += allFilter; + strFilter += (TCHAR)'\0'; // next string please +#ifndef _MAC + strFilter += _T("*.*"); +#else + strFilter += _T("****"); +#endif + strFilter += (TCHAR)'\0'; // last string + pDlgFile->m_ofn.nMaxCustFilter++; + + pDlgFile->m_ofn.lpstrFilter = strFilter; +#ifndef _MAC + pDlgFile->m_ofn.lpstrTitle = title; +#else + pDlgFile->m_ofn.lpstrPrompt = title; +#endif + pDlgFile->m_ofn.lpstrFile = fileName.GetBuffer(_MAX_PATH); + + BOOL bResult = pDlgFile->DoModal() == IDOK ? TRUE : FALSE; + fileName.ReleaseBuffer(); + + delete pDlgFile; + + return bResult; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.h new file mode 100644 index 0000000..4ea50fa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXDocMgr.h @@ -0,0 +1,11 @@ +class COXDocManager : public CDocManager +{ + DECLARE_DYNAMIC(COXDocManager) +public: + + COXDocManager(); + + // helper for standard commdlg dialogs + virtual BOOL DoPromptFileName(CString& fileName, UINT nIDSTitle, + DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate); +}; \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.H new file mode 100644 index 0000000..cdaa523 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.H @@ -0,0 +1,36 @@ + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp: +// +// + +class COXWinApp : public CWinApp +{ +DECLARE_DYNAMIC(COXWinApp) +// Data Members +public: + +protected: + +private: + +// Member Functions +public: + COXWinApp(); + void AddDocTemplate(CDocTemplate* pTemplate); + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog); + +protected: + +private: + + +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.cpp new file mode 100644 index 0000000..aaca5c0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/OXWinApp.cpp @@ -0,0 +1,35 @@ +#include "stdafx.h" +#include "OXWinApp.h" +#include "OXDocMgr.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp + + +IMPLEMENT_DYNAMIC(COXWinApp, CWinApp) + +///////////////////////////////////////////////////////////////////////////// +// COXWinApp construction + +COXWinApp::COXWinApp() +{ +} + +void COXWinApp::AddDocTemplate(CDocTemplate* pTemplate) +{ + if (m_pDocManager == NULL) + m_pDocManager = new COXDocManager; + m_pDocManager->AddDocTemplate(pTemplate); +} + +CFileDialog* COXWinApp::NewFileDialog(BOOL bOpenFileDialog) +{ + return new CFileDialog(bOpenFileDialog); +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.clw new file mode 100644 index 0000000..433407e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.clw @@ -0,0 +1,103 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=COXFileDialog +LastTemplate=CFileDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "preview.h" +LastPage=0 + +ClassCount=6 +Class1=CChildFrame +Class2=CMainFrame +Class3=CPreviewApp +Class4=CPreviewDoc +Class5=CMyPreviewView + +ResourceCount=2 +Resource1=IDR_PREVTYPE +Resource2=IDR_MAINFRAME +Class6=COXFileDialog + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CPreviewApp] +Type=0 +BaseClass=COXWinApp +HeaderFile=Preview.h +ImplementationFile=Preview.cpp +Filter=N +VirtualFilter=AC +LastObject=CPreviewApp + +[CLS:CPreviewDoc] +Type=0 +BaseClass=CDocument +HeaderFile=PreviewDoc.h +ImplementationFile=PreviewDoc.cpp + +[CLS:CMyPreviewView] +Type=0 +BaseClass=CView +HeaderFile=PreviewView.h +ImplementationFile=PreviewView.cpp + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_APP_EXIT +Command4=ID_VIEW_STATUS_BAR +Command5=ID_APP_ABOUT +CommandCount=5 + +[MNU:IDR_PREVTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_APP_EXIT +Command5=ID_VIEW_STATUS_BAR +Command6=ID_APP_ABOUT +CommandCount=6 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[CLS:COXFileDialog] +Type=0 +HeaderFile=OXFileDialog.h +ImplementationFile=OXFileDialog.cpp +BaseClass=CFileDialog +Filter=D + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.cpp new file mode 100644 index 0000000..8f570e4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.cpp @@ -0,0 +1,150 @@ +// Preview.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "Preview.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "PreviewDoc.h" +#include "PreviewView.h" +#include "OXPreviewDialog.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp + +BEGIN_MESSAGE_MAP(CPreviewApp, COXWinApp) + //{{AFX_MSG_MAP(CPreviewApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp construction + +CPreviewApp::CPreviewApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CPreviewApp object + +CPreviewApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp initialization + +BOOL CPreviewApp::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + SetRegistryKey(_T("Local AppWizard-Generated Applications")); + LoadStdProfileSettings(); // 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_PREVTYPE, + RUNTIME_CLASS(CPreviewDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CMyPreviewView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +CFileDialog* CPreviewApp::NewFileDialog(BOOL bOpenFileDialog) +{ + return new COXPreviewDialog(bOpenFileDialog); +} + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CPreviewApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp commands + +int CPreviewApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return COXWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsp new file mode 100644 index 0000000..27788c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsp @@ -0,0 +1,480 @@ +# Microsoft Developer Studio Project File - Name="Preview" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Preview - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Preview.mak" CFG="Preview - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Preview - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Preview - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Preview - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Preview_" +# PROP BASE Intermediate_Dir ".\Preview_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Preview_" +# PROP Intermediate_Dir ".\Preview_" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\jpgd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview_" +# PROP BASE Intermediate_Dir "Preview_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /I "..\..\..\Lib\Jpeg" /I "..\..\..\Lib\Jpeg\Jpegsrc6" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 ..\..\..\Lib\libs\jpgr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Preview0" +# PROP BASE Intermediate_Dir "Preview0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Preview.exe" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Preview1" +# PROP BASE Intermediate_Dir "Preview1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOT_REGISTERED" /D "_UNICODE" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Preview.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Preview.exe" + +!ENDIF + +# Begin Target + +# Name "Preview - Win32 Release" +# Name "Preview - Win32 Debug" +# Name "Preview - Win32 Release_Shared" +# Name "Preview - Win32 Unicode_Debug" +# Name "Preview - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBMPFle.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXGphFle.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXImageListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCod.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGCom.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGDom.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGExp.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXJPGFle.cpp + +!IF "$(CFG)" == "Preview - Win32 Release" + +!ELSEIF "$(CFG)" == "Preview - Win32 Debug" + +!ELSEIF "$(CFG)" == "Preview - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "Preview - Win32 Unicode_Release" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMetaFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXPreviewDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.cpp +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.CPP +# End Source File +# Begin Source File + +SOURCE=.\Preview.cpp +# End Source File +# Begin Source File + +SOURCE=.\Preview.rc +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDIB.H +# End Source File +# Begin Source File + +SOURCE=.\OXDocMgr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXImageListBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMetaFile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXPreviewDialog.h +# End Source File +# Begin Source File + +SOURCE=.\OXWinApp.H +# End Source File +# Begin Source File + +SOURCE=.\Preview.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewDoc.h +# End Source File +# Begin Source File + +SOURCE=.\PreviewView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Preview.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Preview.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\PreviewDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\test.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Preview.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsw new file mode 100644 index 0000000..7e6886d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Preview"=".\Preview.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/preview", MXIBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.h new file mode 100644 index 0000000..27f8958 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.h @@ -0,0 +1,42 @@ +// Preview.h : main header file for the PREVIEW application +// + +#include "OXWinApp.h" + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CPreviewApp: +// See Preview.cpp for the implementation of this class +// + +class CPreviewApp : public COXWinApp +{ +public: + CPreviewApp(); + virtual CFileDialog* NewFileDialog(BOOL bOpenFileDialog); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPreviewApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CPreviewApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.rc new file mode 100644 index 0000000..e12cc06 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.rc @@ -0,0 +1,342 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" +#include + +///////////////////////////////////////////////////////////////////////////// +#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" + "#include \r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#include ""OXPreviewDialog.rc"" \r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Preview.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" + "#include ""OXMetaFile.rc""\r\n" + "#endif\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\\Preview.ico" +IDR_PREVTYPE ICON "res\\PreviewDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About Preview...", ID_APP_ABOUT + END +END + +IDR_PREVTYPE 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 SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About Preview...", 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 + + +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "FileDescription", "PREVIEW MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "PREVIEW" + VALUE "LegalCopyright", "Copyright © 1996" + VALUE "OriginalFilename", "PREVIEW.EXE" + VALUE "ProductName", "PREVIEW Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Preview Demo" + IDR_PREVTYPE "\nPrev\nPreview\nFiles To Preview (*.bmp; *.jpg; *.wmf; *.emf; *.cur; *.icl; *.ico; *.doc; *.rtf; *.xls; *.txt; *.plg)\n.bmp;.jpg;.wmf;.emf;.cur;.icl;.ico;.doc;.rtf;.xls;.txt;.plg\nPreview.Document\nPrev Document" + ID_DESCRIPTION_FILE "previewInfo.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Preview" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#include "OXPreviewDialog.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Preview.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXMetaFile.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.reg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.reg new file mode 100644 index 0000000..3061861 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.reg @@ -0,0 +1,14 @@ +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\.BMP = Preview.Document +HKEY_CLASSES_ROOT\Preview.Document\shell\open\command = PREVIEW.EXE %1 +HKEY_CLASSES_ROOT\Preview.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\Preview.Document\shell\open\ddeexec\application = PREVIEW + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\Preview.Document = Prev Document diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.sln new file mode 100644 index 0000000..ea58e9a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Preview", "Preview.vcproj", "{7B40488B-66D1-4A24-B0A2-DBB584757108}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Debug|Win32.Build.0 = Debug|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Release|Win32.ActiveCfg = Release|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Release|Win32.Build.0 = Release|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {7B40488B-66D1-4A24-B0A2-DBB584757108}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj new file mode 100644 index 0000000..7eca57e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj @@ -0,0 +1,1762 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj.vspscc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj.vspscc new file mode 100644 index 0000000..6cb031b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/Preview.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.cpp new file mode 100644 index 0000000..7beb41d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.cpp @@ -0,0 +1,82 @@ +// PreviewDoc.cpp : implementation of the CPreviewDoc class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "PreviewDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc + +IMPLEMENT_DYNCREATE(CPreviewDoc, CDocument) + +BEGIN_MESSAGE_MAP(CPreviewDoc, CDocument) + //{{AFX_MSG_MAP(CPreviewDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc construction/destruction + +CPreviewDoc::CPreviewDoc() +{ + // TODO: add one-time construction code here + +} + +CPreviewDoc::~CPreviewDoc() +{ +} + +BOOL CPreviewDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc serialization + +void CPreviewDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc diagnostics + +#ifdef _DEBUG +void CPreviewDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CPreviewDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CPreviewDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.h new file mode 100644 index 0000000..cb2d0c2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewDoc.h @@ -0,0 +1,44 @@ +// PreviewDoc.h : interface of the CPreviewDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CPreviewDoc : public CDocument +{ +protected: // create from serialization only + CPreviewDoc(); + DECLARE_DYNCREATE(CPreviewDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPreviewDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CPreviewDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CPreviewDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.cpp new file mode 100644 index 0000000..7dd2f84 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.cpp @@ -0,0 +1,91 @@ +// PreviewView.cpp : implementation of the CMyPreviewView class +// + +#include "stdafx.h" +#include "Preview.h" + +#include "PreviewDoc.h" +#include "PreviewView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView + +IMPLEMENT_DYNCREATE(CMyPreviewView, CView) + +BEGIN_MESSAGE_MAP(CMyPreviewView, CView) + //{{AFX_MSG_MAP(CMyPreviewView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView construction/destruction + +CMyPreviewView::CMyPreviewView() +{ + // TODO: add construction code here + +} + +CMyPreviewView::~CMyPreviewView() +{ +} + +BOOL CMyPreviewView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView drawing + +void CMyPreviewView::OnDraw(CDC* pDC) +{ + CPreviewDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + pDC->TextOut(10,20,"Select Open from File Menu option To Preview a BMP file without opening it "); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView printing + + + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView diagnostics + +#ifdef _DEBUG +void CMyPreviewView::AssertValid() const +{ + CView::AssertValid(); +} + +void CMyPreviewView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CPreviewDoc* CMyPreviewView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPreviewDoc))); + return (CPreviewDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMyPreviewView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.h new file mode 100644 index 0000000..90bc04d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/PreviewView.h @@ -0,0 +1,51 @@ +// PreviewView.h : interface of the CMyPreviewView class +// +///////////////////////////////////////////////////////////////////////////// + +class CMyPreviewView : public CView +{ +protected: // create from serialization only + CMyPreviewView(); + DECLARE_DYNCREATE(CMyPreviewView) + +// Attributes +public: + CPreviewDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyPreviewView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMyPreviewView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CMyPreviewView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in PreviewView.cpp +inline CPreviewDoc* CMyPreviewView::GetDocument() + { return (CPreviewDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.cpp new file mode 100644 index 0000000..b55f25b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Preview.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.h new file mode 100644 index 0000000..0299c1f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#define OX_PREVIEW_GRAPHICS +#define OX_PREVIEW_PLAINTEXT +#define OX_PREVIEW_RTF +#define OX_PREVIEW_BMP +#define OX_PREVIEW_METAFILE +#define OX_PREVIEW_ICON +#define OX_PREVIEW_HTML + + +#ifndef _UNICODE +#define OXDIB_SUPPORTJPEG +#endif _UNICODE + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/dog.jpg b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/dog.jpg new file mode 100644 index 0000000..7ac047e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/dog.jpg differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.csv b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.csv new file mode 100644 index 0000000..97c5be3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.csv @@ -0,0 +1,11 @@ +"ID","Valid","Byte","Int","Float","Double","String","Name" +1,Yes,25,-30,234.3453,3245235234.235,"This is a test, this is only a test",George +2,No,255,32767,3.141592654,3.141592654,"And now, +for something +completely different",Peter +3,Yes,-29,2342,2.718281828,23.14069263,Some more numbers,Paul + +"ID","Address","Last Name" +1,1231 Sunnyside Circle,McGill +2,21w238 Honeysuckle Rose Lane,Piper +3,19 First Street,Howard \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.xls b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.xls new file mode 100644 index 0000000..6e5b62b Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/headers.xls differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/previewInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/previewInfo.rtf new file mode 100644 index 0000000..4348053 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/previewInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.rc2 new file mode 100644 index 0000000..8669738 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Preview.rc2 @@ -0,0 +1,13 @@ +// +// PREVIEW.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/PreviewDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/PreviewDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/PreviewDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/resource.h new file mode 100644 index 0000000..b39592e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/preview/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Preview.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_PREVTYPE 129 +#define ID_DESCRIPTION_FILE 130 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.CPP new file mode 100644 index 0000000..b548932 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.CPP @@ -0,0 +1,50 @@ +// example.cpp : implementation file +// + +#include "stdafx.h" + +#include "Roll32.h" +#include "example.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CExample dialog + + +CExample::CExample(CWnd* pParent /*=NULL*/) + : COXRollup(CExample::IDD, pParent) +{ + //{{AFX_DATA_INIT(CExample) + m_strTestEdit = _T(""); + //}}AFX_DATA_INIT +} + + +void CExample::DoDataExchange(CDataExchange* pDX) +{ + COXRollup::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CExample) + DDX_Text(pDX, IDC_TEST_EDIT, m_strTestEdit); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CExample, COXRollup) + //{{AFX_MSG_MAP(CExample) + ON_BN_CLICKED(IDC_BTN_APPLY, OnApply) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CExample message handlers + +void CExample::OnApply() +{ + RUpdateData(TRUE); + Send2MR(ID_APPLY); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.H new file mode 100644 index 0000000..40e85fd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/EXAMPLE.H @@ -0,0 +1,39 @@ +// example.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CExample dialog +#include "oxrollup.h" +#include "resource.h" + +class CExample : public COXRollup +{ +// Construction +public: + CExample(CWnd* pParent = NULL); // standard constructor + // overridden from base class + LPCTSTR GetTitleBarBitmap() { return _T("TITLEBAR_BMP"); } + +// Dialog Data + //{{AFX_DATA(CExample) + enum { IDD = ID_EXAMPLE }; + CString m_strTestEdit; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CExample) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CExample) + afx_msg void OnApply(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.CPP new file mode 100644 index 0000000..456b5f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.CPP @@ -0,0 +1,73 @@ +// maxvirtd.cpp : implementation file +// + +#include "stdafx.h" +#include "Roll32.h" +#include "maxvirtd.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMaxVirtDialog dialog + + +CMaxVirtDialog::CMaxVirtDialog(CWnd* pParent /*=NULL*/) + : COXRollup(CMaxVirtDialog::IDD, pParent) +{ + SetScrollSteps(100); // looks pretty + + //{{AFX_DATA_INIT(CMaxVirtDialog) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CMaxVirtDialog::DoDataExchange(CDataExchange* pDX) +{ + COXRollup::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMaxVirtDialog) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CMaxVirtDialog, COXRollup) + //{{AFX_MSG_MAP(CMaxVirtDialog) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +///////////////////////////////////////////////////////////////////////////// +// CMaxVirtDialog message handlers + +void CMaxVirtDialog::OnCloseRollup() +{ + ShowWindow(SW_HIDE); // first we hide + UnArrange(); // second get out of arrange orderings + DestroyWindow(); // delete will be done in PostNcDestroy +} + +void CMaxVirtDialog::GetTitleBarRect(CRect &rcTBarRect) +{ + GetClientRect(rcTBarRect); + rcTBarRect.bottom = 20; +} + +LPCTSTR CMaxVirtDialog::GetTitleBarBitmap() +{ + // our slightly enlarged bitmap + return _T("MAXVIRT"); +} + +void CMaxVirtDialog::PostNcDestroy() +{ + // Why do I have to place the call to delete this here? someone might ask + // Answer: if we don´t close the dialog manually (close menu,..), it won´t be + // deleted. Placing it to OnDestroy isn´t practical (dbg messages from mfc) + // see cframewnd or others, they do the same + COXRollup::PostNcDestroy(); + delete this; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.H new file mode 100644 index 0000000..ecf3ad3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/MAXVIRTD.H @@ -0,0 +1,43 @@ +// maxvirtd.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CMaxVirtDialog dialog +#include "oxrollup.h" + +class CMaxVirtDialog : public COXRollup +{ +protected: + virtual void OnCloseRollup(); + virtual void PostNcDestroy(); + +public: + virtual void GetTitleBarRect(CRect &rcTBarRect); + virtual LPCTSTR GetTitleBarBitmap(); + +// Construction +public: + CMaxVirtDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CMaxVirtDialog) + enum { IDD = ID_OVERLOAD_MAX }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMaxVirtDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CMaxVirtDialog) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Mainfrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Mainfrm.cpp new file mode 100644 index 0000000..4aa3217 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Mainfrm.cpp @@ -0,0 +1,141 @@ +// mainfrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "Roll32.h" + +#include "mainfrm.h" +#include "oxrollup.h" +#include "example.h" +#include "UTBStrOp.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_VIEW_ROLLUPTEST, OnRollupTest) + ON_WM_WINDOWPOSCHANGED() + //}}AFX_MSG_MAP + ON_ROLLUP_NOTIFICATION() +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// arrays of IDs used to initialize control bars + +// toolbar buttons - IDs are command buttons +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE 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() +{ + CExample* pExample = ((CRoll32App*)AfxGetApp())->GetExampleRollup(); +// if (pExample->GetSafeHwnd() != 0) +// pExample->DestroyWindow(); + delete pExample; +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + 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 + } + + // create the new dialog + ((CRoll32App *)AfxGetApp())->GetExampleRollup() = new CExample(this); + return 0; +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CMDIFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CMDIFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +BOOL CMainFrame::OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID) +{ + UNREFERENCED_PARAMETER(rollupID); + if (message == IDCANCEL) + pWndRollup->DestroyWindow(); + return TRUE; +} + + +void CMainFrame::OnRollupTest() +{ + CExample* pExample = ((CRoll32App*)AfxGetApp())->GetExampleRollup(); + + TCHAR szTitle[20]; + UTBStr::tcscpy(szTitle,20,_T("MFC 2.5/3.0/4.0")); + + pExample->CreateRollUp(this, 6458, szTitle); + pExample->ShowWindow(SW_SHOWNORMAL); + + pExample->SendMessage(IDM_OX_RU_ARRANGE); + + GetActiveFrame()->SetFocus(); +} + +void CMainFrame::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) +{ + CMDIFrameWnd::OnWindowPosChanged(lpwndpos); + + COXRollup::ReArrangeArranged(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.CLW b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.CLW new file mode 100644 index 0000000..4a4e6dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.CLW @@ -0,0 +1,131 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CRoll32App +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "roll32.h" +LastPage=0 + +ClassCount=6 +Class1=CExample +Class2=CMainFrame +Class3=CMaxVirtDialog +Class4=CRoll32App +Class5=CRoll32Doc +Class6=CRoll32View + +ResourceCount=4 +Resource1=IDR_ROLL32TYPE (Dutch (Belgium)) +Resource2=ID_EXAMPLE (Dutch (Belgium)) +Resource3=IDR_MAINFRAME (Dutch (Belgium)) +Resource4=ID_OVERLOAD_MAX (Dutch (Belgium)) + +[CLS:CExample] +Type=0 +BaseClass=COXRollup +HeaderFile=EXAMPLE.H +ImplementationFile=EXAMPLE.CPP +LastObject=CExample + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=mainfrm.h +ImplementationFile=Mainfrm.cpp + +[CLS:CMaxVirtDialog] +Type=0 +BaseClass=COXRollup +HeaderFile=MAXVIRTD.H +ImplementationFile=MAXVIRTD.CPP + +[CLS:CRoll32App] +Type=0 +BaseClass=CWinApp +HeaderFile=ROLL32.H +ImplementationFile=Roll32.cpp +Filter=N +VirtualFilter=AC +LastObject=CRoll32App + +[CLS:CRoll32Doc] +Type=0 +BaseClass=CDocument +HeaderFile=ROLL3DOC.H +ImplementationFile=ROLL3DOC.CPP + +[CLS:CRoll32View] +Type=0 +BaseClass=CView +HeaderFile=ROLL3VW.H +ImplementationFile=Roll3vw.cpp + +[DLG:ID_EXAMPLE] +Type=1 +Class=CExample + +[DLG:ID_OVERLOAD_MAX] +Type=1 +Class=CMaxVirtDialog + +[MNU:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_STATUS_BAR +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_ROLL32TYPE (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_CLOSE +Command3=ID_APP_EXIT +Command4=ID_VIEW_STATUS_BAR +Command5=ID_VIEW_ROLLUPTEST +Command6=ID_WINDOW_NEW +Command7=ID_WINDOW_CASCADE +Command8=ID_WINDOW_TILE_HORZ +Command9=ID_WINDOW_ARRANGE +Command10=ID_APP_ABOUT +CommandCount=10 + +[DLG:ID_EXAMPLE (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_CAPTION,static,1073741825 +Control2=IDC_TEST_EDIT,edit,1350631620 +Control3=IDC_BTN_APPLY,button,1342242816 +Control4=IDC_STATIC,static,1342308353 + +[ACL:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:ID_OVERLOAD_MAX (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=2 +Control1=IDC_CAPTION,static,1073741825 +Control2=IDC_STATIC,static,1342308353 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.H new file mode 100644 index 0000000..d6c5df3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.H @@ -0,0 +1,43 @@ +// Roll32.h : main header file for the ROLL32 application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRoll32App: +// See Roll32.cpp for the implementation of this class +// +class CExample; + +class CRoll32App : public CWinApp +{ +protected: + CExample *m_pExample; +public: + CRoll32App(); + CExample *&GetExampleRollup() { return m_pExample; } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoll32App) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CRoll32App) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.RC b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.RC new file mode 100644 index 0000000..2994560 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL32.RC @@ -0,0 +1,393 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +TITLEBAR_BMP BITMAP "RES\\TITLEBAR.BMP" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +MAXVIRT BITMAP "RES\\MAXVIRT.BMP" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#include ""res\\Roll32.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "\r\n" + "#include ""OXRollUp.rc"" // Roll up class resources\r\n" + "\r\n" + "#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" + "#include ""afxres.rc"" \t// Standard components\r\n" + "#include ""afxprint.rc""\t// printing/print preview resources\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\\ROLL32.ICO" +IDR_ROLL32TYPE ICON "RES\\ROLL3DOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About Roll32...", ID_APP_ABOUT + END +END + +IDR_ROLL32TYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + MENUITEM "&Rollup Test", ID_VIEW_ROLLUPTEST + 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 Roll32...", 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 +// + +ID_EXAMPLE DIALOG 20, 41, 87, 92 +STYLE DS_SETFONT | WS_POPUP | WS_BORDER +FONT 8, "System" +BEGIN + CTEXT "Roll Up",IDC_CAPTION,0,0,87,8,NOT WS_VISIBLE | NOT WS_GROUP + EDITTEXT IDC_TEST_EDIT,3,13,80,25,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL + PUSHBUTTON "&Apply",IDC_BTN_APPLY,3,41,80,12 + CTEXT "This simple example demonstrates the use of Rollup derived dialogs!",IDC_STATIC,3,54,80,35 +END + +ID_OVERLOAD_MAX DIALOG 20, 41, 125, 99 +STYLE DS_SETFONT | WS_POPUP | WS_THICKFRAME +FONT 8, "System" +BEGIN + CTEXT "Roll Up",IDC_CAPTION,0,0,125,8,NOT WS_VISIBLE | NOT WS_GROUP + CTEXT "This example demonstrates the use of Rollup´s overloaded virtual functions!",IDC_STATIC,21,29,80,35 +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 "040904b0" + BEGIN + VALUE "FileDescription", "ROLL32 MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "ROLL32" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "ROLL32.EXE" + VALUE "ProductName", "ROLL32 Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + ID_OVERLOAD_MAX, DIALOG + BEGIN + BOTTOMMARGIN, 93 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "Rollup Sample Application" + IDR_ROLL32TYPE "\nRollup\nRollup\nRollup Files (*.r32)\n.R32\nRollup.Document\nRollup Document" + ID_DESCRIPTION_FILE "Roll32Info.rtf" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "Rollup Sample Application" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE +BEGIN + ID_VIEW_ROLLUPTEST "Opens a sample Rollup dialog" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "res\Roll32.rc2" // non-Microsoft Visual C++ edited resources + +#include "OXRollUp.rc" // Roll up class resources + +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.CPP new file mode 100644 index 0000000..eb9794a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.CPP @@ -0,0 +1,81 @@ +// Roll3doc.cpp : implementation of the CRoll32Doc class +// + +#include "stdafx.h" +#include "Roll32.h" + +#include "Roll3doc.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoll32Doc + +IMPLEMENT_DYNCREATE(CRoll32Doc, CDocument) + +BEGIN_MESSAGE_MAP(CRoll32Doc, CDocument) + //{{AFX_MSG_MAP(CRoll32Doc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoll32Doc construction/destruction + +CRoll32Doc::CRoll32Doc() +{ + // TODO: add one-time construction code here + m_strTestText = _T("For Rollup with a big caption, double-click view! For a small caption, look at the view menu"); +} + +CRoll32Doc::~CRoll32Doc() +{ +} + +BOOL CRoll32Doc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32Doc serialization + +void CRoll32Doc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32Doc diagnostics + +#ifdef _DEBUG +void CRoll32Doc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CRoll32Doc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRoll32Doc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.H new file mode 100644 index 0000000..f34a1a1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3DOC.H @@ -0,0 +1,44 @@ +// Roll3doc.h : interface of the CRoll32Doc class +// +///////////////////////////////////////////////////////////////////////////// + +class CRoll32Doc : public CDocument +{ +protected: // create from serialization only + CRoll32Doc(); + DECLARE_DYNCREATE(CRoll32Doc) + +// Attributes +public: + CString m_strTestText; +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoll32Doc) + public: + virtual BOOL OnNewDocument(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRoll32Doc(); + virtual void Serialize(CArchive& ar); // overridden for document i/o +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CRoll32Doc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3VW.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3VW.H new file mode 100644 index 0000000..41a7833 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/ROLL3VW.H @@ -0,0 +1,58 @@ +// Roll3vw.h : interface of the CRoll32View class +// +///////////////////////////////////////////////////////////////////////////// + +class CRoll32View : public CView +{ +protected: // create from serialization only + CRoll32View(); + DECLARE_DYNCREATE(CRoll32View) + +// Attributes +public: + CRoll32Doc* GetDocument(); + // member variable for Example dialog + DWORD m_hExampleDlg; + DWORD m_hExampleDlg2; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRoll32View) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRoll32View(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CRoll32View) + afx_msg void OnDestroy(); + afx_msg void OnSetFocus(CWnd* pOldWnd); + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + //}}AFX_MSG + afx_msg BOOL OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID); + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in Roll3vw.cpp +inline CRoll32Doc* CRoll32View::GetDocument() + { return (CRoll32Doc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.cpp new file mode 100644 index 0000000..ac9bd53 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.cpp @@ -0,0 +1,140 @@ +// Roll32.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "example.h" +#include "Roll32.h" + +#include "mainfrm.h" +#include "Roll3doc.h" +#include "Roll3vw.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoll32App + +BEGIN_MESSAGE_MAP(CRoll32App, CWinApp) + //{{AFX_MSG_MAP(CRoll32App) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CRoll32App construction + +CRoll32App::CRoll32App() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRoll32App object + +CRoll32App theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CRoll32App initialization + +BOOL CRoll32App::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#ifdef _WIN32 +#if _MSC_VER < 1400 + Enable3dControls(); +#endif +#endif + m_pExample = NULL; + + LoadStdProfileSettings(); // 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_ROLL32TYPE, + RUNTIME_CLASS(CRoll32Doc), + RUNTIME_CLASS(CMDIChildWnd), // standard MDI child frame + RUNTIME_CLASS(CRoll32View)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Enable DDE Execute open + EnableShellOpen(); + RegisterShellFileTypes(); + + // simple command line parsing + if (m_lpCmdLine[0] == '\0') + { + // create a new (empty) document + OnFileNew(); + } + else + { + // open an existing document + OpenDocumentFile(m_lpCmdLine); + } + + // Enable drag/drop open + m_pMainWnd->DragAcceptFiles(); + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CRoll32App::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32App commands + +int CRoll32App::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsp new file mode 100644 index 0000000..c3633e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsp @@ -0,0 +1,323 @@ +# Microsoft Developer Studio Project File - Name="ROLL32" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ROLL32 - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Roll32.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Roll32.mak" CFG="ROLL32 - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ROLL32 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ROLL32 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ROLL32 - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ROLL32 - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ROLL32 - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ROLL32 - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\WinDebug" +# PROP BASE Intermediate_Dir ".\WinDebug" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# ADD BASE CPP /nologo /MD /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"stdafx.h" /FD /c +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Roll32.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ROLL32 - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\WinRel" +# PROP BASE Intermediate_Dir ".\WinRel" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /FR /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Roll32.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ROLL32 - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ROLL32__" +# PROP BASE Intermediate_Dir "ROLL32__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Roll32.exe" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Roll32.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ROLL32 - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ROLL32_0" +# PROP BASE Intermediate_Dir "ROLL32_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fr /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Fr /Yu"stdafx.h" /FD /c +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Roll32.exe" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Roll32.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ROLL32 - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ROLL32_1" +# PROP BASE Intermediate_Dir "ROLL32_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\Source\UTSampleAbout\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /mktyplib203 +# ADD MTL /mktyplib203 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\Source\UTSampleAbout\\" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Roll32.exe" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Roll32.exe" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "ROLL32 - Win32 Debug" +# Name "ROLL32 - Win32 Release" +# Name "ROLL32 - Win32 Release_Shared" +# Name "ROLL32 - Win32 Unicode_Debug" +# Name "ROLL32 - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRollup.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTleBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\example.cpp +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\maxvirtd.cpp +# End Source File +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# Begin Source File + +SOURCE=.\Roll32.cpp +# End Source File +# Begin Source File + +SOURCE=.\ROLL32.RC +# End Source File +# Begin Source File + +SOURCE=.\Roll3doc.cpp +# End Source File +# Begin Source File + +SOURCE=.\Roll3vw.cpp +# End Source File +# Begin Source File + +SOURCE=.\stdafx.cpp +# ADD BASE CPP /Yc"stdafx.h" +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\EXAMPLE.H +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.h +# End Source File +# Begin Source File + +SOURCE=.\MAXVIRTD.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRollup.H +# End Source File +# Begin Source File + +SOURCE=.\ROLL32.H +# End Source File +# Begin Source File + +SOURCE=.\ROLL3DOC.H +# End Source File +# Begin Source File + +SOURCE=.\ROLL3VW.H +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\RES\MAXVIRT.BMP +# End Source File +# Begin Source File + +SOURCE=..\..\Include\RES\OXRUpBar.bmp +# End Source File +# Begin Source File + +SOURCE=.\RES\ROLL32.ICO +# End Source File +# Begin Source File + +SOURCE=.\RES\ROLL32.RC2 +# End Source File +# Begin Source File + +SOURCE=.\RES\ROLL3DOC.ICO +# End Source File +# Begin Source File + +SOURCE=.\res\TITLEBAR.BMP +# End Source File +# Begin Source File + +SOURCE=.\RES\TOOLBAR.BMP +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Roll32.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsw new file mode 100644 index 0000000..5233bf5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ROLL32"=".\Roll32.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/rollup", AAJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.vcproj new file mode 100644 index 0000000..76a101e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32.vcproj @@ -0,0 +1,1150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32Info.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32Info.rtf new file mode 100644 index 0000000..e2b24fd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll32Info.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll3vw.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll3vw.cpp new file mode 100644 index 0000000..ccca292 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Roll3vw.cpp @@ -0,0 +1,169 @@ +// Roll3vw.cpp : implementation of the CRoll32View class +// + +#include "stdafx.h" +#include "Roll32.h" + +#include "Roll3doc.h" +#include "Roll3vw.h" +#include "example.h" +#include "maxvirtd.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View + +IMPLEMENT_DYNCREATE(CRoll32View, CView) + +#define new DEBUG_NEW + +BEGIN_MESSAGE_MAP(CRoll32View, CView) + //{{AFX_MSG_MAP(CRoll32View) + ON_WM_DESTROY() + ON_WM_SETFOCUS() + ON_WM_LBUTTONDBLCLK() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) + ON_ROLLUP_NOTIFICATION() +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View construction/destruction + +CRoll32View::CRoll32View() +{ + // TODO: add construction code here + +} + +CRoll32View::~CRoll32View() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View drawing + +void CRoll32View::OnDraw(CDC* pDC) +{ + CRoll32Doc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + CString strOutput = pDoc->m_strTestText; + CRect rect; + GetClientRect(&rect); + + pDC->SetTextAlign(TA_CENTER|TA_BOTTOM); + pDC->TextOut(rect.Width()/2,rect.Height()/2,strOutput,strOutput.GetLength()); +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View printing + +BOOL CRoll32View::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CRoll32View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CRoll32View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View diagnostics + +#ifdef _DEBUG +void CRoll32View::AssertValid() const +{ + CView::AssertValid(); +} + +void CRoll32View::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CRoll32Doc* CRoll32View::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRoll32Doc))); + return (CRoll32Doc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRoll32View message handlers + +void CRoll32View::OnDestroy() +{ + CView::OnDestroy(); + + CExample *pExample = ((CRoll32App *)AfxGetApp())->GetExampleRollup(); + pExample->ReleaseRecipient(this); +} + +void CRoll32View::OnSetFocus(CWnd* pOldWnd) +{ + CView::OnSetFocus(pOldWnd); + + + // simply set our view as message recipient + CExample* pExample = ((CRoll32App*)AfxGetApp())->GetExampleRollup(); + if (! pExample->IsOwner( this )) + { + pExample->SetRecipient(this); + pExample->m_strTestEdit = GetDocument()->m_strTestText; + pExample->RUpdateData(FALSE); + } + +} + +BOOL CRoll32View::OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID) +{ + CExample* pExample = ((CRoll32App*)AfxGetApp())->GetExampleRollup(); + if (pExample->GetRollupID() == rollupID) + { + switch (message) + { + case ID_APPLY: + GetDocument()->m_strTestText = ((CExample*)pWndRollup)->m_strTestEdit; + Invalidate(); + break; + default: + TRACE2("Unhandled message %d from Rollup %d\n",message,rollupID); + break; + } + } + // messages from other rollups are being ignored!!! + return TRUE; +} + +void CRoll32View::OnLButtonDblClk(UINT nFlags, CPoint point) +{ + UNREFERENCED_PARAMETER(nFlags); + CMaxVirtDialog *pMaxVirt = new CMaxVirtDialog(this); + + TCHAR achBuffer[64]; + UTBStr::stprintf(achBuffer, 64,_T("MVT: %ld"),::GetTickCount()); + + pMaxVirt->CreateRollUp(this,15,achBuffer); + ClientToScreen(&point); + pMaxVirt->SetWindowPos(NULL,point.x,point.y,0,0,SWP_NOZORDER|SWP_NOSIZE); + pMaxVirt->ShowWindow(SW_SHOWNORMAL); + + // if you´re searching for the delete, see maxvirtd.cpp PostNcDestroy + // and OnCloseRollup +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/STDAFX.CPP new file mode 100644 index 0000000..cffc47d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/STDAFX.CPP @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Roll32.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Stdafx.h new file mode 100644 index 0000000..fbeca6b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/Stdafx.h @@ -0,0 +1,10 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/mainfrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/mainfrm.h new file mode 100644 index 0000000..db26ab4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/mainfrm.h @@ -0,0 +1,44 @@ +// mainfrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnRollupTest(); + afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos); + //}}AFX_MSG + afx_msg BOOL OnRollupMessage(CWnd* pWndRollup,UINT message,UINT rollupID); + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/MAXVIRT.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/MAXVIRT.BMP new file mode 100644 index 0000000..1eff414 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/MAXVIRT.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.ICO new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.RC2 new file mode 100644 index 0000000..2e28830 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL32.RC2 @@ -0,0 +1,13 @@ +// +// ROLL32.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL3DOC.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL3DOC.ICO new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/ROLL3DOC.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TITLEBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TITLEBAR.BMP new file mode 100644 index 0000000..c824409 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TITLEBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TOOLBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TOOLBAR.BMP new file mode 100644 index 0000000..0556e00 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/res/TOOLBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/resource.h new file mode 100644 index 0000000..a3d49ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/rollup/resource.h @@ -0,0 +1,27 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ROLL32.RC +// +#define ID_EXAMPLE 19 +#define IDD_ABOUTBOX 100 +#define ID_OVERLOAD_MAX 101 +#define IDR_MAINFRAME 128 +#define IDR_ROLL32TYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_TEST_EDIT 1000 +#define IDC_BTN_APPLY 1001 +#define IDC_CAPTION 16231 +#define ID_VIEW_ROLLUPTEST 32771 +#define ID_VIEW_ROLLUPTEST_2 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.cpp new file mode 100644 index 0000000..0f1313e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.cpp new file mode 100644 index 0000000..ec3a431 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.cpp @@ -0,0 +1,50 @@ +// CntrItem.cpp : implementation of the CScrollTipDemoCntrItem class +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" + +#include "ScrollTipDoc.h" +#include "ScrollTipEditView.h" +#include "CntrItem.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDemoCntrItem implementation + +IMPLEMENT_SERIAL(CScrollTipDemoCntrItem, CRichEditCntrItem, 0) + +CScrollTipDemoCntrItem::CScrollTipDemoCntrItem(REOBJECT* preo, CScrollTipDoc* pContainer) + : CRichEditCntrItem(preo, pContainer) +{ + // TODO: add one-time construction code here + +} + +CScrollTipDemoCntrItem::~CScrollTipDemoCntrItem() +{ + // TODO: add cleanup code here + +} + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDemoCntrItem diagnostics + +#ifdef _DEBUG +void CScrollTipDemoCntrItem::AssertValid() const +{ + CRichEditCntrItem::AssertValid(); +} + +void CScrollTipDemoCntrItem::Dump(CDumpContext& dc) const +{ + CRichEditCntrItem::Dump(dc); +} +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.h new file mode 100644 index 0000000..22f1b51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/CntrItem.h @@ -0,0 +1,41 @@ +// CntrItem.h : interface of the CScrollTipDemoCntrItem class +// + +class CScrollTipDoc; +class CScrollTipEditView; + +class CScrollTipDemoCntrItem : public CRichEditCntrItem +{ + DECLARE_SERIAL(CScrollTipDemoCntrItem) + +// Constructors +public: + CScrollTipDemoCntrItem(REOBJECT* preo = NULL, CScrollTipDoc* pContainer = NULL); + // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE. + // IMPLEMENT_SERIALIZE requires the class have a constructor with + // zero arguments. Normally, OLE items are constructed with a + // non-NULL document pointer. + +// Attributes +public: + CScrollTipDoc* GetDocument() + { return (CScrollTipDoc*)CRichEditCntrItem::GetDocument(); } + CScrollTipEditView* GetActiveView() + { return (CScrollTipEditView*)CRichEditCntrItem::GetActiveView(); } + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollTipDemoCntrItem) + public: + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + ~CScrollTipDemoCntrItem(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.cpp new file mode 100644 index 0000000..02363ca --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.cpp @@ -0,0 +1,91 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.h new file mode 100644 index 0000000..3b6ba60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/MainFrm.h @@ -0,0 +1,44 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.cpp new file mode 100644 index 0000000..8b33476 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.cpp @@ -0,0 +1,106 @@ +// ScrollDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" +#include "ScrollDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollDlg dialog + + +CScrollDlg::CScrollDlg(CWnd* pParent /*=NULL*/) + : CDialog(CScrollDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CScrollDlg) + //}}AFX_DATA_INIT +} + + +void CScrollDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CScrollDlg) + DDX_Control(pDX, IDC_LIST, m_wndList); + DDX_Control(pDX, IDC_HORZ_SCROLL_1, m_wndHorzScroll1); + DDX_Control(pDX, IDC_HORZ_SCROLL_2, m_wndHorzScroll2); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CScrollDlg, CDialog) + //{{AFX_MSG_MAP(CScrollDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrollDlg message handlers + +BOOL CScrollDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Set initial values + SCROLLINFO scrollInfo; + ::ZeroMemory(&scrollInfo, sizeof(scrollInfo)); + scrollInfo.cbSize = sizeof(scrollInfo); + scrollInfo.fMask = SIF_ALL; + + m_wndHScrollTipOwner1.InterceptHorizontalScroll(&m_wndHorzScroll1); + scrollInfo.nMin = 0; + scrollInfo.nMax = 99; + scrollInfo.nPage = 10; + scrollInfo.nPos = 0; + m_wndHorzScroll1.SetScrollInfo(&scrollInfo); + m_wndHScrollTipOwner1.SetMask(_T("Page %p")); + m_wndHScrollTipOwner1.SetLeftTop(TRUE); + m_wndHScrollTipOwner1.SetPageAlign(TRUE); + + m_wndHScrollTipOwner2.InterceptHorizontalScroll(&m_wndHorzScroll2); + scrollInfo.nMin = 0; + scrollInfo.nMax = 99; + scrollInfo.nPage = 10; + scrollInfo.nPos = 0; + m_wndHorzScroll2.SetScrollInfo(&scrollInfo); + m_wndHScrollTipOwner2.SetMask(_T("Pos %a")); + m_wndHScrollTipOwner2.SetLeftTop(TRUE); + m_wndHScrollTipOwner2.SetPageAlign(FALSE); + + // ... Just attach a temporary CWnd to the vertical scrollbar + // without subclassing (this must work as well) + CWnd* pWndVertScroll = GetDlgItem(IDC_VERT_SCROLL_1); + ASSERT(pWndVertScroll != NULL); + m_wndVScrollTipOwner1.InterceptVerticalScroll(pWndVertScroll); + scrollInfo.nMin = 0; + scrollInfo.nMax = 99; + scrollInfo.nPage = 10; + scrollInfo.nPos = 0; + pWndVertScroll->SetScrollInfo(SB_CTL, &scrollInfo); + m_wndVScrollTipOwner1.SetMask(_T("Page %p")); + m_wndVScrollTipOwner1.SetLeftTop(TRUE); + m_wndVScrollTipOwner1.SetPageAlign(TRUE); + + m_wndListScrollTipOwner.InterceptVerticalScroll(&m_wndList, TRUE); + m_wndList.AddString(_T("One")); + m_wndList.AddString(_T("Two")); + m_wndList.AddString(_T("Three")); + m_wndList.AddString(_T("Four")); + m_wndList.AddString(_T("Five")); + m_wndList.AddString(_T("Six")); + m_wndList.AddString(_T("Seven")); + m_wndList.AddString(_T("Eight")); + m_wndList.AddString(_T("Nine")); + m_wndList.AddString(_T("Ten")); + m_wndListScrollTipOwner.SetMask(_T("Pos %a")); + m_wndListScrollTipOwner.SetLeftTop(TRUE); + m_wndListScrollTipOwner.SetPageAlign(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.h new file mode 100644 index 0000000..4410053 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollDlg.h @@ -0,0 +1,43 @@ +// ScrollDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CScrollDlg dialog + +#include "OXScrollTipOwner.h" + +class CScrollDlg : public CDialog +{ +// Construction +public: + CScrollDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CScrollDlg) + enum { IDD = IDD_SCROLL_DLG }; + CListBox m_wndList; + CScrollBar m_wndHorzScroll1; + CScrollBar m_wndHorzScroll2; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + COXScrollTipOwner m_wndHScrollTipOwner1; + COXScrollTipOwner m_wndHScrollTipOwner2; + COXScrollTipOwner m_wndVScrollTipOwner1; + COXScrollTipOwner m_wndListScrollTipOwner; + + // Generated message map functions + //{{AFX_MSG(CScrollDlg) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.cpp new file mode 100644 index 0000000..aa961c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.cpp @@ -0,0 +1,53 @@ +// ScrollSettingsDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" +#include "ScrollSettingsDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollSettingsDlg dialog + + +CScrollSettingsDlg::CScrollSettingsDlg(CWnd* pParent /*=NULL*/) + : CDialog(CScrollSettingsDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CScrollSettingsDlg) + m_sHorizontalMask = _T(""); + m_bHorizontalPageAlign = FALSE; + m_bHorizontalTop = FALSE; + m_bVerticalLeft = FALSE; + m_sVerticalMask = _T(""); + m_bVerticalPageAlign = FALSE; + //}}AFX_DATA_INIT +} + + +void CScrollSettingsDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CScrollSettingsDlg) + DDX_Text(pDX, IDC_HORZ_MASK, m_sHorizontalMask); + DDX_Check(pDX, IDC_HORZ_PAGE_ALIGN, m_bHorizontalPageAlign); + DDX_Check(pDX, IDC_HORZ_TOP, m_bHorizontalTop); + DDX_Check(pDX, IDC_VERT_LEFT, m_bVerticalLeft); + DDX_Text(pDX, IDC_VERT_MASK, m_sVerticalMask); + DDX_Check(pDX, IDC_VERT_PAGE_ALIGN, m_bVerticalPageAlign); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CScrollSettingsDlg, CDialog) + //{{AFX_MSG_MAP(CScrollSettingsDlg) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrollSettingsDlg message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.h new file mode 100644 index 0000000..1a0b73b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollSettingsDlg.h @@ -0,0 +1,40 @@ +// ScrollSettingsDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CScrollSettingsDlg dialog + +class CScrollSettingsDlg : public CDialog +{ +// Construction +public: + CScrollSettingsDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CScrollSettingsDlg) + enum { IDD = IDD_SCROLL_SETTINGS }; + CString m_sHorizontalMask; + BOOL m_bHorizontalPageAlign; + BOOL m_bHorizontalTop; + BOOL m_bVerticalLeft; + CString m_sVerticalMask; + BOOL m_bVerticalPageAlign; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollSettingsDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CScrollSettingsDlg) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.clw new file mode 100644 index 0000000..9cf1c49 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.clw @@ -0,0 +1,179 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CScrollTipApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "scrolltipdemo.h" +LastPage=0 + +ClassCount=7 +Class1=CChildFrame +Class2=CMainFrame +Class3=CScrollDlg +Class4=CScrollSettingsDlg +Class5=CScrollTipApp +Class6=CScrollTipDoc +Class7=CScrollTipEditView + +ResourceCount=5 +Resource1=IDR_SCROLLTYPE (Dutch (Belgium)) +Resource2=IDR_MAINFRAME (Dutch (Belgium)) +Resource3=IDR_SCROLLTYPE_CNTR_IP (Dutch (Belgium)) +Resource4=IDD_SCROLL_SETTINGS (Dutch (Belgium)) +Resource5=IDD_SCROLL_DLG (Dutch (Belgium)) + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CScrollDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ScrollDlg.h +ImplementationFile=ScrollDlg.cpp + +[CLS:CScrollSettingsDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ScrollSettingsDlg.h +ImplementationFile=ScrollSettingsDlg.cpp + +[CLS:CScrollTipApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ScrollTipDemo.h +ImplementationFile=ScrollTipDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CScrollTipApp + +[CLS:CScrollTipDoc] +Type=0 +BaseClass=CRichEditDoc +HeaderFile=ScrollTipDoc.h +ImplementationFile=ScrollTipDoc.cpp + +[CLS:CScrollTipEditView] +Type=0 +BaseClass=CRichEditView +HeaderFile=ScrollTipEditView.h +ImplementationFile=ScrollTipEditView.cpp + +[DLG:IDD_SCROLL_DLG] +Type=1 +Class=CScrollDlg + +[DLG:IDD_SCROLL_SETTINGS] +Type=1 +Class=CScrollSettingsDlg + +[MNU:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_STATUS_BAR +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_SCROLLTYPE (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_STATUS_BAR +Command4=ID_WINDOW_NEW +Command5=ID_WINDOW_CASCADE +Command6=ID_WINDOW_TILE_HORZ +Command7=ID_WINDOW_ARRANGE +Command8=ID_APP_ABOUT +CommandCount=8 + +[DLG:IDD_SCROLL_SETTINGS (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=18 +Control1=IDC_STATIC,button,1342177287 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_HORZ_MASK,edit,1350631552 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_HORZ_PAGE_ALIGN,button,1342242819 +Control8=IDC_HORZ_TOP,button,1342242819 +Control9=IDC_STATIC,button,1342177287 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_VERT_MASK,edit,1350631552 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_VERT_PAGE_ALIGN,button,1342242819 +Control16=IDC_VERT_LEFT,button,1342242819 +Control17=IDOK,button,1342242817 +Control18=IDCANCEL,button,1342242816 + +[DLG:IDD_SCROLL_DLG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=12 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_HORZ_SCROLL_1,scrollbar,1342177280 +Control3=IDC_HORZ_SCROLL_2,scrollbar,1342177280 +Control4=IDC_VERT_SCROLL_1,scrollbar,1342177281 +Control5=IDC_LIST,listbox,1352728833 +Control6=IDC_STATIC,static,1342177294 +Control7=IDC_STATIC,static,1342177294 +Control8=IDC_STATIC,static,1342177294 +Control9=IDC_STATIC,static,1342177294 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATIC,static,1342308352 +Control12=IDC_STATIC,static,1342308352 + +[ACL:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_SELECT_ALL +Command10=ID_EDIT_FIND +Command11=ID_EDIT_REPEAT +Command12=ID_EDIT_REPLACE +Command13=ID_OLE_EDIT_PROPERTIES +Command14=ID_EDIT_UNDO +Command15=ID_EDIT_CUT +Command16=ID_EDIT_COPY +Command17=ID_EDIT_PASTE +Command18=ID_NEXT_PANE +Command19=ID_PREV_PANE +Command20=ID_CANCEL_EDIT_CNTR +CommandCount=20 + +[ACL:IDR_SCROLLTYPE_CNTR_IP (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_NEXT_PANE +Command6=ID_PREV_PANE +Command7=ID_CANCEL_EDIT_CNTR +CommandCount=7 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.cpp new file mode 100644 index 0000000..1b8b333 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.cpp @@ -0,0 +1,140 @@ +// ScrollTipDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "ScrollTipDemo.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "ScrollTipDoc.h" +#include "ScrollTipEditView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipApp + +BEGIN_MESSAGE_MAP(CScrollTipApp, CWinApp) + //{{AFX_MSG_MAP(CScrollTipApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipApp construction + +CScrollTipApp::CScrollTipApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CScrollTipApp object + +CScrollTipApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipApp initialization + +BOOL CScrollTipApp::InitInstance() +{ + // Initialize OLE libraries + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OLE_INIT_FAILED); + return FALSE; + } + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + LoadStdProfileSettings(); // 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_SCROLLTYPE, + RUNTIME_CLASS(CScrollTipDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CScrollTipEditView)); + pDocTemplate->SetContainerInfo(IDR_SCROLLTYPE_CNTR_IP); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// App command to run the dialog +void CScrollTipApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipApp commands + +int CScrollTipApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsp new file mode 100644 index 0000000..079db0e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsp @@ -0,0 +1,317 @@ +# Microsoft Developer Studio Project File - Name="ScrollTipDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ScrollTipDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ScrollTipDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ScrollTipDemo.mak" CFG="ScrollTipDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ScrollTipDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ScrollTipDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ScrollTipDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ScrollTipDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ScrollTipDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ScrollTipDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ScrollTipDemo.exe" + +!ELSEIF "$(CFG)" == "ScrollTipDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ScrollTipDemo.exe" + +!ELSEIF "$(CFG)" == "ScrollTipDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ScrollTi" +# PROP BASE Intermediate_Dir "ScrollTi" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ScrollTipDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ScrollTipDemo.exe" + +!ELSEIF "$(CFG)" == "ScrollTipDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ScrollT0" +# PROP BASE Intermediate_Dir "ScrollT0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ScrollTipDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ScrollTipDemo.exe" + +!ELSEIF "$(CFG)" == "ScrollTipDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ScrollT1" +# PROP BASE Intermediate_Dir "ScrollT1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ScrollTipDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ScrollTipDemo.exe" + +!ENDIF + +# Begin Target + +# Name "ScrollTipDemo - Win32 Release" +# Name "ScrollTipDemo - Win32 Debug" +# Name "ScrollTipDemo - Win32 Release_Shared" +# Name "ScrollTipDemo - Win32 Unicode_Debug" +# Name "ScrollTipDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScrollTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScrollTipOwner.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\CntrItem.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\ScrollDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScrollSettingsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipEditView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\CntrItem.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\ScrollDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ScrollSettingsDlg.h +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipDemo.h +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ScrollTipEditView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ScrollTipDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ScrollTipDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ScrollTipDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ScrollTipDemo.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsw new file mode 100644 index 0000000..6d2bd93 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ScrollTipDemo"=".\ScrollTipDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/scrolltips", IFJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.h new file mode 100644 index 0000000..fe6c2da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.h @@ -0,0 +1,39 @@ +// ScrollTipDemo.h : main header file for the SCROLLTIPDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipApp: +// See ScrollTipDemo.cpp for the implementation of this class +// + +class CScrollTipApp : public CWinApp +{ +public: + CScrollTipApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollTipApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CScrollTipApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.rc new file mode 100644 index 0000000..60c202c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.rc @@ -0,0 +1,477 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#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 + "#include ""utsampleabout.rc""\r\n" + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ScrollTipDemo.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" + "#include ""afxolecl.rc"" // OLE container resources\r\n" + "#endif\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\\ScrollTipDemo.ico" +IDR_SCROLLTYPE ICON "res\\ScrollTipDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About ScrollTipDemo...", ID_APP_ABOUT + END +END + +IDR_SCROLLTYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + 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 ScrollTipDemo...", 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 + "A", ID_EDIT_SELECT_ALL, VIRTKEY, CONTROL + "F", ID_EDIT_FIND, VIRTKEY, CONTROL + VK_F3, ID_EDIT_REPEAT, VIRTKEY + "H", ID_EDIT_REPLACE, VIRTKEY, CONTROL + VK_RETURN, ID_OLE_EDIT_PROPERTIES, VIRTKEY, ALT, NOINVERT + 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 + VK_ESCAPE, ID_CANCEL_EDIT_CNTR, VIRTKEY, NOINVERT +END + +IDR_SCROLLTYPE_CNTR_IP 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 + VK_F6, ID_NEXT_PANE, VIRTKEY + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT + VK_ESCAPE, ID_CANCEL_EDIT_CNTR, VIRTKEY, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SCROLL_SETTINGS DIALOG 0, 0, 206, 150 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "ScrollTip Settings" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Horizontal",IDC_STATIC,7,7,192,54 + LTEXT "&Tip Mask",IDC_STATIC,13,16,35,8 + EDITTEXT IDC_HORZ_MASK,13,26,100,14,ES_AUTOHSCROLL + LTEXT "(%p is page number, ",IDC_STATIC,118,16,68,8 + LTEXT "%l is position in page, ",IDC_STATIC,118,26,73,8 + LTEXT "%a is absolute position)",IDC_STATIC,118,36,79,8 + CONTROL "Page &Align",IDC_HORZ_PAGE_ALIGN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,46,49,10 + CONTROL "Show at &top",IDC_HORZ_TOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,46,51,10 + GROUPBOX "Vertical",IDC_STATIC,7,63,192,54 + LTEXT "&Tip Mask",IDC_STATIC,13,72,35,8 + EDITTEXT IDC_VERT_MASK,13,82,100,14,ES_AUTOHSCROLL + LTEXT "(%p is page number, ",IDC_STATIC,118,72,68,8 + LTEXT "%l is position in page, ",IDC_STATIC,118,82,73,8 + LTEXT "%a is absolute position)",IDC_STATIC,118,92,79,8 + CONTROL "Page &Align",IDC_VERT_PAGE_ALIGN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,102,49,10 + CONTROL "Show &left",IDC_VERT_LEFT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,102,43,10 + DEFPUSHBUTTON "OK",IDOK,47,129,50,14 + PUSHBUTTON "Cancel",IDCANCEL,108,129,50,14 +END + +IDD_SCROLL_DLG DIALOG 0, 0, 202, 151 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Test Dialog SrcollTip" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Close",IDCANCEL,75,130,50,14 + SCROLLBAR IDC_HORZ_SCROLL_1,7,7,116,8 + SCROLLBAR IDC_HORZ_SCROLL_2,7,44,116,8 + SCROLLBAR IDC_VERT_SCROLL_1,186,7,9,43,SBS_VERT + LISTBOX IDC_LIST,7,84,118,39,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP,7,16,15,13 + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP,163,50,32,9 + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP,7,57,32,9 + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP,125,106,32,9 + LTEXT "Herz. Page",IDC_STATIC,56,18,36,8 + LTEXT "Ver Page",IDC_STATIC,165,60,30,8 + LTEXT "Absolute pos.",IDC_STATIC,42,57,44,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 "040904b0" + BEGIN + VALUE "FileDescription", "SCROLLTIPDEMO MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "SCROLLTIPDEMO" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd." + VALUE "OriginalFilename", "SCROLLTIPDEMO.EXE" + VALUE "ProductName", "SCROLLTIPDEMO Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_SCROLL_SETTINGS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 199 + TOPMARGIN, 7 + BOTTOMMARGIN, 143 + END + + IDD_SCROLL_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 195 + TOPMARGIN, 7 + BOTTOMMARGIN, 144 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDP_OLE_INIT_FAILED "OLE initialization failed. Make sure that the OLE libraries are the correct version." + IDP_FAILED_TO_CREATE "Failed to create object. Make sure the object is entered in the system registry." +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "ScrollTipDemo" + IDR_SCROLLTYPE "\nScroll\nScroll\n\n\nScrollTipDemo.Document\nScroll Document" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "ScrollTipDemo (Dundas Software)" + 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" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + 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_PASTE_LINK "Insert Clipboard contents and a link to its source\nPaste Link" + ID_EDIT_PASTE_SPECIAL "Insert Clipboard contents with options\nPaste Special" + 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" +END + +STRINGTABLE +BEGIN + 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 + ID_OLE_INSERT_NEW "Insert new embedded object\nNew Object" + ID_OLE_EDIT_LINKS "Edit linked objects\nEdit Links" + ID_OLE_EDIT_CONVERT "Convert object to different type\nConvert Object" +END + +STRINGTABLE +BEGIN + ID_OLE_VERB_FIRST "Activate embedded or linked object" + 57873 "Activate embedded or linked object" + 57874 "Activate embedded or linked object" + 57875 "Activate embedded or linked object" +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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" + ID_DESCRIPTION_FILE "scrolltipinfo.rtf" +END + +STRINGTABLE +BEGIN + IDS_VIEW_TEXT "Please enter additional text so that both scroll bars appear.\n\nMove the scroll bars with your mouse to see the scroll tips.\n\nTo change settings RIGHT CLICK this view.\n\nTo test a dialog box DOUBLE CLICK this view.\n\n\nxxxxxxxxx1xxxxxxxxx2xxxxxxxxx3xxxxxxxxx4xxxxxxxxx5xxxxxxxxx6xxxxxxxxx7xxxxxxxxx8xxxxxxxxx\n" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ScrollTipDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "afxolecl.rc" // OLE container resources +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.vcproj new file mode 100644 index 0000000..45a9888 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDemo.vcproj @@ -0,0 +1,1250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.cpp new file mode 100644 index 0000000..b5cab47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.cpp @@ -0,0 +1,105 @@ +// ScrollTipDoc.cpp : implementation of the CScrollTipDoc class +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" + +#include "ScrollTipDoc.h" +#include "CntrItem.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDoc + +IMPLEMENT_DYNCREATE(CScrollTipDoc, CRichEditDoc) + +BEGIN_MESSAGE_MAP(CScrollTipDoc, CRichEditDoc) + //{{AFX_MSG_MAP(CScrollTipDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Enable default OLE container implementation + ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu) + ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks) + ON_UPDATE_COMMAND_UI(ID_OLE_VERB_FIRST, CRichEditDoc::OnUpdateObjectVerbMenu) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDoc construction/destruction + +CScrollTipDoc::CScrollTipDoc() + { + // TODO: add one-time construction code here + + } + +CScrollTipDoc::~CScrollTipDoc() + { + } + +BOOL CScrollTipDoc::OnNewDocument() + { + if (!CRichEditDoc::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; + } + +CRichEditCntrItem* CScrollTipDoc::CreateClientItem(REOBJECT* preo) const + { + // cast away constness of this + return new CScrollTipDemoCntrItem(preo, (CScrollTipDoc*) this); + } + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDoc serialization + +void CScrollTipDoc::Serialize(CArchive& ar) + { + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } + + // Calling the base class CRichEditDoc enables serialization + // of the container document's COleClientItem objects. + CRichEditDoc::Serialize(ar); + } + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDoc diagnostics + +#ifdef _DEBUG +void CScrollTipDoc::AssertValid() const + { + CRichEditDoc::AssertValid(); + } + +void CScrollTipDoc::Dump(CDumpContext& dc) const + { + CRichEditDoc::Dump(dc); + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipDoc commands + +BOOL CScrollTipDoc::SaveModified() + { + // ... Never ask to save + SetModifiedFlag(FALSE); + + return CRichEditDoc::SaveModified(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.h new file mode 100644 index 0000000..14a658d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipDoc.h @@ -0,0 +1,47 @@ +// ScrollTipDoc.h : interface of the CScrollTipDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CScrollTipDoc : public CRichEditDoc +{ +protected: // create from serialization only + CScrollTipDoc(); + DECLARE_DYNCREATE(CScrollTipDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollTipDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + protected: + virtual BOOL SaveModified(); + //}}AFX_VIRTUAL + virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const; + +// Implementation +public: + virtual ~CScrollTipDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CScrollTipDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.cpp new file mode 100644 index 0000000..8bfda80 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.cpp @@ -0,0 +1,153 @@ +// ScrollTipEditView.cpp : implementation of the CScrollTipEditView class +// + +#include "stdafx.h" +#include "ScrollTipDemo.h" + +#include "ScrollTipDoc.h" +#include "CntrItem.h" +#include "ScrollTipEditView.h" +#include "ScrollSettingsDlg.h" +#include "ScrollDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipEditView + +IMPLEMENT_DYNCREATE(CScrollTipEditView, CRichEditView) + +BEGIN_MESSAGE_MAP(CScrollTipEditView, CRichEditView) + //{{AFX_MSG_MAP(CScrollTipEditView) + ON_WM_RBUTTONDOWN() + ON_WM_LBUTTONDBLCLK() + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CRichEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CRichEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRichEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipEditView construction/destruction + +CScrollTipEditView::CScrollTipEditView() +{ + m_nWordWrap = WrapNone; +} + +CScrollTipEditView::~CScrollTipEditView() +{ +} + +BOOL CScrollTipEditView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CRichEditView::PreCreateWindow(cs); +} + +void CScrollTipEditView::OnInitialUpdate() +{ + CRichEditView::OnInitialUpdate(); + + // Set the printing margins (720 twips = 1/2 inch). + SetMargins(CRect(720, 720, 720, 720)); + + // Insert sopme initial text in the view + CString sInitialText; + VERIFY(sInitialText.LoadString(IDS_VIEW_TEXT)); + GetRichEditCtrl().SetSel(0, -1); + GetRichEditCtrl().ReplaceSel(sInitialText); + + // Add the scroll bar interceptors for scroll tips + m_wndHScrollTipOwner.InterceptHorizontalScroll(this, TRUE); + m_wndVScrollTipOwner.InterceptVerticalScroll(this, TRUE); + + // Set initial values + m_wndHScrollTipOwner.SetMask(_T("Pos %a")); + m_wndHScrollTipOwner.SetLeftTop(TRUE); + m_wndHScrollTipOwner.SetPageAlign(FALSE); + m_wndVScrollTipOwner.SetMask(_T("Page %p")); + m_wndVScrollTipOwner.SetLeftTop(TRUE); + m_wndVScrollTipOwner.SetPageAlign(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipEditView printing + +BOOL CScrollTipEditView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipEditView diagnostics + +#ifdef _DEBUG +void CScrollTipEditView::AssertValid() const +{ + CRichEditView::AssertValid(); +} + +void CScrollTipEditView::Dump(CDumpContext& dc) const +{ + CRichEditView::Dump(dc); +} + +CScrollTipDoc* CScrollTipEditView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScrollTipDoc))); + return (CScrollTipDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScrollTipEditView message handlers + +void CScrollTipEditView::OnRButtonDown(UINT nFlags, CPoint point) +{ + AdjustSettings(); + + CRichEditView::OnRButtonDown(nFlags, point); +} + +void CScrollTipEditView::OnLButtonDblClk(UINT nFlags, CPoint point) +{ + CScrollDlg dlg; + dlg.DoModal(); + + CRichEditView::OnLButtonDblClk(nFlags, point); +} + +void CScrollTipEditView::AdjustSettings() +{ + CScrollSettingsDlg dlg; + dlg.m_sHorizontalMask = m_wndHScrollTipOwner.GetMask(); + dlg.m_bHorizontalPageAlign = m_wndHScrollTipOwner.GetPageAlign(); + dlg.m_bHorizontalTop = m_wndHScrollTipOwner.GetLeftTop(); + + dlg.m_sVerticalMask = m_wndVScrollTipOwner.GetMask(); + dlg.m_bVerticalPageAlign = m_wndVScrollTipOwner.GetPageAlign(); + dlg.m_bVerticalLeft = m_wndVScrollTipOwner.GetLeftTop(); + + if (dlg.DoModal() == IDOK) + { + m_wndHScrollTipOwner.SetMask(dlg.m_sHorizontalMask); + m_wndHScrollTipOwner.SetLeftTop(dlg.m_bHorizontalTop); + m_wndHScrollTipOwner.SetPageAlign(dlg.m_bHorizontalPageAlign); + + m_wndVScrollTipOwner.SetMask(dlg.m_sVerticalMask); + m_wndVScrollTipOwner.SetLeftTop(dlg.m_bVerticalLeft); + m_wndVScrollTipOwner.SetPageAlign(dlg.m_bVerticalPageAlign); + } +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.h new file mode 100644 index 0000000..a83668f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/ScrollTipEditView.h @@ -0,0 +1,58 @@ +// ScrollTipEditView.h : interface of the CScrollTipEditView class +// +///////////////////////////////////////////////////////////////////////////// +#include "OXScrollTipOwner.h" + +class CScrollTipDemoCntrItem; + +class CScrollTipEditView : public CRichEditView +{ +protected: // create from serialization only + CScrollTipEditView(); + DECLARE_DYNCREATE(CScrollTipEditView) + +// Attributes +public: + CScrollTipDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrollTipEditView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnInitialUpdate(); // called first time after construct + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CScrollTipEditView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXScrollTipOwner m_wndHScrollTipOwner; + COXScrollTipOwner m_wndVScrollTipOwner; + +// Generated message map functions +protected: + void AdjustSettings(); + //{{AFX_MSG(CScrollTipEditView) + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ScrollTipEditView.cpp +inline CScrollTipDoc* CScrollTipEditView::GetDocument() + { return (CScrollTipDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.cpp new file mode 100644 index 0000000..906d8eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ScrollTipDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.h new file mode 100644 index 0000000..fd68b70 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/StdAfx.h @@ -0,0 +1,20 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE classes +#include // MFC OLE dialog classes +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC rich edit classes + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.rc2 new file mode 100644 index 0000000..bf62b38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDemo.rc2 @@ -0,0 +1,13 @@ +// +// SCROLLTIPDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/ScrollTipDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/bitmap1.bmp new file mode 100644 index 0000000..61832dd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/resource.h new file mode 100644 index 0000000..1b0f663 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ScrollTipDemo.rc +// +#define IDR_SCROLLTYPE_CNTR_IP 6 +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDP_FAILED_TO_CREATE 102 +#define IDR_MAINFRAME 128 +#define IDR_SCROLLTYPE 129 +#define IDD_SCROLL_SETTINGS 130 +#define IDD_SCROLL_DLG 131 +#define IDB_BITMAP1 132 +#define IDC_HORZ_MASK 1000 +#define IDS_VIEW_TEXT 1000 +#define IDC_HORZ_PAGE_ALIGN 1001 +#define IDC_HORZ_TOP 1002 +#define IDC_VERT_MASK 1003 +#define IDC_HORZ_SCROLL_1 1003 +#define IDC_VERT_PAGE_ALIGN 1004 +#define IDC_HORZ_SCROLL_2 1004 +#define IDC_VERT_LEFT 1005 +#define IDC_VERT_SCROLL_1 1005 +#define IDC_LIST 1006 +#define ID_CANCEL_EDIT_CNTR 32768 +#define ID_DESCRIPTION_FILE 61446 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/scrolltipinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/scrolltipinfo.rtf new file mode 100644 index 0000000..cf4ff30 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/scrolltips/scrolltipinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.cpp new file mode 100644 index 0000000..313ece6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.cpp @@ -0,0 +1,100 @@ +// OXColorBar.cpp : implementation file +// + +#include "stdafx.h" +#include "SpinEx.h" +#include "ColorBar.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CColorBar + +CColorBar::CColorBar() + { + m_nRed = m_nGreen = m_nBlue = 0; + m_pSpecialPalette = NULL; + } + +CColorBar::~CColorBar() + { + if ( m_pSpecialPalette ) + delete m_pSpecialPalette; + } + + +BEGIN_MESSAGE_MAP(CColorBar, CStatic) + //{{AFX_MSG_MAP(CColorBar) + ON_WM_PAINT() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CColorBar message handlers + +void CColorBar::SetBarColor(int nRed, int nGreen, int nBlue) + { + m_nRed = nRed; + m_nGreen = nGreen; + m_nBlue = nBlue; + RedrawWindow(); + } + +void CColorBar::OnPaint() + { + //CPalette* pOldPalette = NULL; + CPaintDC dc(this); // device context for painting + //if ( dc.GetDeviceCaps(SIZEPALETTE) == 256 ) // get number of entries in the system palette + // pOldPalette = SetSpecialPalette(&dc); // special palette for 256-color display + + COLORREF bkCol = RGB(m_nRed, m_nGreen, m_nBlue); // paint color + CBrush colBrush(bkCol); // paint brush + + dc.FillRect(&(dc.m_ps.rcPaint), &colBrush); + + //if ( pOldPalette ) + // dc.SelectPalette(pOldPalette, FALSE); + } + +CPalette* CColorBar::SetSpecialPalette(CPaintDC* pdc) +// Set special palette in case of computer with 256 colors. + { + WORD m_wEntriesNum = 1; + CPalette* pOldPalette = NULL; + LPLOGPALETTE pLogPal = (LPLOGPALETTE) new BYTE[2 * sizeof(WORD) + m_wEntriesNum * sizeof(PALETTEENTRY)]; + + pLogPal->palVersion = 0x300; + pLogPal->palNumEntries = m_wEntriesNum; + for ( int nCount = 0; nCount < m_wEntriesNum; nCount++ ) + { + pLogPal->palPalEntry[nCount].peRed = (BYTE)m_nRed; + pLogPal->palPalEntry[nCount].peGreen = (BYTE)m_nGreen; + pLogPal->palPalEntry[nCount].peBlue = (BYTE)m_nBlue; + pLogPal->palPalEntry[nCount].peFlags = 0; + } + + if ( m_pSpecialPalette ) + delete m_pSpecialPalette; + + m_pSpecialPalette = new CPalette; + if ( m_pSpecialPalette->CreatePalette(pLogPal) ) + { + pOldPalette = pdc->SelectPalette(m_pSpecialPalette, FALSE); + if ( pOldPalette ) + { + UINT nMapEntries = pdc->RealizePalette(); + if ( nMapEntries != m_wEntriesNum ) + { + TRACE1("CColorBar::SetSpecialPalette() : No mapped palette entries (must be %i)\n", m_wEntriesNum); + ASSERT(FALSE); + } + } + } + delete[] pLogPal; + + return pOldPalette; + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.h new file mode 100644 index 0000000..508f721 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/ColorBar.h @@ -0,0 +1,54 @@ +#if !defined(AFX_OXCOLORBAR_H__4433107A_2442_11D1_A281_0000929B340A__INCLUDED_) +#define AFX_OXCOLORBAR_H__4433107A_2442_11D1_A281_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// OXColorBar.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CColorBar window + +class CColorBar : public CStatic +{ +// Construction +public: + CColorBar(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CColorBar) + //}}AFX_VIRTUAL + +// Implementation +public: + CPalette* m_pSpecialPalette; + void SetBarColor(int nRed, int nGreen, int nBlue); + virtual ~CColorBar(); + + // Generated message map functions +protected: + CPalette* SetSpecialPalette(CPaintDC* pdc); + int m_nRed; + int m_nGreen; + int m_nBlue; + //{{AFX_MSG(CColorBar) + afx_msg void OnPaint(); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OXCOLORBAR_H__4433107A_2442_11D1_A281_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.clw new file mode 100644 index 0000000..11f88cc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.clw @@ -0,0 +1,62 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSpinExApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "spinex.h" +LastPage=0 + +ClassCount=3 +Class1=CColorBar +Class2=CSpinExApp +Class3=CSpinExDlg + +ResourceCount=1 +Resource1=IDD_SPINEX_DIALOG + +[CLS:CColorBar] +Type=0 +BaseClass=CStatic +HeaderFile=ColorBar.h +ImplementationFile=ColorBar.cpp +LastObject=CColorBar + +[CLS:CSpinExApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SpinEx.h +ImplementationFile=SpinEx.cpp +Filter=N +VirtualFilter=AC +LastObject=CSpinExApp + +[CLS:CSpinExDlg] +Type=0 +BaseClass=CDialog +HeaderFile=SpinExDlg.h +ImplementationFile=SpinExDlg.cpp + +[DLG:IDD_SPINEX_DIALOG] +Type=1 +Class=CSpinExDlg +ControlCount=17 +Control1=IDC_COLORBAR,static,1342242821 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_BUDDY2,edit,1350639745 +Control4=IDC_SPINEX2,msctls_updown32,1342177314 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_BUDDY1,edit,1350639745 +Control7=IDC_SPINEX1,msctls_updown32,1342177314 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_BUDDY3,edit,1350639745 +Control10=IDC_SPINEX3,msctls_updown32,1342177314 +Control11=IDC_STATIC,static,1342308354 +Control12=IDC_BUDDY4,edit,1350639745 +Control13=IDC_RADIO1,button,1342242825 +Control14=IDC_RADIO2,button,1342242825 +Control15=IDC_STATIC,button,1342177287 +Control16=IDC_STATIC,button,1342177287 +Control17=IDC_STATIC,static,1342308354 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.cpp new file mode 100644 index 0000000..0516be5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.cpp @@ -0,0 +1,100 @@ +// SpinEx.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SpinEx.h" +#include "SpinExDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSpinExApp + +BEGIN_MESSAGE_MAP(CSpinExApp, CWinApp) + //{{AFX_MSG_MAP(CSpinExApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSpinExApp construction + +CSpinExApp::CSpinExApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSpinExApp object + +CSpinExApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSpinExApp initialization + +BOOL CSpinExApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CSpinExDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSpinExApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsp new file mode 100644 index 0000000..2d11a40 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsp @@ -0,0 +1,313 @@ +# Microsoft Developer Studio Project File - Name="SpinEx" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SpinEx - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SpinEx.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SpinEx.mak" CFG="SpinEx - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SpinEx - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SpinEx - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SpinEx - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SpinEx - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SpinEx - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SpinEx - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SpinEx.exe" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SpinEx.exe" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SpinEx__" +# PROP BASE Intermediate_Dir "SpinEx__" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SpinEx.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SpinEx.exe" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SpinEx_0" +# PROP BASE Intermediate_Dir "SpinEx_0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SpinEx.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"SpinEx.exe" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SpinEx_1" +# PROP BASE Intermediate_Dir "SpinEx_1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SpinEx.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"SpinEx.exe" + +!ENDIF + +# Begin Target + +# Name "SpinEx - Win32 Release" +# Name "SpinEx - Win32 Debug" +# Name "SpinEx - Win32 Release_Shared" +# Name "SpinEx - Win32 Unicode_Debug" +# Name "SpinEx - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSpinCtrl.cpp + +!IF "$(CFG)" == "SpinEx - Win32 Release" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Debug" + +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Debug" + +# ADD BASE CPP /Yu"stdafx.h" +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Release" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp + +!IF "$(CFG)" == "SpinEx - Win32 Release" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Debug" + +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Debug" + +# ADD BASE CPP /Yu"stdafx.h" +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Release" + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ColorBar.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\SpinEx.cpp + +!IF "$(CFG)" == "SpinEx - Win32 Release" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Debug" + +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Release_Shared" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Debug" + +# ADD BASE CPP /Yu"stdafx.h" +# ADD CPP /Yu"stdafx.h" + +!ELSEIF "$(CFG)" == "SpinEx - Win32 Unicode_Release" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\SpinEx.rc +# End Source File +# Begin Source File + +SOURCE=.\SpinExDlg.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ColorBar.h +# End Source File +# Begin Source File + +SOURCE=.\SpinEx.h +# End Source File +# Begin Source File + +SOURCE=.\SpinExDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\SpinEx.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SpinEx.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\SpinEx.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsw new file mode 100644 index 0000000..a9c5d51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SpinEx"=".\SpinEx.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/spinex", EJJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.h new file mode 100644 index 0000000..f393ad4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.h @@ -0,0 +1,50 @@ +// SpinEx.h : main header file for the SPINEX application +// + +#if !defined(AFX_SPINEX_H__B6E68EB8_1621_11D1_A271_0000929B340A__INCLUDED_) +#define AFX_SPINEX_H__B6E68EB8_1621_11D1_A271_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSpinExApp: +// See SpinEx.cpp for the implementation of this class +// + +class CSpinExApp : public CWinApp +{ +public: + CSpinExApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSpinExApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSpinExApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SPINEX_H__B6E68EB8_1621_11D1_A271_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.rc new file mode 100644 index 0000000..e463d79 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.rc @@ -0,0 +1,217 @@ +// 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 + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\SpinEx.ico" +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// 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" + "#include ""OXSpinCtrlRes.h""\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SpinEx.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "#include ""OXSpinCtrl.rc"" // Spin ctrl resources\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SPINEX_DIALOG DIALOGEX 0, 0, 253, 138 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "COXSpinCtrl demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_COLORBAR,"Static",SS_GRAYRECT | WS_TABSTOP,7,7,147,99,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE + LTEXT "Red",IDC_STATIC,168,19,20,8 + EDITTEXT IDC_BUDDY2,190,17,39,13,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SPINEX2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,230,17,11,15 + LTEXT "Green",IDC_STATIC,165,45,20,8 + EDITTEXT IDC_BUDDY1,190,41,39,13,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SPINEX1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,230,40,11,15 + LTEXT "Blue",IDC_STATIC,168,67,20,8 + EDITTEXT IDC_BUDDY3,190,65,39,13,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SPINEX3,"msctls_updown32",UDS_SETBUDDYINT | UDS_ARROWKEYS,230,65,11,15 + RTEXT "Size",IDC_STATIC,189,87,13,8 + EDITTEXT IDC_BUDDY4,207,85,39,13,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Screen pixel = spin unit",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,119,89,8 + CONTROL "Screen borders <=> spin value limits",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,111,119,128,8 + GROUPBOX "Spin value computation method",IDC_STATIC,7,109,239,22 + GROUPBOX "Color components",IDC_STATIC,160,5,85,77 + RTEXT "(bar width is displayed)",IDC_STATIC,164,95,38,17 +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 "040904B0" + BEGIN + VALUE "FileDescription", "SpinEx MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "SpinEx" + VALUE "LegalCopyright", "Copyright (C) 1997" + VALUE "OriginalFilename", "SpinEx.EXE" + VALUE "ProductName", "SpinEx Application" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_SPINEX_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 131 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About SpinEx..." + ID_DESCRIPTION_FILE "SpinExInfo.rtf" +END + +STRINGTABLE +BEGIN + IDR_MAINFRAME "SpinEx" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SpinEx.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +#include "OXSpinCtrl.rc" // Spin ctrl resources + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.vcproj new file mode 100644 index 0000000..429f80f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinEx.vcproj @@ -0,0 +1,938 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.cpp new file mode 100644 index 0000000..d85cdd5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.cpp @@ -0,0 +1,224 @@ +// SpinExDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "SpinEx.h" +#include "SpinExDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CSpinExDlg dialog + +CSpinExDlg::CSpinExDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSpinExDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSpinExDlg) + m_nBuddy4 = 0; + m_nBuddy1 = 0; + m_nBuddy3 = 0; + m_nBuddy2 = 0; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + m_nColorBarHei = 0; + m_nColorBarWid = 0; +} + +void CSpinExDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSpinExDlg) + DDX_Control(pDX, IDC_COLORBAR, m_ColorBar); + DDX_Control(pDX, IDC_BUDDY4, m_Buddy4); + DDX_Control(pDX, IDC_SPINEX3, m_SpinEx3); + DDX_Control(pDX, IDC_BUDDY3, m_Buddy3); + DDX_Control(pDX, IDC_BUDDY2, m_Buddy2); + DDX_Control(pDX, IDC_SPINEX2, m_SpinEx2); + DDX_Control(pDX, IDC_BUDDY1, m_Buddy1); + DDX_Control(pDX, IDC_SPINEX1, m_SpinEx1); + DDX_Text(pDX, IDC_BUDDY4, m_nBuddy4); + DDX_Text(pDX, IDC_BUDDY1, m_nBuddy1); + DDX_Text(pDX, IDC_BUDDY3, m_nBuddy3); + DDX_Text(pDX, IDC_BUDDY2, m_nBuddy2); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSpinExDlg, CDialog) + //{{AFX_MSG_MAP(CSpinExDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_RADIO1, OnRadio1) + ON_BN_CLICKED(IDC_RADIO2, OnRadio2) + ON_EN_CHANGE(IDC_BUDDY4, OnChangeBuddy4) + ON_EN_CHANGE(IDC_BUDDY1, OnChangeBuddy1) + ON_EN_CHANGE(IDC_BUDDY2, OnChangeBuddy1) + ON_EN_CHANGE(IDC_BUDDY3, OnChangeBuddy1) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSpinExDlg message handlers + +BOOL CSpinExDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Set the COXSpinCtrl objects, which are mapped to a common Spin Controls (Red, Green and Blue spins). + m_SpinEx1.SetBuddy(&m_Buddy1); + m_SpinEx1.SetRange(0, 255); + m_SpinEx1.SetPos(100); + m_SpinEx2.SetBuddy(&m_Buddy2); + m_SpinEx2.SetRange(0, 255); + m_SpinEx2.SetPos(100); + m_SpinEx3.SetBuddy(&m_Buddy3); + m_SpinEx3.SetRange(0, 255); + m_SpinEx3.SetPos(100); + + // Create a new COXSpinCtrl object (Size spin). + m_nColorBarHei = 160; // Color Bar height. + m_nColorBarWid = 220; // Color Bar width. + RECT rectSpinPos; + m_Buddy4.GetWindowRect(&rectSpinPos); + ScreenToClient(&rectSpinPos); + int nBuddyHei = rectSpinPos.bottom - rectSpinPos.top; + rectSpinPos.top = rectSpinPos.bottom + 1; + rectSpinPos.bottom = rectSpinPos.top + nBuddyHei; + m_SpinEx4.Create(WS_VISIBLE | UDS_HORZ | UDS_SETBUDDYINT, rectSpinPos, this, IDC_SPINEX4); + m_SpinEx4.SetBuddy(&m_Buddy4); + m_SpinEx4.SetRange((short)m_nColorBarWid - 150, (short)m_nColorBarWid); + m_SpinEx4.SetPos(m_nColorBarWid); + + // Set a default COXSpinCtrl method of delta value computation (Delta pixel = Delta value). + m_SpinEx1.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx2.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx3.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx4.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + CheckRadioButton(IDC_RADIO1, IDC_RADIO2, IDC_RADIO1); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSpinExDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSpinExDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSpinExDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSpinExDlg::OnRadio1() +// Set a COXSpinCtrl method of delta value computation (Delta pixel = Delta value). +{ + m_SpinEx1.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx2.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx3.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); + m_SpinEx4.SetComputationMethod(OX_SPIN_DELTA_PIXEL_IS_DELTA_VALUE); +} + +void CSpinExDlg::OnRadio2() +// Set a COXSpinCtrl method of delta value computation (Screen limits). +{ + m_SpinEx1.SetComputationMethod(OX_SPIN_SCREEN_AREA); + m_SpinEx2.SetComputationMethod(OX_SPIN_SCREEN_AREA); + m_SpinEx3.SetComputationMethod(OX_SPIN_SCREEN_AREA); + m_SpinEx4.SetComputationMethod(OX_SPIN_SCREEN_AREA); +} + +void CSpinExDlg::OnChangeBuddy1() +// Update color of Color Bar (as result of color component change). +{ + UpdateData(TRUE); + m_ColorBar.SetBarColor(m_nBuddy2/*Red*/, m_nBuddy1/*Green*/, m_nBuddy3/*Blue*/); +} + +void CSpinExDlg::OnChangeBuddy4() +// Change the Color Bar size. +{ + RECT rectBarPos; + int newWid, newHei; + + m_ColorBar.GetWindowRect(&rectBarPos); + ScreenToClient(&rectBarPos); + UpdateData(TRUE); + if (m_nBuddy4 <=220 && m_nBuddy4 >=70) + { newWid = m_nBuddy4; + newHei = m_nColorBarHei - m_nColorBarWid + m_nBuddy4; + m_ColorBar.MoveWindow(rectBarPos.left, rectBarPos.top, newWid, newHei); + } + else + MessageBox(_T("Value should not be greater than 220 nor less than 70")); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.h new file mode 100644 index 0000000..a4904a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExDlg.h @@ -0,0 +1,70 @@ +// SpinExDlg.h : header file +// + +#include "OXSpinCtrl.h" +#include "ColorBar.h" + +#if !defined(AFX_SPINEXDLG_H__B6E68EBA_1621_11D1_A271_0000929B340A__INCLUDED_) +#define AFX_SPINEXDLG_H__B6E68EBA_1621_11D1_A271_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CSpinExDlg dialog + +class CSpinExDlg : public CDialog +{ +// Construction +public: + COXSpinCtrl m_SpinEx4; + CSpinExDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSpinExDlg) + enum { IDD = IDD_SPINEX_DIALOG }; + CColorBar m_ColorBar; + CEdit m_Buddy4; + COXSpinCtrl m_SpinEx3; + CEdit m_Buddy3; + CEdit m_Buddy2; + COXSpinCtrl m_SpinEx2; + CEdit m_Buddy1; + COXSpinCtrl m_SpinEx1; + int m_nBuddy4; + int m_nBuddy1; + int m_nBuddy3; + int m_nBuddy2; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSpinExDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + int m_nColorBarHei; + int m_nColorBarWid; + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CSpinExDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnRadio1(); + afx_msg void OnRadio2(); + afx_msg void OnChangeBuddy4(); + afx_msg void OnChangeBuddy1(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SPINEXDLG_H__B6E68EBA_1621_11D1_A271_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExInfo.rtf new file mode 100644 index 0000000..957bb89 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/SpinExInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.cpp new file mode 100644 index 0000000..9b4734a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SpinEx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.h new file mode 100644 index 0000000..f6249b2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__B6E68EBC_1621_11D1_A271_0000929B340A__INCLUDED_) +#define AFX_STDAFX_H__B6E68EBC_1621_11D1_A271_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__B6E68EBC_1621_11D1_A271_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.ico new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.rc2 new file mode 100644 index 0000000..6dd9824 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/SpinEx.rc2 @@ -0,0 +1,13 @@ +// +// SPINEX.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/bitmap1.bmp new file mode 100644 index 0000000..fcf9bbb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/resource.h new file mode 100644 index 0000000..0ce1c37 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/spinex/resource.h @@ -0,0 +1,32 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SpinEx.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SPINEX_DIALOG 102 +#define ID_DESCRIPTION_FILE 102 +#define IDR_MAINFRAME 128 +#define IDC_SPINEX1 1005 +#define IDC_BUDDY1 1006 +#define IDC_SPINEX2 1007 +#define IDC_BUDDY2 1008 +#define IDC_SPINEX3 1009 +#define IDC_BUDDY3 1010 +#define IDC_BUDDY4 1011 +#define IDC_SPINEX4 1012 +#define IDC_RADIO1 1016 +#define IDC_RADIO2 1017 +#define IDC_COLORBAR 1018 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.CPP new file mode 100644 index 0000000..0a03e1d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.CPP @@ -0,0 +1,131 @@ +// mainfrm.cpp : implementation of the CMainFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "stdafx.h" +#include "scribble.h" + +#include "mainfrm.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP + // Global help commands + ON_COMMAND(ID_HELP_INDEX, CMDIFrameWnd::OnHelpIndex) + ON_COMMAND(ID_HELP_USING, CMDIFrameWnd::OnHelpUsing) + ON_COMMAND(ID_HELP, CMDIFrameWnd::OnHelp) + ON_COMMAND(ID_CONTEXT_HELP, CMDIFrameWnd::OnContextHelp) + ON_COMMAND(ID_DEFAULT_HELP, CMDIFrameWnd::OnHelpIndex) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// arrays of IDs used to initialize control bars + +// toolbar buttons - IDs are command buttons +static UINT BASED_CODE buttons[] = +{ + // same order as in the bitmap 'toolbar.bmp' + ID_FILE_NEW, + ID_FILE_OPEN, + ID_FILE_SAVE, + ID_SEPARATOR, + ID_EDIT_CUT, + ID_EDIT_COPY, + ID_EDIT_PASTE, + ID_SEPARATOR, + ID_PEN_THICK_OR_THIN, + ID_SEPARATOR, + ID_ZOOM_UP, + ID_ZOOM_DOWN, + ID_ZOOM_TOWINDOW, + ID_SEPARATOR, + ID_FILE_PRINT, + ID_APP_ABOUT, +}; + +static UINT BASED_CODE indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_ZOOM, + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ +} + +CMainFrame::~CMainFrame() +{ + // TODO: add member initialization code here +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) || + !m_wndToolBar.SetButtons(buttons, + sizeof(buttons)/sizeof(UINT))) + { + TRACE(_T("Failed to create toolbar\n")); + return -1; // fail to create + } + + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE(_T("Failed to create status bar\n")); + return -1; // fail to create + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.H new file mode 100644 index 0000000..820988a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/MAINFRM.H @@ -0,0 +1,48 @@ +// mainfrm.h : interface of the CMainFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.CPP new file mode 100644 index 0000000..32928a5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.CPP @@ -0,0 +1,68 @@ +// pendlg.cpp : implementation file +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "stdafx.h" +#include "scribble.h" +#include "pendlg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPenWidthsDlg dialog + +CPenWidthsDlg::CPenWidthsDlg(CWnd* pParent /*=NULL*/) + : CDialog(CPenWidthsDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CPenWidthsDlg) + // NOTE: the ClassWizard will add member initialization here + m_nThickWidth = 0; + m_nThinWidth = 0; + //}}AFX_DATA_INIT +} + +void CPenWidthsDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPenWidthsDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + DDX_Text(pDX, IDC_THIN_PEN_WIDTH, m_nThinWidth); + DDV_MinMaxInt(pDX, m_nThinWidth, 1, 20); + DDX_Text(pDX, IDC_THICK_PEN_WIDTH, m_nThickWidth); + DDV_MinMaxInt(pDX, m_nThickWidth, 1, 20); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPenWidthsDlg, CDialog) + //{{AFX_MSG_MAP(CPenWidthsDlg) + // NOTE: the ClassWizard will add message map macros here + ON_BN_CLICKED(IDC_DEFAULT_PEN_WIDTHS, OnDefaultPenWidths) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPenWidthsDlg message handlers + + + +void CPenWidthsDlg::OnDefaultPenWidths() +{ + m_nThinWidth = 2; + m_nThickWidth = 5; + UpdateData(FALSE); // causes DoDataExchange() + // bSave=FALSE means don't save from screen, + // rather, write to screen +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.H new file mode 100644 index 0000000..178cfd5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/PENDLG.H @@ -0,0 +1,36 @@ +// pendlg.h : header file +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +class CPenWidthsDlg : public CDialog +{ +// Construction +public: + CPenWidthsDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CPenWidthsDlg) + enum { IDD = IDD_PEN_WIDTHS }; + int m_nThickWidth; + int m_nThinWidth; + //}}AFX_DATA + +// Implementation +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + + // Generated message map functions + //{{AFX_MSG(CPenWidthsDlg) + afx_msg void OnDefaultPenWidths(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CLW b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CLW new file mode 100644 index 0000000..fc0976d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CLW @@ -0,0 +1,127 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CScribbleApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "scribble.h" +LastPage=0 + +ClassCount=5 +Class1=CMainFrame +Class2=CPenWidthsDlg +Class3=CScribbleApp +Class4=CScribDoc +Class5=CScribView + +ResourceCount=3 +Resource1=IDD_PEN_WIDTHS +Resource2=IDR_MAINFRAME +Resource3=IDR_SCRIBTYPE + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MAINFRM.H +ImplementationFile=MAINFRM.CPP +LastObject=CMainFrame + +[CLS:CPenWidthsDlg] +Type=0 +BaseClass=CDialog +HeaderFile=PENDLG.H +ImplementationFile=PENDLG.CPP + +[CLS:CScribbleApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SCRIBBLE.H +ImplementationFile=SCRIBBLE.CPP +LastObject=CScribbleApp + +[CLS:CScribDoc] +Type=0 +BaseClass=CDocument +HeaderFile=SCRIBDOC.H +ImplementationFile=SCRIBDOC.CPP + +[CLS:CScribView] +Type=0 +BaseClass=COXZoomView +HeaderFile=SCRIBVW.H +ImplementationFile=SCRIBVW.CPP + +[DLG:IDD_PEN_WIDTHS] +Type=1 +Class=CPenWidthsDlg +ControlCount=7 +Control1=IDC_THIN_PEN_WIDTH,edit,1350631552 +Control2=IDC_THICK_PEN_WIDTH,edit,1350631552 +Control3=IDOK,button,1342373889 +Control4=IDCANCEL,button,1342373888 +Control5=IDC_DEFAULT_PEN_WIDTHS,button,1342373888 +Control6=IDC_STATIC,static,1342373888 +Control7=IDC_STATIC,static,1342373888 + +[MNU:IDR_SCRIBTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_SAVE_AS +Command5=ID_FILE_MRU_FILE1 +Command6=ID_APP_EXIT +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_EDIT_COPY +Command10=ID_EDIT_PASTE +Command11=ID_EDIT_CLEAR_ALL +Command12=ID_PEN_THICK_OR_THIN +Command13=ID_PEN_WIDTHS +Command14=ID_VIEW_TOOLBAR +Command15=ID_VIEW_STATUS_BAR +Command16=ID_WINDOW_NEW +Command17=ID_WINDOW_CASCADE +Command18=ID_WINDOW_TILE_HORZ +Command19=ID_WINDOW_DUPLICATE +Command20=ID_WINDOW_ARRANGE +Command21=ID_ZOOM_UP +Command22=ID_ZOOM_DOWN +Command23=ID_ZOOM_TOWINDOW +Command24=ID_ZOOM_100 +Command25=ID_APP_ABOUT +CommandCount=25 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_VIEW_TOOLBAR +Command5=ID_VIEW_STATUS_BAR +Command6=ID_APP_ABOUT +CommandCount=6 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_SAVE +Command5=ID_EDIT_PASTE +Command6=ID_EDIT_UNDO +Command7=ID_EDIT_CUT +Command8=ID_HELP +Command9=ID_CONTEXT_HELP +Command10=ID_NEXT_PANE +Command11=ID_PREV_PANE +Command12=ID_EDIT_COPY +Command13=ID_EDIT_PASTE +Command14=ID_EDIT_CUT +Command15=ID_EDIT_UNDO +CommandCount=15 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CPP new file mode 100644 index 0000000..95fa507 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.CPP @@ -0,0 +1,141 @@ +// scribble.cpp : Defines the class behaviors for the application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "stdafx.h" +#include "UTSampleabout.h" +#include "scribble.h" + +#include "mainfrm.h" +//#include "scribfrm.h" +#include "scribdoc.h" +#include "scribvw.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp + +BEGIN_MESSAGE_MAP(CScribbleApp, CWinApp) + //{{AFX_MSG_MAP(CScribbleApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + // Standard print setup command +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp construction + +CScribbleApp::CScribbleApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CScribbleApp object + +CScribbleApp NEAR theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp initialization + +BOOL CScribbleApp::InitInstance() +{ + // 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. + + LoadStdProfileSettings(); // Load standard INI file options (including MRU) + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Register the application's document templates. Document templates + // serve as the connection between documents, frame windows and views. + + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate( + IDR_SCRIBTYPE, + RUNTIME_CLASS(CScribDoc), + RUNTIME_CLASS(CMDIChildWnd), + RUNTIME_CLASS(CScribView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // enable file manager drag/drop and DDE Execute open + EnableShellOpen(); + RegisterShellFileTypes(); + + + // simple command line parsing + if (m_lpCmdLine[0] == '\0') + { + // create a new (empty) document + OnFileNew(); + } + else + { + // open an existing document + OpenDocumentFile(m_lpCmdLine); + } + + m_pMainWnd->DragAcceptFiles(); + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +int CScribbleApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CScribbleApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE);; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.H new file mode 100644 index 0000000..851786f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.H @@ -0,0 +1,44 @@ +// scribble.h : main header file for the SCRIBBLE application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp: +// See scribble.cpp for the implementation of this class +// + +class CScribbleApp : public CWinApp +{ +public: + CScribbleApp(); + +// Overrides + virtual BOOL InitInstance(); + virtual int ExitInstance(); + +// Implementation + + //{{AFX_MSG(CScribbleApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.RC b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.RC new file mode 100644 index 0000000..b58f358 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBBLE.RC @@ -0,0 +1,340 @@ +// 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 + "#include ""utsampleabout.rc""\r\n" + "#include ""res\\scribble.rc2"" // non-App Studio edited resources\r\n" + "\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""afxprint.rc"" // printing/print preview resources\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\\SCRIBBLE.ICO" +IDR_SCRIBTYPE ICON "RES\\SCRIBDOC.ICO" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP "RES\\TOOLBAR.BMP" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + 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 SCRIBBLE...", ID_APP_ABOUT + END +END + +IDR_SCRIBTYPE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + 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 + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + 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 "&Duplicate", ID_WINDOW_DUPLICATE + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + END + POPUP "&Zoom" + BEGIN + MENUITEM "Zoom &Up", ID_ZOOM_UP + MENUITEM "Zoom &Down", ID_ZOOM_DOWN + MENUITEM "Zoom to &Window", ID_ZOOM_TOWINDOW + MENUITEM SEPARATOR + MENUITEM "100%", ID_ZOOM_100 + END + POPUP "&Help" + BEGIN + MENUITEM "&About SCRIBBLE...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_PEN_WIDTHS DIALOG 3, 4, 170, 90 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Pen Widths" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_THIN_PEN_WIDTH,73,6,17,13,ES_AUTOHSCROLL + EDITTEXT IDC_THICK_PEN_WIDTH,73,23,17,13,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,63,61,37,14,WS_GROUP + PUSHBUTTON "Cancel",IDCANCEL,113,62,37,13,WS_GROUP + PUSHBUTTON "Default",IDC_DEFAULT_PEN_WIDTHS,13,62,37,13,WS_GROUP + LTEXT "Thick Pen Width:",IDC_STATIC,9,26,60,9,WS_TABSTOP + LTEXT "Thin Pen Width:",IDC_STATIC,9,9,57,9,WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDR_MAINFRAME "SCRIBBLE Windows Application" + IDR_SCRIBTYPE "\nScrib\nSCRIB Document\nSCRIB Files (*.scb)\n.scb\nScribFileType\nSCRIB File Type" +END + +STRINGTABLE +BEGIN + AFX_IDS_APP_TITLE "SCRIBBLE Windows Application" + 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" + ID_INDICATOR_ZOOM "1000%" +END + +STRINGTABLE +BEGIN + ID_FILE_NEW "Create a new document" + ID_FILE_OPEN "Open an existing document" + ID_FILE_CLOSE "Close the active document" + ID_FILE_SAVE "Save the active document" + ID_FILE_SAVE_AS "Save the active document with a new name" + ID_FILE_PAGE_SETUP "Change the printing options" + ID_FILE_PRINT_SETUP "Change the printer and printing options" + ID_FILE_PRINT "Print the active document" + ID_FILE_PRINT_PREVIEW "Display full pages" +END + +STRINGTABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright" + ID_APP_EXIT "Quit the application; prompts to save documents" +END + +STRINGTABLE +BEGIN + 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" +END + +STRINGTABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane" + ID_PREV_PANE "Switch back to the previous window pane" +END + +STRINGTABLE +BEGIN + ID_WINDOW_NEW "Open another window for the active document" + ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window" + ID_WINDOW_CASCADE "Arrange windows so they overlap" + ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles" + ID_WINDOW_TILE_VERT "Arrange windows as non-overlapping tiles" + ID_WINDOW_SPLIT "Split the active window into panes" +END + +STRINGTABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection" + ID_EDIT_CLEAR_ALL "Clears the drawing" + ID_EDIT_COPY "Copy the selection and puts it on the Clipboard" + ID_EDIT_CUT "Cut the selection and puts it on the Clipboard" + ID_EDIT_FIND "Find the specified text" + ID_EDIT_PASTE "Insert Clipboard contents" + ID_EDIT_REPEAT "Repeat the last action" + ID_EDIT_REPLACE "Replace specific text with different text" + ID_EDIT_SELECT_ALL "Select the entire document" + ID_EDIT_UNDO "Undo the last action" + ID_EDIT_REDO "Redo the previously undone action" +END + +STRINGTABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar" + ID_VIEW_STATUS_BAR "Show or hide the status bar" +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" +END + +STRINGTABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE +BEGIN + ID_PEN_THICK_OR_THIN "Toggles line thickness between thin and thick" + ID_PEN_WIDTHS "Changes the size of the thin and thick pen" + ID_ZOOM_100 "Zoom to 100%" + ID_ZOOM_UP "Zoom the document up" + ID_ZOOM_DOWN "Zoom the document down" + ID_ZOOM_TOWINDOW "Zoom the document to fill the window" + ID_WINDOW_DUPLICATE "Create an additional Window" +END + +STRINGTABLE +BEGIN + ID_DESCRIPTION_FILE "zoomviewInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#include "res\scribble.rc2" // non-App Studio edited resources + +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.CPP new file mode 100644 index 0000000..a6cca43 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.CPP @@ -0,0 +1,309 @@ +// scribdoc.cpp : implementation of the CScribDoc class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "stdafx.h" +#include "scribble.h" +#include "scribdoc.h" +#include "pendlg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribDoc + +IMPLEMENT_DYNCREATE(CScribDoc, CDocument) + +BEGIN_MESSAGE_MAP(CScribDoc, CDocument) + //{{AFX_MSG_MAP(CScribDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_COMMAND(ID_EDIT_CLEAR_ALL, OnEditClearAll) + ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR_ALL, OnUpdateEditClearAll) + ON_COMMAND(ID_PEN_THICK_OR_THIN, OnPenThickOrThin) + ON_UPDATE_COMMAND_UI(ID_PEN_THICK_OR_THIN, OnUpdatePenThickOrThin) + ON_COMMAND(ID_PEN_WIDTHS, OnPenWidths) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScribDoc construction/destruction + +CScribDoc::CScribDoc() +{ + // TODO: add one-time construction code here +} + +CScribDoc::~CScribDoc() +{ +} + +///////////////////////////////////////////////////////////////////////////// +void CScribDoc::DeleteContents() +{ + while (!m_strokeList.IsEmpty()) + { + delete m_strokeList.RemoveHead(); + } +} + +void CScribDoc::InitDocument() +{ + m_bThickPen = FALSE; + m_nThinWidth = 2; // default thin pen is 2 pixels wide + m_nThickWidth = 5; // default thick pen is 5 pixels wide + ReplacePen(); // initialze pen according to current width + + // default document size is 6 x 4 inches, measures in MM_LOENGLISH + // (0.01 inches). Origin is bottom left. + m_rectDoc = CRect(0,400,600,0); + +} + +BOOL CScribDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + InitDocument(); + return TRUE; +} + +BOOL CScribDoc::OnOpenDocument(LPCTSTR pszPathName) +{ + if (!CDocument::OnOpenDocument(pszPathName)) + return FALSE; + InitDocument(); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CScribDoc serialization + +void CScribDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + ar << m_rectDoc; + } + else + { + ar >> m_rectDoc; + } + m_strokeList.Serialize(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CScribDoc diagnostics + +#ifdef _DEBUG +void CScribDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CScribDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScribDoc commands + +void CScribDoc::OnEditClearAll() +{ + DeleteContents(); + SetModifiedFlag(); // Mark the document as having been modified, for + // purposes of confirming File Close. + UpdateAllViews(NULL); +} + +void CScribDoc::OnUpdateEditClearAll(CCmdUI* pCmdUI) +{ + // Enable the command user interface object (menu item or tool bar + // button) if the document is non-empty, i.e., has at least one stroke. + pCmdUI->Enable(!m_strokeList.IsEmpty()); +} + + +///////////////////////////////////////////////////////////////////////////// +void CScribDoc::OnPenThickOrThin() +{ + // Toggle the state of the pen between thin or thick. + m_bThickPen = !m_bThickPen; + + // Change the current pen to reflect the new user-specified width. + ReplacePen(); +} + + +///////////////////////////////////////////////////////////////////////////// +void CScribDoc::OnUpdatePenThickOrThin(CCmdUI* pCmdUI) +{ + // Add check mark to Draw Thick Line menu item, if the current + // pen width is "thick". + pCmdUI->SetCheck(m_bThickPen); +} + + +///////////////////////////////////////////////////////////////////////////// +void CScribDoc::OnPenWidths() +{ + CPenWidthsDlg dlg; + // Initialize dialog data + dlg.m_nThinWidth = m_nThinWidth; + dlg.m_nThickWidth = m_nThickWidth; + + // Invoke the dialog box + if (dlg.DoModal() == IDOK) + { + // retrieve the dialog data + m_nThinWidth = dlg.m_nThinWidth; + m_nThickWidth = dlg.m_nThickWidth; + + // Update the pen that is used by views when drawing new strokes, + // to reflect the new pen width definitions for "thick" and "thin". + ReplacePen(); + } +} + +///////////////////////////////////////////////////////////////////////////// +void CScribDoc::ReplacePen() +{ + m_nPenWidth = m_bThickPen? m_nThickWidth : m_nThinWidth; + + // Change the current pen to reflect the new user-specified width. + m_penCur.DeleteObject(); + m_penCur.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)); // solid black +} + +///////////////////////////////////////////////////////////////////////////// +CStroke* CScribDoc::NewStroke() +{ + CStroke* pStrokeItem = new CStroke(m_nPenWidth); + m_strokeList.AddTail(pStrokeItem); + SetModifiedFlag(); // Mark the document as having been modified, for + // purposes of confirming File Close. + return pStrokeItem; +} + +///////////////////////////////////////////////////////////////////////////// +POSITION CScribDoc::GetFirstStrokePos() +{ + return m_strokeList.GetHeadPosition(); +} + + +///////////////////////////////////////////////////////////////////////////// +CStroke* CScribDoc::GetNextStroke(POSITION& pos) +{ + return (CStroke*)m_strokeList.GetNext(pos); +} + + +///////////////////////////////////////////////////////////////////////////// +// CStroke + +// Each time we change what gets serialized, we change the +// schema number. +IMPLEMENT_SERIAL(CStroke, CObject, 2) + +///////////////////////////////////////////////////////////////////////////// +CStroke::CStroke() +{ + // this empty constructor should be used by serialization only +} + +///////////////////////////////////////////////////////////////////////////// +CStroke::CStroke(UINT nPenWidth) +{ + m_nPenWidth = nPenWidth; + m_rectBounding.SetRectEmpty(); +} + +///////////////////////////////////////////////////////////////////////////// +void CStroke::AddPoint(CPoint pt) +{ + m_pointArray.Add(MAKELONG(pt.x, pt.y)); +} + +///////////////////////////////////////////////////////////////////////////// +BOOL CStroke::DrawStroke(CDC* pDC) +{ + CPen penStroke; + if (!penStroke.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0))) + return FALSE; + CPen* pOldPen = pDC->SelectObject(&penStroke); + pDC->MoveTo(GetPoint(0)); + for (int i=1; i < m_pointArray.GetSize(); i++) + { + pDC->LineTo(GetPoint(i)); + } + + pDC->SelectObject(pOldPen); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +void CStroke::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + ar << m_rectBounding; + ar << (WORD)m_nPenWidth; + m_pointArray.Serialize(ar); + } + else + { + ar >> m_rectBounding; + WORD w; + ar >> w; + m_nPenWidth = w; + m_pointArray.Serialize(ar); + } +} + +///////////////////////////////////////////////////////////////////////////// +void CStroke::FinishStroke() +{ + // Calculate the bounding rectangle. It's needed for smart + // repainting. + + if (m_pointArray.GetSize()==0) + { + m_rectBounding.SetRectEmpty(); + return; + } + CPoint pt = GetPoint(0); + m_rectBounding = CRect(pt.x, pt.y, pt.x, pt.y); + + for (int i=1; i < m_pointArray.GetSize(); i++) + { + // If the point lies outside of the accumulated bounding + // rectangle, then inflate the bounding rect to include it. + pt = GetPoint(i); + m_rectBounding.left = __min(m_rectBounding.left, pt.x); + m_rectBounding.right = __max(m_rectBounding.right, pt.x); + m_rectBounding.top = __max(m_rectBounding.top, pt.y); + m_rectBounding.bottom = __min(m_rectBounding.bottom, pt.y); + } + + // Add the pen width to the bounding rectangle. This is necessary + // to account for the width of the stroke when invalidating + // the screen. + m_rectBounding.InflateRect(CSize(m_nPenWidth, -(int)m_nPenWidth)); + return; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.H new file mode 100644 index 0000000..9bfd746 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBDOC.H @@ -0,0 +1,119 @@ +// scribdoc.h : interface of the CScribDoc class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +class CStroke; + +class CScribDoc : public CDocument +{ +protected: // create from serialization only + CScribDoc(); + DECLARE_DYNCREATE(CScribDoc) + +// Attributes +protected: + CObList m_strokeList; // Each member of the list is a CStroke + + // The document keeps track of the current pen width on behalf of + // all views. We'd like the user interface of Scribble to be such + // that if the user chooses the Draw Thick Line command, it will apply + // to all views, not just the view that currently has the focus. + + BOOL m_bThickPen; // TRUE if current pen is thick + UINT m_nThinWidth; + UINT m_nThickWidth; + CPen m_penCur; // pen created according to + // user-selected pen style (width) +public: + UINT m_nPenWidth; // current user-selected pen width + CPen* GetCurrentPen() { return &m_penCur; } + +protected: + CRect m_rectDoc; +public: + CRect& GetDocRect() { return m_rectDoc; } + +// Operations +public: + void DeleteContents(); + CStroke* NewStroke(); + POSITION GetFirstStrokePos(); + CStroke* GetNextStroke(POSITION& pos); + +// Implementation +protected: + void ReplacePen(); + +public: + virtual ~CScribDoc(); + virtual void Serialize(CArchive& ar); // overridden for document i/o +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif +protected: + void InitDocument(); + virtual BOOL OnNewDocument(); + virtual BOOL OnOpenDocument(LPCTSTR pszPathName); + +// Generated message map functions +protected: + //{{AFX_MSG(CScribDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + afx_msg void OnEditClearAll(); + afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI); + afx_msg void OnPenThickOrThin(); + afx_msg void OnUpdatePenThickOrThin(CCmdUI* pCmdUI); + afx_msg void OnPenWidths(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// +// class CStroke +// +// A stroke is a series of connected points in the scribble drawing. +// A scribble document may have multiple strokes. + +class CStroke : public CObject +{ +public: + CStroke(UINT nPenWidth); + +protected: + CStroke(); + DECLARE_SERIAL(CStroke) + +// Attributes + UINT m_nPenWidth; // one pen width applies to entire stroke + CDWordArray m_pointArray; // series of connected points + CRect m_rectBounding; // smallest rect that surrounds all + // of the points in the stroke + // measured in MM_LOENGLISH units + // (0.01 inches, with Y-axis inverted) +public: + CRect& GetBoundingRect() { return m_rectBounding; } + +// Operations +public: + void AddPoint(CPoint pt); + BOOL DrawStroke(CDC* pDC); + void FinishStroke(); + +// Helper functions +protected: + CPoint GetPoint(int i) const { return CPoint(m_pointArray[i]); } + +public: + virtual void Serialize(CArchive& ar); +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.CPP new file mode 100644 index 0000000..4649b69 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.CPP @@ -0,0 +1,349 @@ +// scribvw.cpp : implementation of the CScribView class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + + +#include "stdafx.h" +#include "scribble.h" + +#include "scribdoc.h" +#include "scribvw.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribView + +IMPLEMENT_DYNCREATE(CScribView, COXZoomView) + + +BEGIN_MESSAGE_MAP(CScribView, COXZoomView) + //{{AFX_MSG_MAP(CScribView) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_MOUSEMOVE() + ON_COMMAND(ID_ZOOM_100, OnZoom100) + ON_UPDATE_COMMAND_UI(ID_ZOOM_100, OnUpdateZoom100) + ON_WM_RBUTTONDOWN() + ON_COMMAND(ID_ZOOM_TOWINDOW, OnZoomToWindow) + ON_UPDATE_COMMAND_UI(ID_INDICATOR_ZOOM, OnUpdateZoom) + ON_COMMAND(ID_ZOOM_UP, OnZoomUp) + ON_UPDATE_COMMAND_UI(ID_ZOOM_UP, OnUpdateZoomUp) + ON_COMMAND(ID_ZOOM_DOWN, OnZoomDown) + ON_UPDATE_COMMAND_UI(ID_ZOOM_DOWN, OnUpdateZoomDown) + ON_COMMAND(ID_WINDOW_DUPLICATE, OnWindowDuplicate) + //}}AFX_MSG_MAP + + // Standard printing commands + END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScribView construction/destruction + +CScribView::CScribView() +{ + // TODO: add construction code here + action = IDLE; +} + +CScribView::~CScribView() +{ +} + + + +///////////////////////////////////////////////////////////////////////////// +void CScribView::OnUpdate(CView*, LPARAM, CObject* pHint) +{ + // The document has informed this view that some data has changed. + + if (pHint != NULL) + { + if (pHint->IsKindOf(RUNTIME_CLASS(CStroke))) + { + // The hint is that a stroke as been added (or changed). + // So, invalidate its rectangle. + CStroke* pStroke = (CStroke*)pHint; + CClientDC dc(this); + OnPrepareDC(&dc); + CRect rectInvalid = pStroke->GetBoundingRect(); + dc.LPtoDP(&rectInvalid); + InvalidateRect(&rectInvalid); + return; + } + } + // We can't interpret the hint, so assume that anything might + // have been updated. + Invalidate(TRUE); + return; +} + +///////////////////////////////////////////////////////////////////////////// +// A view's OnInitialUpdate() overrideable function is called immediately +// after the frame window is created, and the view within the frame +// window is attached to its document. This provides the scroll view the +// opportunity to set its size (m_totalSize) based on the document size. +void CScribView::OnInitialUpdate() +{ + SetDeviceScrollSizesRelative(MM_LOENGLISH, GetDocument()->GetDocRect()); + //SetDeviceScrollSizesRelative(CSize(600,400), GetDocument()->GetDocRect()); + SetAlignToBottom( TRUE ); + SetZoomAlign( ZV_CENTER ); +} + + + +///////////////////////////////////////////////////////////////////////////// +// CScribView drawing + +void CScribView::OnDraw(CDC* pDC) +{ + CScribDoc* pDoc = GetDocument(); + + + // Get the invalidated rectangle of the view, or in the case + // of printing, the clipping region of the printer dc. + CRect rectClip; + CRect rectStroke; + pDC->GetClipBox(&rectClip); + pDC->LPtoDP(&rectClip); + if( !pDC->IsPrinting() ) + rectClip.InflateRect(1,1); + + // Note: COXZoomView::OnPaint() will have already adjusted the + // viewport origin before calling OnDraw(), to reflect the + // currently scrolled position. + + // The view delegates the drawing of individual strokes to + // CStroke::DrawStroke(). + for (POSITION pos = pDoc->GetFirstStrokePos(); pos != NULL; ) + { + CStroke* pStroke = pDoc->GetNextStroke(pos); + rectStroke = pStroke->GetBoundingRect(); + pDC->LPtoDP(&rectStroke); + if (!rectStroke.IntersectRect(&rectStroke, &rectClip)) + continue; + pStroke->DrawStroke(pDC); + } +} + + +///////////////////////////////////////////////////////////////////////////// +// CScribView diagnostics + +#ifdef _DEBUG +void CScribView::AssertValid() const +{ + COXZoomView::AssertValid(); +} + +void CScribView::Dump(CDumpContext& dc) const +{ + COXZoomView::Dump(dc); +} + +CScribDoc* CScribView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScribDoc))); + return (CScribDoc*) m_pDocument; +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScribView message handlers + +void CScribView::OnLButtonDown(UINT, CPoint point) +{ // When the user presses the mouse button, she may be + // starting a new stroke, or selecting or de-selecting a stroke. + + // COXZoomView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + if( action != IDLE ) return; + CClientDC dc(this); + OnPrepareDC(&dc); + CRect rcClip, rcClient; + rcClip = GetDocument()->GetDocRect(); + dc.LPtoDP( rcClip ); + GetClientRect( rcClient ); + rcClip.IntersectRect( rcClip, rcClient ); + CRect rcPen( 0, 0, GetDocument()->m_nPenWidth, 0 ); + dc.LPtoDP( rcPen ); + int i = rcPen.Width(); + i++; + i/=2; + rcClip.InflateRect( -i, -i ); + if( !rcClip.PtInRect( point ) ) + return; + ClientToScreen( rcClip ); + ::ClipCursor( rcClip ); + action = DRAWING; + dc.DPtoLP(&point); + + m_pStrokeCur = GetDocument()->NewStroke(); + m_pStrokeCur->AddPoint(point); // add first point to the new stroke + + SetCapture(); // Capture the mouse until button up. + m_ptPrev = point; // Serves as the MoveTo() anchor point for the + // LineTo() the next point, as the user drags the + // mouse. + + return; + +} + + +///////////////////////////////////////////////////////////////////////////// +void CScribView::OnLButtonUp(UINT, CPoint point) +{ + // Mouse button up is interesting in the Scribble application + // only if the user is currently drawing a new stroke by dragging + // the captured mouse. + + if( action != DRAWING ) return; + action = IDLE; + ::ClipCursor( NULL ); + CScribDoc* pDoc = GetDocument(); + + CClientDC dc(this); + + // COXZoomView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + OnPrepareDC(&dc); // set up mapping mode and viewport origin + dc.DPtoLP(&point); + + CPen* pOldPen = dc.SelectObject(pDoc->GetCurrentPen()); + dc.MoveTo(m_ptPrev); + dc.LineTo(point); + dc.SelectObject(pOldPen); + m_pStrokeCur->AddPoint(point); + + // Tell the stroke item that we're done adding points to it. + // This is so it can finish computing its bounding rectangle. + m_pStrokeCur->FinishStroke(); + + // Tell the other views that this stroke has been added + // so that they can invalidate this stroke's area in their + // client area. + pDoc->UpdateAllViews(this, 0L, m_pStrokeCur); + + ReleaseCapture(); // Release the mouse capture established at + // the beginning of the mouse drag. + return; +} + + +void CScribView::OnRButtonDown(UINT , CPoint point) +{ + if( action != IDLE ) return; + action = ZOOMING; + CRect rectZoom; + CZoomRect zoom; + if( zoom.TrackTheMouse( WM_RBUTTONUP, this, rectZoom, point ) ) + ZoomToRectangle( rectZoom ); + action = IDLE; + return; +} + +///////////////////////////////////////////////////////////////////////////// +void CScribView::OnMouseMove(UINT, CPoint point) +{ + // Mouse movement is interesting in the Scribble application + // only if the user is currently drawing a new stroke by dragging + // the captured mouse. + + switch( action ) + { + case DRAWING: + { + CClientDC dc(this); + // COXZoomView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + OnPrepareDC(&dc); + dc.DPtoLP(&point); + + m_pStrokeCur->AddPoint(point); + + // Draw a line from the previous detected point in the mouse + // drag to the current point. + CPen* pOldPen = dc.SelectObject(GetDocument()->GetCurrentPen()); + dc.MoveTo(m_ptPrev); + dc.LineTo(point); + dc.SelectObject(pOldPen); + m_ptPrev = point; + } + break; + } + return; +} + +void CScribView::OnZoom100() +{ + SetZoomLevel( 100 ); +} + +void CScribView::OnUpdateZoom100(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck( 100 == GetZoomLevel() ? 1 : 0 ); +} + + +void CScribView::OnZoomToWindow() +{ + ZoomToWindow(); +} + +void CScribView::OnUpdateZoom(CCmdUI* pCmdUI) +{ + TCHAR szBuf[10]; + UTBStr::stprintf(szBuf, 10, _T("%4i%%"), GetZoomLevel() ); + pCmdUI->Enable( TRUE ); + pCmdUI->SetText( szBuf ); +} + +void CScribView::OnZoomUp() +{ + int i = GetZoomLevel(); + i = MulDiv( 1000,i,707); + SetZoomLevel( i ); +} + +void CScribView::OnUpdateZoomUp(CCmdUI* pCmdUI) +{ + pCmdUI->Enable( 1000 > GetZoomLevel() ); +} + +void CScribView::OnZoomDown() +{ + int i = GetZoomLevel(); + i = MulDiv( 707,i,1000); + SetZoomLevel( i ); +} + +void CScribView::OnUpdateZoomDown(CCmdUI* pCmdUI) +{ + pCmdUI->Enable( 10 < GetZoomLevel() ); +} + +void CScribView::OnWindowDuplicate() +{ + CDocTemplate* pTempl = GetDocument()->GetDocTemplate(); + CFrameWnd* pFrame = pTempl->CreateNewFrame( GetDocument(), GetParentFrame() ); + pTempl->InitialUpdateFrame( pFrame, GetDocument() ); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.H new file mode 100644 index 0000000..ea7c9b4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/SCRIBVW.H @@ -0,0 +1,75 @@ +// scribvw.h : interface of the CScribView class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "OXZoomVw.h" // Should be REMARKED IF USING OXClass.h in stdafx.h + +// Derive the view from COXZoomView to add scrolling functionality. +class CScribView : public COXZoomView +{ +protected: // create from serialization only + CScribView(); + DECLARE_DYNCREATE(CScribView) + +// Attributes +public: + CScribDoc* GetDocument(); + +protected: + CStroke* m_pStrokeCur; // the stroke in progress + CPoint m_ptPrev; // the last mouse pt in the stroke in progress + CPoint m_ptStart; // starting point of zooming + + enum { IDLE, DRAWING, ZOOMING } action; + +// Operations +public: + +// Implementation +public: + virtual void OnInitialUpdate(); + virtual void OnUpdate(CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL); + virtual ~CScribView(); + virtual void OnDraw(CDC* pDC); // overridden to draw this view + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + + // Generated message map functions +protected: + //{{AFX_MSG(CScribView) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnZoom100(); + afx_msg void OnUpdateZoom100(CCmdUI* pCmdUI); + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnZoomToWindow(); + afx_msg void OnUpdateZoom(CCmdUI* pCmdUI); + afx_msg void OnZoomUp(); + afx_msg void OnUpdateZoomUp(CCmdUI* pCmdUI); + afx_msg void OnZoomDown(); + afx_msg void OnUpdateZoomDown(CCmdUI* pCmdUI); + afx_msg void OnWindowDuplicate(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in scribvw.cpp +inline CScribDoc* CScribView::GetDocument() + { return (CScribDoc*) m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.CPP new file mode 100644 index 0000000..055fa16 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.CPP @@ -0,0 +1,15 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.H new file mode 100644 index 0000000..a944f47 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/STDAFX.H @@ -0,0 +1,21 @@ +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and Microsoft +// QuickHelp and/or WinHelp documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include // MFC core and standard components +#include // MFC extensions (including VB) +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsp new file mode 100644 index 0000000..7c4bc85 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsp @@ -0,0 +1,290 @@ +# Microsoft Developer Studio Project File - Name="SCRIBBLE" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SCRIBBLE - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Scribble.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Scribble.mak" CFG="SCRIBBLE - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SCRIBBLE - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SCRIBBLE - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SCRIBBLE - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SCRIBBLE - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SCRIBBLE - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SCRIBBLE - Win32 Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G3 /MT /W4 /GX /Og /Ob1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"STDAFX.H" /c +# ADD CPP /nologo /G3 /MT /W4 /GX /Og /Ob1 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "GRAPHICS" /D "_MBCS" /Yu"STDAFX.H" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 oldnames.lib /nologo /stack:0x2800 /subsystem:windows /machine:IX86 +# ADD LINK32 /nologo /stack:0x2800 /subsystem:windows /machine:IX86 /out:"Scribble.exe" + +!ELSEIF "$(CFG)" == "SCRIBBLE - Win32 Debug" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"STDAFX.H" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"STDAFX.H" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 oldnames.lib /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 +# ADD LINK32 /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 /out:"Scribble.exe" + +!ELSEIF "$(CFG)" == "SCRIBBLE - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SCRIBBLE" +# PROP BASE Intermediate_Dir "SCRIBBLE" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G3 /MT /W4 /GX /Og /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "GRAPHICS" /D "_MBCS" /Yu"STDAFX.H" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G3 /MD /W4 /GX /Og /Ob1 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "GRAPHICS" /D "_MBCS" /D "_AFXDLL" /Yu"STDAFX.H" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x2800 /subsystem:windows /machine:IX86 /out:"Scribble.exe" +# ADD LINK32 /nologo /stack:0x2800 /subsystem:windows /machine:IX86 /out:"Scribble.exe" + +!ELSEIF "$(CFG)" == "SCRIBBLE - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SCRIBBL0" +# PROP BASE Intermediate_Dir "SCRIBBL0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"STDAFX.H" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"STDAFX.H" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x2800 /subsystem:windows /debug /machine:IX86 /out:"Scribble.exe" +# ADD LINK32 /nologo /stack:0x2800 /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:IX86 /out:"Scribble.exe" + +!ELSEIF "$(CFG)" == "SCRIBBLE - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SCRIBBL1" +# PROP BASE Intermediate_Dir "SCRIBBL1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G3 /MT /W4 /GX /Og /Ob1 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "GRAPHICS" /D "_MBCS" /Yu"STDAFX.H" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G3 /MD /W4 /GX /Og /Ob1 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "GRAPHICS" /D "_MBCS" /D "_UNICODE" /D "_AFXDLL" /Yu"STDAFX.H" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /stack:0x2800 /subsystem:windows /machine:IX86 /out:"Scribble.exe" +# ADD LINK32 /nologo /stack:0x2800 /entry:"wWinMainCRTStartup" /subsystem:windows /machine:IX86 /out:"Scribble.exe" + +!ENDIF + +# Begin Target + +# Name "SCRIBBLE - Win32 Release" +# Name "SCRIBBLE - Win32 Debug" +# Name "SCRIBBLE - Win32 Release_Shared" +# Name "SCRIBBLE - Win32 Unicode_Debug" +# Name "SCRIBBLE - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxzoomvw.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MAINFRM.CPP +# End Source File +# Begin Source File + +SOURCE=.\PENDLG.CPP +# End Source File +# Begin Source File + +SOURCE=.\SCRIBBLE.CPP +# End Source File +# Begin Source File + +SOURCE=.\SCRIBBLE.RC +# End Source File +# Begin Source File + +SOURCE=.\SCRIBDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\SCRIBVW.CPP +# End Source File +# Begin Source File + +SOURCE=.\STDAFX.CPP +# ADD BASE CPP /Yc"STDAFX.H" +# ADD CPP /Yc"STDAFX.H" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\MAINFRM.H +# End Source File +# Begin Source File + +SOURCE=.\PENDLG.H +# End Source File +# Begin Source File + +SOURCE=.\SCRIBBLE.H +# End Source File +# Begin Source File + +SOURCE=.\SCRIBDOC.H +# End Source File +# Begin Source File + +SOURCE=.\SCRIBVW.H +# End Source File +# Begin Source File + +SOURCE=.\STDAFX.H +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\RES\SCRIBBLE.ICO +# End Source File +# Begin Source File + +SOURCE=.\RES\SCRIBBLE.RC2 +# End Source File +# Begin Source File + +SOURCE=.\RES\SCRIBDOC.ICO +# End Source File +# Begin Source File + +SOURCE=.\RES\TOOLBAR.BMP +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Scribble.exe.manifest +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsw new file mode 100644 index 0000000..fc39bc7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SCRIBBLE"=".\Scribble.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + "$/Work/Ultimate Toolbox/Working/samples/gui/zoomvw", ARJBAAAA + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.vcproj new file mode 100644 index 0000000..1fd659f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/Scribble.vcproj @@ -0,0 +1,1028 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.ICO new file mode 100644 index 0000000..d0404d8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.RC2 new file mode 100644 index 0000000..4ed18d4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBBLE.RC2 @@ -0,0 +1,50 @@ +// +// SCRIBBLE.RC2 - resources AppStudio does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by AppStudio +#endif //APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// Version stamp for this .EXE + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE +#else + FILEFLAGS 0 // final version +#endif + FILEOS VOS_DOS_WINDOWS16 + FILETYPE VFT_APP + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilual + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SCRIBBLE MFC Application\0" + VALUE "FileVersion", "1.0.001\0" + VALUE "InternalName", "SCRIBBLE\0" + VALUE "LegalCopyright", "\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename","SCRIBBLE.EXE\0" + VALUE "ProductName", "SCRIBBLE\0" + VALUE "ProductVersion", "1.0.001\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + // English language (0x409) and the Windows ANSI codepage (1252) + END +END + +///////////////////////////////////////////////////////////////////////////// +// Add additional manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBDOC.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBDOC.ICO new file mode 100644 index 0000000..73372c4 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/SCRIBDOC.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/TOOLBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/TOOLBAR.BMP new file mode 100644 index 0000000..b057e3d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/res/TOOLBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/resource.h new file mode 100644 index 0000000..f19464d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SCRIBBLE.RC +// +#define IDR_MAINFRAME 2 +#define IDR_SCRIBTYPE 3 +#define IDD_ABOUTBOX 100 +#define IDD_PEN_WIDTHS 101 +#define IDC_THIN_PEN_WIDTH 104 +#define IDC_THICK_PEN_WIDTH 105 +#define IDC_DEFAULT_PEN_WIDTHS 106 +#define ID_PEN_THICK_OR_THIN 32768 +#define ID_PEN_WIDTHS 32769 +#define ID_ZOOM_25 32770 +#define ID_ZOOM_50 32771 +#define ID_ZOOM_100 32772 +#define ID_ZOOM_200 32773 +#define ID_ZOOM_400 32774 +#define ID_ZOOM_ZOOMUP 32775 +#define ID_ZOOM_ZOOMDOWN 32776 +#define ID_ZOOM_ZOOMTOWINDOW 32777 +#define ID_ZOOM_UP 32778 +#define ID_ZOOM_DOWN 32779 +#define ID_ZOOM_TOWINDOW 32780 +#define ID_WINDOW_DUPLICATE 32781 +#define ID_INDICATOR_ZOOM 59142 +#define ID_DESCRIPTION_FILE 61216 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_COMMAND_VALUE 32782 +#define _APS_NEXT_CONTROL_VALUE 107 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/zoomviewInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/zoomviewInfo.rtf new file mode 100644 index 0000000..e965616 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/gui/zoomvw/zoomviewInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.clw new file mode 100644 index 0000000..b71bd51 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.clw @@ -0,0 +1,81 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CListBoxDemoDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ListBoxDemo.h" + +ClassCount=3 +Class1=CListBoxDemoApp +Class2=CListBoxDemoDlg +Class3=CAboutDlg + +ResourceCount=5 +Resource1=IDD_ABOUTBOX +Resource2=IDR_MAINFRAME +Resource3=IDD_LISTBOXDEMO_DIALOG +Resource4=IDD_ABOUTBOX (English (U.S.)) +Resource5=IDD_LISTBOXDEMO_DIALOG (English (U.S.)) + +[CLS:CListBoxDemoApp] +Type=0 +HeaderFile=ListBoxDemo.h +ImplementationFile=ListBoxDemo.cpp +Filter=N + +[CLS:CListBoxDemoDlg] +Type=0 +HeaderFile=ListBoxDemoDlg.h +ImplementationFile=ListBoxDemoDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=IDC_BTNREMOVE + +[CLS:CAboutDlg] +Type=0 +HeaderFile=ListBoxDemoDlg.h +ImplementationFile=ListBoxDemoDlg.cpp +Filter=D + +[DLG:IDD_ABOUTBOX] +Type=1 +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 +Class=CAboutDlg + + +[DLG:IDD_LISTBOXDEMO_DIALOG] +Type=1 +ControlCount=3 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,static,1342308352 +Class=CListBoxDemoDlg + +[DLG:IDD_LISTBOXDEMO_DIALOG (English (U.S.))] +Type=1 +Class=CListBoxDemoDlg +ControlCount=7 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_LIST1,listbox,1352728931 +Control4=IDC_EDIT,edit,1350631552 +Control5=IDC_BTNADD,button,1342242816 +Control6=IDC_BTNREMOVE,button,1342242816 +Control7=IDC_CHKSORT,button,1342242819 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.cpp new file mode 100644 index 0000000..9c25646 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.cpp @@ -0,0 +1,74 @@ +// ListBoxDemo.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ListBoxDemo.h" +#include "ListBoxDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoApp + +BEGIN_MESSAGE_MAP(CListBoxDemoApp, CWinApp) + //{{AFX_MSG_MAP(CListBoxDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoApp construction + +CListBoxDemoApp::CListBoxDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CListBoxDemoApp object + +CListBoxDemoApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoApp initialization + +BOOL CListBoxDemoApp::InitInstance() +{ + 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. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + CListBoxDemoDlg dlg; + m_pMainWnd = &dlg; + int 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; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsp new file mode 100644 index 0000000..f720915 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsp @@ -0,0 +1,152 @@ +# Microsoft Developer Studio Project File - Name="ListBoxDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ListBoxDemo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ListBoxDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ListBoxDemo.mak" CFG="ListBoxDemo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ListBoxDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ListBoxDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ListBoxDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "ListBoxDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ListBoxDemo - Win32 Release" +# Name "ListBoxDemo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTB" + +# PROP Default_Filter ".cpp" +# Begin Source File + +SOURCE=..\..\..\source\OXListBoxEx.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ListBoxDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\ListBoxDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\ListBoxDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ListBoxDemo.h +# End Source File +# Begin Source File + +SOURCE=.\ListBoxDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ListBoxDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ListBoxDemo.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsw new file mode 100644 index 0000000..3ea3d32 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ListBoxDemo"=".\ListBoxDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.h new file mode 100644 index 0000000..c02e082 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.h @@ -0,0 +1,49 @@ +// ListBoxDemo.h : main header file for the LISTBOXDEMO application +// + +#if !defined(AFX_LISTBOXDEMO_H__1A90F7B7_5A11_4469_8CD8_241B1FA14DFA__INCLUDED_) +#define AFX_LISTBOXDEMO_H__1A90F7B7_5A11_4469_8CD8_241B1FA14DFA__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoApp: +// See ListBoxDemo.cpp for the implementation of this class +// + +class CListBoxDemoApp : public CWinApp +{ +public: + CListBoxDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CListBoxDemoApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CListBoxDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LISTBOXDEMO_H__1A90F7B7_5A11_4469_8CD8_241B1FA14DFA__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.rc new file mode 100644 index 0000000..27208c2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemo.rc @@ -0,0 +1,225 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About ListBoxDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "ListBoxDemo Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2006",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_LISTBOXDEMO_DIALOG DIALOGEX 0, 0, 320, 200 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "ListBoxDemo" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,260,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,260,23,50,14 + LISTBOX IDC_LIST1,13,41,145,132,LBS_SORT | LBS_OWNERDRAWVARIABLE | + LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_EDIT,189,54,87,14,ES_AUTOHSCROLL + PUSHBUTTON "Add",IDC_BTNADD,211,85,50,14 + PUSHBUTTON "Remove",IDC_BTNREMOVE,211,108,50,14 + CONTROL "Sort list box",IDC_CHKSORT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,213,140,52,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ListBoxDemo MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ListBoxDemo\0" + VALUE "LegalCopyright", "Copyright (C) 2006\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ListBoxDemo.EXE\0" + VALUE "ProductName", "ListBoxDemo Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_LISTBOXDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 193 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About ListBoxDemo..." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Australia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ListBoxDemo.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 DISCARDABLE "res\\ListBoxDemo.ico" +#endif // English (Australia) 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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ListBoxDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.cpp new file mode 100644 index 0000000..d2900f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.cpp @@ -0,0 +1,213 @@ +// ListBoxDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ListBoxDemo.h" +#include "ListBoxDemoDlg.h" +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoDlg dialog + +CListBoxDemoDlg::CListBoxDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CListBoxDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CListBoxDemoDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CListBoxDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CListBoxDemoDlg) + DDX_Control(pDX, IDC_LIST1, m_ListBox); + DDX_Control(pDX, IDC_EDIT, m_TextToAdd); + DDX_Control(pDX, IDC_CHKSORT, m_chkSort); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CListBoxDemoDlg, CDialog) + //{{AFX_MSG_MAP(CListBoxDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CHKSORT, OnChksort) + ON_BN_CLICKED(IDC_BTNADD, OnBtnadd) + ON_BN_CLICKED(IDC_BTNREMOVE, OnBtnremove) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoDlg message handlers + +BOOL CListBoxDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + m_ListBox.ModifyStyle(0, LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CListBoxDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CListBoxDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CListBoxDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CListBoxDemoDlg::OnChksort() +{ + if (m_chkSort.GetCheck()) + { + m_ListBox.ModifyStyle(0, LBS_SORT); + } + else + { + m_ListBox.ModifyStyle(LBS_SORT, 0); + } +} + +void CListBoxDemoDlg::OnBtnadd() +{ + CFont font; + font.Attach(this->GetFont()); + CString text; + m_TextToAdd.GetWindowText(text); + int nIndex = //m_ListBox.InsertString(0, text); + m_ListBox.AddString(text); + + m_ListBox.SetItemIndent(nIndex,0); + m_ListBox.SetItemTextColor(nIndex, RGB(rand() * 255/ RAND_MAX, rand() * 255/ RAND_MAX,rand() * 255/ RAND_MAX)); + m_ListBox.SetItemBkColor(nIndex, RGB(rand() * 255/ RAND_MAX, rand() * 255/ RAND_MAX,rand() * 255/ RAND_MAX)); + m_ListBox.SetItemTooltipText(nIndex, _TEXT("tooltip")); + m_ListBox.SetItemFont(nIndex,GetFont()); + +} + +void CListBoxDemoDlg::OnBtnremove() +{ + int nIndex=m_ListBox.GetCurSel(); + m_ListBox.DeleteString(nIndex); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.h new file mode 100644 index 0000000..0f4e37f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ListBoxDemoDlg.h @@ -0,0 +1,54 @@ +// ListBoxDemoDlg.h : header file +// + +#if !defined(AFX_LISTBOXDEMODLG_H__827DCE60_D0A0_42E2_8CE3_C119889FCE03__INCLUDED_) +#define AFX_LISTBOXDEMODLG_H__827DCE60_D0A0_42E2_8CE3_C119889FCE03__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CListBoxDemoDlg dialog + +class CListBoxDemoDlg : public CDialog +{ +// Construction +public: + CListBoxDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CListBoxDemoDlg) + enum { IDD = IDD_LISTBOXDEMO_DIALOG }; + COXListBoxEx m_ListBox; + CEdit m_TextToAdd; + CButton m_chkSort; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CListBoxDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CListBoxDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnChksort(); + afx_msg void OnBtnadd(); + afx_msg void OnBtnremove(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LISTBOXDEMODLG_H__827DCE60_D0A0_42E2_8CE3_C119889FCE03__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ReadMe.txt new file mode 100644 index 0000000..5f37e9a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : ListBoxDemo +======================================================================== + + +AppWizard has created this ListBoxDemo 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 ListBoxDemo application. + +ListBoxDemo.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +ListBoxDemo.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CListBoxDemoApp application class. + +ListBoxDemo.cpp + This is the main application source file that contains the application + class CListBoxDemoApp. + +ListBoxDemo.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++. + +ListBoxDemo.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\ListBoxDemo.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file ListBoxDemo.rc. + +res\ListBoxDemo.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. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +ListBoxDemoDlg.h, ListBoxDemoDlg.cpp - the dialog + These files contain your CListBoxDemoDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in ListBoxDemo.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named ListBoxDemo.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. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.cpp new file mode 100644 index 0000000..88d9ad7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ListBoxDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.h new file mode 100644 index 0000000..a068189 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A568A775_543A_4200_9CC2_38D7F42BA19D__INCLUDED_) +#define AFX_STDAFX_H__A568A775_543A_4200_9CC2_38D7F42BA19D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 + +#include "OXListBoxEx.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A568A775_543A_4200_9CC2_38D7F42BA19D__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.rc2 new file mode 100644 index 0000000..2c0433f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/res/ListBoxDemo.rc2 @@ -0,0 +1,13 @@ +// +// LISTBOXDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/resource.h new file mode 100644 index 0000000..844db70 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/new/ListBoxDemo/resource.h @@ -0,0 +1,25 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ListBoxDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_LISTBOXDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_LIST1 1000 +#define IDC_EDIT 1001 +#define IDC_BTNADD 1002 +#define IDC_BTNREMOVE 1003 +#define IDC_CHKSORT 1004 + +// 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 1005 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.clw new file mode 100644 index 0000000..3ee1722 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.clw @@ -0,0 +1,164 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CCompDialog +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ActiveDesktop.h" + +ClassCount=4 +Class1=CActiveDesktopApp +Class2=CActiveDesktopDlg +Class3=CAboutDlg + +ResourceCount=7 +Resource1=IDD_DIALOG_COMPT (English (U.S.)) +Resource2=IDR_MAINFRAME +Resource3=IDD_ABOUTBOX +Class4=CCompDialog +Resource4=IDD_ACTIVEDESKTOP_DIALOG +Resource5=IDD_ABOUTBOX (English (U.S.)) +Resource6=IDD_ACTIVEDESKTOP_DIALOG (English (U.S.)) +Resource7=IDD_DIALOG_COMPT + +[CLS:CActiveDesktopApp] +Type=0 +HeaderFile=ActiveDesktop.h +ImplementationFile=ActiveDesktop.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC + +[CLS:CActiveDesktopDlg] +Type=0 +HeaderFile=ActiveDesktopDlg.h +ImplementationFile=ActiveDesktopDlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC +LastObject=CActiveDesktopDlg + +[CLS:CAboutDlg] +Type=0 +HeaderFile=ActiveDesktopDlg.h +ImplementationFile=ActiveDesktopDlg.cpp +Filter=D + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[DLG:IDD_ACTIVEDESKTOP_DIALOG] +Type=1 +Class=CActiveDesktopDlg +ControlCount=18 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK_DESKTOP,button,1342242819 +Control4=IDC_CHECK_COMPS,button,1342242819 +Control5=IDC_LIST_MAIN,SysListView32,1350631433 +Control6=ID_NEW,button,1342242816 +Control7=ID_REMOVE,button,1476460544 +Control8=ID_EDIT,button,1476460544 +Control9=IDC_STATIC_WALLPAPER,static,1342308352 +Control10=IDC_EDIT_WALLPAPER,edit,1350631552 +Control11=IDC_STATIC_PATTERN_NAME,static,1342308352 +Control12=IDC_STATIC_PATTERN,static,1350565902 +Control13=ID_APPLY,button,1476460544 +Control14=IDC_COMBO_WOPT,combobox,1344348163 +Control15=ID_REFRESH,button,1342242816 +Control16=IDC_STATIC_MAIN,button,1342177287 +Control17=IDC_STATIC_WALL,button,1342177287 +Control18=IDC_STATIC_FILENAME,static,1342308352 + +[DLG:IDD_DIALOG_COMPT] +Type=1 +Class=CCompDialog +ControlCount=17 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC_SOURCE,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_CHECK_SCROLLABLE,button,1342242819 +Control8=IDC_CHECK_SIZEABLE,button,1342242819 +Control9=IDC_CHECK_ENABLE,button,1342242819 +Control10=IDC_EDIT_NAME,edit,1350631552 +Control11=IDC_EDIT_SOURCE,edit,1350631552 +Control12=IDC_EDIT_WIDTH,edit,1350631552 +Control13=IDC_EDIT_HEIGHT,edit,1350631552 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_EDIT_LEFT,edit,1350631552 +Control17=IDC_EDIT_TOP,edit,1350631552 + +[CLS:CCompDialog] +Type=0 +HeaderFile=CompDialog.h +ImplementationFile=CompDialog.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=IDOK + +[DLG:IDD_DIALOG_COMPT (English (U.S.))] +Type=1 +Class=? +ControlCount=17 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC_SOURCE,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_CHECK_SCROLLABLE,button,1342242819 +Control8=IDC_CHECK_SIZEABLE,button,1342242819 +Control9=IDC_CHECK_ENABLE,button,1342242819 +Control10=IDC_EDIT_NAME,edit,1350631552 +Control11=IDC_EDIT_SOURCE,edit,1350631552 +Control12=IDC_EDIT_WIDTH,edit,1350631552 +Control13=IDC_EDIT_HEIGHT,edit,1350631552 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_EDIT_LEFT,edit,1350631552 +Control17=IDC_EDIT_TOP,edit,1350631552 + +[DLG:IDD_ACTIVEDESKTOP_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=18 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK_DESKTOP,button,1342242819 +Control4=IDC_CHECK_COMPS,button,1342242819 +Control5=IDC_LIST_MAIN,SysListView32,1350631433 +Control6=ID_NEW,button,1342242816 +Control7=ID_REMOVE,button,1476460544 +Control8=ID_EDIT,button,1476460544 +Control9=IDC_STATIC_WALLPAPER,static,1342308352 +Control10=IDC_EDIT_WALLPAPER,edit,1350631552 +Control11=IDC_STATIC_PATTERN_NAME,static,1342308352 +Control12=IDC_STATIC_PATTERN,static,1350565902 +Control13=ID_APPLY,button,1476460544 +Control14=IDC_COMBO_WOPT,combobox,1344348163 +Control15=ID_REFRESH,button,1342242816 +Control16=IDC_STATIC_MAIN,button,1342177287 +Control17=IDC_STATIC_WALL,button,1342177287 +Control18=IDC_STATIC_FILENAME,static,1342308352 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.cpp new file mode 100644 index 0000000..bc98e43 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.cpp @@ -0,0 +1,107 @@ +// ActiveDesktop.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ActiveDesktop.h" +#include "ActiveDesktopDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopApp + +BEGIN_MESSAGE_MAP(CActiveDesktopApp, CWinApp) + //{{AFX_MSG_MAP(CActiveDesktopApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopApp construction + +CActiveDesktopApp::CActiveDesktopApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CActiveDesktopApp object + +CActiveDesktopApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopApp initialization + +BOOL CActiveDesktopApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + HRESULT hRslt=::CoInitialize(NULL); + if (FAILED(hRslt)) + { + TRACE0("::CoInitialize() failed.\n"); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CActiveDesktopDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CActiveDesktopApp::ExitInstance() +{ + ::CoUninitialize(); + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsp new file mode 100644 index 0000000..721fbf7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsp @@ -0,0 +1,285 @@ +# Microsoft Developer Studio Project File - Name="ActiveDesktop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ActiveDesktop - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ActiveDesktop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ActiveDesktop.mak" CFG="ActiveDesktop - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ActiveDesktop - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ActiveDesktop - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ActiveDesktop - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ActiveDesktop - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ActiveDesktop - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ActiveDesktop - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ActiveDesktop.exe" + +!ELSEIF "$(CFG)" == "ActiveDesktop - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ActiveDesktop.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ActiveDesktop - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ActiveDesktop___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "ActiveDesktop___Win32_DebugUnicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# SUBTRACT BASE CPP /WX +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ActiveDesktop.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ActiveDesktop.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ActiveDesktop - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ActiveDesktop___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "ActiveDesktop___Win32_ReleaseUnicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /WX +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ActiveDesktop.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ActiveDesktop.exe" + +!ELSEIF "$(CFG)" == "ActiveDesktop - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ActiveDesktop___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "ActiveDesktop___Win32_ReleaseShared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT BASE CPP /WX +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# SUBTRACT CPP /WX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ActiveDesktop.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ActiveDesktop.exe" + +!ENDIF + +# Begin Target + +# Name "ActiveDesktop - Win32 Release" +# Name "ActiveDesktop - Win32 Debug" +# Name "ActiveDesktop - Win32 DebugUnicode" +# Name "ActiveDesktop - Win32 ReleaseUnicode" +# Name "ActiveDesktop - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ActiveDesktop.cpp +# End Source File +# Begin Source File + +SOURCE=.\ActiveDesktop.rc +# End Source File +# Begin Source File + +SOURCE=.\ActiveDesktopDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\CompDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXActiveDesktop.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ActiveDesktop.h +# End Source File +# Begin Source File + +SOURCE=.\ActiveDesktopDlg.h +# End Source File +# Begin Source File + +SOURCE=.\CompDialog.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXActiveDesktop.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\UTSampleAbout.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ActiveDesktop.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ActiveDesktop.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsw new file mode 100644 index 0000000..2c3235b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ActiveDesktop"=".\ActiveDesktop.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.h new file mode 100644 index 0000000..1d57a1c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.h @@ -0,0 +1,50 @@ +// ActiveDesktop.h : main header file for the ACTIVEDESKTOP application +// + +#if !defined(AFX_ACTIVEDESKTOP_H__CD16C203_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) +#define AFX_ACTIVEDESKTOP_H__CD16C203_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopApp: +// See ActiveDesktop.cpp for the implementation of this class +// + +class CActiveDesktopApp : public CWinApp +{ +public: + CActiveDesktopApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CActiveDesktopApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CActiveDesktopApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ACTIVEDESKTOP_H__CD16C203_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.rc new file mode 100644 index 0000000..0f680a4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.rc @@ -0,0 +1,294 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ActiveDesktop.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc""\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 DISCARDABLE "res\\ActiveDesktop.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About ActiveDesktop" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "ActiveDesktop Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2000",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_ACTIVEDESKTOP_DIALOG DIALOGEX 0, 0, 258, 210 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "ActiveDesktop" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,40,189,50,14 + PUSHBUTTON "Cancel",IDCANCEL,93,189,50,14 + CONTROL "Enable Active Desktop",IDC_CHECK_DESKTOP,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,9,91,11 + CONTROL "Enable Components",IDC_CHECK_COMPS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,139,9,86,10 + CONTROL "List1",IDC_LIST_MAIN,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,14,92,173,77 + PUSHBUTTON "New ..",ID_NEW,194,117,50,14 + PUSHBUTTON "Remove",ID_REMOVE,194,154,50,14,WS_DISABLED + PUSHBUTTON "Edit ..",ID_EDIT,194,136,50,14,WS_DISABLED + LTEXT "Style",IDC_STATIC_WALLPAPER,15,61,21,10 + EDITTEXT IDC_EDIT_WALLPAPER,49,40,127,12,ES_AUTOHSCROLL + LTEXT "Pattern",IDC_STATIC_PATTERN_NAME,209,25,25,8 + CONTROL 130,IDC_STATIC_PATTERN,"Static",SS_BITMAP | WS_BORDER, + 199,37,23,21 + PUSHBUTTON "Apply",ID_APPLY,147,189,50,14,WS_DISABLED + COMBOBOX IDC_COMBO_WOPT,49,60,80,43,CBS_DROPDOWNLIST | + CBS_UPPERCASE | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Refresh",ID_REFRESH,201,189,50,14 + GROUPBOX "Installed items",IDC_STATIC_MAIN,7,83,244,95 + GROUPBOX "Wallpaper properties",IDC_STATIC_WALL,7,26,179,54 + LTEXT "FileName",IDC_STATIC_FILENAME,14,40,31,9 +END + +IDD_DIALOG_COMPT DIALOG DISCARDABLE 0, 0, 270, 87 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "The component properties" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,213,65,50,14 + PUSHBUTTON "Cancel",IDCANCEL,213,47,50,14 + LTEXT "Name",IDC_STATIC,7,11,23,8 + LTEXT "Source",IDC_STATIC_SOURCE,7,27,27,8 + LTEXT "Width",IDC_STATIC,7,52,22,8 + LTEXT "Height",IDC_STATIC,7,69,25,8 + CONTROL "Scrollable",IDC_CHECK_SCROLLABLE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,212,20,45,8 + CONTROL "Sizeable",IDC_CHECK_SIZEABLE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,212,33,43,8 + CONTROL "Enabled",IDC_CHECK_ENABLE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,212,7,44,8 + EDITTEXT IDC_EDIT_NAME,42,7,158,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_SOURCE,42,24,158,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_WIDTH,42,49,32,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_HEIGHT,42,66,32,12,ES_AUTOHSCROLL + LTEXT "Left point",IDC_STATIC,91,52,31,9 + LTEXT "Top point",IDC_STATIC,91,69,37,9 + EDITTEXT IDC_EDIT_LEFT,137,49,32,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_TOP,137,66,32,12,ES_AUTOHSCROLL +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ActiveDesktop MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ActiveDesktop\0" + VALUE "LegalCopyright", "Copyright (C) 2000\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ActiveDesktop.EXE\0" + VALUE "ProductName", "ActiveDesktop Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_ACTIVEDESKTOP_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 251 + TOPMARGIN, 7 + BOTTOMMARGIN, 203 + END + + IDD_DIALOG_COMPT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 263 + TOPMARGIN, 7 + BOTTOMMARGIN, 80 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_ACTIVEDESKTOP_DIALOG DLGINIT +BEGIN + IDC_COMBO_WOPT, 0x403, 16, 0 +0x5057, 0x535f, 0x5954, 0x454c, 0x435f, 0x4e45, 0x4554, 0x0052, + IDC_COMBO_WOPT, 0x403, 14, 0 +0x5057, 0x535f, 0x5954, 0x454c, 0x545f, 0x4c49, 0x0045, + IDC_COMBO_WOPT, 0x403, 17, 0 +0x5057, 0x535f, 0x5954, 0x454c, 0x535f, 0x5254, 0x5445, 0x4843, "\000" + IDC_COMBO_WOPT, 0x403, 13, 0 +0x5057, 0x535f, 0x5954, 0x454c, 0x4d5f, 0x5841, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP_PATTERN BITMAP DISCARDABLE "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About ActiveDesktop..." +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_DESCRIPTION_FILE "OXActivedesktop.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ActiveDesktop.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.vcproj new file mode 100644 index 0000000..2d4ee1b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktop.vcproj @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.cpp new file mode 100644 index 0000000..d1c86fb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.cpp @@ -0,0 +1,551 @@ +// ActiveDesktopDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ActiveDesktop.h" +#include "ActiveDesktopDlg.h" +#include "UTSampleAbout.h" + +#include "UTBSTrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopDlg dialog + +CActiveDesktopDlg::CActiveDesktopDlg(CWnd* pParent /*=NULL*/) + : CDialog(CActiveDesktopDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CActiveDesktopDlg) + m_bComps = FALSE; + m_bDesktop = FALSE; + m_nWOpt = -1; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + ::ZeroMemory(&m_pattern, 8); + ::ZeroMemory(&m_bmp,512); + VERIFY(m_bitmap.CreateBitmap(64,64,1,1,&m_bmp)); + m_bEditEnabled=FALSE; + m_bRemoveEnabled=FALSE; + + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CActiveDesktopDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CActiveDesktopDlg) + DDX_Control(pDX, IDOK, m_btnOK); + DDX_Control(pDX, IDC_STATIC_PATTERN, m_stcPattern); + DDX_Control(pDX, IDC_LIST_MAIN, m_lstMain); + DDX_Control(pDX, IDC_EDIT_WALLPAPER, m_edtWallpaper); + DDX_Control(pDX, ID_REMOVE, m_btnRemove); + DDX_Control(pDX, ID_EDIT, m_btnEdit); + DDX_Control(pDX, ID_APPLY, m_btnApply); + DDX_Check(pDX, IDC_CHECK_COMPS, m_bComps); + DDX_Check(pDX, IDC_CHECK_DESKTOP, m_bDesktop); + DDX_CBIndex(pDX, IDC_COMBO_WOPT, m_nWOpt); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CActiveDesktopDlg, CDialog) + //{{AFX_MSG_MAP(CActiveDesktopDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CHECK_DESKTOP, OnCheckDesktop) + ON_BN_CLICKED(IDC_CHECK_COMPS, OnCheckComps) + ON_BN_CLICKED(ID_APPLY, OnApply) + ON_BN_CLICKED(ID_EDIT, OnEdit) + ON_BN_CLICKED(ID_NEW, OnNew) + ON_BN_CLICKED(ID_REMOVE, OnRemove) + ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_MAIN, OnItemchangedListMain) + ON_BN_CLICKED(IDC_STATIC_PATTERN, OnStaticPattern) + ON_BN_CLICKED(ID_REFRESH, OnRefresh) + ON_EN_CHANGE(IDC_EDIT_WALLPAPER, OnChangeEditWallpaper) + ON_CBN_SELCHANGE(IDC_COMBO_WOPT, OnSelchangeComboWopt) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopDlg message handlers + +BOOL CActiveDesktopDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + + Init(); + m_desktop.SetParent(m_hWnd); + + GetDlgItem(ID_APPLY)->EnableWindow(FALSE); + GetDlgItem(ID_EDIT)->EnableWindow(m_bEditEnabled); + GetDlgItem(ID_REMOVE)->EnableWindow(m_bRemoveEnabled); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CActiveDesktopDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CActiveDesktopDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CActiveDesktopDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CActiveDesktopDlg::OnCheckDesktop() +{ + UpdateData(TRUE); + GetDlgItem(IDC_CHECK_COMPS)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_EDIT_WALLPAPER)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_LIST_MAIN)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_STATIC_PATTERN)->EnableWindow(m_bDesktop); + GetDlgItem(ID_NEW)->EnableWindow(m_bDesktop); + GetDlgItem(ID_EDIT)->EnableWindow(m_bDesktop?m_bEditEnabled:FALSE); + GetDlgItem(ID_REMOVE)->EnableWindow(m_bDesktop?m_bRemoveEnabled:FALSE); + GetDlgItem(IDC_STATIC_PATTERN_NAME)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_STATIC_WALLPAPER)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_STATIC_FILENAME)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_COMBO_WOPT)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_EDIT_WALLPAPER)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_STATIC_MAIN)->EnableWindow(m_bDesktop); + GetDlgItem(IDC_STATIC_WALL)->EnableWindow(m_bDesktop); + + GetDlgItem(ID_APPLY)->EnableWindow(TRUE); +} + +void CActiveDesktopDlg::OnCheckComps() +{ + UpdateData(TRUE); + GetDlgItem(ID_APPLY)->EnableWindow(TRUE); +} + +void CActiveDesktopDlg::OnApply() +{ + UpdateData(TRUE); + ApplyChanges(); + GetDlgItem(ID_APPLY)->EnableWindow(FALSE); + OnRefresh(); +} + +void CActiveDesktopDlg::OnEdit() +{ + UpdateData(TRUE); + POSITION pos=m_lstMain.GetFirstSelectedItemPosition(); + if (pos==NULL) + return; + + int nNumber=m_lstMain.GetNextSelectedItem(pos); + CString sSource=m_lstMain.GetItemText(nNumber,1); + LPCOMPONENT pComp=m_desktop.GetComponent((LPCTSTR) sSource); + if (!pComp) + { + AfxMessageBox(_T("Error to get the item")); + return; + } + m_dlgComp.m_bEnabled=pComp->fChecked; + m_dlgComp.m_bScrollable=(pComp->fNoScroll)?FALSE:TRUE; + m_dlgComp.m_bSizeable=pComp->cpPos.fCanResize; + m_dlgComp.m_nAction=CCompDialog::ACTION_MODIFY; + m_dlgComp.m_nHeight=pComp->cpPos.dwHeight; + m_dlgComp.m_nLeft=pComp->cpPos.iLeft; + m_dlgComp.m_nTop=pComp->cpPos.iTop; + m_dlgComp.m_nWidth=pComp->cpPos.dwWidth; + LPTSTR lpszName=GetTcharString(pComp->wszFriendlyName); + + m_dlgComp.m_sName=lpszName; + delete [] lpszName; + LPTSTR lpszSource=GetTcharString(pComp->wszSource); + m_dlgComp.m_sSource=lpszSource; + delete [] lpszSource; + + if (m_dlgComp.DoModal()==IDOK) + { + pComp->fChecked=m_dlgComp.m_bEnabled; + pComp->fNoScroll=m_dlgComp.m_bScrollable?FALSE:TRUE; + pComp->cpPos.fCanResize=pComp->cpPos.fCanResizeX= + pComp->cpPos.fCanResizeY=m_dlgComp.m_bSizeable; + pComp->cpPos.dwHeight=m_dlgComp.m_nHeight; + pComp->cpPos.iLeft=m_dlgComp.m_nLeft; + pComp->cpPos.iTop=m_dlgComp.m_nTop; + pComp->cpPos.dwWidth=m_dlgComp.m_nWidth; + LPWSTR lpszwName=GetWcharString((LPCTSTR) m_dlgComp.m_sName); + UTBStr::wcscpy(pComp->wszFriendlyName, MAX_PATH, lpszwName); + delete [] lpszwName; + if (!m_desktop.ModifyItem(pComp)) + AfxMessageBox(_T("Error to modify the item.")); + else + m_desktop.ApplyChanges(); + } + delete pComp; + + OnRefresh(); +} + +void CActiveDesktopDlg::OnNew() +{ + UpdateData(TRUE); + m_dlgComp.m_nAction=CCompDialog::ACTION_NEW; + if (m_dlgComp.DoModal()==IDOK) + { + COMPONENT comp; + ::ZeroMemory(&comp, sizeof(comp)); + + comp.dwSize=sizeof(comp); + comp.fChecked=m_dlgComp.m_bEnabled; + comp.fNoScroll=(m_dlgComp.m_bScrollable)?FALSE:TRUE; + comp.fDirty=TRUE; + comp.iComponentType=COMP_TYPE_WEBSITE; + LPWSTR lpszwName=GetWcharString((LPCTSTR) m_dlgComp.m_sName); + ASSERT(lpszwName); + UTBStr::wcscpy(comp.wszFriendlyName, MAX_PATH, lpszwName); + delete [] lpszwName; + LPWSTR lpszSource=GetWcharString((LPCTSTR) m_dlgComp.m_sSource); + UTBStr::wcscpy(comp.wszSource, INTERNET_MAX_URL_LENGTH, lpszSource); + delete [] lpszSource; + comp.cpPos.dwSize=sizeof(comp.cpPos); + comp.cpPos.dwHeight=m_dlgComp.m_nHeight; + comp.cpPos.dwWidth=m_dlgComp.m_nWidth; + comp.cpPos.fCanResize=m_dlgComp.m_bSizeable; + comp.cpPos.fCanResizeX=comp.cpPos.fCanResizeY=comp.cpPos.fCanResize; + comp.cpPos.iLeft=m_dlgComp.m_nLeft; + comp.cpPos.iTop=m_dlgComp.m_nTop; + if (!m_desktop.AddItem(&comp)) + AfxMessageBox(_T("Error to create new item!")); + } + +} + +void CActiveDesktopDlg::OnRemove() +{ + UpdateData(TRUE); + POSITION pos=m_lstMain.GetFirstSelectedItemPosition(); + if (pos==NULL) + return; + + int nNumber=m_lstMain.GetNextSelectedItem(pos); + CString sSource=m_lstMain.GetItemText(nNumber,1); + LPCOMPONENT pComp=m_desktop.GetComponent((LPCTSTR) sSource); + + if (!m_desktop.RemoveItem(pComp)) + AfxMessageBox(_T("Error to delete the item")); + + delete pComp; + + UpdateData(TRUE); + OnRefresh(); +} + +void CActiveDesktopDlg::OnItemchangedListMain(NMHDR* pNMHDR, LRESULT* pResult) +{ + UpdateData(TRUE); + NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + if ((pNMListView->uNewState ^ pNMListView->uOldState) + & 0x3000) + { + GetDlgItem(ID_APPLY)->EnableWindow(TRUE); + } + if (m_lstMain.GetSelectedCount()) + { + m_bEditEnabled=TRUE; + m_bRemoveEnabled=TRUE; + } + else + { + m_bEditEnabled=FALSE; + m_bRemoveEnabled=FALSE; + } + GetDlgItem(ID_EDIT)->EnableWindow(m_bEditEnabled); + GetDlgItem(ID_REMOVE)->EnableWindow(m_bRemoveEnabled); + + *pResult = 0; +} + +void CActiveDesktopDlg::OnStaticPattern() +{ + UpdateData(TRUE); +} + +void CActiveDesktopDlg::OnOK() +{ + OnApply(); + + CDialog::OnOK(); +} + +BOOL CActiveDesktopDlg::Init() +{ + CRect rct; + m_lstMain.GetClientRect(&rct); + m_lstMain.InsertColumn(0,_T("Name"),LVCFMT_LEFT,rct.Width()/2); + m_lstMain.InsertColumn(1,_T("URL"),LVCFMT_LEFT,rct.Width()/2); + DWORD dwExStyle=m_lstMain.GetExtendedStyle(); + m_lstMain.SetExtendedStyle(dwExStyle | + LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); + + if (!m_desktop.Init()) + { + AfxMessageBox(_T( + "Initialization failed. \ +Make sure you have installed Active Desktop \ +(shell.dll version 4.71 or better)")); + return FALSE; + } + OnRefresh(); + + return TRUE; + +} + +void CActiveDesktopDlg::UpdatePattern() +{ + + if (HBITMAP(m_bitmap)) + m_bitmap.DeleteObject(); + + BYTE* pPointer=(BYTE*) &m_bmp; + + for (int i=0; i<8; i++) + { + int nBit=1; + for (int n=0; n<8; n++) + { + if (nBit & m_pattern[i]) + { + for (int u=0; u<8; u++) + *(pPointer+u*8)=0xFF; + } + else + { + for (int u=0; u<8; u++) + *(pPointer+u*8)=0; + } + nBit=nBit<<1; + pPointer++; + } + pPointer+=56; + } + + VERIFY(m_bitmap.CreateBitmap(64,64,1,1,&m_bmp)); + + m_stcPattern.SetBitmap(HBITMAP(m_bitmap)); + m_stcPattern.RedrawWindow(); + +} + +void CActiveDesktopDlg::OnRefresh() +{ + m_lstMain.DeleteAllItems(); + VERIFY(m_desktop.Refresh()); + VERIFY(m_desktop.IsDesktopEnabled(&m_bDesktop)); + VERIFY(m_desktop.IsComponentsEnabled(&m_bComps)); + CString sWallpaper; + VERIFY(m_desktop.GetWallpaper(sWallpaper)); + m_edtWallpaper.SetWindowText((LPCTSTR) sWallpaper); + m_nWOpt=m_desktop.GetWallpaperStyle(); + int nComps=m_desktop.GetItemCount(); + UpdateData(FALSE); + for (int i=0;iwszFriendlyName); + int n=m_lstMain.InsertItem(m_lstMain.GetItemCount(),lpszName); + delete[]lpszName; + lpszName=GetTcharString(pComp->wszSource); + m_lstMain.SetItemText(n,1,lpszName); + delete[] lpszName; + m_lstMain.SetCheck(n,pComp->fChecked); + delete pComp; + } + UpdateData(FALSE); + + + VERIFY(m_desktop.GetPattern((BYTE*) &m_pattern)); + UpdatePattern(); + OnCheckDesktop(); + GetDlgItem(ID_APPLY)->EnableWindow(FALSE); +} + +void CActiveDesktopDlg::ApplyChanges() +{ + if (!m_desktop.SetDesktopEnable(m_bDesktop)) + { + AfxMessageBox(_T("Error to enable Active Desktop")); + return; + } + if (!m_desktop.SetComponentsEnable(m_bComps)) + { + AfxMessageBox(_T("Error to enable components")); + return; + } + CString sWallpaper; + m_edtWallpaper.GetWindowText(sWallpaper); + if (!m_desktop.SetWallpaper(sWallpaper)) + { + AfxMessageBox(_T("Error to set wallpaper")); + return; + + } + if (!m_desktop.SetWallpaperStyle(m_nWOpt)) + { + AfxMessageBox(_T("Error to set wallpaper style")); + return; + + } + VERIFY(m_desktop.ApplyChanges()); + + + for (int i=0; i< m_lstMain.GetItemCount(); i++) + { + CString sSource=m_lstMain.GetItemText(i,1); + LPCOMPONENT pComp=m_desktop.GetComponent(sSource); + if (!pComp) + { + CString sText; + sText.Format(_T("Couldnot get item %s"),sSource); + AfxMessageBox(sText); + continue; + } + if (pComp->fChecked!=m_lstMain.GetCheck(i)) + { + pComp->fChecked=m_lstMain.GetCheck(i); + if (!m_desktop.ModifyItem(pComp)) + { + CString sText; + sText.Format(_T("Couldnot modify item %s"),sSource); + AfxMessageBox(sText); + } + else + m_desktop.ApplyChanges(); + + } + delete pComp; + } + + +} + +void CActiveDesktopDlg::OnChangeEditWallpaper() +{ + GetDlgItem(ID_APPLY)->EnableWindow(TRUE); +} + +void CActiveDesktopDlg::OnSelchangeComboWopt() +{ + GetDlgItem(ID_APPLY)->EnableWindow(TRUE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.h new file mode 100644 index 0000000..ffe89b0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/ActiveDesktopDlg.h @@ -0,0 +1,82 @@ +// ActiveDesktopDlg.h : header file +// + +#if !defined(AFX_ACTIVEDESKTOPDLG_H__CD16C205_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) +#define AFX_ACTIVEDESKTOPDLG_H__CD16C205_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_ + +#include "OXActiveDesktop.h" // Added by ClassView +#include "CompDialog.h" // Added by ClassView +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CActiveDesktopDlg dialog + +class CActiveDesktopDlg : public CDialog +{ +// Construction +public: + BOOL m_bRemoveEnabled; + BOOL m_bEditEnabled; + void ApplyChanges(); + CCompDialog m_dlgComp; + void UpdatePattern(); + BOOL Init(); + COXActiveDesktop m_desktop; + CActiveDesktopDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CActiveDesktopDlg) + enum { IDD = IDD_ACTIVEDESKTOP_DIALOG }; + CButton m_btnOK; + CStatic m_stcPattern; + CListCtrl m_lstMain; + CEdit m_edtWallpaper; + CButton m_btnRemove; + CButton m_btnEdit; + CButton m_btnApply; + BOOL m_bComps; + BOOL m_bDesktop; + CBitmap m_bitmap; + int m_nWOpt; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CActiveDesktopDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + BYTE m_bmp[512]; + BYTE m_pattern[8]; + + // Generated message map functions + //{{AFX_MSG(CActiveDesktopDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCheckDesktop(); + afx_msg void OnCheckComps(); + afx_msg void OnApply(); + afx_msg void OnEdit(); + afx_msg void OnNew(); + afx_msg void OnRemove(); + afx_msg void OnItemchangedListMain(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnStaticPattern(); + virtual void OnOK(); + afx_msg void OnRefresh(); + afx_msg void OnChangeEditWallpaper(); + afx_msg void OnSelchangeComboWopt(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ACTIVEDESKTOPDLG_H__CD16C205_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.cpp new file mode 100644 index 0000000..54d11df --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.cpp @@ -0,0 +1,107 @@ +// CompDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "ActiveDesktop.h" +#include "CompDialog.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCompDialog dialog + + +CCompDialog::CCompDialog(CWnd* pParent /*=NULL*/) + : CDialog(CCompDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCompDialog) + m_bEnabled = FALSE; + m_bScrollable = FALSE; + m_bSizeable = FALSE; + m_nHeight = 0; + m_nLeft = 0; + m_sName = _T(""); + m_sSource = _T(""); + m_nTop = 0; + m_nWidth = 0; + //}}AFX_DATA_INIT + m_nAction=NULL; +} + + +void CCompDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCompDialog) + DDX_Check(pDX, IDC_CHECK_ENABLE, m_bEnabled); + DDX_Check(pDX, IDC_CHECK_SCROLLABLE, m_bScrollable); + DDX_Check(pDX, IDC_CHECK_SIZEABLE, m_bSizeable); + DDX_Text(pDX, IDC_EDIT_HEIGHT, m_nHeight); + DDX_Text(pDX, IDC_EDIT_LEFT, m_nLeft); + DDX_Text(pDX, IDC_EDIT_NAME, m_sName); + DDX_Text(pDX, IDC_EDIT_SOURCE, m_sSource); + DDX_Text(pDX, IDC_EDIT_TOP, m_nTop); + DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCompDialog, CDialog) + //{{AFX_MSG_MAP(CCompDialog) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCompDialog message handlers + +void CCompDialog::OnOK() +{ + // TODO: Add extra validation here + + CDialog::OnOK(); +} + +BOOL CCompDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + + switch (m_nAction) + { + case ACTION_NEW: + { + m_bEnabled=1; + m_bScrollable=1; + m_bSizeable=1; + m_nHeight=60; + m_nWidth=180; + m_nLeft=240; + m_nTop=180; + m_sName=_T("Ultimate Toolbox"); + m_sSource=_T("http://www.theultimatetoolbox.com"); + CWnd* pWnd=GetDlgItem(IDC_STATIC_SOURCE); + pWnd->SetWindowText(_T("URL")); + UpdateData(FALSE); + GetDlgItem(IDC_EDIT_WIDTH)->EnableWindow(TRUE); + GetDlgItem(IDC_EDIT_HEIGHT)->EnableWindow(TRUE); + GetDlgItem(IDC_EDIT_LEFT)->EnableWindow(TRUE); + GetDlgItem(IDC_EDIT_TOP)->EnableWindow(TRUE); + GetDlgItem(IDC_CHECK_SIZEABLE)->EnableWindow(TRUE); + GetDlgItem(IDC_EDIT_SOURCE)->EnableWindow(TRUE); + } + break; + case ACTION_MODIFY: + GetDlgItem(IDC_EDIT_WIDTH)->EnableWindow(FALSE); + GetDlgItem(IDC_EDIT_HEIGHT)->EnableWindow(FALSE); + GetDlgItem(IDC_EDIT_LEFT)->EnableWindow(FALSE); + GetDlgItem(IDC_EDIT_TOP)->EnableWindow(FALSE); + GetDlgItem(IDC_CHECK_SIZEABLE)->EnableWindow(FALSE); + GetDlgItem(IDC_EDIT_SOURCE)->EnableWindow(FALSE); + + } + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.h new file mode 100644 index 0000000..ab433e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/CompDialog.h @@ -0,0 +1,60 @@ +#if !defined(AFX_COMPDIALOG_H__6A38F6B6_F108_11D3_ACC3_0050BAAB46B1__INCLUDED_) +#define AFX_COMPDIALOG_H__6A38F6B6_F108_11D3_ACC3_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// CompDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCompDialog dialog + + +class CCompDialog : public CDialog +{ +// Construction +public: + enum {ACTION_NEW=1, + ACTION_MODIFY}; + + UINT m_nAction; + CCompDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCompDialog) + enum { IDD = IDD_DIALOG_COMPT }; + BOOL m_bEnabled; + BOOL m_bScrollable; + BOOL m_bSizeable; + UINT m_nHeight; + int m_nLeft; + CString m_sName; + CString m_sSource; + int m_nTop; + UINT m_nWidth; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCompDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCompDialog) + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_COMPDIALOG_H__6A38F6B6_F108_11D3_ACC3_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/OXActiveDesktop.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/OXActiveDesktop.rtf new file mode 100644 index 0000000..0d2bdad --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/OXActiveDesktop.rtf @@ -0,0 +1,17 @@ +{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f16\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;} +{\f17\froman\fcharset238\fprq2 Times New Roman CE;}{\f18\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f20\froman\fcharset161\fprq2 Times New Roman Greek;}{\f21\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f22\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f113\fswiss\fcharset238\fprq2 Verdana CE;}{\f114\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f116\fswiss\fcharset161\fprq2 Verdana Greek;}{\f117\fswiss\fcharset162\fprq2 Verdana Tur;} +{\f118\fswiss\fcharset186\fprq2 Verdana Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; +\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\nowidctlpar\widctlpar\adjustright \fs20\cgrid \snext0 +Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s15\nowidctlpar\widctlpar\adjustright \f16\lang4105\cgrid \sbasedon0 \snext15 Body Text;}}{\info{\title The COXActiveDesktop class is a wrapper for IActiveDesktop interface}{\author Dmitriy} +{\operator Dmitriy}{\creatim\yr2000\mo3\dy5\hr18\min30}{\revtim\yr2000\mo3\dy5\hr18\min30}{\version2}{\edmins0}{\nofpages1}{\nofwords101}{\nofchars576}{\*\company Home}{\nofcharsws707}{\vern71}} +\widowctrl\ftnbj\aenddoc\formshade\viewkind1\viewscale80\pgbrdrhead\pgbrdrfoot \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \s15\nowidctlpar\widctlpar\adjustright \f16\lang4105\cgrid {The }{\b COXActiveDesktop}{ + class is a wrapper for IActiveDesktop interface. In order to explore this class you have to have ActiveDesktop installed. That means that shell32.dll must be version 4.71 or better as well as explorer.exe. To start to work with this class call }{\i\cf2 +::CoInitialize()}{ function before using this class, in }{\i\cf2 InitInstance()}{, for example. Once you have finished to work with this class, call }{\i\cf2 ::CoUninitialize()}{. First called function of the class must be }{\i\cf2 Init()}{ + and it must succeed. After that you have different functions to manage by the Active Desktop items, like }{\i\cf2 GetComponent()}{, }{\i\cf2 ModifyItem()}{, }{\i\cf2 RemoveItem()}{ + etc. The items may be of different types, like controls, webpages and others. +\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f16\fs24\lang4105 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/Resource.h new file mode 100644 index 0000000..d2b8d33 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/Resource.h @@ -0,0 +1,49 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ActiveDesktop.rc +// +#define ID_NEW 3 +#define ID_REMOVE 4 +#define ID_EDIT 5 +#define ID_APPLY 6 +#define ID_REFRESH 7 +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_ACTIVEDESKTOP_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDB_BITMAP_PATTERN 130 +#define ID_DESCRIPTION_FILE 130 +#define IDD_DIALOG_COMPT 131 +#define IDC_CHECK_DESKTOP 1000 +#define IDC_CHECK_COMPS 1001 +#define IDC_LIST_MAIN 1002 +#define IDC_EDIT_WALLPAPER 1003 +#define IDC_STATIC_PATTERN 1004 +#define IDC_STATIC_WALLPAPER 1005 +#define IDC_STATIC_PATTERN_NAME 1006 +#define IDC_COMBO_WOPT 1007 +#define IDC_CHECK_SCROLLABLE 1008 +#define IDC_CHECK_SIZEABLE 1009 +#define IDC_CHECK_ENABLE 1010 +#define IDC_EDIT_NAME 1011 +#define IDC_EDIT_SOURCE 1012 +#define IDC_EDIT_WIDTH 1013 +#define IDC_EDIT_HEIGHT 1014 +#define IDC_EDIT_LEFT 1015 +#define IDC_EDIT_TOP 1016 +#define IDC_STATIC_SOURCE 1017 +#define IDC_STATIC_FILENAME 1018 +#define IDC_STATIC_WALL 1019 +#define IDC_STATIC_MAIN 1020 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1021 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.cpp new file mode 100644 index 0000000..4e5ba68 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ActiveDesktop.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.h new file mode 100644 index 0000000..4f424c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__CD16C207_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__CD16C207_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include "wininet.h" +#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 + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__CD16C207_EDE3_11D3_ACB6_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.rc2 new file mode 100644 index 0000000..009d931 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/ActiveDesktop.rc2 @@ -0,0 +1,13 @@ +// +// ACTIVEDESKTOP.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/bitmap1.bmp new file mode 100644 index 0000000..4fb77b2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/ActiveDesktop/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.clw new file mode 100644 index 0000000..0fe6b09 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.clw @@ -0,0 +1,189 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CAddressBookDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "addressbook.h" +LastPage=0 + +ClassCount=4 +Class1=CAddressBookApp +Class2=CAboutDlg +Class3=CAddressBookDlg + +ResourceCount=6 +Resource1=IDD_ABOUTBOX +Resource2=IDD_ADDRESSBOOK_DIALOG +Resource3=IDD_ADDRESSBOOK_DIALOG (English (U.S.)) +Resource4=IDD_ABOUTBOX (English (U.S.)) +Class4=COptionsDlg +Resource5=IDD_DIALOG_BROWSE +Resource6=IDD_DIALOG_BROWSE (English (Canada)) + +[CLS:CAddressBookApp] +Type=0 +BaseClass=CWinApp +HeaderFile=AddressBook.h +ImplementationFile=AddressBook.cpp +Filter=N +VirtualFilter=AC +LastObject=CAddressBookApp + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=AddressBookDlg.cpp +ImplementationFile=AddressBookDlg.cpp +LastObject=CAboutDlg + +[CLS:CAddressBookDlg] +Type=0 +BaseClass=CDialog +HeaderFile=AddressBookDlg.h +ImplementationFile=AddressBookDlg.cpp +LastObject=CAddressBookDlg +Filter=D +VirtualFilter=dWC + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[DLG:IDD_ADDRESSBOOK_DIALOG] +Type=1 +Class=CAddressBookDlg +ControlCount=18 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_BUTTON_FIND,button,1342242816 +Control3=IDC_STATIC,button,1342177287 +Control4=IDC_LIST_RESULTS,SysListView32,1350631425 +Control5=IDC_BUTTON_CREATE,button,1342242816 +Control6=IDC_BUTTON_EDIT,button,1342242816 +Control7=IDC_BUTTON_FINDDIALOG,button,1342242816 +Control8=IDC_EDIT_LDAP,edit,1350631552 +Control9=IDC_BUTTON_LDAP,button,1342242816 +Control10=IDC_BUTTON_DELETE,button,1342242816 +Control11=IDC_BUTTON_ADDRESS,button,1342242816 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_EDIT_EMAIL,edit,1350631552 +Control15=IDC_EDIT_NAME,edit,1350631552 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_COMBO_SEARCHBY,combobox,1344339971 +Control18=IDC_STATIC,button,1342177287 + +[DLG:IDD_ABOUTBOX (English (U.S.))] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[DLG:IDD_ADDRESSBOOK_DIALOG (English (U.S.))] +Type=1 +Class=CAddressBookDlg +ControlCount=21 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_BUTTON_FIND,button,1342242816 +Control4=IDC_STATIC,button,1342177287 +Control5=IDC_EDIT_FIND,edit,1350631552 +Control6=IDC_RADIO_EMAIL,button,1342177289 +Control7=IDC_RADIO_PHONE,button,1342177289 +Control8=IDC_RADIO_DISPLAYNAME,button,1342177289 +Control9=IDC_LIST_RESULTS,SysListView32,1350631425 +Control10=IDC_STATIC,button,1342177287 +Control11=IDC_EDIT_CREATE_ADDRESS,edit,1350631552 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_EDIT_CREATE_DISPNAME,edit,1350631552 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_BUTTON_CREATE,button,1476460544 +Control16=IDC_BUTTON_EDIT,button,1342242816 +Control17=IDC_BUTTON_FINDDIALOG,button,1342242816 +Control18=IDC_EDIT_LDAP,edit,1350631552 +Control19=IDC_BUTTON_LDAP,button,1342242816 +Control20=IDC_BUTTON_DELETE,button,1342242816 +Control21=IDC_BUTTON_ADDRESS,button,1342242816 + +[DLG:IDD_DIALOG_BROWSE] +Type=1 +Class=COptionsDlg +ControlCount=27 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK1,button,1342242819 +Control4=IDC_CHECK2,button,1476460547 +Control5=IDC_CHECK3,button,1476460547 +Control6=IDC_COMBO1,combobox,1478557699 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_EDIT_ENTRY,edit,1350631552 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_RADIO_DEFAULT,button,1342177289 +Control11=IDC_RADIO_CUSTOM,button,1342177289 +Control12=IDC_STATIC,static,1342177287 +Control13=IDC_STATIC,static,1342177287 +Control14=IDC_STATIC,static,1342177287 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_EDIT1,edit,1484849280 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_EDIT2,edit,1484849280 +Control20=IDC_EDIT3,edit,1484849280 +Control21=IDC_COMBO2,combobox,1478557699 +Control22=IDC_COMBO3,combobox,1478557699 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_EDIT_DEST,edit,1350631552 +Control26=IDC_EDIT_CAPTION,edit,1350631552 +Control27=IDC_STATIC,button,1342177287 + +[CLS:COptionsDlg] +Type=0 +HeaderFile=OptionsDlg.h +ImplementationFile=OptionsDlg.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=IDC_COMBO3 + +[DLG:IDD_DIALOG_BROWSE (English (Canada))] +Type=1 +Class=? +ControlCount=27 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK1,button,1342242819 +Control4=IDC_CHECK2,button,1476460547 +Control5=IDC_CHECK3,button,1476460547 +Control6=IDC_COMBO1,combobox,1478557699 +Control7=IDC_STATIC,button,1342177287 +Control8=IDC_EDIT_ENTRY,edit,1350631552 +Control9=IDC_STATIC,static,1342308352 +Control10=IDC_RADIO_DEFAULT,button,1342177289 +Control11=IDC_RADIO_CUSTOM,button,1342177289 +Control12=IDC_STATIC,static,1342177287 +Control13=IDC_STATIC,static,1342177287 +Control14=IDC_STATIC,static,1342177287 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_EDIT1,edit,1484849280 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_EDIT2,edit,1484849280 +Control20=IDC_EDIT3,edit,1484849280 +Control21=IDC_COMBO2,combobox,1478557699 +Control22=IDC_COMBO3,combobox,1478557699 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_EDIT_DEST,edit,1350631552 +Control26=IDC_EDIT_CAPTION,edit,1350631552 +Control27=IDC_STATIC,button,1342177287 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.cpp new file mode 100644 index 0000000..31026d2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.cpp @@ -0,0 +1,98 @@ +// AddressBook.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "AddressBook.h" +#include "AddressBookDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookApp + +BEGIN_MESSAGE_MAP(CAddressBookApp, CWinApp) + //{{AFX_MSG_MAP(CAddressBookApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookApp construction + +CAddressBookApp::CAddressBookApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CAddressBookApp object + +CAddressBookApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookApp initialization + +BOOL CAddressBookApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + CAddressBookDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CAddressBookApp::ExitInstance() +{ + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsp new file mode 100644 index 0000000..af3ba6d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsp @@ -0,0 +1,263 @@ +# Microsoft Developer Studio Project File - Name="AddressBook" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=AddressBook - Win32 DebugUnicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AddressBook.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AddressBook.mak" CFG="AddressBook - Win32 DebugUnicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AddressBook - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "AddressBook - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "AddressBook - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "AddressBook - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "AddressBook - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AddressBook - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 Edkguid.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /out:"AddressBook.exe" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "AddressBook - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 Edkguid.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"AddressBook.exe" /pdbtype:sept +# SUBTRACT LINK32 /incremental:no + +!ELSEIF "$(CFG)" == "AddressBook - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "AddressBook___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "AddressBook___Win32_DebugUnicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 Edkguid.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# SUBTRACT BASE LINK32 /incremental:no +# ADD LINK32 Edkguid.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"AddressBook.exe" /pdbtype:sept +# SUBTRACT LINK32 /incremental:no + +!ELSEIF "$(CFG)" == "AddressBook - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AddressBook___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "AddressBook___Win32_ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 Edkguid.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /out:"AddressBook.exe" + +!ELSEIF "$(CFG)" == "AddressBook - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AddressBook___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "AddressBook___Win32_ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 Edkguid.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /out:"AddressBook.exe" + +!ENDIF + +# Begin Target + +# Name "AddressBook - Win32 Release" +# Name "AddressBook - Win32 Debug" +# Name "AddressBook - Win32 DebugUnicode" +# Name "AddressBook - Win32 ReleaseUnicode" +# Name "AddressBook - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AddressBook.cpp +# End Source File +# Begin Source File + +SOURCE=.\AddressBook.rc +# End Source File +# Begin Source File + +SOURCE=.\AddressBookDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\OptionsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWABook.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AddressBook.h +# End Source File +# Begin Source File + +SOURCE=.\AddressBookDlg.h +# End Source File +# Begin Source File + +SOURCE=.\OptionsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXWABook.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\AddressBook.ico +# End Source File +# Begin Source File + +SOURCE=.\res\AddressBook.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsw new file mode 100644 index 0000000..d2312c2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AddressBook"=".\AddressBook.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.h new file mode 100644 index 0000000..9a0b437 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.h @@ -0,0 +1,50 @@ +// AddressBook.h : main header file for the ADDRESSBOOK application +// + +#if !defined(AFX_ADDRESSBOOK_H__4FD8257A_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) +#define AFX_ADDRESSBOOK_H__4FD8257A_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookApp: +// See AddressBook.cpp for the implementation of this class +// + +class CAddressBookApp : public CWinApp +{ +public: + CAddressBookApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAddressBookApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CAddressBookApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADDRESSBOOK_H__4FD8257A_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.rc new file mode 100644 index 0000000..c636a56 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.rc @@ -0,0 +1,358 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\AddressBook.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXWabook.rc""\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 DISCARDABLE "res\\AddressBook.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About AddressBook" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "AddressBook Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2000",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_ADDRESSBOOK_DIALOG DIALOGEX 0, 0, 278, 263 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "AddressBook" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "Exit",IDCANCEL,212,120,50,14 + PUSHBUTTON "Find",IDC_BUTTON_FIND,212,33,51,14 + GROUPBOX "Address",IDC_STATIC,7,7,263,63 + CONTROL "List1",IDC_LIST_RESULTS,"SysListView32",LVS_REPORT | + WS_BORDER | WS_TABSTOP,7,140,264,116 + PUSHBUTTON "Create",IDC_BUTTON_CREATE,155,17,51,14 + PUSHBUTTON "Edit",IDC_BUTTON_EDIT,212,17,51,14 + PUSHBUTTON "Find dialog",IDC_BUTTON_FINDDIALOG,64,120,51,14 + EDITTEXT IDC_EDIT_LDAP,13,90,184,12,ES_AUTOHSCROLL + PUSHBUTTON "Search",IDC_BUTTON_LDAP,211,89,51,14 + PUSHBUTTON "Delete",IDC_BUTTON_DELETE,155,34,51,14 + PUSHBUTTON "Browse",IDC_BUTTON_ADDRESS,7,120,51,14 + LTEXT "Name",IDC_STATIC,13,23,23,9 + LTEXT "Email",IDC_STATIC,13,38,20,9 + EDITTEXT IDC_EDIT_EMAIL,43,35,99,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_NAME,43,20,99,12,ES_AUTOHSCROLL + LTEXT "Search by ",IDC_STATIC,167,53,36,9 + COMBOBOX IDC_COMBO_SEARCHBY,212,51,51,51,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + GROUPBOX "LDAP",IDC_STATIC,7,75,264,37 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "AddressBook MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "AddressBook\0" + VALUE "LegalCopyright", "Copyright (C) 2000\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "AddressBook.EXE\0" + VALUE "ProductName", "AddressBook Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_ADDRESSBOOK_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 271 + TOPMARGIN, 7 + BOTTOMMARGIN, 256 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_ADDRESSBOOK_DIALOG DLGINIT +BEGIN + IDC_COMBO_SEARCHBY, 0x403, 6, 0 +0x6d45, 0x6961, 0x006c, + IDC_COMBO_SEARCHBY, 0x403, 5, 0 +0x614e, 0x656d, "\000" + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About AddressBook..." +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_DESCRIPTION_FILE "OXWABook.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_BROWSE DIALOGEX 0, 0, 317, 204 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize appearence of the Browse dialog" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,260,183,50,14 + PUSHBUTTON "Cancel",IDCANCEL,207,183,50,14 + CONTROL "First",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 22,44,29,10 + CONTROL "Second",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | + WS_DISABLED | WS_TABSTOP,22,99,41,10 + CONTROL "Third",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | + WS_DISABLED | WS_TABSTOP,22,154,32,10 + COMBOBOX IDC_COMBO1,63,41,72,46,CBS_DROPDOWNLIST | WS_DISABLED | + WS_VSCROLL | WS_TABSTOP + GROUPBOX "Edit boxes",IDC_STATIC,7,7,146,190 + EDITTEXT IDC_EDIT_ENTRY,205,38,98,13,ES_AUTOHSCROLL + LTEXT "New Entry",IDC_STATIC,164,42,37,11 + CONTROL "Default",IDC_RADIO_DEFAULT,"Button",BS_AUTORADIOBUTTON, + 13,17,40,10 + CONTROL "Custom",IDC_RADIO_CUSTOM,"Button",BS_AUTORADIOBUTTON,71, + 17,41,9 + CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,15,31,130,50, + WS_EX_CLIENTEDGE + CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,15,86,130,50, + WS_EX_CLIENTEDGE + CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,15,141,130,50, + WS_EX_CLIENTEDGE + LTEXT "Title",IDC_STATIC,21,65,17,11 + EDITTEXT IDC_EDIT1,42,63,93,13,ES_AUTOHSCROLL | WS_DISABLED + LTEXT "Title",IDC_STATIC,21,120,17,11 + LTEXT "Title",IDC_STATIC,21,175,17,11 + EDITTEXT IDC_EDIT2,42,118,93,13,ES_AUTOHSCROLL | WS_DISABLED + EDITTEXT IDC_EDIT3,42,173,93,13,ES_AUTOHSCROLL | WS_DISABLED + COMBOBOX IDC_COMBO2,63,96,72,46,CBS_DROPDOWNLIST | WS_DISABLED | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBO3,63,151,72,46,CBS_DROPDOWNLIST | WS_DISABLED | + WS_VSCROLL | WS_TABSTOP + LTEXT "Destination",IDC_STATIC,164,61,37,11 + LTEXT "Caption",IDC_STATIC,164,24,31,11 + EDITTEXT IDC_EDIT_DEST,205,57,98,13,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_CAPTION,205,19,98,13,ES_AUTOHSCROLL + GROUPBOX "",IDC_STATIC,157,7,153,74 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG_BROWSE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 310 + TOPMARGIN, 7 + BOTTOMMARGIN, 197 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_DIALOG_BROWSE DLGINIT +BEGIN + IDC_COMBO1, 0x403, 8, 0 +0x414d, 0x4950, 0x545f, 0x004f, + IDC_COMBO1, 0x403, 8, 0 +0x414d, 0x4950, 0x435f, 0x0043, + IDC_COMBO1, 0x403, 9, 0 +0x414d, 0x4950, 0x425f, 0x4343, "\000" + IDC_COMBO2, 0x403, 8, 0 +0x414d, 0x4950, 0x545f, 0x004f, + IDC_COMBO2, 0x403, 8, 0 +0x414d, 0x4950, 0x435f, 0x0043, + IDC_COMBO2, 0x403, 9, 0 +0x414d, 0x4950, 0x425f, 0x4343, "\000" + IDC_COMBO3, 0x403, 8, 0 +0x414d, 0x4950, 0x545f, 0x004f, + IDC_COMBO3, 0x403, 8, 0 +0x414d, 0x4950, 0x435f, 0x0043, + IDC_COMBO3, 0x403, 9, 0 +0x414d, 0x4950, 0x425f, 0x4343, "\000" + 0 +END + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\AddressBook.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXWabook.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.vcproj new file mode 100644 index 0000000..f050ab0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBook.vcproj @@ -0,0 +1,929 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.cpp new file mode 100644 index 0000000..917f330 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.cpp @@ -0,0 +1,388 @@ +// AddressBookDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "AddressBook.h" +#include "AddressBookDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookDlg dialog + +CAddressBookDlg::CAddressBookDlg(CWnd* pParent /*=NULL*/) + : CDialog(CAddressBookDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CAddressBookDlg) + m_sLDAP = _T("ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US"); + m_nSearchBy = 0; + m_sEmail = _T(""); + m_sName = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CAddressBookDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAddressBookDlg) + DDX_Control(pDX, IDC_LIST_RESULTS, m_lstResults); + DDX_Text(pDX, IDC_EDIT_LDAP, m_sLDAP); + DDX_CBIndex(pDX, IDC_COMBO_SEARCHBY, m_nSearchBy); + DDX_Text(pDX, IDC_EDIT_EMAIL, m_sEmail); + DDX_Text(pDX, IDC_EDIT_NAME, m_sName); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAddressBookDlg, CDialog) + //{{AFX_MSG_MAP(CAddressBookDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_FIND, OnButtonFind) + ON_BN_CLICKED(IDC_BUTTON_CREATE, OnButtonCreate) + ON_BN_CLICKED(IDC_BUTTON_EDIT, OnButtonEdit) + ON_BN_CLICKED(IDC_BUTTON_FINDDIALOG, OnButtonFinddialog) + ON_BN_CLICKED(IDC_BUTTON_LDAP, OnButtonLdap) + ON_BN_CLICKED(IDC_BUTTON_DELETE, OnButtonDelete) + ON_BN_CLICKED(IDC_BUTTON_ADDRESS, OnButtonAddress) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookDlg message handlers + +BOOL CAddressBookDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + if (!m_ABook.Init()) + { + TRACE0("Unable to initialize the address book.\r\n Quit."); + PostMessage(WM_QUIT); + } + else + m_ABook.SetParent(this->m_hWnd); + + CRect rect; + m_lstResults.GetClientRect(&rect); + m_lstResults.InsertColumn(0,_T("Property"),LVCFMT_LEFT,100); + m_lstResults.InsertColumn(1,_T("Value"),LVCFMT_LEFT,100); + m_lstResults.InsertColumn(2,_T("To "),LVCFMT_LEFT,rect.Width()-200); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CAddressBookDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CAddressBookDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CAddressBookDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CAddressBookDlg::OnButtonFind() +{ + UpdateData(); + PopulateList(NULL); + + COXMailUser* pUser=GetUser(); + if (!pUser) + return; + + PopulateList(pUser); + AfxMessageBox(_T("The user has been found.")); + + if (pUser) + delete pUser; +} + +void CAddressBookDlg::PopulateList(COXMailUser *pUser, BOOL bList) +{ + + m_lstResults.DeleteAllItems(); + if (!pUser) + return; + + CRect rect; + m_lstResults.GetClientRect(&rect); + + if (!bList) + { + FillUserProperties(pUser); + } + else + { + ADRLIST* pList=(ADRLIST*) pUser; + ASSERT(pList); + + for (UINT n=0;ncEntries;n++) + { + + ULONG ulType=NULL; + + // find PR_RECIPIENT_TYPE property + UINT k=0; + for (k=0;kaEntries[n].cValues;k++) + { + + if (pList->aEntries[n].rgPropVals[k].ulPropTag==PR_RECIPIENT_TYPE) + { + ulType=pList->aEntries[n].rgPropVals[k].Value.l; + } + + } + + for (k=0;kaEntries[n].cValues;k++) + { + + if (pList->aEntries[n].rgPropVals[k].ulPropTag==PR_ENTRYID) + { + COXMailUser* pUser=m_ABook.GetUserFromID( + pList->aEntries[n].rgPropVals[k].Value.bin.cb, + (ENTRYID*) pList->aEntries[n].rgPropVals[k].Value.bin.lpb); + if (pUser) + { + UINT nStart=m_lstResults.GetItemCount(); + FillUserProperties(pUser); + CString sType; + if (ulType == MAPI_TO) + sType=_T("To "); + if (ulType == MAPI_CC) + sType=_T("Cc "); + if (ulType == MAPI_BCC) + sType=_T("Bcc "); + m_lstResults.SetItemText(nStart,2,(LPCTSTR) sType); + delete pUser; + + } + + } + } + } + } +} + + +void CAddressBookDlg::OnButtonCreate() +{ + + PopulateList(NULL); + + COXMailUser* pUser=m_ABook.CreateUser(); + + if (pUser) + AfxMessageBox(_T("The user has been created successfully.")); + else + { + AfxMessageBox(_T("The user has not been created.")); + return; + } + + PopulateList(pUser); + delete pUser; +} + +void CAddressBookDlg::OnButtonEdit() +{ + + UpdateData(); + PopulateList(NULL); + + COXMailUser* pUser=GetUser(); + if (!pUser) + return; + + BOOL bRet=m_ABook.EditUser(pUser); + + if (bRet) + AfxMessageBox(_T("The properties of the user has been edited successfully.")); + else + AfxMessageBox(_T("The properties of the user has not been edited successfully.")); + + if (pUser) + delete pUser; +} + +void CAddressBookDlg::OnButtonFinddialog() +{ + PopulateList(NULL); + m_ABook.ShowFindDialog(); +} + +void CAddressBookDlg::OnButtonLdap() +{ + UpdateData(TRUE); + PopulateList(NULL); + + LPTSTR lpszLDAP =m_sLDAP.GetBuffer(m_sLDAP.GetLength()); + COXMailUser* pUser=m_ABook.SearchLDAP(lpszLDAP,WABOBJECT_LDAPURL_RETURN_MAILUSER); + + m_sLDAP.ReleaseBuffer(); + + if (pUser) + { + PopulateList(pUser); + delete pUser; + } + + + +} + +void CAddressBookDlg::OnButtonDelete() +{ + UpdateData(); + PopulateList(NULL); + + COXMailUser* pUser=GetUser(); + if (!pUser) + return; + + BOOL bRet=m_ABook.DeleteUser(pUser); + + if (bRet && !m_ABook.GetLastError()) + AfxMessageBox(_T("The user has been successfully deleted.")); + else + AfxMessageBox(_T("Error to delete the user.")); + if (pUser) + delete pUser; +} + +void CAddressBookDlg::OnButtonAddress() +{ + + PopulateList(NULL); + + if (m_dlgOpt.DoModal()==IDOK) + { + ADRLIST* pList=m_ABook.SelectUser(&m_dlgOpt.m_options); + if (pList) + { + PopulateList((COXMailUser*) pList, TRUE); + } + else + TRACE1("COXAddressBook::returned %d\r\n",m_ABook.GetLastError()); + } +} + +COXMailUser* CAddressBookDlg::GetUser() +{ + COXMailUser* pUser=NULL; + + switch (m_nSearchBy) + { + case E_EMAIL: + pUser=m_ABook.FindUserByEMail(m_sEmail, TRUE, NULL, MAPI_MODIFY); + break; + case E_NAME: + pUser=m_ABook.FindUserByName(m_sName, TRUE, NULL, MAPI_MODIFY); + break; + default: + ASSERT(FALSE); + } + if (!pUser) + { + AfxMessageBox(_T("Error to find the user.")); + return NULL; + } + else + return pUser; + +} + +BOOL CAddressBookDlg::FillUserProperties(COXMailUser *pUser) +{ + ULONG nNumber=NULL; + + COXPropValue* pProps=pUser->GetProperties(NULL,&nNumber); + if (!pProps) + { + return FALSE; + } + + for (UINT n=0;nulPropTag); + if (sText.IsEmpty()) + continue; + m_lstResults.InsertItem(m_lstResults.GetItemCount(),(LPCTSTR) sText); + sText =(pProps+n)->GetStringProperty(); + if (!sText.IsEmpty()) + m_lstResults.SetItemText(m_lstResults.GetItemCount()-1, + 1,(LPCTSTR) sText); + } + delete [] pProps; + + return TRUE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.h new file mode 100644 index 0000000..de8255b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/AddressBookDlg.h @@ -0,0 +1,74 @@ +// AddressBookDlg.h : header file +// + +#if !defined(AFX_ADDRESSBOOKDLG_H__4FD8257C_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) +#define AFX_ADDRESSBOOKDLG_H__4FD8257C_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXWABook.h" +#include "OptionsDlg.h" +#include "utsampleabout.h" + +///////////////////////////////////////////////////////////////////////////// +// CAddressBookDlg dialog + +typedef enum{ + E_EMAIL=0, + E_NAME +}E_ABENUM; + +class CAddressBookDlg : public CDialog +{ +// Construction +public: + BOOL FillUserProperties(COXMailUser* pUser); + COXMailUser* GetUser(); + COptionsDlg m_dlgOpt; + void PopulateList(COXMailUser* pUser, BOOL bList=FALSE); + CAddressBookDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CAddressBookDlg) + enum { IDD = IDD_ADDRESSBOOK_DIALOG }; + CListCtrl m_lstResults; + CString m_sLDAP; + int m_nSearchBy; + CString m_sEmail; + CString m_sName; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAddressBookDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXWABook m_ABook; + + // Generated message map functions + //{{AFX_MSG(CAddressBookDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonFind(); + afx_msg void OnButtonCreate(); + afx_msg void OnButtonEdit(); + afx_msg void OnButtonFinddialog(); + afx_msg void OnButtonLdap(); + afx_msg void OnButtonDelete(); + afx_msg void OnButtonAddress(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADDRESSBOOKDLG_H__4FD8257C_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/ImageListBox.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/ImageListBox.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/ImageListBox.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OXWABook.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OXWABook.rtf new file mode 100644 index 0000000..ada1e2f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OXWABook.rtf @@ -0,0 +1,38 @@ +{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f49\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;} +{\f53\froman\fcharset238\fprq2 Times New Roman CE;}{\f54\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f56\froman\fcharset161\fprq2 Times New Roman Greek;}{\f57\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f60\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f445\fswiss\fcharset238\fprq2 Verdana CE;}{\f446\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f448\fswiss\fcharset161\fprq2 Verdana Greek;}{\f449\fswiss\fcharset162\fprq2 Verdana Tur;} +{\f452\fswiss\fcharset186\fprq2 Verdana Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; +\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{ +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\info +{\title This class encapsulated Internet address book management}{\author dmitriyf}{\operator dmitriyf}{\creatim\yr2000\mo2\dy22\hr14\min28}{\revtim\yr2000\mo2\dy22\hr14\min36}{\version2}{\edmins8}{\nofpages1}{\nofwords195}{\nofchars1112} +{\*\company Dundas}{\nofcharsws1365}{\vern8247}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1 +\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f49 Th}{\f49 e }{ +\b\f49 COIXWABook}{\f49 class }{\f49 encapsulated}{\f49 }{\f49 Internet}{\f49 address book }{\f49 management}{\f49 . +\par The }{\f49 Internet}{\f49 address book is address book that we usually use +\par with Outlook or Outlook Express }{\f49 programs}{\f49 as well as another +\par mailer }{\f49 programs}{\f49 . This address book represented in Windows +\par by }{\b\f49 wab32.dll}{\f49 . The dll exposed it functionality with COM interfaces, +\par so there is nothing to worry about implementation of this dll. +\par Actually we can have access to 3 interfaces for sure: +\par }{\b\f49 IAddrBook}{\f49 , }{\b\f49 IWABObject}{\f49 , }{\b\f49 IABContainer}{\f49 (implements personal address book) +\par These interfaces are not described in details, but some information +\par we can get is in MSDN in shell API }{\f49 reference}{\f49 . Consider }{\f49 reading}{\f49 +\par descriptions of MAPI implementation of the functions because +\par it provides more info and is more clearly. +\par +\par The class allows browse for users, select users in predefined +\par edit boxes, create, delete and edit users and users' properties. +\par +\par To use the class }{\f49 you}{\f49 first of all must call function }{\b\f49\cf2 Init()}{\f49 and +\par make sure it is succeed. Otherwise you will not be able to work with the class. +\par The }{\b\f49 COXWABook}{\f49 class uses 2 helper classes. +\par One of them is }{\b\f49 COXMailUser}{\f49 class that }{\f49 encapsulated}{\f49 user properties and operations +\par with these properties. Another one, }{\b\f49 COXPropValue}{\f49 has been created for +\par simplify use of }{\b\f49 SPropValue}{\f49 structure. +\par +\par To use this class make sure you have added "}{\b\i\f49 Edkguid.lib}{\f49 " +\par in }{\i\f49 Project->Settings->Link->Object/Library}{\f49 modules}{\f49 +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.cpp new file mode 100644 index 0000000..9e7deba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.cpp @@ -0,0 +1,253 @@ +// OptionsDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "addressbook.h" +#include "OptionsDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// COptionsDlg dialog + + +COptionsDlg::COptionsDlg(CWnd* pParent /*=NULL*/) + : CDialog(COptionsDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(COptionsDlg) + m_sCaption = _T(""); + m_sDest = _T(""); + m_sEntry = _T(""); + m_bChk1 = FALSE; + m_bChk2 = FALSE; + m_bChk3 = FALSE; + //}}AFX_DATA_INIT + m_bDefault=TRUE; + m_nSel1=0; + m_nSel2=0; + m_nSel3=0; +} + + +void COptionsDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(COptionsDlg) + DDX_Control(pDX, IDC_EDIT3, m_edt3); + DDX_Control(pDX, IDC_EDIT2, m_edt2); + DDX_Control(pDX, IDC_EDIT1, m_edt1); + DDX_Control(pDX, IDC_COMBO3, m_cmb3); + DDX_Control(pDX, IDC_COMBO2, m_cmb2); + DDX_Control(pDX, IDC_COMBO1, m_cmb1); + DDX_Text(pDX, IDC_EDIT_CAPTION, m_sCaption); + DDX_Text(pDX, IDC_EDIT_DEST, m_sDest); + DDX_Text(pDX, IDC_EDIT_ENTRY, m_sEntry); + DDX_Check(pDX, IDC_CHECK1, m_bChk1); + DDX_Check(pDX, IDC_CHECK2, m_bChk2); + DDX_Check(pDX, IDC_CHECK3, m_bChk3); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(COptionsDlg, CDialog) + //{{AFX_MSG_MAP(COptionsDlg) + ON_BN_CLICKED(IDC_RADIO_DEFAULT, OnRadioDefault) + ON_BN_CLICKED(IDC_RADIO_CUSTOM, OnRadioCustom) + ON_BN_CLICKED(IDC_CHECK1, OnCheck1) + ON_BN_CLICKED(IDC_CHECK2, OnCheck2) + ON_BN_CLICKED(IDC_CHECK3, OnCheck3) + ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1) + ON_CBN_SELCHANGE(IDC_COMBO2, OnSelchangeCombo2) + ON_CBN_SELCHANGE(IDC_COMBO3, OnSelchangeCombo3) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// COptionsDlg message handlers + +void COptionsDlg::OnRadioDefault() +{ + m_bDefault=TRUE; + UpdateControls(); +} + +void COptionsDlg::OnRadioCustom() +{ + m_bDefault=FALSE; + UpdateControls(); +} + +void COptionsDlg::OnCheck1() +{ + UpdateData(); + if (!m_bChk1) + { + m_bChk2=m_bChk3=FALSE; + UpdateData(FALSE); + GetDlgItem(IDC_CHECK2)->EnableWindow(FALSE); + GetDlgItem(IDC_CHECK3)->EnableWindow(FALSE); + } + else + { + GetDlgItem(IDC_CHECK2)->EnableWindow(TRUE); + } + UpdateControls(); + +} + +void COptionsDlg::OnCheck2() +{ + UpdateData(); + if (!m_bChk2) + { + m_bChk3=FALSE; + UpdateData(FALSE); + GetDlgItem(IDC_CHECK3)->EnableWindow(FALSE); + } + else + GetDlgItem(IDC_CHECK3)->EnableWindow(TRUE); + + UpdateControls(); + +} + +void COptionsDlg::OnCheck3() +{ + UpdateControls(); + +} + +void COptionsDlg::OnSelchangeCombo1() +{ + //UpdateControls(); + +} + +void COptionsDlg::OnSelchangeCombo2() +{ + //UpdateControls(); + +} + +void COptionsDlg::OnSelchangeCombo3() +{ + //UpdateControls(); + +} + +BOOL COptionsDlg::IsFirstEnabled() +{ + UpdateData(); + if (!m_bDefault && m_bChk1) + return TRUE; + else + return FALSE; +} + +BOOL COptionsDlg::IsSecondEnabled() +{ + if (!m_bDefault && m_bChk2 && IsFirstEnabled()) + return TRUE; + else + return FALSE; + + +} + +BOOL COptionsDlg::IsThirdEnabled() +{ + if (!m_bDefault && m_bChk3 && IsSecondEnabled()) + return TRUE; + else + return FALSE; + +} + + +BOOL COptionsDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + CButton* pButton; + if (m_bDefault) + pButton=(CButton*) GetDlgItem(IDC_RADIO_DEFAULT); + else + pButton=(CButton*) GetDlgItem(IDC_RADIO_CUSTOM); + ASSERT(pButton); + pButton->SetCheck(1); + m_cmb1.SetCurSel(0); + m_cmb2.SetCurSel(0); + m_cmb3.SetCurSel(0); + if (m_bChk1) + GetDlgItem(IDC_CHECK2)->EnableWindow(TRUE); + if (m_bChk2) + GetDlgItem(IDC_CHECK3)->EnableWindow(TRUE); + m_cmb1.SetCurSel(m_nSel1); + m_cmb2.SetCurSel(m_nSel2); + m_cmb3.SetCurSel(m_nSel3); + m_edt1.SetWindowText((LPCTSTR) m_sEdit1); + m_edt2.SetWindowText((LPCTSTR) m_sEdit2); + m_edt3.SetWindowText((LPCTSTR) m_sEdit3); + + UpdateControls(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void COptionsDlg::UpdateControls() +{ + UpdateData(); + BOOL bEnable; + + if (IsFirstEnabled()) + bEnable=TRUE; + else + bEnable=FALSE; + m_cmb1.EnableWindow(bEnable); + m_edt1.EnableWindow(bEnable); + + if (IsSecondEnabled()) + bEnable=TRUE; + else + bEnable=FALSE; + m_cmb2.EnableWindow(bEnable); + m_edt2.EnableWindow(bEnable); + + if (IsThirdEnabled()) + bEnable=TRUE; + else + bEnable=FALSE; + m_cmb3.EnableWindow(bEnable); + m_edt3.EnableWindow(bEnable); + + +} + +void COptionsDlg::OnOK() +{ + UpdateData(TRUE); + m_nSel1=m_cmb1.GetCurSel(); + m_nSel2=m_cmb2.GetCurSel(); + m_nSel3=m_cmb3.GetCurSel(); + m_options.ulType1=m_bChk1?(m_bDefault?MAPI_TO:m_nSel1+1):NULL; + m_options.ulType2=m_bChk2?(m_bDefault?MAPI_CC:m_nSel2+1):NULL; + m_options.ulType3=m_bChk3?(m_bDefault?MAPI_BCC:m_nSel3+1):NULL; + + + m_edt1.GetWindowText(m_sEdit1); + m_edt2.GetWindowText(m_sEdit2); + m_edt3.GetWindowText(m_sEdit3); + m_options.sType1=m_sEdit1; + m_options.sType2=m_sEdit2; + m_options.sType3=m_sEdit3; + m_options.sCaption=m_sCaption; + m_options.sDest=m_sDest; + m_options.sNewEntry=m_sEntry; + + CDialog::OnOK(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.h new file mode 100644 index 0000000..904e8c0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/OptionsDlg.h @@ -0,0 +1,80 @@ +#if !defined(AFX_OPTIONSDLG_H__DBF9C2B5_E4CD_11D3_98F4_204C4F4F5020__INCLUDED_) +#define AFX_OPTIONSDLG_H__DBF9C2B5_E4CD_11D3_98F4_204C4F4F5020__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// OptionsDlg.h : header file +// + +#include "OXWABook.h" + +///////////////////////////////////////////////////////////////////////////// +// COptionsDlg dialog + +class COptionsDlg : public CDialog +{ +// Construction +public: + CString m_sEdit3; + CString m_sEdit2; + CString m_sEdit1; + int m_nSel3; + int m_nSel2; + int m_nSel1; + void UpdateControls(); + BOOL IsThirdEnabled(); + BOOL IsSecondEnabled(); + BOOL IsFirstEnabled(); + COptionsDlg(CWnd* pParent = NULL); // standard constructor + tOXWABOptions m_options; + +// Dialog Data + //{{AFX_DATA(COptionsDlg) + enum { IDD = IDD_DIALOG_BROWSE }; + CEdit m_edt3; + CEdit m_edt2; + CEdit m_edt1; + CComboBox m_cmb3; + CComboBox m_cmb2; + CComboBox m_cmb1; + CString m_sCaption; + CString m_sDest; + CString m_sEntry; + BOOL m_bChk1; + BOOL m_bChk2; + BOOL m_bChk3; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COptionsDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + BOOL m_bDefault; + + // Generated message map functions + //{{AFX_MSG(COptionsDlg) + afx_msg void OnRadioDefault(); + afx_msg void OnRadioCustom(); + afx_msg void OnCheck1(); + afx_msg void OnCheck2(); + afx_msg void OnCheck3(); + afx_msg void OnSelchangeCombo1(); + afx_msg void OnSelchangeCombo2(); + afx_msg void OnSelchangeCombo3(); + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_OPTIONSDLG_H__DBF9C2B5_E4CD_11D3_98F4_204C4F4F5020__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/Resource.h new file mode 100644 index 0000000..1e408a7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/Resource.h @@ -0,0 +1,48 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by AddressBook.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_ADDRESSBOOK_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDD_DIALOG_BROWSE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_BUTTON_FIND 1000 +#define IDC_LIST_RESULTS 1005 +#define IDC_BUTTON_CREATE 1009 +#define IDC_BUTTON_EDIT 1010 +#define IDC_BUTTON_FINDDIALOG 1011 +#define IDC_EDIT_LDAP 1012 +#define IDC_BUTTON_LDAP 1013 +#define IDC_BUTTON_DELETE 1014 +#define IDC_BUTTON_ADDRESS 1015 +#define IDC_CHECK1 1016 +#define IDC_EDIT_EMAIL 1016 +#define IDC_CHECK2 1017 +#define IDC_EDIT_NAME 1017 +#define IDC_CHECK3 1018 +#define IDC_COMBO1 1019 +#define IDC_EDIT_ENTRY 1022 +#define IDC_RADIO_DEFAULT 1023 +#define IDC_RADIO_CUSTOM 1024 +#define IDC_EDIT1 1025 +#define IDC_COMBO_SEARCHBY 1025 +#define IDC_EDIT2 1026 +#define IDC_EDIT3 1027 +#define IDC_COMBO2 1028 +#define IDC_COMBO3 1029 +#define IDC_EDIT_DEST 1030 +#define IDC_EDIT_CAPTION 1031 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1026 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.cpp new file mode 100644 index 0000000..a84f150 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// AddressBook.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.h new file mode 100644 index 0000000..c17e6f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__4FD8257E_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__4FD8257E_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__4FD8257E_E3AD_11D3_ACA4_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.rc2 new file mode 100644 index 0000000..e605743 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/shell/AddressBook/res/AddressBook.rc2 @@ -0,0 +1,13 @@ +// +// ADDRESSBOOK.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.clw new file mode 100644 index 0000000..560e670 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.clw @@ -0,0 +1,115 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CAdvancedAssertApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "advancedassert.h" +LastPage=0 + +ClassCount=3 +Class1=CAdvancedAssertApp +Class2=CAdvancedAssertDlg + +ResourceCount=4 +Resource1=IDD_CUSTOMIZE +Class3=CCustomizeAssertDlg +Resource2=IDD_ADVANCEDASSERT_DIALOG (English (U.S.)) +Resource3=IDD_ADVANCEDASSERT_DIALOG +Resource4=IDD_CUSTOMIZE (English (Canada)) + +[CLS:CAdvancedAssertApp] +Type=0 +BaseClass=CWinApp +HeaderFile=AdvancedAssert.h +ImplementationFile=AdvancedAssert.cpp +LastObject=CAdvancedAssertApp +Filter=N +VirtualFilter=AC + +[CLS:CAdvancedAssertDlg] +Type=0 +BaseClass=CDialog +HeaderFile=AdvancedAssertDlg.h +ImplementationFile=AdvancedAssertDlg.cpp +Filter=D +VirtualFilter=dWC + +[DLG:IDD_STATICHYPERLINK_DIALOG] +Type=1 +Class=CAdvancedAssertDlg + +[DLG:IDD_ADVANCEDASSERT_DIALOG (English (U.S.))] +Type=1 +Class=? +ControlCount=13 +Control1=IDC_STATIC_WEB_UT,static,1342177283 +Control2=IDC_SAMPLE_CAPTION,static,1342308353 +Control3=IDC_STATIC_ABOUT,static,1342308352 +Control4=IDC_STATIC_CLOSE,static,1342308865 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342177294 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342177294 +Control9=IDC_STATIC,static,1342308353 +Control10=IDC_CUSTOMIZE,static,1342308352 +Control11=IDC_STATIC,button,1342177287 +Control12=IDC_ASSERTION,static,1342308353 +Control13=IDC_STATIC,static,1342177294 + +[DLG:IDD_CUSTOMIZE] +Type=1 +Class=CCustomizeAssertDlg +ControlCount=9 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK_SENDMAIL,button,1342242819 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_EDIT_NOTE1,edit,1352732676 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_EDIT_NOTE2,edit,1352732676 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_EDIT_EMAIL,edit,1350631552 + +[CLS:CCustomizeAssertDlg] +Type=0 +HeaderFile=CustomizeAssertDlg.h +ImplementationFile=CustomizeAssertDlg.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=CCustomizeAssertDlg + +[DLG:IDD_ADVANCEDASSERT_DIALOG] +Type=1 +Class=? +ControlCount=13 +Control1=IDC_STATIC_WEB_UT,static,1342177283 +Control2=IDC_SAMPLE_CAPTION,static,1342308353 +Control3=IDC_STATIC_ABOUT,static,1342308352 +Control4=IDC_STATIC_CLOSE,static,1342308865 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342177294 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_STATIC,static,1342177294 +Control9=IDC_STATIC,static,1342308353 +Control10=IDC_CUSTOMIZE,static,1342308352 +Control11=IDC_STATIC,button,1342177287 +Control12=IDC_ASSERTION,static,1342308353 +Control13=IDC_STATIC,static,1342177294 + +[DLG:IDD_CUSTOMIZE (English (Canada))] +Type=1 +Class=? +ControlCount=9 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_CHECK_SENDMAIL,button,1342242819 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_EDIT_NOTE1,edit,1352732676 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_EDIT_NOTE2,edit,1352732676 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_EDIT_EMAIL,edit,1350631552 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.cpp new file mode 100644 index 0000000..ad60682 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.cpp @@ -0,0 +1,99 @@ +// AdvancedAssert.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "AdvancedAssert.h" +#include "AdvancedAssertDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertApp + +BEGIN_MESSAGE_MAP(CAdvancedAssertApp, CWinApp) + //{{AFX_MSG_MAP(CAdvancedAssertApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertApp construction + +CAdvancedAssertApp::CAdvancedAssertApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CAdvancedAssertApp object + +CAdvancedAssertApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertApp initialization + +BOOL CAdvancedAssertApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CAdvancedAssertDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CAdvancedAssertApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsp new file mode 100644 index 0000000..5ff38e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsp @@ -0,0 +1,309 @@ +# Microsoft Developer Studio Project File - Name="AdvancedAssert" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=AdvancedAssert - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AdvancedAssert.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AdvancedAssert.mak" CFG="AdvancedAssert - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AdvancedAssert - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedAssert - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedAssert - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedAssert - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedAssert - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AdvancedAssert - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedAssert.exe" + +!ELSEIF "$(CFG)" == "AdvancedAssert - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"AdvancedAssert.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AdvancedAssert - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "StaticHy" +# PROP BASE Intermediate_Dir "StaticHy" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedAssert.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedAssert.exe" + +!ELSEIF "$(CFG)" == "AdvancedAssert - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Advanced" +# PROP BASE Intermediate_Dir "Advanced" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"AdvancedAssert.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"AdvancedAssert.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AdvancedAssert - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Advance0" +# PROP BASE Intermediate_Dir "Advance0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedAssert.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"AdvancedAssert.exe" + +!ENDIF + +# Begin Target + +# Name "AdvancedAssert - Win32 Release" +# Name "AdvancedAssert - Win32 Debug" +# Name "AdvancedAssert - Win32 Release_Shared" +# Name "AdvancedAssert - Win32 Unicode_Debug" +# Name "AdvancedAssert - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHyperLinkAction.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\AdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=.\AdvancedAssert.rc +# End Source File +# Begin Source File + +SOURCE=.\AdvancedAssertDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\CustomizeAssertDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AdvancedAssert.h +# End Source File +# Begin Source File + +SOURCE=.\AdvancedAssertDlg.h +# End Source File +# Begin Source File + +SOURCE=.\CustomizeAssertDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAdvancedAssert.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAdvancedAssertMail.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHyperLinkAction.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticHyperLink.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\AdvancedAssert.ico +# End Source File +# Begin Source File + +SOURCE=.\res\AdvancedAssert.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\arrow1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\arrow2.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsw new file mode 100644 index 0000000..6c7326f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AdvancedAssert"=".\AdvancedAssert.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.h new file mode 100644 index 0000000..15cf959 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.h @@ -0,0 +1,50 @@ +// AdvancedAssert.h : main header file for the STATICHYPERLINK application +// + +#if !defined(AFX_ADVANCEDASSERT_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_ADVANCEDASSERT_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertApp: +// See StaticHyperLink.cpp for the implementation of this class +// + +class CAdvancedAssertApp : public CWinApp +{ +public: + CAdvancedAssertApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedAssertApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CAdvancedAssertApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADVANCEDASSERT_H__ED8354A6_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.rc new file mode 100644 index 0000000..d0594cf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.rc @@ -0,0 +1,278 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc"" \r\n" + "#include ""OXHyperLinkAction.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\AdvancedAssert.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\AdvancedAssert.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ADVANCEDASSERT_DIALOG DIALOGEX 0, 0, 185, 237 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "AdvancedAssert" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC_WEB_UT,7,7,20,20,0, + WS_EX_CLIENTEDGE + CTEXT "Advanced Asserts",IDC_SAMPLE_CAPTION,35,14,133,8 + LTEXT "About the sample",IDC_STATIC_ABOUT,73,178,56,8 + CTEXT "Close",IDC_STATIC_CLOSE,83,211,18,8,SS_CENTERIMAGE + LTEXT "Click here to read",IDC_STATIC,7,178,56,8 + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP,30,168,54,7, + WS_EX_TRANSPARENT + LTEXT "and here to exit the application",IDC_STATIC,7,191,98,8 + CONTROL 133,IDC_STATIC,"Static",SS_BITMAP,25,201,40,30, + WS_EX_TRANSPARENT + CTEXT "Advanced Assert were designed specifically to manage process of beta-testing. We override the way MFC notifies about assertions in the code. In addition to the information provided in MFC we provide the functionality of sending assert information by email", + IDC_STATIC,7,34,171,43 + LTEXT "Customize Assert dialog",IDC_CUSTOMIZE,103,79,75,8 + GROUPBOX "Advanced Assert in Action",IDC_STATIC,7,99,171,51 + CTEXT "By clicking over this text you will incur assertion that will be handled using our implementation of ASSERT macro if this application compiled with debug options set on", + IDC_ASSERTION,10,112,165,34 + CONTROL 134,IDC_STATIC,"Static",SS_BITMAP,63,81,32,4 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "AdvancedAssert MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "AdvancedAssert\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "AdvancedAssert.EXE\0" + VALUE "ProductName", "AdvancedAssert Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ADVANCEDASSERT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 230 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About AdvancedAssert..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "AdvancedAssert" + ID_DESCRIPTION_FILE "AdvancedAssertInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CUSTOMIZE DIALOG DISCARDABLE 0, 0, 253, 188 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Customize Assert Dialog" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,63,167,50,14 + PUSHBUTTON "Cancel",IDCANCEL,139,167,50,14 + CONTROL "Show Send Mail button",IDC_CHECK_SENDMAIL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,7,89,10 + LTEXT "Text to display in the Assert Dialog (Note1)", + IDC_STATIC,7,23,134,8 + EDITTEXT IDC_EDIT_NOTE1,7,35,239,36,ES_MULTILINE | ES_WANTRETURN | + WS_VSCROLL + LTEXT "Text to display in the Assert Dialog (Note2)", + IDC_STATIC,7,79,134,8 + EDITTEXT IDC_EDIT_NOTE2,7,92,239,36,ES_MULTILINE | ES_WANTRETURN | + WS_VSCROLL + LTEXT "Email address",IDC_STATIC,7,136,44,8 + EDITTEXT IDC_EDIT_EMAIL,56,134,190,12,ES_AUTOHSCROLL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CUSTOMIZE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 181 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_ARROW1 BITMAP DISCARDABLE "res\\arrow1.bmp" +IDB_ARROW2 BITMAP DISCARDABLE "res\\arrow2.bmp" +IDB_ARROW3 BITMAP DISCARDABLE "res\\bitmap1.bmp" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" +#include "OXHyperLinkAction.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\AdvancedAssert.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.vcproj new file mode 100644 index 0000000..c53d2b9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssert.vcproj @@ -0,0 +1,1154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.cpp new file mode 100644 index 0000000..997e2d4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.cpp @@ -0,0 +1,279 @@ +// AdvancedAssertDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "AdvancedAssert.h" +#include "AdvancedAssertDlg.h" +#include "UTSampleAbout.h" +#include "CustomizeAssertDlg.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// message to react on "About" action +static UINT g_nAboutMsgID=RegisterWindowMessage(_T("AboutAdvancedAssert")); +// message to react on "Close" action +static UINT g_nCloseMsgID=RegisterWindowMessage(_T("CloseAdvancedAssert")); +// message to react on "Customize" action +static UINT g_nCustomizeMsgID=RegisterWindowMessage(_T("CustomizeAdvancedAssert")); +// message to react on "Assertion" text +static UINT g_nAssertionMsgID=RegisterWindowMessage(_T("IncurAssertionAdvancedAssert")); +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertDlg dialog + +CAdvancedAssertDlg::CAdvancedAssertDlg(CWnd* pParent /*=NULL*/) + : CDialog(CAdvancedAssertDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CAdvancedAssertDlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CAdvancedAssertDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAdvancedAssertDlg) + DDX_Control(pDX, IDC_ASSERTION, m_ctlAssertion); + DDX_Control(pDX, IDC_CUSTOMIZE, m_ctlCustomize); + DDX_Control(pDX, IDC_SAMPLE_CAPTION, m_ctlStaticSampleCaption); + DDX_Control(pDX, IDC_STATIC_ABOUT, m_ctlStaticAbout); + DDX_Control(pDX, IDC_STATIC_CLOSE, m_ctlStaticClose); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAdvancedAssertDlg, CDialog) + //{{AFX_MSG_MAP(CAdvancedAssertDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP + // map messages with corresponding handlers + ON_REGISTERED_MESSAGE(g_nAboutMsgID,OnAboutActivated) + ON_REGISTERED_MESSAGE(g_nCloseMsgID,OnCloseActivated) + ON_REGISTERED_MESSAGE(g_nCustomizeMsgID,OnCustomizeActivated) + ON_REGISTERED_MESSAGE(g_nAssertionMsgID,OnAssertionActivated) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertDlg message handlers + +BOOL CAdvancedAssertDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // set new LOGINFO of the font of the COXStaticHyperLink object + LOGFONT lf; + GetFont()->GetObject(sizeof(lf), &lf); + lf.lfUnderline=TRUE; + lf.lfWeight=1000; + lf.lfHeight=-18; + CFont font; + font.CreateFontIndirect(&lf); + m_ctlStaticClose.SetTextFont(&font); + // set action as userdefined + // don't forget to set callback message and handle to recipient window + m_ctlStaticClose.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nCloseMsgID,GetSafeHwnd()); + m_ctlStaticClose.SetShowToolTip(FALSE); + + // set action as userdefined + // don't forget to set callback message and handle to recipient window + m_ctlStaticAbout.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nAboutMsgID,GetSafeHwnd()); + m_ctlStaticAbout.SetToolTipText(_T("Information about Advanced Asserts")); + + // set properties of COXStatic controls + // + lf.lfUnderline=FALSE; + lf.lfItalic=TRUE; + lf.lfWeight=1000; + lf.lfHeight=-14; + UTBStr::tcscpy(lf.lfFaceName, LF_FACESIZE, _T("Times New Roman")); + m_ctlStaticSampleCaption.SetTextLogFont(&lf); + m_ctlStaticSampleCaption.SetTextColor(RGB(0,0,128)); + m_ctlStaticSampleCaption.SetShowToolTip(TRUE); + m_ctlStaticSampleCaption.SetToolTipText(_T("Why do we need tool tip here?")); + m_ctlStaticSampleCaption.SetFitToText(TRUE); + + // set action as userdefined + // don't forget to set callback message and handle to recipient window + m_ctlCustomize.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nCustomizeMsgID,GetSafeHwnd()); + m_ctlCustomize.SetToolTipText(_T("Click here to customize assertion dialog")); + + // set action as userdefined + // don't forget to set callback message and handle to recipient window + GetFont()->GetObject(sizeof(lf), &lf); + lf.lfUnderline=FALSE; + m_ctlAssertion.SetTextLogFont(&lf); + m_ctlAssertion.SetUnvisitedColor(RGB(0,128,128)); + m_ctlAssertion.SetFitToText(FALSE); + m_ctlAssertion.SetToolTipText(_T("Click here to fire an assertion")); + m_ctlAssertion.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nAssertionMsgID,GetSafeHwnd()); + + m_sNote1=AppGetAssertNote1(); + m_sNote2=AppGetAssertNote2(); + m_sEmailAddress="Support[SMTP:support@theUltimateToolbox.com]"; + AppSetAssertEmailAddress(m_sEmailAddress); + m_bSendMail=AppGetAssertSendState(); + + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CAdvancedAssertDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CAdvancedAssertDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CAdvancedAssertDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +// "About" action was activated +LONG CAdvancedAssertDlg::OnAboutActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + + return (LONG)1; +} + +// "Close" action was activated +LONG CAdvancedAssertDlg::OnCloseActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + // just close the dialog + EndDialog(IDOK); + + return (LONG)1; +} + +// "Customize" action was activated +LONG CAdvancedAssertDlg::OnCustomizeActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CCustomizeAssertDlg dlg; + dlg.m_sNote1=m_sNote1; + dlg.m_sNote2=m_sNote2; + dlg.m_sEmailAddress=m_sEmailAddress; + dlg.m_bSendMail=m_bSendMail; + + switch(dlg.DoModal()) + { + case IDOK: + { + m_sNote1=dlg.m_sNote1; + m_sNote2=dlg.m_sNote2; + m_sEmailAddress=dlg.m_sEmailAddress; + m_bSendMail=dlg.m_bSendMail; + AppSetAssertEmailAddress(m_sEmailAddress); + AppSetAssertNote1(m_sNote1); + AppSetAssertNote2(m_sNote2); + AppSetAssertSendState(m_bSendMail); } + break; + case IDCANCEL: + { + + } + break; + } + + return (LONG)1; +} + +// "Assertion" action was activated +LONG CAdvancedAssertDlg::OnAssertionActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + int nMonth=0 ; + ASSERT( (nMonth >= 1) && (nMonth <=12) ) ; + +#if !(defined(_DEBUG) || defined(BETA)) + AfxMessageBox(_T("The sample was compiled in release mode without declaring \nBETA in the stdafx.h. Assertion won't be activated!")); +#endif + + return (LONG)1; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.h new file mode 100644 index 0000000..5aede53 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertDlg.h @@ -0,0 +1,64 @@ +// AdvancedAssertDlg.h : header file +// + +#include "OXStaticHyperLink.h" + +#if !defined(AFX_ADVANCEDASSERTDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_ADVANCEDASSERTDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedAssertDlg dialog + +class CAdvancedAssertDlg : public CDialog +{ +// Construction +public: + CAdvancedAssertDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CAdvancedAssertDlg) + enum { IDD = IDD_ADVANCEDASSERT_DIALOG }; + COXStaticHyperLink m_ctlAssertion; + COXStaticHyperLink m_ctlCustomize; + COXStatic m_ctlStaticSampleCaption; + COXStaticHyperLink m_ctlStaticAbout; + COXStaticHyperLink m_ctlStaticClose; + //}}AFX_DATA + CString m_sNote1; + CString m_sNote2; + CString m_sEmailAddress; + BOOL m_bSendMail; + + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedAssertDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CAdvancedAssertDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + afx_msg LONG OnAboutActivated(UINT wParam, LONG lParam); + afx_msg LONG OnCloseActivated(UINT wParam, LONG lParam); + afx_msg LONG OnCustomizeActivated(UINT wParam, LONG lParam); + afx_msg LONG OnAssertionActivated(UINT wParam, LONG lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADVANCEDASSERTDLG_H__ED8354A8_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertInfo.rtf new file mode 100644 index 0000000..8687bec Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/AdvancedAssertInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.cpp new file mode 100644 index 0000000..26ba66f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.cpp @@ -0,0 +1,55 @@ +// CustomizeAssertDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "advancedassert.h" +#include "CustomizeAssertDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeAssertDlg dialog + + +CCustomizeAssertDlg::CCustomizeAssertDlg(CWnd* pParent /*=NULL*/) + : CDialog(CCustomizeAssertDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCustomizeAssertDlg) + m_bSendMail = FALSE; + m_sEmailAddress = _T(""); + m_sNote1 = _T(""); + m_sNote2 = _T(""); + //}}AFX_DATA_INIT +} + + +void CCustomizeAssertDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCustomizeAssertDlg) + DDX_Check(pDX, IDC_CHECK_SENDMAIL, m_bSendMail); + DDX_Text(pDX, IDC_EDIT_EMAIL, m_sEmailAddress); + DDX_Text(pDX, IDC_EDIT_NOTE1, m_sNote1); + DDX_Text(pDX, IDC_EDIT_NOTE2, m_sNote2); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCustomizeAssertDlg, CDialog) + //{{AFX_MSG_MAP(CCustomizeAssertDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeAssertDlg message handlers + +void CCustomizeAssertDlg::OnOK() +{ + // TODO: Add extra validation here + + CDialog::OnOK(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.h new file mode 100644 index 0000000..4cff801 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/CustomizeAssertDlg.h @@ -0,0 +1,49 @@ +#if !defined(AFX_CUSTOMIZEASSERTDLG_H__6EC9E164_1A72_11D2_888E_0080C83F712F__INCLUDED_) +#define AFX_CUSTOMIZEASSERTDLG_H__6EC9E164_1A72_11D2_888E_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// CustomizeAssertDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCustomizeAssertDlg dialog + +class CCustomizeAssertDlg : public CDialog +{ +// Construction +public: + CCustomizeAssertDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCustomizeAssertDlg) + enum { IDD = IDD_CUSTOMIZE }; + BOOL m_bSendMail; + CString m_sEmailAddress; + CString m_sNote1; + CString m_sNote2; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCustomizeAssertDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCustomizeAssertDlg) + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CUSTOMIZEASSERTDLG_H__6EC9E164_1A72_11D2_888E_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.cpp new file mode 100644 index 0000000..2a4197c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// StaticHyperLink.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.h new file mode 100644 index 0000000..310f0b8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/StdAfx.h @@ -0,0 +1,32 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define BETA + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +// afx.h is normally included within afxwin.h, but we do so +// here so that most of the MFC inline asserts will +// use our Advanced Asserts mechanism. +#include // MFC version of ASSERT +#include "OXAdvancedAssert.h" // Redefine ASSERT our way. + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__ED8354AA_AC60_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.ico new file mode 100644 index 0000000..32949bd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.rc2 new file mode 100644 index 0000000..9d5056b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/AdvancedAssert.rc2 @@ -0,0 +1,13 @@ +// +// STATICHYPERLINK.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow1.bmp new file mode 100644 index 0000000..b316d52 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow2.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow2.bmp new file mode 100644 index 0000000..a76acce Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/arrow2.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/bitmap1.bmp new file mode 100644 index 0000000..76a56f6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/resource.h new file mode 100644 index 0000000..c9e9d12 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedAssert/resource.h @@ -0,0 +1,65 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by AdvancedAssert.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_STATICHYPERLINK_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDD_CUSTOMIZESTATICHYPERLINK_DIALOG 130 +#define IDD_CUSTOMIZESTATIC_DIALOG 131 +#define IDD_ADVANCEDASSERT_DIALOG 131 +#define IDB_ARROW1 132 +#define IDB_ARROW2 133 +#define IDB_ARROW3 134 +#define IDD_CUSTOMIZE 135 +#define IDC_STATIC_BILL_GATES 1000 +#define IDC_STATIC_EMAIL_ANDREI 1001 +#define IDC_STATIC_ABOUT 1002 +#define IDC_STATIC_WEB_UT 1003 +#define IDC_STATIC_WEB_DUNDAS 1004 +#define IDC_STATIC_FAX 1005 +#define IDC_STATIC_EMAIL_SALES 1006 +#define IDC_STATIC_SOLITAIRE 1007 +#define IDC_STATIC_CLOSE 1008 +#define IDC_COMBO_ACTION 1009 +#define IDC_BUTTON_CLR_VISITED 1010 +#define IDC_BUTTON_CLR_UNVISITED 1011 +#define IDC_BUTTON_FONT 1012 +#define IDC_CHECK_USE_WINDOW_TEXT 1013 +#define IDC_CHECK_ERROR_NOTIFY 1014 +#define IDC_CHECK_FIT_TO_TEXT 1015 +#define IDC_CHECK_SHOW_TOOLTIP 1016 +#define IDC_EDIT_FILE 1017 +#define IDC_EDIT_PARAMETERS 1018 +#define IDC_EDIT_DEFAULT_DIRECTORY 1019 +#define IDC_EDIT_TOOLTIP_TEXT 1020 +#define IDC_CHECK_USE_SPECIAL_CURSOR 1021 +#define IDC_EDIT_VISITED_COLOR 1023 +#define IDC_EDIT_UNVISITED_COLOR 1024 +#define IDC_EDIT_CALLBACK_MESSAGE_ID 1026 +#define IDC_EDIT_FONT_NAME 1027 +#define IDC_EDIT_WINDOW_TEXT 1028 +#define IDC_SAMPLE_CAPTION 1029 +#define IDC_BUTTON_COLOR 1030 +#define IDC_EDIT_COLOR 1031 +#define IDC_STATIC_HINT 1032 +#define IDC_CUSTOMIZE 1035 +#define IDC_ASSERTION 1036 +#define IDC_CHECK_SENDMAIL 1037 +#define IDC_EDIT_NOTE1 1038 +#define IDC_EDIT_NOTE2 1039 +#define IDC_EDIT_EMAIL 1041 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 136 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1042 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.clw new file mode 100644 index 0000000..db05f41 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.clw @@ -0,0 +1,64 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CAdvancedTraceDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "AdvancedTrace.h" + +ClassCount=2 +Class1=CAdvancedTraceApp +Class2=CAdvancedTraceDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_ADVANCEDTRACE_DIALOG + +[CLS:CAdvancedTraceApp] +Type=0 +HeaderFile=AdvancedTrace.h +ImplementationFile=AdvancedTrace.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CAdvancedTraceApp + +[CLS:CAdvancedTraceDlg] +Type=0 +HeaderFile=AdvancedTraceDlg.h +ImplementationFile=AdvancedTraceDlg.cpp +Filter=D +LastObject=IDCANCEL +BaseClass=CDialog +VirtualFilter=dWC + +[DLG:IDD_ADVANCEDTRACE_DIALOG] +Type=1 +Class=CAdvancedTraceDlg +ControlCount=24 +Control1=IDOK,button,1342242817 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_SEPARATOR1,static,1342312448 +Control7=IDC_OUTPUT_FILE1,static,1342308865 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_SEPARATOR2,static,1342312448 +Control10=IDC_EDIT,edit,1350631552 +Control11=IDC_BUTTON,button,1342242816 +Control12=IDC_STATIC,static,1342308352 +Control13=IDC_COMBO,combobox,1344339971 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_LISTBOX,listbox,1352728835 +Control16=IDC_CHECK,button,1342242819 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_LISTCTRL,SysListView32,1350631425 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_OUTPUT_FILE2,static,1342308865 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.cpp new file mode 100644 index 0000000..0ef584d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.cpp @@ -0,0 +1,112 @@ +// AdvancedTrace.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "AdvancedTrace.h" +#include "AdvancedTraceDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceApp + +BEGIN_MESSAGE_MAP(CAdvancedTraceApp, CWinApp) + //{{AFX_MSG_MAP(CAdvancedTraceApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceApp construction + +CAdvancedTraceApp::CAdvancedTraceApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CAdvancedTraceApp object + +CAdvancedTraceApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceApp initialization + +BOOL CAdvancedTraceApp::InitInstance() +{ + // 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. + + OXTRACE_SETDUMPFILE(_T("TraceTest.txt")); + OXTRACE_SETFLUSH(TRUE); + + OXTRACE(_T("AdvancedTrace Demo")); + + OXTRACE_WRITE(_T("Enable 3D controls")); +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + OXTRACE_WRITE(_T("Initialize RichEdit control")); + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + OXTRACE_WRITE(_T("Create Dialog")); + + CAdvancedTraceDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + OXTRACE_WRITE(_T("Close Application")); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CAdvancedTraceApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + OXTRACE(_T("Clean up")); + OXTRACE_WRITE(_T("Unload the library for rich edit text support")); + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsp new file mode 100644 index 0000000..697fac1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsp @@ -0,0 +1,274 @@ +# Microsoft Developer Studio Project File - Name="AdvancedTrace" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=AdvancedTrace - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AdvancedTrace.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AdvancedTrace.mak" CFG="AdvancedTrace - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AdvancedTrace - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedTrace - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedTrace - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedTrace - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "AdvancedTrace - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AdvancedTrace - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedTrace.exe" + +!ELSEIF "$(CFG)" == "AdvancedTrace - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"AdvancedTrace.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AdvancedTrace - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AdvancedTrace___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "AdvancedTrace___Win32_Release_Shared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"AdvancedTrace.exe" + +!ELSEIF "$(CFG)" == "AdvancedTrace - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "AdvancedTrace___Win32_Unicode_Debug" +# PROP BASE Intermediate_Dir "AdvancedTrace___Win32_Unicode_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "OXTRACEON" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"AdvancedTrace.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "AdvancedTrace - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "AdvancedTrace___Win32_Unicode_Release" +# PROP BASE Intermediate_Dir "AdvancedTrace___Win32_Unicode_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "OXTRACEON" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"AdvancedTrace.exe" + +!ENDIF + +# Begin Target + +# Name "AdvancedTrace - Win32 Release" +# Name "AdvancedTrace - Win32 Debug" +# Name "AdvancedTrace - Win32 Release_Shared" +# Name "AdvancedTrace - Win32 Unicode_Debug" +# Name "AdvancedTrace - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTBSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHyperLinkAction.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSeparator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTrace.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\AdvancedTrace.cpp +# End Source File +# Begin Source File + +SOURCE=.\AdvancedTrace.rc +# End Source File +# Begin Source File + +SOURCE=.\AdvancedTraceDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AdvancedTrace.h +# End Source File +# Begin Source File + +SOURCE=.\AdvancedTraceDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStatic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTrace.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\AdvancedTrace.ico +# End Source File +# Begin Source File + +SOURCE=.\res\AdvancedTrace.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsw new file mode 100644 index 0000000..7caca70 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AdvancedTrace"=".\AdvancedTrace.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.h new file mode 100644 index 0000000..7c1c670 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.h @@ -0,0 +1,52 @@ +// AdvancedTrace.h : main header file for the ADVANCEDTRACE application +// + +#if !defined(AFX_ADVANCEDTRACE_H__3454410A_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) +#define AFX_ADVANCEDTRACE_H__3454410A_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +#include "OXTrace.h" + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceApp: +// See AdvancedTrace.cpp for the implementation of this class +// + +class CAdvancedTraceApp : public CWinApp +{ +public: + CAdvancedTraceApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedTraceApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CAdvancedTraceApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADVANCEDTRACE_H__3454410A_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.rc new file mode 100644 index 0000000..43465f7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.rc @@ -0,0 +1,265 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\AdvancedTrace.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""UTSampleAbout.rc""\r\n" + "#include ""OXBitmapButton.rc"" \r\n" + "#include ""OXHyperLinkAction.rc""\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 DISCARDABLE "res\\AdvancedTrace.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ADVANCEDTRACE_DIALOG DIALOGEX 0, 0, 320, 277 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "AdvancedTrace" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Close",IDOK,7,256,50,14 + LTEXT "Edit control",IDC_STATIC,7,164,36,8 + LTEXT "This demo uses COXTrace class in order to provide tracing support. COXTrace class allows you to forward trace output into the file. Also it automatically wraps long strings.", + IDC_STATIC,7,7,306,19 + LTEXT "But the most interesting functionality of this class includes support for blocks of trace messages.", + IDC_STATIC,7,27,306,9 + LTEXT "In this demo we put a lot of TRACE statements. You might try to update the contents of the controls displayed - all your activity will be traced. The output will be saved in the following file:", + IDC_STATIC,7,100,306,19 + LTEXT "",IDC_SEPARATOR1,7,89,306,8,SS_SUNKEN + CTEXT "TraceTest.txt",IDC_OUTPUT_FILE1,7,122,94,14, + SS_CENTERIMAGE + LTEXT "This file will be located in the same directory as this demo executable", + IDC_STATIC,7,140,216,8 + LTEXT "Change the controls contents!",IDC_SEPARATOR2,7,154,306, + 8,SS_SUNKEN + EDITTEXT IDC_EDIT,7,174,56,12,ES_AUTOHSCROLL + PUSHBUTTON "Click me!",IDC_BUTTON,79,173,54,14 + LTEXT "Button",IDC_STATIC,81,164,22,8 + COMBOBOX IDC_COMBO,153,174,73,76,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Combo",IDC_STATIC,153,164,23,8 + LISTBOX IDC_LISTBOX,7,202,84,48,LBS_SORT | LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + CONTROL "Check box",IDC_CHECK,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,247,176,66,10 + LTEXT "List Box",IDC_STATIC,7,193,26,8 + CONTROL "List2",IDC_LISTCTRL,"SysListView32",LVS_REPORT | + WS_BORDER | WS_TABSTOP,105,202,208,48 + LTEXT "List Control",IDC_STATIC,107,193,66,8 + LTEXT "Check out the TRACE output in the file",IDC_STATIC,106, + 257,124,8 + CTEXT "TraceTest.txt",IDC_OUTPUT_FILE2,237,257,43,8, + SS_CENTERIMAGE + LTEXT "In order to simplify the process of identifying of such blocks of TRACE messages COXTrace support indention level for every block: whenever start of block is marked the indention is", + IDC_STATIC,7,54,306,16 + LTEXT "When you create COXTrace object it automaticaly marks the start of new block and when the object is being destroyed it automatically marks the end of the current block.", + IDC_STATIC,7,35,306,15 + LTEXT "increased (by default by 4 symbols) and whenever end of block is marked the indention is decreased.", + IDC_STATIC,7,71,306,16 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "AdvancedTrace MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "AdvancedTrace\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "AdvancedTrace.EXE\0" + VALUE "ProductName", "AdvancedTrace Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ADVANCEDTRACE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 7 + BOTTOMMARGIN, 270 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_ADVANCEDTRACE_DIALOG DLGINIT +BEGIN + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3120, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3220, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3320, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3420, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3520, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3620, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3720, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3820, "\000" + IDC_COMBO, 0x403, 7, 0 +0x7449, 0x6d65, 0x3920, "\000" + IDC_COMBO, 0x403, 8, 0 +0x7449, 0x6d65, 0x3120, 0x0030, + 0 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About AdvancedTrace..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "AdvancedTrace" + ID_DESCRIPTION_FILE "TraceInfo.rtf" +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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\AdvancedTrace.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "UTSampleAbout.rc" +#include "OXBitmapButton.rc" +#include "OXHyperLinkAction.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.vcproj new file mode 100644 index 0000000..7a8f5d5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTrace.vcproj @@ -0,0 +1,1082 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.cpp new file mode 100644 index 0000000..41b609a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.cpp @@ -0,0 +1,299 @@ +// AdvancedTraceDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "AdvancedTrace.h" +#include "AdvancedTraceDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceDlg dialog + +CAdvancedTraceDlg::CAdvancedTraceDlg(CWnd* pParent /*=NULL*/) + : CDialog(CAdvancedTraceDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CAdvancedTraceDlg) + m_bChecked = FALSE; + m_nComboItem = -1; + m_sListBoxItem = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + pTrace=NULL; +} + +void CAdvancedTraceDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAdvancedTraceDlg) + DDX_Control(pDX, IDC_LISTCTRL, m_listCtrl); + DDX_Control(pDX, IDC_LISTBOX, m_listBox); + DDX_Control(pDX, IDC_OUTPUT_FILE2, m_linkOutputFile); + DDX_Control(pDX, IDC_OUTPUT_FILE1, m_staticOutputFile); + DDX_Control(pDX, IDC_SEPARATOR2, m_separator2); + DDX_Control(pDX, IDC_SEPARATOR1, m_separator1); + DDX_Check(pDX, IDC_CHECK, m_bChecked); + DDX_CBIndex(pDX, IDC_COMBO, m_nComboItem); + DDX_LBString(pDX, IDC_LISTBOX, m_sListBoxItem); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAdvancedTraceDlg, CDialog) + //{{AFX_MSG_MAP(CAdvancedTraceDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON, OnButton) + ON_BN_CLICKED(IDC_CHECK, OnCheck) + ON_CBN_SELCHANGE(IDC_COMBO, OnSelchangeCombo) + ON_EN_CHANGE(IDC_EDIT, OnChangeEdit) + ON_LBN_SELCHANGE(IDC_LISTBOX, OnSelchangeListbox) + ON_NOTIFY(LVN_ITEMCHANGED, IDC_LISTCTRL, OnItemchangedListctrl) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceDlg message handlers + +BOOL CAdvancedTraceDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + { + // put the following code in brackets in order to destroy COXTrace + // object before intantianting the new one + + OXTRACE(_T("Initialize dialog data")); + + OXTRACE_WRITE(_T("Add 'About...' menu item to system menu.")); + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + OXTRACE_WRITE(_T("Initialize controls")); + + OXTRACE_WRITE(_T("Setup static controls")); + //////////////////////////////// + m_separator2.SetTextColor(::GetSysColor(COLOR_WINDOW)); + LOGFONT lf; + GetFont()->GetObject(sizeof(lf), &lf); + lf.lfWeight=1000; + lf.lfHeight=-16; + CFont font; + font.CreateFontIndirect(&lf); + m_staticOutputFile.SetTextFont(&font); + + m_linkOutputFile.SetToolTipText(_T("Click to open output file")); + m_linkOutputFile.SetAction(ID_HLACTION_OPEN,_T("TraceTest.txt")); + //////////////////////////////// + + OXTRACE_WRITE(_T("Populate common controls with data")); + //////////////////////////////// + // populate list control + CString sColumnText; + CString sItemText; + for (int nColumn=0; nColumn<6; nColumn++) + { + sColumnText.Format(_T("Column %d"),nColumn+1); + m_listCtrl.InsertColumn(nColumn,sColumnText,LVCFMT_LEFT,100); + + for(int nRow=0; nRow<10; nRow++) + { + sItemText.Format(_T("Item %d in column %d"),nRow+1,nColumn+1); + if(nColumn==0) + m_listCtrl.InsertItem(nRow,sItemText,0); + else + m_listCtrl.SetItem(nRow,nColumn,LVIF_TEXT, + sItemText,NULL,NULL,NULL,NULL); + } + } + ///////////////////////////////// + + + + // populate listbox control + for (int nIndex=0; nIndex<10; nIndex++) + { + sItemText.Format(_T("Listbox item %d"),nIndex+1); + m_listBox.AddString(sItemText); + } + ///////////////////////////////// + + // the COXTrace object created using OXTRACE macro will be destroyed + // when it is out of scope + } + + + //////////////////////////////// + + pTrace=new COXTrace(_T("Demo Dialog")); + + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CAdvancedTraceDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + OXTRACE(_T("Display About Dialog")); + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CAdvancedTraceDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CAdvancedTraceDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CAdvancedTraceDlg::OnButton() +{ + // TODO: Add your control notification handler code here + ASSERT(pTrace!=NULL); + pTrace->Write(_T("Button has been clicked")); +} + +void CAdvancedTraceDlg::OnCheck() +{ + // TODO: Add your control notification handler code here + ASSERT(pTrace!=NULL); + UpdateData(); + pTrace->Write(_T("Button has been "), + (m_bChecked ? _T("checked") : _T("unchecked"))); +} + +void CAdvancedTraceDlg::OnSelchangeCombo() +{ + // TODO: Add your control notification handler code here + ASSERT(pTrace!=NULL); + UpdateData(); + pTrace->WriteFormatted(_T("Current item in combo box changed to: %d"), + m_nComboItem); +} + +void CAdvancedTraceDlg::OnChangeEdit() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + + // TODO: Add your control notification handler code here + + ASSERT(pTrace!=NULL); + UpdateData(); + pTrace->Write(_T("The contents of the edit control has been changed")); +} + +void CAdvancedTraceDlg::OnSelchangeListbox() +{ + // TODO: Add your control notification handler code here + ASSERT(pTrace!=NULL); + UpdateData(); + pTrace->WriteFormatted(_T("Current item in list box changed to: %s"), + m_sListBoxItem); +} + +void CAdvancedTraceDlg::OnItemchangedListctrl(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + + ASSERT(pTrace!=NULL); + UpdateData(); + pTrace->WriteFormatted(_T("The state of %d item has been changed in the list control"), + pNMListView->iItem); + + *pResult = 0; +} + +void CAdvancedTraceDlg::OnOK() +{ + // TODO: Add extra validation here + + if(pTrace!=NULL) + { + pTrace->Write(_T("State of dialog object:"),*this); + delete pTrace; + pTrace=NULL; + } + + CDialog::OnOK(); +} + +void CAdvancedTraceDlg::OnCancel() +{ + // TODO: Add extra cleanup here + + if(pTrace!=NULL) + { + pTrace->Write(_T("State of dialog object before closing:"),*this); + delete pTrace; + pTrace=NULL; + } + + CDialog::OnCancel(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.h new file mode 100644 index 0000000..4e8965c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/AdvancedTraceDlg.h @@ -0,0 +1,71 @@ +// AdvancedTraceDlg.h : header file +// + +#if !defined(AFX_ADVANCEDTRACEDLG_H__3454410C_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) +#define AFX_ADVANCEDTRACEDLG_H__3454410C_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "OXSeparator.h" +#include "OXStaticHyperLink.h" +#include "OXTrace.h" + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedTraceDlg dialog + +class CAdvancedTraceDlg : public CDialog +{ +// Construction +public: + CAdvancedTraceDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CAdvancedTraceDlg) + enum { IDD = IDD_ADVANCEDTRACE_DIALOG }; + CListCtrl m_listCtrl; + CListBox m_listBox; + COXStaticHyperLink m_linkOutputFile; + COXStatic m_staticOutputFile; + COXSeparator m_separator2; + COXSeparator m_separator1; + BOOL m_bChecked; + int m_nComboItem; + CString m_sListBoxItem; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAdvancedTraceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXTrace* pTrace; + + // Generated message map functions + //{{AFX_MSG(CAdvancedTraceDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButton(); + afx_msg void OnCheck(); + afx_msg void OnSelchangeCombo(); + afx_msg void OnChangeEdit(); + afx_msg void OnSelchangeListbox(); + afx_msg void OnItemchangedListctrl(NMHDR* pNMHDR, LRESULT* pResult); + virtual void OnOK(); + virtual void OnCancel(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADVANCEDTRACEDLG_H__3454410C_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/Resource.h new file mode 100644 index 0000000..5a6cd65 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/Resource.h @@ -0,0 +1,30 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by AdvancedTrace.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_ADVANCEDTRACE_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_SEPARATOR1 1000 +#define IDC_OUTPUT_FILE1 1001 +#define IDC_SEPARATOR2 1002 +#define IDC_EDIT 1003 +#define IDC_BUTTON 1004 +#define IDC_COMBO 1005 +#define IDC_LISTBOX 1006 +#define IDC_CHECK 1007 +#define IDC_LISTCTRL 1008 +#define IDC_OUTPUT_FILE2 1009 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1011 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.cpp new file mode 100644 index 0000000..51f910d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// AdvancedTrace.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.h new file mode 100644 index 0000000..3551833 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/StdAfx.h @@ -0,0 +1,26 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__3454410E_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) +#define AFX_STDAFX_H__3454410E_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#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 + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__3454410E_BC3C_11D2_A7BD_525400DAF3CE__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceInfo.rtf new file mode 100644 index 0000000..32f3972 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceTest.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceTest.txt new file mode 100644 index 0000000..e2597ea Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/TraceTest.txt differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.rc2 new file mode 100644 index 0000000..065dd39 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/AdvancedTrace/res/AdvancedTrace.rc2 @@ -0,0 +1,13 @@ +// +// ADVANCEDTRACE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.clw new file mode 100644 index 0000000..7f490ce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.clw @@ -0,0 +1,35 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CClipDockDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "ClipDock.h" + +ClassCount=2 +Class1=CClipDockApp +Class2=CClipDockDlg + +ResourceCount=2 +Resource2=IDR_MAINFRAME + +[CLS:CClipDockApp] +Type=0 +HeaderFile=ClipDock.h +ImplementationFile=ClipDock.cpp +Filter=W +BaseClass=CWinApp +VirtualFilter=AC + +[CLS:CClipDockDlg] +Type=0 +HeaderFile=ClipDockDlg.h +ImplementationFile=ClipDockDlg.cpp +Filter=D +BaseClass=COXAppBar +VirtualFilter=dWC +LastObject=CClipDockDlg + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.cpp new file mode 100644 index 0000000..acb6707 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.cpp @@ -0,0 +1,114 @@ +// ClipDock.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ClipDock.h" +#include "ClipDockDlg.h" +#include "UTSampleAbout.h" +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CClipDockApp + +BEGIN_MESSAGE_MAP(CClipDockApp, CWinApp) + //{{AFX_MSG_MAP(CClipDockApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CClipDockApp construction + +CClipDockApp::CClipDockApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CClipDockApp object + +CClipDockApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CClipDockApp initialization + +BOOL CClipDockApp::InitInstance() +{ + AfxEnableControlContainer(); + + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OX_OLE_INIT_FAILED); + return FALSE; + } + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + CClipDockDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +void CClipDockApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + + +int CClipDockApp::ExitInstance() +{ + + // Unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsp new file mode 100644 index 0000000..695a1c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsp @@ -0,0 +1,278 @@ +# Microsoft Developer Studio Project File - Name="ClipDock" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ClipDock - Win32 UnicodeDebug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ClipDock.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ClipDock.mak" CFG="ClipDock - Win32 UnicodeDebug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ClipDock - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ClipDock - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ClipDock - Win32 UnicodeDebug" (based on "Win32 (x86) Application") +!MESSAGE "ClipDock - Win32 UnicodeRelease" (based on "Win32 (x86) Application") +!MESSAGE "ClipDock - Win32 ReleaseShared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ClipDock - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ClipDock.exe" + +!ELSEIF "$(CFG)" == "ClipDock - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ClipDock.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ClipDock - Win32 UnicodeDebug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ClipDock___Win32_UnicodeDebug" +# PROP BASE Intermediate_Dir "ClipDock___Win32_UnicodeDebug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UnicodeDebug" +# PROP Intermediate_Dir "UnicodeDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ClipDock.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ClipDock - Win32 UnicodeRelease" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ClipDock___Win32_UnicodeRelease" +# PROP BASE Intermediate_Dir "ClipDock___Win32_UnicodeRelease" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "UnicodeRelease" +# PROP Intermediate_Dir "UnicodeRelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ClipDock.exe" + +!ELSEIF "$(CFG)" == "ClipDock - Win32 ReleaseShared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ClipDock___Win32_ReleaseShared" +# PROP BASE Intermediate_Dir "ClipDock___Win32_ReleaseShared" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseShared" +# PROP Intermediate_Dir "ReleaseShared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ClipDock.exe" + +!ENDIF + +# Begin Target + +# Name "ClipDock - Win32 Release" +# Name "ClipDock - Win32 Debug" +# Name "ClipDock - Win32 UnicodeDebug" +# Name "ClipDock - Win32 UnicodeRelease" +# Name "ClipDock - Win32 ReleaseShared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ClipDock.cpp +# End Source File +# Begin Source File + +SOURCE=.\ClipDock.rc +# End Source File +# Begin Source File + +SOURCE=.\ClipDockDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXAppBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXClipPocket.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMulticlipboardDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ClipDock.h +# End Source File +# Begin Source File + +SOURCE=.\ClipDockDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXAppBar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXClipPocket.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMulticlipboardDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXToolTipCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\ClipDock.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ClipDock.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsw new file mode 100644 index 0000000..4751ff8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ClipDock"=".\ClipDock.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.h new file mode 100644 index 0000000..75ad63d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.h @@ -0,0 +1,51 @@ +// ClipDock.h : main header file for the CLIPDOCK application +// + +#if !defined(AFX_CLIPDOCK_H__89C11C7C_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) +#define AFX_CLIPDOCK_H__89C11C7C_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CClipDockApp: +// See ClipDock.cpp for the implementation of this class +// + +class CClipDockApp : public CWinApp +{ +public: + CClipDockApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CClipDockApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CClipDockApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CLIPDOCK_H__89C11C7C_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.rc new file mode 100644 index 0000000..b1d0029 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.rc @@ -0,0 +1,158 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ClipDock.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXMulticlipboardDlg.rc""\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 DISCARDABLE "res\\ClipDock.ico" + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ClipDock MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ClipDock\0" + VALUE "LegalCopyright", "Copyright (C) 2000\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ClipDock.EXE\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "ClipDock Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "MultiClipboard" + ID_DESCRIPTION_FILE "OXMulticlipboardDld.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ClipDock.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXMulticlipboardDlg.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.vcproj new file mode 100644 index 0000000..0cfe4e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDock.vcproj @@ -0,0 +1,1091 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.cpp new file mode 100644 index 0000000..20a292c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.cpp @@ -0,0 +1,188 @@ +// ClipDockDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ClipDock.h" +#include "ClipDockDlg.h" +#include "OXClipPocket.h" +#include "OXToolTipCtrl.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CClipDockDlg dialog + +CClipDockDlg::CClipDockDlg() + : COXAppBar() +{ + //{{AFX_DATA_INIT(CClipDockDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_pButton=NULL; +} + +CClipDockDlg::~CClipDockDlg() +{ + if (m_pButton) + { + m_pButton->DestroyWindow(); + delete m_pButton; + } + +} + +void CClipDockDlg::DoDataExchange(CDataExchange* pDX) +{ + COXMulticlipboardDlg::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CClipDockDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CClipDockDlg, COXAppBar) + //{{AFX_MSG_MAP(CClipDockDlg) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_DESTROY() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CClipDockDlg message handlers + +BOOL CClipDockDlg::OnInitDialog() +{ + COXMulticlipboardDlg::OnInitDialog(); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + SetPocketsInRow(1); + AdjustSize(1); + Register(TRUE); + SetBarStyle(OX_APPBARS_RIGHT | OX_APPBARS_FLOAT | OX_APPBARS_DIFFERENT_DIMS); + + CRect rect; + CalculateDesiredRect(1,rect); + CalcWindowRect(&rect); + this->SetDockDimension(ABE_RIGHT, rect.Width()); + SetEdge(ABE_RIGHT); + SetAlwaysOnTop(TRUE); + + GetClientRect(&rect); + m_pButton=new CButton; + rect.DeflateRect(10,10); + rect.bottom=rect.top+18; + m_pButton->Create(_T("About"), WS_VISIBLE | WS_CHILD, rect, this, ID_APP_ABOUT); + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CClipDockDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + COXMulticlipboardDlg::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CClipDockDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CClipDockDlg::OnSetEdge(UINT nEdge) +{ + if (nEdge==ABE_FLOAT) + SetPocketsInRow(4); + else + SetPocketsInRow(1); + + AdjustSize(GetLastPocketIndex()); + +} + +BOOL CClipDockDlg::CanResize() +{ + if (GetEdge()==ABE_FLOAT) + return TRUE; + else + return FALSE; +} + +void CClipDockDlg::OnClipInfoChanged(UINT nPocketNumber) +{ + COXMulticlipboardDlg::OnClipInfoChanged(nPocketNumber); + COXClipPocket* pPocket=GetPocket(nPocketNumber); + ASSERT(pPocket); + + COXToolTipCtrl* pTip=GetToolTip(); + + if (pPocket->GetDataType()==CF_TEXT) + { + tOXData* pData=pPocket->GetData(); + if (pData->Stgmed.tymed==TYMED_HGLOBAL) + { + //we have text in global memory; + TCHAR szBuffer[28]; + void* pText=::GlobalLock(pData->Stgmed.hGlobal); + DWORD dwSize= (DWORD)min(27,::GlobalSize(pData->Stgmed.hGlobal)); + ::ZeroMemory((void*) &szBuffer, 28); + ::CopyMemory((void*) &szBuffer, pText, dwSize); + ::GlobalUnlock(pData->Stgmed.hGlobal); + lstrcpy(((LPTSTR) &szBuffer+24),_T("..")); + pTip->DelTool(pPocket); + pTip->AddTool(pPocket,(LPCTSTR) &szBuffer); + } + } +} + +BOOL CClipDockDlg::ClipObjectToPocket(COXClipPocket* pPocket, + COleDataObject* pObject) +{ + return COXMulticlipboardDlg::ClipObjectToPocket(pPocket,pObject); +} + +UINT CClipDockDlg::GetButtonsHeight() +{ + return 38; +} + +void CClipDockDlg::OnDestroy() +{ + + COXAppBar::OnDestroy(); + + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.h new file mode 100644 index 0000000..8754c5e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/ClipDockDlg.h @@ -0,0 +1,61 @@ +// ClipDockDlg.h : header file +// + +#if !defined(AFX_CLIPDOCKDLG_H__89C11C7E_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) +#define AFX_CLIPDOCKDLG_H__89C11C7E_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXMulticlipboardDlg.h" +#include "OXAppBar.h" +///////////////////////////////////////////////////////////////////////////// +// CClipDockDlg dialog + +class CClipDockDlg : public COXAppBar +{ +// Construction +public: + CButton* m_pButton; + CClipDockDlg(); // standard constructor + + ~CClipDockDlg(); +// Dialog Data + //{{AFX_DATA(CClipDockDlg) +// enum { IDD = IDD_CLIPDOCK_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + virtual UINT GetButtonsHeight(); + virtual void OnSetEdge(UINT nEdge); + virtual BOOL CanResize(); + virtual void OnClipInfoChanged(UINT nPocketNumber); + virtual BOOL ClipObjectToPocket(COXClipPocket* pPocket, + COleDataObject* pObject); + + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CClipDockDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CClipDockDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnDestroy(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CLIPDOCKDLG_H__89C11C7E_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/OXMulticlipboardDld.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/OXMulticlipboardDld.rtf new file mode 100644 index 0000000..e762564 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/OXMulticlipboardDld.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/Resource.h new file mode 100644 index 0000000..8e7ccc8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/Resource.h @@ -0,0 +1,18 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ClipDock.rc +// +#define IDD_CLIPDOCK_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 130 + +// 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 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.cpp new file mode 100644 index 0000000..ea4ece5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ClipDock.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.h new file mode 100644 index 0000000..5ab03b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__89C11C80_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__89C11C80_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__89C11C80_DA60_11D3_AC98_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.rc2 new file mode 100644 index 0000000..1285198 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/ClipDock/res/ClipDock.rc2 @@ -0,0 +1,13 @@ +// +// CLIPDOCK.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.clw new file mode 100644 index 0000000..2f97a0a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.clw @@ -0,0 +1,52 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CEventLogApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "EventLog.h" + +ClassCount=2 +Class1=CEventLogApp +Class2=CEventLogDlg + +ResourceCount=2 +Resource1=IDR_MAINFRAME +Resource2=IDD_EVENTLOG_DIALOG + +[CLS:CEventLogApp] +Type=0 +HeaderFile=EventLog.h +ImplementationFile=EventLog.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC +LastObject=CEventLogApp + +[CLS:CEventLogDlg] +Type=0 +HeaderFile=EventLogDlg.h +ImplementationFile=EventLogDlg.cpp +Filter=D +LastObject=CEventLogDlg +BaseClass=CDialog +VirtualFilter=dWC + +[DLG:IDD_EVENTLOG_DIALOG] +Type=1 +Class=CEventLogDlg +ControlCount=12 +Control1=IDC_CREATE_BUTTON,button,1342242816 +Control2=IDC_REG_BUTTON,button,1342373888 +Control3=IDC_EVNT1_RADIO,button,1342308361 +Control4=IDC_EVNT2_RADIO,button,1342177289 +Control5=IDC_EVNT3_RADIO,button,1342177289 +Control6=IDC_EVNT4_RADIO,button,1342177289 +Control7=IDC_REP_BUTTON,button,1342373888 +Control8=IDC_OPEN_BUTTON,button,1342373888 +Control9=IDC_LIST_EVENTS,listbox,1352728835 +Control10=IDC_RFR_BUTTON,button,1342242816 +Control11=IDC_STATIC,button,1342177287 +Control12=IDC_STATIC,button,1342177287 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.cpp new file mode 100644 index 0000000..9a38c32 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.cpp @@ -0,0 +1,101 @@ +// EventLog.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "EventLog.h" +#include "EventLogDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEventLogApp + +BEGIN_MESSAGE_MAP(CEventLogApp, CWinApp) + //{{AFX_MSG_MAP(CEventLogApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEventLogApp construction + +CEventLogApp::CEventLogApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CEventLogApp object + +CEventLogApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CEventLogApp initialization + +BOOL CEventLogApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CEventLogDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CEventLogApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsp new file mode 100644 index 0000000..5515d6e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsp @@ -0,0 +1,261 @@ +# Microsoft Developer Studio Project File - Name="EventLog" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=EventLog - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "EventLog.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "EventLog.mak" CFG="EventLog - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "EventLog - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "EventLog - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "EventLog - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "EventLog - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "EventLog - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "EventLog - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"EventLog.exe" + +!ELSEIF "$(CFG)" == "EventLog - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"EventLog.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "EventLog - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "EventLog" +# PROP BASE Intermediate_Dir "EventLog" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"EventLog.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"EventLog.exe" + +!ELSEIF "$(CFG)" == "EventLog - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "EventLo0" +# PROP BASE Intermediate_Dir "EventLo0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"EventLog.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"EventLog.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "EventLog - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "EventLo1" +# PROP BASE Intermediate_Dir "EventLo1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"EventLog.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"EventLog.exe" + +!ENDIF + +# Begin Target + +# Name "EventLog - Win32 Release" +# Name "EventLog - Win32 Debug" +# Name "EventLog - Win32 Release_Shared" +# Name "EventLog - Win32 Unicode_Debug" +# Name "EventLog - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\Source\Evntlog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\EventLog.cpp +# End Source File +# Begin Source File + +SOURCE=.\EventLog.rc +# End Source File +# Begin Source File + +SOURCE=.\EventLogDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryItem.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\EventLog.h +# End Source File +# Begin Source File + +SOURCE=.\EventLogDlg.h +# End Source File +# Begin Source File + +SOURCE=.\msgs.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\EventLog.ico +# End Source File +# Begin Source File + +SOURCE=.\res\EventLog.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsw new file mode 100644 index 0000000..7273f67 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "EventLog"=".\EventLog.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.h new file mode 100644 index 0000000..4b80fc5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.h @@ -0,0 +1,50 @@ +// EventLog.h : main header file for the EVENTLOG application +// + +#if !defined(AFX_EVENTLOG_H__B2FDEA46_8819_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_EVENTLOG_H__B2FDEA46_8819_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CEventLogApp: +// See EventLog.cpp for the implementation of this class +// + +class CEventLogApp : public CWinApp +{ +public: + CEventLogApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEventLogApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CEventLogApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EVENTLOG_H__B2FDEA46_8819_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.rc new file mode 100644 index 0000000..87c193c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.rc @@ -0,0 +1,212 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\EventLog.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\EventLog.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_EVENTLOG_DIALOG DIALOG DISCARDABLE 0, 0, 426, 202 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "EventLog" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Create the special application log for the EventLogDemo", + IDC_CREATE_BUTTON,104,14,216,18 + PUSHBUTTON "Register EventLogDemo Source",IDC_REG_BUTTON,35,62,115, + 16,WS_GROUP + CONTROL "File ?? not found on drive ??",IDC_EVNT1_RADIO,"Button", + BS_AUTORADIOBUTTON | WS_GROUP,16,93,128,10 + CONTROL "Unable to start the Guardian ...",IDC_EVNT2_RADIO, + "Button",BS_AUTORADIOBUTTON,16,108,128,10 + CONTROL "Computer ?? logged on to domain ??",IDC_EVNT3_RADIO, + "Button",BS_AUTORADIOBUTTON,16,123,128,10 + CONTROL "Hi there, interested in the Ultimate Toolbox ?", + IDC_EVNT4_RADIO,"Button",BS_AUTORADIOBUTTON,16,138,156, + 10 + PUSHBUTTON "Report",IDC_REP_BUTTON,57,167,65,16,WS_GROUP + PUSHBUTTON "Open EventLogDemo Source",IDC_OPEN_BUTTON,238,61,115,16, + WS_GROUP + LISTBOX IDC_LIST_EVENTS,188,85,225,69,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Refresh",IDC_RFR_BUTTON,269,166,65,16 + GROUPBOX "Report an event",IDC_STATIC,7,46,172,149 + GROUPBOX "Browse Events in the Application log",IDC_STATIC,183,46, + 236,149 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "EventLog MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "EventLog\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "EventLog.EXE\0" + VALUE "ProductName", "EventLog Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_EVENTLOG_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 419 + TOPMARGIN, 7 + BOTTOMMARGIN, 195 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About EventLog..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "EventLog" + ID_DESCRIPTION_FILE "EventLogInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\EventLog.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.vcproj new file mode 100644 index 0000000..e87e6fc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLog.vcproj @@ -0,0 +1,921 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.cpp new file mode 100644 index 0000000..8fdd9d2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.cpp @@ -0,0 +1,291 @@ +// EventLogDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "EventLog.h" +#include "EventLogDlg.h" + +#include "UTSampleAbout.h" + +#include "msgs.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CEventLogDlg dialog + +CEventLogDlg::CEventLogDlg(CWnd* pParent /*=NULL*/) + : CDialog(CEventLogDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CEventLogDlg) + m_nEvent = -1; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CEventLogDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CEventLogDlg) + DDX_Control(pDX, IDC_RFR_BUTTON, m_ctlButtonRefresh); + DDX_Control(pDX, IDC_REP_BUTTON, m_ctlButtonReport); + DDX_Control(pDX, IDC_LIST_EVENTS, m_ctlListEvents); + DDX_Radio(pDX, IDC_EVNT1_RADIO, m_nEvent); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CEventLogDlg, CDialog) + //{{AFX_MSG_MAP(CEventLogDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CREATE_BUTTON, OnCreateButton) + ON_BN_CLICKED(IDC_OPEN_BUTTON, OnOpenButton) + ON_BN_CLICKED(IDC_REG_BUTTON, OnRegButton) + ON_BN_CLICKED(IDC_REP_BUTTON, OnRepButton) + ON_BN_CLICKED(IDC_RFR_BUTTON, OnRfrButton) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CEventLogDlg message handlers + +BOOL CEventLogDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CEventLogDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CEventLogDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CEventLogDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CEventLogDlg::OnCreateButton() +{ + // TODO: Add your control notification handler code here + + CString sMsgPath; + + ::GetCurrentDirectory(_MAX_PATH, sMsgPath.GetBuffer(_MAX_PATH + 1)); + sMsgPath.ReleaseBuffer(); + sMsgPath += _T("\\messages.dll"); + + DWORD dwOptions = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | + EVENTLOG_INFORMATION_TYPE; + + if (!m_EventLog.CreateApplicationLog(_T("EventLog"), sMsgPath, dwOptions)) + { + if (m_EventLog.GetErrorCode() == 5) + // Display the string. + AfxMessageBox(GetErrorMessage(m_EventLog.GetErrorCode()) + + _T("\nyou'll need administrator priviledges to add this registry key"), MB_OK|MB_ICONINFORMATION); + else + // Display the string. + AfxMessageBox(GetErrorMessage(m_EventLog.GetErrorCode()), MB_OK|MB_ICONINFORMATION); + } + else + AfxMessageBox(_T("Creation succeeded")); + +} + +void CEventLogDlg::OnOpenButton() +{ + // TODO: Add your control notification handler code here + + m_EventLog.Close(); + + if (!m_EventLog.Open(_T("EventLog"))) + { + // Display the string. + AfxMessageBox(GetErrorMessage(m_EventLog.GetErrorCode()), MB_OK|MB_ICONINFORMATION); + m_ctlButtonRefresh.EnableWindow(FALSE); + return; + } + + m_ctlButtonRefresh.EnableWindow(TRUE); +} + +void CEventLogDlg::OnRegButton() +{ + // TODO: Add your control notification handler code here + + if (!m_EventLog.RegisterSource(_T("EventLog"))) + { + // Display the string. + AfxMessageBox(GetErrorMessage(m_EventLog.GetErrorCode()), MB_OK|MB_ICONINFORMATION); + return; + } + + m_ctlButtonReport.EnableWindow(TRUE); +} + +void CEventLogDlg::OnRepButton() +{ + // TODO: Add your control notification handler code here + + if (UpdateData(TRUE)) + { + LPCTSTR aInsertStrs[4]; /* array of pointers to insert + strings */ + switch(m_nEvent) + { + case 0: + { + /* Set up our array of insert strings for error message */ + aInsertStrs[0] = _T("test.cpp"); + aInsertStrs[1] = _T("Z"); + + m_EventLog.Report(eventError, MSG_FILE_NOT_FOUND, 0, 2, aInsertStrs); + break; + } + case 1: + { + m_EventLog.Report(eventWarning, MSG_UNABLE_START_GUARDIAN); + break; + } + case 2: + { + /* Set up our array of insert strings for error message */ + aInsertStrs[0] = _T("UNICORN"); + aInsertStrs[1] = _T("PERI"); + + m_EventLog.Report(eventInformation, MSG_COMP_LOGGED_ON, 0, 2, aInsertStrs); + break; + } + case 3: + { + m_EventLog.Report(eventInformation, MSG_ULTIMATE_TOOLBOX); + break; + } + default: + { + TRACE0("not supported message"); + } + } + } +} + +void CEventLogDlg::OnRfrButton() +{ + // TODO: Add your control notification handler code here + + m_EventLog.Close(); + + if (!m_EventLog.Open(_T("EventLog"))) + { + // Display the string. + AfxMessageBox(GetErrorMessage(m_EventLog.GetErrorCode()), MB_OK|MB_ICONINFORMATION); + return; + } + + m_ctlListEvents.ResetContent(); + + BYTE bBuffer[512]; /* hold the event log record raw data */ + EVENTLOGRECORD* pevlr; + pevlr = (EVENTLOGRECORD*)&bBuffer; + + DWORD dwRead = sizeof(bBuffer); + + CString sListLine; + while (m_EventLog.Read(0, /* ignored for sequential reads */ + bBuffer, /* address of buffer */ + dwRead)) /* size of buffer as input and count of bytes read as output */ + { + while (dwRead > 0) + { + // List the event ID, type, and source name. The source name is + // just past the end of the formal structure. + sListLine.Format(_T("Event ID: 0x%08X EventType: %d Source: %s"), + pevlr->EventID, pevlr->EventType, + (LPTSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD))); + + m_ctlListEvents.SetItemData(m_ctlListEvents.AddString(sListLine), + pevlr->EventID); + // Subtract the size of the event log record we just read + dwRead -= pevlr->Length; + // Point to the next event log record in the buffer + pevlr = (EVENTLOGRECORD*)((LPBYTE)pevlr + pevlr->Length); + } + + // reset our event log record pointer back to the beginning of the + // buffer in preparation for reading the next record. + pevlr = (EVENTLOGRECORD*)&bBuffer; + dwRead = sizeof(bBuffer); + } +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.h new file mode 100644 index 0000000..d087b6a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogDlg.h @@ -0,0 +1,60 @@ +// EventLogDlg.h : header file +// + +#if !defined(AFX_EVENTLOGDLG_H__B2FDEA48_8819_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_EVENTLOGDLG_H__B2FDEA48_8819_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "EvntLog.h" + +///////////////////////////////////////////////////////////////////////////// +// CEventLogDlg dialog + +class CEventLogDlg : public CDialog +{ +// Construction +public: + CEventLogDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CEventLogDlg) + enum { IDD = IDD_EVENTLOG_DIALOG }; + CButton m_ctlButtonRefresh; + CButton m_ctlButtonReport; + CListBox m_ctlListEvents; + int m_nEvent; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CEventLogDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXEventLog m_EventLog; + + // Generated message map functions + //{{AFX_MSG(CEventLogDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCreateButton(); + afx_msg void OnOpenButton(); + afx_msg void OnRegButton(); + afx_msg void OnRepButton(); + afx_msg void OnRfrButton(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_EVENTLOGDLG_H__B2FDEA48_8819_11D1_A3D5_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogInfo.rtf new file mode 100644 index 0000000..e70fae0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/EventLogInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.cpp new file mode 100644 index 0000000..e55ecdb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.cpp @@ -0,0 +1,43 @@ +// stdafx.cpp : source file that includes just the standard includes +// EventLog.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +static TCHAR szUnknownError[] = _T("*** Unknown Error ***"); +CString GetErrorMessage(HRESULT nErrorCode, ...) +{ + va_list args; + LPTSTR pszMsgBuf = NULL; + BOOL bUnknown = FALSE; + CString sResult; + + // ... Get the variable number of parameters + va_start(args, nErrorCode); + + // ... Get the actual message from this DLL + if (::FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + ::GetModuleHandle(AfxGetAppName()), + nErrorCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language + (LPTSTR)&pszMsgBuf, + 0, + &args) == 0) + { + TRACE2("No message was found for error code %i == 0x%8.8X\n", + nErrorCode, nErrorCode); + pszMsgBuf = szUnknownError; + bUnknown = TRUE; + } + + // Fill out parameter + sResult = pszMsgBuf; + + // ... Clean up + if (!bUnknown) + LocalFree(pszMsgBuf); + va_end(args); + + return sResult; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.h new file mode 100644 index 0000000..50ec81f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/StdAfx.h @@ -0,0 +1,28 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__B2FDEA4A_8819_11D1_A3D5_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__B2FDEA4A_8819_11D1_A3D5_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT +#include + +CString GetErrorMessage(HRESULT nErrorCode, ...); + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__B2FDEA4A_8819_11D1_A3D5_0080C83F712F__INCLUDED_) + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages.dll b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages.dll new file mode 100644 index 0000000..f8d8ef1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages.dll differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/Resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/Resource.h new file mode 100644 index 0000000..55649f1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by MESSAGES.RC +// + +// 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 diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.cpp new file mode 100644 index 0000000..cab41b3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// messages.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.h new file mode 100644 index 0000000..e33a314 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/StdAfx.h @@ -0,0 +1,32 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions + +#ifndef _AFX_NO_OLE_SUPPORT +#include // MFC OLE classes +#include // MFC OLE dialog classes +#include // MFC OLE automation classes +#endif // _AFX_NO_OLE_SUPPORT + + +#ifndef _AFX_NO_DB_SUPPORT +#include // MFC ODBC database classes +#endif // _AFX_NO_DB_SUPPORT + +#ifndef _AFX_NO_DAO_SUPPORT +#include // MFC DAO database classes +#endif // _AFX_NO_DAO_SUPPORT + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/makemc.bat b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/makemc.bat new file mode 100644 index 0000000..db49a38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/makemc.bat @@ -0,0 +1,2 @@ +mc msgs.mc +copy msgs.h ..\msgs.h diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.cpp new file mode 100644 index 0000000..a38ca72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.cpp @@ -0,0 +1,35 @@ +// messages.cpp : Defines the initialization routines for the DLL. +// + +#include "stdafx.h" +#include "messages.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMessagesApp + +BEGIN_MESSAGE_MAP(CMessagesApp, CWinApp) + //{{AFX_MSG_MAP(CMessagesApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMessagesApp construction + +CMessagesApp::CMessagesApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMessagesApp object + +CMessagesApp theApp; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.def b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.def new file mode 100644 index 0000000..2e4bff8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.def @@ -0,0 +1,7 @@ +; messages.def : Declares the module parameters for the DLL. + +LIBRARY "MESSAGES" +DESCRIPTION 'MESSAGES Windows Dynamic Link Library' + +EXPORTS + ; Explicit exports can go here diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.h new file mode 100644 index 0000000..57f2d22 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.h @@ -0,0 +1,33 @@ +// messages.h : main header file for the MESSAGES DLL +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMessagesApp +// See messages.cpp for the implementation of this class +// + +class CMessagesApp : public CWinApp +{ +public: + CMessagesApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMessagesApp) + //}}AFX_VIRTUAL + + //{{AFX_MSG(CMessagesApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.rc new file mode 100644 index 0000000..0666293 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/messages.rc @@ -0,0 +1,125 @@ +// 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\messages.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif" + "\0" +END + +///////////////////////////////////////////////////////////////////////////// +#endif // APSTUDIO_INVOKED + + + + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// 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 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "MESSAGES DLL\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "MESSAGES\0" + VALUE "LegalCopyright", "Copyright \251 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename","MESSAGES.DLL\0" + VALUE "ProductName", "MESSAGES Dynamic Link Library\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\\messages.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.h new file mode 100644 index 0000000..0df706f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.h @@ -0,0 +1,203 @@ + /* + Weekly MFC EXTension Support + Copyright (c) 1997 Microsoft Corporation + + This file contains the message definitions for the + EventLogDemo.exe sample program. +------------------------------------------------------------------------- + HEADER SECTION + + The header section defines names and language identifiers for use + by the message definitions later in this file. The MessageIdTypedef, + SeverityNames, FacilityNames, and LanguageNames keywords are + optional and not required. + + + + The MessageIdTypedef keyword gives a typedef name that is used in a + type cast for each message code in the generated include file. Each + message code appears in the include file with the format: #define + name ((type) 0xnnnnnnnn) The default value for type is empty, and no + type cast is generated. It is the programmer's responsibility to + specify a typedef statement in the application source code to define + the type. The type used in the typedef must be large enough to + accomodate the entire 32-bit message code. + + + + The SeverityNames keyword defines the set of names that are allowed + as the value of the Severity keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + severity name is a number that, when shifted left by 30, gives the + bit pattern to logical-OR with the Facility value and MessageId + value to form the full 32-bit message code. The default value of + this keyword is: + + SeverityNames=( + Success=0x0 + Informational=0x1 + Warning=0x2 + Error=0x3 + ) + + Severity values occupy the high two bits of a 32-bit message code. + Any severity value that does not fit in two bits is an error. The + severity codes can be given symbolic names by following each value + with :name + + + + The FacilityNames keyword defines the set of names that are allowed + as the value of the Facility keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + facility name is a number that, when shift it left by 16 bits, gives + the bit pattern to logical-OR with the Severity value and MessageId + value to form the full 32-bit message code. The default value of + this keyword is: + + FacilityNames=( + System=0x0FF + Application=0xFFF + ) + + Facility codes occupy the low order 12 bits of the high order + 16-bits of a 32-bit message code. Any facility code that does not + fit in 12 bits is an error. This allows for 4,096 facility codes. + The first 256 codes are reserved for use by the system software. The + facility codes can be given symbolic names by following each value + with :name + + + The LanguageNames keyword defines the set of names that are allowed + as the value of the Language keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + language name is a number and a file name that are used to name the + generated resource file that contains the messages for that + language. The number corresponds to the language identifier to use + in the resource table. The number is separated from the file name + with a colon. The initial value of LanguageNames is: + + LanguageNames=(English=1:MSG00001) + + Any new names in the source file which don't override the built-in + names are added to the list of valid languages. This allows an + application to support private languages with descriptive names. + + +------------------------------------------------------------------------- + MESSAGE DEFINITION SECTION + + Following the header section is the body of the Message Compiler + source file. The body consists of zero or more message definitions. + Each message definition begins with one or more of the following + statements: + + MessageId = [number|+number] + Severity = severity_name + Facility = facility_name + SymbolicName = name + + The MessageId statement marks the beginning of the message + definition. A MessageID statement is required for each message, + although the value is optional. If no value is specified, the value + used is the previous value for the facility plus one. If the value + is specified as +number then the value used is the previous value + for the facility, plus the number after the plus sign. Otherwise, if + a numeric value is given, that value is used. Any MessageId value + that does not fit in 16 bits is an error. + + The Severity and Facility statements are optional. These statements + specify additional bits to OR into the final 32-bit message code. If + not specified they default to the value last specified for a message + definition. The initial values prior to processing the first message + definition are: + + Severity=Success + Facility=Application + + The value associated with Severity and Facility must match one of + the names given in the FacilityNames and SeverityNames statements in + the header section. The SymbolicName statement allows you to + associate a C/C++ symbolic constant with the final 32-bit message + code. + */ +// +// Values are 32 bit values layed out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_SYSTEM 0x0 +#define FACILITY_STUBS 0x3 +#define FACILITY_RUNTIME 0x2 +#define FACILITY_IO_ERROR_CODE 0x4 + + +// +// Define the severity codes +// +#define STATUS_SEVERITY_WARNING 0x2 +#define STATUS_SEVERITY_SUCCESS 0x0 +#define STATUS_SEVERITY_INFORMATIONAL 0x1 +#define STATUS_SEVERITY_ERROR 0x3 + + +// +// MessageId: MSG_FILE_NOT_FOUND +// +// MessageText: +// +// File %1 not found on Drive %2 +// +#define MSG_FILE_NOT_FOUND ((DWORD)0xC0020001L) + +// +// MessageId: MSG_UNABLE_START_GUARDIAN +// +// MessageText: +// +// Unable to start the Guardian ... +// +#define MSG_UNABLE_START_GUARDIAN ((DWORD)0x80040002L) + +// +// MessageId: MSG_COMP_LOGGED_ON +// +// MessageText: +// +// Computer %1 logged on to domain %2 +// +#define MSG_COMP_LOGGED_ON ((DWORD)0x00000003L) + +// +// MessageId: MSG_WEEKLY_MFC +// +// MessageText: +// +// Hi there, interested in the Ultimate Toolbox ? +// +#define MSG_ULTIMATE_TOOLBOX ((DWORD)0x40020004L) + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.mc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.mc new file mode 100644 index 0000000..efd247d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.mc @@ -0,0 +1,167 @@ +; /* +; Weekly MFC EXTension Support +; Copyright (c) 1997 Microsoft Corporation +; +; This file contains the message definitions for the +; EventLogDemo.exe sample program. + +;------------------------------------------------------------------------- +; HEADER SECTION +; +; The header section defines names and language identifiers for use +; by the message definitions later in this file. The MessageIdTypedef, +; SeverityNames, FacilityNames, and LanguageNames keywords are +; optional and not required. +; +; +MessageIdTypedef=DWORD +; +; The MessageIdTypedef keyword gives a typedef name that is used in a +; type cast for each message code in the generated include file. Each +; message code appears in the include file with the format: #define +; name ((type) 0xnnnnnnnn) The default value for type is empty, and no +; type cast is generated. It is the programmer's responsibility to +; specify a typedef statement in the application source code to define +; the type. The type used in the typedef must be large enough to +; accomodate the entire 32-bit message code. +; +; +SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS + Informational=0x1:STATUS_SEVERITY_INFORMATIONAL + Warning=0x2:STATUS_SEVERITY_WARNING + Error=0x3:STATUS_SEVERITY_ERROR + ) +; +; The SeverityNames keyword defines the set of names that are allowed +; as the value of the Severity keyword in the message definition. The +; set is delimited by left and right parentheses. Associated with each +; severity name is a number that, when shifted left by 30, gives the +; bit pattern to logical-OR with the Facility value and MessageId +; value to form the full 32-bit message code. The default value of +; this keyword is: +; +; SeverityNames=( +; Success=0x0 +; Informational=0x1 +; Warning=0x2 +; Error=0x3 +; ) +; +; Severity values occupy the high two bits of a 32-bit message code. +; Any severity value that does not fit in two bits is an error. The +; severity codes can be given symbolic names by following each value +; with :name +; +; +FacilityNames=(System=0x0:FACILITY_SYSTEM + Runtime=0x2:FACILITY_RUNTIME + Stubs=0x3:FACILITY_STUBS + Io=0x4:FACILITY_IO_ERROR_CODE + ) +; +; The FacilityNames keyword defines the set of names that are allowed +; as the value of the Facility keyword in the message definition. The +; set is delimited by left and right parentheses. Associated with each +; facility name is a number that, when shift it left by 16 bits, gives +; the bit pattern to logical-OR with the Severity value and MessageId +; value to form the full 32-bit message code. The default value of +; this keyword is: +; +; FacilityNames=( +; System=0x0FF +; Application=0xFFF +; ) +; +; Facility codes occupy the low order 12 bits of the high order +; 16-bits of a 32-bit message code. Any facility code that does not +; fit in 12 bits is an error. This allows for 4,096 facility codes. +; The first 256 codes are reserved for use by the system software. The +; facility codes can be given symbolic names by following each value +; with :name +; +; +; The LanguageNames keyword defines the set of names that are allowed +; as the value of the Language keyword in the message definition. The +; set is delimited by left and right parentheses. Associated with each +; language name is a number and a file name that are used to name the +; generated resource file that contains the messages for that +; language. The number corresponds to the language identifier to use +; in the resource table. The number is separated from the file name +; with a colon. The initial value of LanguageNames is: +; +; LanguageNames=(English=1:MSG00001) +; +; Any new names in the source file which don't override the built-in +; names are added to the list of valid languages. This allows an +; application to support private languages with descriptive names. +; +; +;------------------------------------------------------------------------- +; MESSAGE DEFINITION SECTION +; +; Following the header section is the body of the Message Compiler +; source file. The body consists of zero or more message definitions. +; Each message definition begins with one or more of the following +; statements: +; +; MessageId = [number|+number] +; Severity = severity_name +; Facility = facility_name +; SymbolicName = name +; +; The MessageId statement marks the beginning of the message +; definition. A MessageID statement is required for each message, +; although the value is optional. If no value is specified, the value +; used is the previous value for the facility plus one. If the value +; is specified as +number then the value used is the previous value +; for the facility, plus the number after the plus sign. Otherwise, if +; a numeric value is given, that value is used. Any MessageId value +; that does not fit in 16 bits is an error. +; +; The Severity and Facility statements are optional. These statements +; specify additional bits to OR into the final 32-bit message code. If +; not specified they default to the value last specified for a message +; definition. The initial values prior to processing the first message +; definition are: +; +; Severity=Success +; Facility=Application +; +; The value associated with Severity and Facility must match one of +; the names given in the FacilityNames and SeverityNames statements in +; the header section. The SymbolicName statement allows you to +; associate a C/C++ symbolic constant with the final 32-bit message +; code. +; */ + +MessageId=0x1 +Severity=Error +Facility=Runtime +SymbolicName=MSG_FILE_NOT_FOUND +Language=English +File %1 not found on Drive %2 +. + +MessageId=0x2 +Severity=Warning +Facility=Io +SymbolicName=MSG_UNABLE_START_GUARDIAN +Language=English +Unable to start the Guardian ... +. + +MessageId=0x3 +Severity=Success +Facility=System +SymbolicName=MSG_COMP_LOGGED_ON +Language=English +Computer %1 logged on to domain %2 +. + +MessageId=0x4 +Severity=Informational +Facility=Runtime +SymbolicName=MSG_ULTIMATE_TOOLBOX +Language=English +// Hi there, interested in the Ultimate Toolbox ? +. diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.rc new file mode 100644 index 0000000..0885a89 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/msgs.rc @@ -0,0 +1,2 @@ +LANGUAGE 0x9,0x1 +1 11 MSG00001.bin diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/res/messages.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/res/messages.rc2 new file mode 100644 index 0000000..2922f40 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/messages/res/messages.rc2 @@ -0,0 +1,13 @@ +// +// MESSAGES.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... +#include "msgs.rc" + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/msgs.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/msgs.h new file mode 100644 index 0000000..a92fab1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/msgs.h @@ -0,0 +1,200 @@ + /* + This file contains the message definitions for the + EventLog.exe sample program. +------------------------------------------------------------------------- + HEADER SECTION + + The header section defines names and language identifiers for use + by the message definitions later in this file. The MessageIdTypedef, + SeverityNames, FacilityNames, and LanguageNames keywords are + optional and not required. + + + + The MessageIdTypedef keyword gives a typedef name that is used in a + type cast for each message code in the generated include file. Each + message code appears in the include file with the format: #define + name ((type) 0xnnnnnnnn) The default value for type is empty, and no + type cast is generated. It is the programmer's responsibility to + specify a typedef statement in the application source code to define + the type. The type used in the typedef must be large enough to + accomodate the entire 32-bit message code. + + + + The SeverityNames keyword defines the set of names that are allowed + as the value of the Severity keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + severity name is a number that, when shifted left by 30, gives the + bit pattern to logical-OR with the Facility value and MessageId + value to form the full 32-bit message code. The default value of + this keyword is: + + SeverityNames=( + Success=0x0 + Informational=0x1 + Warning=0x2 + Error=0x3 + ) + + Severity values occupy the high two bits of a 32-bit message code. + Any severity value that does not fit in two bits is an error. The + severity codes can be given symbolic names by following each value + with :name + + + + The FacilityNames keyword defines the set of names that are allowed + as the value of the Facility keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + facility name is a number that, when shift it left by 16 bits, gives + the bit pattern to logical-OR with the Severity value and MessageId + value to form the full 32-bit message code. The default value of + this keyword is: + + FacilityNames=( + System=0x0FF + Application=0xFFF + ) + + Facility codes occupy the low order 12 bits of the high order + 16-bits of a 32-bit message code. Any facility code that does not + fit in 12 bits is an error. This allows for 4,096 facility codes. + The first 256 codes are reserved for use by the system software. The + facility codes can be given symbolic names by following each value + with :name + + + The LanguageNames keyword defines the set of names that are allowed + as the value of the Language keyword in the message definition. The + set is delimited by left and right parentheses. Associated with each + language name is a number and a file name that are used to name the + generated resource file that contains the messages for that + language. The number corresponds to the language identifier to use + in the resource table. The number is separated from the file name + with a colon. The initial value of LanguageNames is: + + LanguageNames=(English=1:MSG00001) + + Any new names in the source file which don't override the built-in + names are added to the list of valid languages. This allows an + application to support private languages with descriptive names. + + +------------------------------------------------------------------------- + MESSAGE DEFINITION SECTION + + Following the header section is the body of the Message Compiler + source file. The body consists of zero or more message definitions. + Each message definition begins with one or more of the following + statements: + + MessageId = [number|+number] + Severity = severity_name + Facility = facility_name + SymbolicName = name + + The MessageId statement marks the beginning of the message + definition. A MessageID statement is required for each message, + although the value is optional. If no value is specified, the value + used is the previous value for the facility plus one. If the value + is specified as +number then the value used is the previous value + for the facility, plus the number after the plus sign. Otherwise, if + a numeric value is given, that value is used. Any MessageId value + that does not fit in 16 bits is an error. + + The Severity and Facility statements are optional. These statements + specify additional bits to OR into the final 32-bit message code. If + not specified they default to the value last specified for a message + definition. The initial values prior to processing the first message + definition are: + + Severity=Success + Facility=Application + + The value associated with Severity and Facility must match one of + the names given in the FacilityNames and SeverityNames statements in + the header section. The SymbolicName statement allows you to + associate a C/C++ symbolic constant with the final 32-bit message + code. + */ +// +// Values are 32 bit values layed out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_SYSTEM 0x0 +#define FACILITY_STUBS 0x3 +#define FACILITY_RUNTIME 0x2 +#define FACILITY_IO_ERROR_CODE 0x4 + + +// +// Define the severity codes +// +#define STATUS_SEVERITY_WARNING 0x2 +#define STATUS_SEVERITY_SUCCESS 0x0 +#define STATUS_SEVERITY_INFORMATIONAL 0x1 +#define STATUS_SEVERITY_ERROR 0x3 + + +// +// MessageId: MSG_FILE_NOT_FOUND +// +// MessageText: +// +// File %1 not found on Drive %2 +// +#define MSG_FILE_NOT_FOUND ((DWORD)0xC0020001L) + +// +// MessageId: MSG_UNABLE_START_GUARDIAN +// +// MessageText: +// +// Unable to start the Guardian ... +// +#define MSG_UNABLE_START_GUARDIAN ((DWORD)0x80040002L) + +// +// MessageId: MSG_COMP_LOGGED_ON +// +// MessageText: +// +// Computer %1 logged on to domain %2 +// +#define MSG_COMP_LOGGED_ON ((DWORD)0x00000003L) + +// +// MessageId: MSG_WEEKLY_MFC +// +// MessageText: +// +// Hi there, interested in the Ultimate Toolbox ? +// +#define MSG_ULTIMATE_TOOLBOX ((DWORD)0x40020004L) + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.rc2 new file mode 100644 index 0000000..6020692 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/res/EventLog.rc2 @@ -0,0 +1,13 @@ +// +// EVENTLOG.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/resource.h new file mode 100644 index 0000000..f7c3d4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/EventLog/resource.h @@ -0,0 +1,33 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by EventLog.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_EVENTLOG_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_EVNT1_RADIO 1000 +#define IDC_EVNT2_RADIO 1001 +#define IDC_EVNT3_RADIO 1002 +#define IDC_EVNT4_RADIO 1003 +#define IDC_REP_BUTTON 1004 +#define IDC_LIST1 1005 +#define IDC_LIST_EVENTS 1005 +#define IDC_DET_BUTTON 1006 +#define IDC_RFR_BUTTON 1007 +#define IDC_CREATE_BUTTON 1008 +#define IDC_REG_BUTTON 1009 +#define IDC_OPEN_BUTTON 1010 + +// 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 1011 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.clw new file mode 100644 index 0000000..9d4b82f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.clw @@ -0,0 +1,59 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CFileChangerDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "filechanger.h" +LastPage=0 + +ClassCount=2 +Class1=CFileChangerDemoApp +Class2=CFileChangerDemoDlg + +ResourceCount=1 +Resource1=IDD_FILECHANGER_DIALOG + +[CLS:CFileChangerDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=FileChanger.h +ImplementationFile=FileChanger.cpp +Filter=N +VirtualFilter=AC +LastObject=CFileChangerDemoApp + +[CLS:CFileChangerDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=FileChangerDemoDlg.h +ImplementationFile=FileChangerDemoDlg.cpp + +[DLG:IDD_FILECHANGER_DIALOG] +Type=1 +Class=CFileChangerDemoDlg +ControlCount=22 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_FINDTEXT,edit,1350631552 +Control3=IDC_TEXT,button,1342308361 +Control4=IDC_BINARY,button,1342177289 +Control5=IDC_ALL,button,1342373891 +Control6=IDC_MATCHCASE,button,1342242819 +Control7=IDC_WHOLEWORD,button,1342242819 +Control8=IDC_STATIC,static,1342308352 +Control9=IDC_REPLACETEXT,edit,1350631552 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_FILEIN,edit,1350631552 +Control12=IDC_BROWSEIN,button,1342242816 +Control13=IDC_STATIC,static,1342308352 +Control14=IDC_OVERWRITE,button,1342242819 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_FILEOUT,edit,1350631552 +Control17=IDC_BROWSEOUT,button,1342242816 +Control18=IDC_USECFILE,button,1342242819 +Control19=IDC_FIND,button,1342242817 +Control20=IDC_REPLACE,button,1342242816 +Control21=IDCANCEL,button,1342242816 +Control22=IDC_MESSAGE,button,1342242819 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.cpp new file mode 100644 index 0000000..74734e4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.cpp @@ -0,0 +1,94 @@ +// FileChanger.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "FileChanger.h" +#include "FileChangerDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoApp + +BEGIN_MESSAGE_MAP(CFileChangerDemoApp, CWinApp) + //{{AFX_MSG_MAP(CFileChangerDemoApp) + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoApp construction + +CFileChangerDemoApp::CFileChangerDemoApp() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CFileChangerDemoApp object + +CFileChangerDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoApp initialization + +BOOL CFileChangerDemoApp::InitInstance() +{ + // Standard initialization + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CFileChangerDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CFileChangerDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsp new file mode 100644 index 0000000..cc67dba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsp @@ -0,0 +1,247 @@ +# Microsoft Developer Studio Project File - Name="FileChanger" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FileChanger - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FileChanger.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FileChanger.mak" CFG="FileChanger - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FileChanger - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FileChanger - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileChanger - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "FileChanger - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "FileChanger - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FileChanger - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileChanger.exe" + +!ELSEIF "$(CFG)" == "FileChanger - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileChanger.exe" + +!ELSEIF "$(CFG)" == "FileChanger - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileChan" +# PROP BASE Intermediate_Dir "FileChan" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileChanger.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileChanger.exe" + +!ELSEIF "$(CFG)" == "FileChanger - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FileCha0" +# PROP BASE Intermediate_Dir "FileCha0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"FileChanger.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"FileChanger.exe" + +!ELSEIF "$(CFG)" == "FileChanger - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FileCha1" +# PROP BASE Intermediate_Dir "FileCha1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"FileChanger.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"FileChanger.exe" + +!ENDIF + +# Begin Target + +# Name "FileChanger - Win32 Release" +# Name "FileChanger - Win32 Debug" +# Name "FileChanger - Win32 Release_Shared" +# Name "FileChanger - Win32 Unicode_Debug" +# Name "FileChanger - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXFileChanger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FileChanger.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\FileChanger.rc +# End Source File +# Begin Source File + +SOURCE=.\FileChangerDemoDlg.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\FileChanger.h +# End Source File +# Begin Source File + +SOURCE=.\FileChangerDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\FileChanger.ico +# End Source File +# Begin Source File + +SOURCE=.\res\FileChanger.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsw new file mode 100644 index 0000000..d4fcea6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FileChanger"=".\FileChanger.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.h new file mode 100644 index 0000000..48a28e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.h @@ -0,0 +1,48 @@ +// FileChanger.h : main header file for the FILECHANGER application +// + +#if !defined(AFX_FILECHANGER_H__C3AA0CE4_F410_11D0_B8FE_444553540000__INCLUDED_) +#define AFX_FILECHANGER_H__C3AA0CE4_F410_11D0_B8FE_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoApp: +// See FileChanger.cpp for the implementation of this class +// + +class CFileChangerDemoApp : public CWinApp +{ +public: + CFileChangerDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileChangerDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CFileChangerDemoApp) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FILECHANGER_H__C3AA0CE4_F410_11D0_B8FE_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.rc new file mode 100644 index 0000000..8ef89fd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.rc @@ -0,0 +1,221 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""UTSampleAbout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\FileChanger.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\FileChanger.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_FILECHANGER_DIALOG DIALOGEX 0, 0, 291, 126 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Demo of COXFileChanger" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "&Find:",IDC_STATIC,11,12,16,8 + EDITTEXT IDC_FINDTEXT,58,10,109,14,ES_AUTOHSCROLL + CONTROL "&Text",IDC_TEXT,"Button",BS_AUTORADIOBUTTON | WS_GROUP, + 173,10,30,10 + CONTROL "&Binary",IDC_BINARY,"Button",BS_AUTORADIOBUTTON,173,20, + 35,10 + CONTROL "&All",IDC_ALL,"Button",BS_AUTOCHECKBOX | WS_GROUP | + WS_TABSTOP,213,10,23,10 + CONTROL "&Match Case",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,213,20,54,10 + CONTROL "Whole word only",IDC_WHOLEWORD,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,213,31,69,10 + LTEXT "&Replace With:",IDC_STATIC,11,30,46,8 + EDITTEXT IDC_REPLACETEXT,58,28,109,14,ES_AUTOHSCROLL + LTEXT "&Input:",IDC_STATIC,11,47,19,8 + EDITTEXT IDC_FILEIN,58,46,167,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse",IDC_BROWSEIN,229,46,50,14 + LTEXT "&Overwrite:",IDC_STATIC,11,65,33,8 + CONTROL "",IDC_OVERWRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 58,65,16,8 + LTEXT "&Output:",IDC_STATIC,11,82,24,8 + EDITTEXT IDC_FILEOUT,58,79,167,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse",IDC_BROWSEOUT,229,79,50,14 + CONTROL "&Use CFile*",IDC_USECFILE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,61,103,49,10 + DEFPUSHBUTTON "&Find",IDC_FIND,117,102,50,14 + PUSHBUTTON "&Replace",IDC_REPLACE,173,102,50,14 + PUSHBUTTON "E&xit",IDCANCEL,229,102,50,14 + CONTROL "&Message",IDC_MESSAGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,10,103,45,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "FileChanger MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "FileChanger\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "FileChanger.EXE\0" + VALUE "ProductName", "FileChanger Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_FILECHANGER_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 284 + TOPMARGIN, 7 + BOTTOMMARGIN, 119 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About FileChanger..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "FileChanger" + ID_DESCRIPTION_FILE "FileChangerInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "UTSampleAbout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\FileChanger.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.vcproj new file mode 100644 index 0000000..d1be9b8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChanger.vcproj @@ -0,0 +1,863 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.cpp new file mode 100644 index 0000000..6e30014 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.cpp @@ -0,0 +1,426 @@ +// CFileChangerDemoDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "FileChanger.h" +#include "FileChangerDemoDlg.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoDlg dialog + +CFileChangerDemoDlg::CFileChangerDemoDlg(CWnd* pParent /*=NULL*/) + : CDialog(CFileChangerDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CFileChangerDemoDlg) + m_bAll = TRUE; + m_sFileIn = _T(""); + m_sFileOut = _T(""); + m_sFindText = _T(""); + m_bMatchCase = FALSE; + m_bOverwrite = FALSE; + m_sReplaceText = _T(""); + m_bUseCFile = FALSE; + m_bWholeWord = FALSE; + m_nTextBinary = 0; + m_bMessage = TRUE; + //}}AFX_DATA_INIT + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CFileChangerDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CFileChangerDemoDlg) + DDX_Control(pDX, IDC_OVERWRITE, m_ctlOverwrite); + DDX_Control(pDX, IDC_WHOLEWORD, m_ctlWholeWord); + DDX_Control(pDX, IDC_FILEOUT, m_ctlFileOut); + DDX_Control(pDX, IDC_BROWSEOUT, m_ctlBrowseOut); + DDX_Control(pDX, IDC_MATCHCASE, m_ctlMatchCase); + DDX_Check(pDX, IDC_ALL, m_bAll); + DDX_Text(pDX, IDC_FILEIN, m_sFileIn); + DDX_Text(pDX, IDC_FILEOUT, m_sFileOut); + DDX_Text(pDX, IDC_FINDTEXT, m_sFindText); + DDX_Check(pDX, IDC_MATCHCASE, m_bMatchCase); + DDX_Check(pDX, IDC_OVERWRITE, m_bOverwrite); + DDX_Text(pDX, IDC_REPLACETEXT, m_sReplaceText); + DDX_Check(pDX, IDC_USECFILE, m_bUseCFile); + DDX_Check(pDX, IDC_WHOLEWORD, m_bWholeWord); + DDX_Radio(pDX, IDC_TEXT, m_nTextBinary); + DDX_Check(pDX, IDC_MESSAGE, m_bMessage); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CFileChangerDemoDlg, CDialog) + //{{AFX_MSG_MAP(CFileChangerDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_TEXT, OnSelectTextBinary) + ON_BN_CLICKED(IDC_FIND, OnFind) + ON_BN_CLICKED(IDC_REPLACE, OnReplace) + ON_BN_CLICKED(IDC_OVERWRITE, OnSelectOverwrite) + ON_BN_CLICKED(IDC_BROWSEIN, OnBrowseIn) + ON_BN_CLICKED(IDC_BROWSEOUT, OnBrowseOut) + ON_BN_CLICKED(IDC_USECFILE, OnUsecfile) + ON_BN_CLICKED(IDC_BINARY, OnSelectTextBinary) + ON_EN_KILLFOCUS(IDC_FINDTEXT, OnSelectTextBinary) + ON_EN_KILLFOCUS(IDC_REPLACETEXT, OnSelectTextBinary) + ON_BN_CLICKED(IDC_MESSAGE, OnMessage) + ON_MESSAGE(WM_OX_FILE_MATCH_FOUND, OnFileMatchFound) + ON_MESSAGE(WM_OX_FILE_PRE_REPLACE, OnFilePreReplace) + ON_MESSAGE(WM_OX_FILE_POST_REPLACE, OnFilePostReplace) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoDlg message handlers + +BOOL CFileChangerDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_fc.SetNotificationWnd(this); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CFileChangerDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CFileChangerDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +HCURSOR CFileChangerDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CFileChangerDemoDlg::OnSelectTextBinary() +{ + UpdateData(); + m_ctlMatchCase.EnableWindow(m_nTextBinary == 0); + m_ctlWholeWord.EnableWindow(m_nTextBinary == 0); + if (m_nTextBinary == 1) + { + toBinary(m_sFindText); + toBinary(m_sReplaceText); + UpdateData(FALSE); + } +} + +void CFileChangerDemoDlg::OnSelectOverwrite() +{ + UpdateData(); + m_ctlFileOut.EnableWindow(!m_bOverwrite); + m_ctlBrowseOut.EnableWindow(!m_bOverwrite); +} + +void CFileChangerDemoDlg::OnUsecfile() +{ + UpdateData(); + m_ctlOverwrite.EnableWindow(!m_bUseCFile); + if (m_bUseCFile) + { + m_bOverwrite = FALSE; + UpdateData(FALSE); + OnSelectOverwrite(); + } +} + +void CFileChangerDemoDlg::OnBrowseIn() +{ + OnBrowse(m_sFileIn); +} + +void CFileChangerDemoDlg::OnBrowseOut() +{ + OnBrowse(m_sFileOut); +} + +void CFileChangerDemoDlg::OnBrowse(CString& sEditBoxText) +{ + UpdateData(); + CFileDialog dlg(TRUE, NULL, sEditBoxText, OFN_HIDEREADONLY, + _T("All Files (*.*)|*.*|Text Files (*.txt)|*.txt|HTML Files (*.html; *.htm)|*.html; *.htm||"), this); + if (dlg.DoModal() == IDOK) + { + sEditBoxText = dlg.GetPathName(); + UpdateData(FALSE); + } +} + +void CFileChangerDemoDlg::OnMessage() +{ + UpdateData(); +} + +// Demo Codes --------------------------------------------- + +void CFileChangerDemoDlg::OnFind() +{ + UINT nResult = 0; + CFile fIn; + + UpdateData(); + try + { + if (m_bUseCFile) + { + fIn.Open(m_sFileIn, CFile::modeRead); + m_fc.UseFiles(&fIn); + } + else + { + m_fc.UseFiles(m_sFileIn); + } + + if (m_nTextBinary == 0) + { + nResult = m_fc.Search(m_sFindText, m_bAll, m_bMatchCase, m_bWholeWord); + } + else + { + CByteArray binary; + toBinary(m_sFindText, &binary); + UpdateData(FALSE); // to display formatted m_sFindText + nResult = m_fc.Search(binary, m_bAll); + } + } + catch(CException* e) + { + fIn.Abort(); + e->ReportError(); + e->Delete(); + } + + CString sMsg; sMsg.Format(_T("Function return: %d"), nResult); + AfxMessageBox(sMsg, MB_ICONINFORMATION); +} + +void CFileChangerDemoDlg::OnReplace() +{ + UINT nResult = 0; + CFile fIn, fOut; + + UpdateData(); + try + { + if (m_bUseCFile) + { + fIn.Open(m_sFileIn, CFile::modeRead); + fOut.Open(m_sFileOut, CFile::modeReadWrite | CFile::modeCreate); + m_fc.UseFiles(&fIn, &fOut); + } + else + { + if (m_bOverwrite) + m_fc.UseFiles(m_sFileIn); + else + m_fc.UseFiles(m_sFileIn, m_sFileOut); + } + + if (m_nTextBinary == 0) + { + nResult = m_fc.Replace(m_sFindText, m_sReplaceText, + m_bAll, m_bMatchCase, m_bWholeWord); + } + else + { + CByteArray binary, replaceBinary; + toBinary(m_sFindText, &binary); + toBinary(m_sReplaceText, &replaceBinary); + UpdateData(FALSE); + nResult = m_fc.Replace(binary, replaceBinary, m_bAll); + } + } + catch(CException* e) + { + fIn.Abort(); + fOut.Abort(); + e->ReportError(); + e->Delete(); + } + + CString sMsg; sMsg.Format(_T("Function return: %d"), nResult); + AfxMessageBox(sMsg, MB_ICONINFORMATION); +} + +void CFileChangerDemoDlg::toBinary(CString& sText, CByteArray* binary /* = NULL */, BOOL bFormat /* = TRUE */) +{ + TCHAR ch; CString sByte, sFormatted; int n = 0, i, nLen; + + nLen = sText.GetLength(); + for (i = 0; i < nLen; i++) + { + ch = sText[i]; + if (_istxdigit(ch)) { sByte += ch; n++;} + if (n == 2 || (n > 0 && (ch == _T(' ') || i == nLen - 1))) + { + sByte.MakeUpper(); + if (n == 1) sFormatted += _T('0'); + sFormatted += sByte + _T(' '); + n = 0; sByte.Empty(); + } + } + + if (binary) + { + nLen = sFormatted.GetLength(); + if (binary->GetSize()) binary->RemoveAll(); + binary->SetSize(nLen / 3); + for (i = 0, n = 0; n < nLen; i++, n+=3) + binary->SetAt(i, (BYTE)(xch2int(sFormatted[n]) * 0x10 + + xch2int(sFormatted[n+1]))); + } + + if (bFormat) + sText = sFormatted; +} + +int CFileChangerDemoDlg::xch2int(TCHAR ch) + { + switch (ch) + { + case _T('0'): return 0; + case _T('1'): return 1; + case _T('2'): return 2; + case _T('3'): return 3; + case _T('4'): return 4; + case _T('5'): return 5; + case _T('6'): return 6; + case _T('7'): return 7; + case _T('8'): return 8; + case _T('9'): return 9; + case _T('a'): case _T('A'): return 10; + case _T('b'): case _T('B'): return 11; + case _T('c'): case _T('C'): return 12; + case _T('d'): case _T('D'): return 13; + case _T('e'): case _T('E'): return 14; + case _T('f'): case _T('F'): return 15; + } + return -1; + } + +// CMyFileChanger : derived from COXFileChanger ----------- + +LRESULT CFileChangerDemoDlg::OnFileMatchFound(WPARAM wParam, LPARAM /* lParam */) + { + COXFileChanger::COXFileChangerData* pFileChangerData = (COXFileChanger::COXFileChangerData*)wParam; + ASSERT(AfxIsValidAddress(pFileChangerData, sizeof(COXFileChanger::COXFileChangerData))); + + if (m_bMessage) + { + CString sMsg; + sMsg.Format(_T("%s [%d]\r\n\r\nCount?"), pFileChangerData->m_pFile->GetFileName(), + pFileChangerData->m_nPos); + + switch(AfxMessageBox(sMsg, MB_YESNOCANCEL | MB_ICONQUESTION)) + { + case IDCANCEL: pFileChangerData->m_bContinue = FALSE; + case IDNO: return FALSE; + } + } + return (LRESULT)TRUE; + } + +LRESULT CFileChangerDemoDlg::OnFilePreReplace(WPARAM wParam, LPARAM /* lParam */) + { + COXFileChanger::COXFileChangerData* pFileChangerData = (COXFileChanger::COXFileChangerData*)wParam; + ASSERT(AfxIsValidAddress(pFileChangerData, sizeof(COXFileChanger::COXFileChangerData))); + + if (m_bMessage) + { + CString sMsg; + sMsg.Format(_T("%s [%d]\r\n\r\nReplace?"), pFileChangerData->m_pFile->GetFileName(), + pFileChangerData->m_nPos); + + switch(AfxMessageBox(sMsg, MB_YESNOCANCEL | MB_ICONQUESTION)) + { + case IDCANCEL: pFileChangerData->m_bContinue = FALSE; + case IDNO: return FALSE; + } + } + return (LRESULT)TRUE; + } + +LRESULT CFileChangerDemoDlg::OnFilePostReplace(WPARAM wParam, LPARAM /* lParam */) + { + COXFileChanger::COXFileChangerData* pFileChangerData = (COXFileChanger::COXFileChangerData*)wParam; + ASSERT(AfxIsValidAddress(pFileChangerData, sizeof(COXFileChanger::COXFileChangerData))); + + if (m_bMessage) + { + CString sMsg; + sMsg.Format(_T("%s [%d]"), pFileChangerData->m_pFile->GetFileName(), pFileChangerData->m_nPos); + AfxMessageBox(sMsg, MB_ICONINFORMATION); + } + + // ... Return value is not used + return (LRESULT)0; + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.h new file mode 100644 index 0000000..2a95462 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerDemoDlg.h @@ -0,0 +1,85 @@ +// CFileChangerDemoDlg.h : header file +// + +#if !defined(AFX_CFileChangerDemoDlg_H__C3AA0CE6_F410_11D0_B8FE_444553540000__INCLUDED_) +#define AFX_CFileChangerDemoDlg_H__C3AA0CE6_F410_11D0_B8FE_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CMyFileChanger + +#include "OXFileChanger.h" + +///////////////////////////////////////////////////////////////////////////// +// CFileChangerDemoDlg dialog + +class CFileChangerDemoDlg : public CDialog +{ +// Construction +public: + static void toBinary(CString& sText, CByteArray* binary = NULL, BOOL bFormat = TRUE); + static int xch2int(TCHAR ch); + CFileChangerDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CFileChangerDemoDlg) + enum { IDD = IDD_FILECHANGER_DIALOG }; + CButton m_ctlOverwrite; + CButton m_ctlWholeWord; + CEdit m_ctlFileOut; + CButton m_ctlBrowseOut; + CButton m_ctlMatchCase; + BOOL m_bAll; + CString m_sFileIn; + CString m_sFileOut; + CString m_sFindText; + BOOL m_bMatchCase; + BOOL m_bOverwrite; + CString m_sReplaceText; + BOOL m_bUseCFile; + BOOL m_bWholeWord; + int m_nTextBinary; + BOOL m_bMessage; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFileChangerDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + COXFileChanger m_fc; + void OnBrowse(CString& sEditBoxText); + + // Generated message map functions + //{{AFX_MSG(CFileChangerDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnSelectTextBinary(); + afx_msg void OnFind(); + afx_msg void OnReplace(); + afx_msg void OnSelectOverwrite(); + afx_msg void OnBrowseIn(); + afx_msg void OnBrowseOut(); + afx_msg void OnUsecfile(); + afx_msg void OnMessage(); + afx_msg LRESULT OnFileMatchFound(WPARAM wParam, LPARAM lParam); + afx_msg LRESULT OnFilePreReplace(WPARAM wParam, LPARAM lParam); + afx_msg LRESULT OnFilePostReplace(WPARAM wParam, LPARAM lParam); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CFileChangerDemoDlg_H__C3AA0CE6_F410_11D0_B8FE_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerInfo.rtf new file mode 100644 index 0000000..d1d5d39 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/FileChangerInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.cpp new file mode 100644 index 0000000..64731f5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// FileChanger.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.h new file mode 100644 index 0000000..dc5879a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__C3AA0CE8_F410_11D0_B8FE_444553540000__INCLUDED_) +#define AFX_STDAFX_H__C3AA0CE8_F410_11D0_B8FE_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__C3AA0CE8_F410_11D0_B8FE_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.rc2 new file mode 100644 index 0000000..47b19fb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/res/FileChanger.rc2 @@ -0,0 +1,13 @@ +// +// FILECHANGER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/resource.h new file mode 100644 index 0000000..2bdd2da --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/FileChanger/resource.h @@ -0,0 +1,37 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by FileChanger.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_FILECHANGER_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_FILEIN 1000 +#define IDC_BROWSEIN 1001 +#define IDC_FILEOUT 1002 +#define IDC_OVERWRITE 1003 +#define IDC_BROWSEOUT 1004 +#define IDC_FINDTEXT 1005 +#define IDC_REPLACETEXT 1006 +#define IDC_TEXT 1008 +#define IDC_BINARY 1009 +#define IDC_MATCHCASE 1010 +#define IDC_WHOLEWORD 1011 +#define IDC_USECFILE 1012 +#define IDC_ALL 1013 +#define IDC_FIND 1014 +#define IDC_REPLACE 1015 +#define IDC_MESSAGE 1016 + +// 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 1017 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.clw new file mode 100644 index 0000000..c8a1052 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.clw @@ -0,0 +1,60 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CInstanceManagerDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "instancemanagerdemo.h" +LastPage=0 + +ClassCount=2 +Class1=CInstanceManagerDemoApp +Class2=CInstanceManagerDemoDlg + +ResourceCount=2 +Resource1=IDD_ABOUTBOX (Dutch (Belgium)) +Resource2=IDD_INSTANCEMANAGERDEMO_DIALOG (Dutch (Belgium)) + +[CLS:CInstanceManagerDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=InstanceManagerDemo.h +ImplementationFile=InstanceManagerDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CInstanceManagerDemoApp + +[CLS:CInstanceManagerDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=InstanceManagerDemoDlg.h +ImplementationFile=InstanceManagerDemoDlg.cpp + +[DLG:IDD_INSTANCEMANAGERDEMO_DIALOG] +Type=1 +Class=CInstanceManagerDemoDlg + +[DLG:IDD_ABOUTBOX (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[DLG:IDD_INSTANCEMANAGERDEMO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=9 +Control1=IDC_STATIC,static,1342308353 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_TITLE,edit,1350631552 +Control4=IDC_SET_TITLE,button,1342242816 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_MAX_NUMBER,edit,1350641792 +Control7=IDC_MAX_NUMBER_SPIN,msctls_updown32,1342177334 +Control8=IDCANCEL,button,1342242816 +Control9=IDC_CLOSE_ALL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.cpp new file mode 100644 index 0000000..7904e1e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.cpp @@ -0,0 +1,110 @@ +// InstanceManagerDemo.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "InstanceManagerDemo.h" +#include "InstanceManagerDemoDlg.h" +#include "OXInstanceManager.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoApp + +BEGIN_MESSAGE_MAP(CInstanceManagerDemoApp, CWinApp) + //{{AFX_MSG_MAP(CInstanceManagerDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoApp construction + +CInstanceManagerDemoApp::CInstanceManagerDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CInstanceManagerDemoApp object + +CInstanceManagerDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +// Construct an instance manager and use a buffer for text +COXInstanceManager instanceManager(_T("InstanceManagerDemo"), 300); + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoApp initialization + +BOOL CInstanceManagerDemoApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // Check for previous instances and close this app if we axcceeded the maximum + if (instanceManager.CheckMaxAllowedInstances()) + return FALSE; + + CInstanceManagerDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CInstanceManagerDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsp new file mode 100644 index 0000000..1ffa87b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsp @@ -0,0 +1,253 @@ +# Microsoft Developer Studio Project File - Name="InstanceManagerDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=InstanceManagerDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "InstanceManagerDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "InstanceManagerDemo.mak" CFG="InstanceManagerDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "InstanceManagerDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "InstanceManagerDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "InstanceManagerDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "InstanceManagerDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "InstanceManagerDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "InstanceManagerDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"InstanceManagerDemo.exe" + +!ELSEIF "$(CFG)" == "InstanceManagerDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"InstanceManagerDemo.exe" + +!ELSEIF "$(CFG)" == "InstanceManagerDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Instance" +# PROP BASE Intermediate_Dir "Instance" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"InstanceManagerDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"InstanceManagerDemo.exe" + +!ELSEIF "$(CFG)" == "InstanceManagerDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Instanc0" +# PROP BASE Intermediate_Dir "Instanc0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"InstanceManagerDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"InstanceManagerDemo.exe" + +!ELSEIF "$(CFG)" == "InstanceManagerDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Instanc1" +# PROP BASE Intermediate_Dir "Instanc1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"InstanceManagerDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"InstanceManagerDemo.exe" + +!ENDIF + +# Begin Target + +# Name "InstanceManagerDemo - Win32 Release" +# Name "InstanceManagerDemo - Win32 Debug" +# Name "InstanceManagerDemo - Win32 Release_Shared" +# Name "InstanceManagerDemo - Win32 Unicode_Debug" +# Name "InstanceManagerDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXInstanceManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\InstanceManagerDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\InstanceManagerDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\InstanceManagerDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\InstanceManagerDemo.h +# End Source File +# Begin Source File + +SOURCE=.\InstanceManagerDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXInstanceManager.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\InstanceManagerDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\InstanceManagerDemo.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsw new file mode 100644 index 0000000..07c398b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "InstanceManagerDemo"=".\InstanceManagerDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.h new file mode 100644 index 0000000..0d735af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.h @@ -0,0 +1,38 @@ +// InstanceManagerDemo.h : main header file for the INSTANCEMANAGERDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoApp: +// See InstanceManagerDemo.cpp for the implementation of this class +// + +class CInstanceManagerDemoApp : public CWinApp +{ +public: + CInstanceManagerDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CInstanceManagerDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CInstanceManagerDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.rc new file mode 100644 index 0000000..be1d09d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.rc @@ -0,0 +1,222 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\InstanceManagerDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\InstanceManagerDemo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About InstanceManagerDemo" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,18,20 + LTEXT "InstanceManagerDemo Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright © 1998 Dundas Software Ltd.",IDC_STATIC,40,25, + 119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP +END + +IDD_INSTANCEMANAGERDEMO_DIALOG DIALOGEX 0, 0, 185, 92 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Instance Manager Demo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CTEXT "Open new instances of this application and set a new title or limit the maximum number of instances", + IDC_STATIC,8,7,170,22 + LTEXT "Title :",IDC_STATIC,7,36,24,8 + EDITTEXT IDC_TITLE,34,33,114,14,ES_AUTOHSCROLL + PUSHBUTTON "&Set",IDC_SET_TITLE,152,33,26,14 + LTEXT "Maximum number of instances",IDC_STATIC,7,55,99,8 + EDITTEXT IDC_MAX_NUMBER,108,52,40,14,ES_AUTOHSCROLL | ES_READONLY | + ES_NUMBER + CONTROL "Spin1",IDC_MAX_NUMBER_SPIN,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,149,52,7,14 + PUSHBUTTON "&Close",IDCANCEL,33,71,50,14 + PUSHBUTTON "Close &All",IDC_CLOSE_ALL,98,71,50,14 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "INSTANCEMANAGERDEMO MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "INSTANCEMANAGERDEMO\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software\0" + VALUE "OriginalFilename", "INSTANCEMANAGERDEMO.EXE\0" + VALUE "ProductName", "INSTANCEMANAGERDEMO Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 210 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_INSTANCEMANAGERDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 85 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About InstanceManagerDemo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Instance Manager Demo" + ID_DESCRIPTION_FILE "instMngrInfo.rtf" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\InstanceManagerDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.vcproj new file mode 100644 index 0000000..e86b692 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemo.vcproj @@ -0,0 +1,872 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.cpp new file mode 100644 index 0000000..b5f463b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.cpp @@ -0,0 +1,251 @@ +// InstanceManagerDemoDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "InstanceManagerDemo.h" +#include "InstanceManagerDemoDlg.h" +#include "OXInstanceManager.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +extern COXInstanceManager instanceManager; + + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoDlg dialog + +CInstanceManagerDemoDlg::CInstanceManagerDemoDlg(CWnd* pParent /*=NULL*/) +: CDialog(CInstanceManagerDemoDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CInstanceManagerDemoDlg) + m_sTitle = _T(""); + m_nMaxNumber = 2; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CInstanceManagerDemoDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CInstanceManagerDemoDlg) + DDX_Control(pDX, IDC_MAX_NUMBER_SPIN, m_wndMaxNumberSpin); + DDX_Text(pDX, IDC_TITLE, m_sTitle); + DDX_Text(pDX, IDC_MAX_NUMBER, m_nMaxNumber); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CInstanceManagerDemoDlg, CDialog) + //{{AFX_MSG_MAP(CInstanceManagerDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_CLOSE_ALL, OnCloseAll) + ON_BN_CLICKED(IDC_SET_TITLE, OnSetTitle) + ON_EN_CHANGE(IDC_MAX_NUMBER, OnChangeMaxNumber) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_SETTEXT, OnSetText) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoDlg message handlers + +BOOL CInstanceManagerDemoDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + // ... Set the range of the spincontrol + m_wndMaxNumberSpin.SetRange(0, 100); + // ... Initialize the text and allowed number of instances + SendMessage(WM_SETTEXT); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CInstanceManagerDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CInstanceManagerDemoDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CInstanceManagerDemoDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CInstanceManagerDemoDlg::OnCloseAll() +{ + instanceManager.SetMaxAllowedInstances(0); +} + +void CInstanceManagerDemoDlg::OnSetTitle() +{ + if (!UpdateData(TRUE)) + return; + + // Put the string in the shared data + // ... Lock our additional data before modifying it + CSingleLock sharedDataLock(&instanceManager.GetAdditionalDataMutex(), TRUE); + + DWORD nMaxSize = instanceManager.GetAdditionalDataSize(); + LPTSTR pszSharedTitle = (LPTSTR)instanceManager.GetAdditionalData(); + if (pszSharedTitle == NULL) + { + TRACE0("CInstanceManagerDemoDlg::OnSetTitle : Could not get the additional shared data\n"); + return; + } + + UTBStr::tcsncpy(pszSharedTitle, nMaxSize, m_sTitle, nMaxSize / sizeof(TCHAR)); + pszSharedTitle[nMaxSize / sizeof(TCHAR) - 1] = _T('\0'); + + // ... Unlock the shared data + pszSharedTitle = NULL; + sharedDataLock.Unlock(); + + // Warn all the other applications that the title has changed + CDWordArray instanceColl; + if (instanceManager.GetInstanceCollection(instanceColl)) + { + int nInstanceIndex = 0; + DWORD nInstanceID = 0; + HWND hMainWnd = NULL; + for (nInstanceIndex = 0; nInstanceIndex < instanceColl.GetSize(); nInstanceIndex++) + { + nInstanceID = instanceColl.GetAt(nInstanceIndex); + hMainWnd = COXInstanceManager::GetMainWindow(nInstanceID); + if (hMainWnd != NULL) + ::SendMessage(hMainWnd, WM_SETTEXT, 0, 0); + } + } +} + +LRESULT CInstanceManagerDemoDlg::OnSetText(WPARAM wParam, LPARAM lParam) +{ + LRESULT result = TRUE; + if ((wParam != 0) && (lParam != 0)) + // ... Normal situation, call base class implementation + result = DefWindowProc(WM_SETTEXT, wParam, lParam); + else + { + // Received a notification from a sister instances + + // Get the string from the shared data + // ... Lock our additional data before querying it + CSingleLock sharedDataLock(&instanceManager.GetAdditionalDataMutex(), TRUE); + +// DWORD nMaxSize = instanceManager.GetAdditionalDataSize(); + LPCTSTR pszSharedTitle = (LPTSTR)instanceManager.GetAdditionalData(); + + // Set the new window text + if (pszSharedTitle != NULL) + result = DefWindowProc(WM_SETTEXT, 0, (LPARAM)pszSharedTitle); + + // And set the new number + m_nMaxNumber = instanceManager.GetMaxAllowedInstances(); + UpdateData(FALSE); + } + + return result; +} + +void CInstanceManagerDemoDlg::OnChangeMaxNumber() +{ + if (m_wndMaxNumberSpin.m_hWnd == NULL) + // ... Controls not linked yet + return; + + if (!UpdateData(TRUE)) + return; + + // ... Set the new maximum (may close some instances) + instanceManager.SetMaxAllowedInstances(m_nMaxNumber); + + // Warn all the other applications that the number has changed + CDWordArray instanceColl; + if (instanceManager.GetInstanceCollection(instanceColl)) + { + int nInstanceIndex = 0; + DWORD nInstanceID = 0; + HWND hMainWnd = NULL; + for (nInstanceIndex = 0; nInstanceIndex < instanceColl.GetSize(); nInstanceIndex++) + { + nInstanceID = instanceColl.GetAt(nInstanceIndex); + hMainWnd = COXInstanceManager::GetMainWindow(nInstanceID); + if (hMainWnd != NULL) + ::SendMessage(hMainWnd, WM_SETTEXT, 0, 0); + } + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.h new file mode 100644 index 0000000..c224f5e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/InstanceManagerDemoDlg.h @@ -0,0 +1,47 @@ +// InstanceManagerDemoDlg.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CInstanceManagerDemoDlg dialog + +class CInstanceManagerDemoDlg : public CDialog +{ +// Construction +public: + CInstanceManagerDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CInstanceManagerDemoDlg) + enum { IDD = IDD_INSTANCEMANAGERDEMO_DIALOG }; + CSpinButtonCtrl m_wndMaxNumberSpin; + CString m_sTitle; + int m_nMaxNumber; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CInstanceManagerDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + BOOL InitializeTitle(); + + // Generated message map functions + //{{AFX_MSG(CInstanceManagerDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCloseAll(); + afx_msg void OnSetTitle(); + afx_msg void OnChangeMaxNumber(); + //}}AFX_MSG + afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.cpp new file mode 100644 index 0000000..4c7b5c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// InstanceManagerDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.h new file mode 100644 index 0000000..12f6912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/instMngrInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/instMngrInfo.rtf new file mode 100644 index 0000000..5fdfd43 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/instMngrInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.rc2 new file mode 100644 index 0000000..ad3d063 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/res/InstanceManagerDemo.rc2 @@ -0,0 +1,13 @@ +// +// INSTANCEMANAGERDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/resource.h new file mode 100644 index 0000000..42077c1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/InstanceManager/resource.h @@ -0,0 +1,26 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by InstanceManagerDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_INSTANCEMANAGERDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_TITLE 1000 +#define IDC_SET_TITLE 1001 +#define IDC_CLOSE_ALL 1002 +#define IDC_MAX_NUMBER 1003 +#define IDC_MAX_NUMBER_SPIN 1004 + +// 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 1005 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.clw new file mode 100644 index 0000000..9ba033b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.clw @@ -0,0 +1,68 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CNumberConversionDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "numberconversiondemo.h" +LastPage=0 + +ClassCount=2 +Class1=CNumberConversionDemoApp +Class2=CNumberConversionDemoDlg + +ResourceCount=1 +Resource1=IDD_NUMBERCONVERSIONDEMO_DIALOG (Dutch (Belgium)) + +[CLS:CNumberConversionDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=NumberConversionDemo.h +ImplementationFile=NumberConversionDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CNumberConversionDemoApp + +[CLS:CNumberConversionDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=NumberConversionDemoDlg.h +ImplementationFile=NumberConversionDemoDlg.cpp + +[DLG:IDD_NUMBERCONVERSIONDEMO_DIALOG] +Type=1 +Class=CNumberConversionDemoDlg + +[DLG:IDD_NUMBERCONVERSIONDEMO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=27 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_INPUT,edit,1350631552 +Control4=IDC_COPY_IN,button,1342242816 +Control5=IDC_PAST_IN,button,1342242816 +Control6=IDC_STATIC,button,1342177287 +Control7=IDC_BINARY_IN,button,1342308361 +Control8=IDC_OCTAL_IN,button,1342177289 +Control9=IDC_DECIMAL_IN,button,1342177289 +Control10=IDC_HEXADECIMAL_IN,button,1342177289 +Control11=IDC_OTHER_IN,button,1342177289 +Control12=IDC_RADIX_IN,edit,1350764672 +Control13=IDC_SPIN_IN,msctls_updown32,1342177334 +Control14=IDC_STATIC,button,1342177287 +Control15=IDC_BINARY_OUT,button,1342308361 +Control16=IDC_OCTAL_OUT,button,1342177289 +Control17=IDC_DECIMAL_OUT,button,1342177289 +Control18=IDC_HEXADECIMAL_OUT,button,1342177289 +Control19=IDC_OTHER_OUT,button,1342177289 +Control20=IDC_RADIX_OUT,edit,1350764672 +Control21=IDC_SPIN_OUT,msctls_updown32,1342177334 +Control22=IDC_SEPARATED,button,1342242819 +Control23=IDC_CONVERT,button,1342242816 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_OUTPUT,edit,1350631552 +Control26=IDC_COPY_OUT,button,1342242816 +Control27=IDCANCEL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.cpp new file mode 100644 index 0000000..06691ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.cpp @@ -0,0 +1,104 @@ +// NumberConversionDemo.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" + +#include "NumberConversionDemo.h" +#include "NumberConversionDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoApp + +BEGIN_MESSAGE_MAP(CNumberConversionDemoApp, CWinApp) + //{{AFX_MSG_MAP(CNumberConversionDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoApp construction + +CNumberConversionDemoApp::CNumberConversionDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CNumberConversionDemoApp object + +CNumberConversionDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoApp initialization + +BOOL CNumberConversionDemoApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CNumberConversionDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CNumberConversionDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsp new file mode 100644 index 0000000..2ea9724 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsp @@ -0,0 +1,245 @@ +# Microsoft Developer Studio Project File - Name="NumberConversionDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=NumberConversionDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NumberConversionDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NumberConversionDemo.mak" CFG="NumberConversionDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NumberConversionDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "NumberConversionDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "NumberConversionDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "NumberConversionDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "NumberConversionDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NumberConversionDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"NumberConversionDemo.exe" + +!ELSEIF "$(CFG)" == "NumberConversionDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"NumberConversionDemo.exe" + +!ELSEIF "$(CFG)" == "NumberConversionDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NumberCo" +# PROP BASE Intermediate_Dir "NumberCo" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"NumberConversionDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"NumberConversionDemo.exe" + +!ELSEIF "$(CFG)" == "NumberConversionDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NumberC0" +# PROP BASE Intermediate_Dir "NumberC0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"NumberConversionDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"NumberConversionDemo.exe" + +!ELSEIF "$(CFG)" == "NumberConversionDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NumberC1" +# PROP BASE Intermediate_Dir "NumberC1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"NumberConversionDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"NumberConversionDemo.exe" + +!ENDIF + +# Begin Target + +# Name "NumberConversionDemo - Win32 Release" +# Name "NumberConversionDemo - Win32 Debug" +# Name "NumberConversionDemo - Win32 Release_Shared" +# Name "NumberConversionDemo - Win32 Unicode_Debug" +# Name "NumberConversionDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXInteger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\NumberConversionDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\NumberConversionDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\NumberConversionDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\NumberConversionDemo.h +# End Source File +# Begin Source File + +SOURCE=.\NumberConversionDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\NumberConversionDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\NumberConversionDemo.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsw new file mode 100644 index 0000000..22d7e16 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "NumberConversionDemo"=".\NumberConversionDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.h new file mode 100644 index 0000000..cbb96b3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.h @@ -0,0 +1,38 @@ +// NumberConversionDemo.h : main header file for the NUMBERCONVERSIONDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoApp: +// See NumberConversionDemo.cpp for the implementation of this class +// + +class CNumberConversionDemoApp : public CWinApp +{ +public: + CNumberConversionDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNumberConversionDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CNumberConversionDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.rc new file mode 100644 index 0000000..0d14d4d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.rc @@ -0,0 +1,241 @@ +//Microsoft Developer Studio 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 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "NUMBERCONVERSIONDEMO MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "NUMBERCONVERSIONDEMO\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd.\0" + VALUE "OriginalFilename", "NUMBERCONVERSIONDEMO.EXE\0" + VALUE "ProductName", "NUMBERCONVERSIONDEMO Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About NumberConversionDemo..." + IDR_MAINFRAM "Number conversion class demo" + ID_DESCRIPTION_FILE "numConInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_NUMBERCONVERSIONDEMO_DIALOG DIALOGEX 0, 0, 209, 238 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "NumberConversionDemo" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "The COXNumber class converts numbers to strings and vice versa. And it can also convert from one radix to another.", + IDC_STATIC,7,7,195,25 + LTEXT "&Input",IDC_STATIC,7,43,23,8 + EDITTEXT IDC_INPUT,33,41,127,12,ES_AUTOHSCROLL + PUSHBUTTON "Copy",IDC_COPY_IN,164,33,38,14 + PUSHBUTTON "Paste",IDC_PAST_IN,164,50,38,14 + GROUPBOX "From",IDC_STATIC,7,67,87,91 + CONTROL "&Binary",IDC_BINARY_IN,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,13,77,35,10 + CONTROL "&Octal",IDC_OCTAL_IN,"Button",BS_AUTORADIOBUTTON,13,89, + 32,10 + CONTROL "&Decimal",IDC_DECIMAL_IN,"Button",BS_AUTORADIOBUTTON,13, + 101,41,10 + CONTROL "&Hexadecimal",IDC_HEXADECIMAL_IN,"Button", + BS_AUTORADIOBUTTON,13,113,56,10 + CONTROL "O&ther",IDC_OTHER_IN,"Button",BS_AUTORADIOBUTTON,13,125, + 32,10 + EDITTEXT IDC_RADIX_IN,47,125,40,12,ES_AUTOHSCROLL | ES_READONLY | + WS_GROUP + CONTROL "Spin1",IDC_SPIN_IN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,86,124,7, + 14 + GROUPBOX "To",IDC_STATIC,115,67,87,91 + CONTROL "&Binary",IDC_BINARY_OUT,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,121,77,35,10 + CONTROL "&Octal",IDC_OCTAL_OUT,"Button",BS_AUTORADIOBUTTON,121, + 89,32,10 + CONTROL "&Decimal",IDC_DECIMAL_OUT,"Button",BS_AUTORADIOBUTTON, + 121,101,41,10 + CONTROL "&Hexadecimal",IDC_HEXADECIMAL_OUT,"Button", + BS_AUTORADIOBUTTON,121,113,56,10 + CONTROL "O&ther",IDC_OTHER_OUT,"Button",BS_AUTORADIOBUTTON,121, + 125,32,10 + EDITTEXT IDC_RADIX_OUT,155,125,40,12,ES_AUTOHSCROLL | ES_READONLY | + WS_GROUP + CONTROL "Spin1",IDC_SPIN_OUT,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,194,124,7, + 14 + CONTROL "Thousand &separated",IDC_SEPARATED,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,121,145,79,10 + PUSHBUTTON "&Convert",IDC_CONVERT,79,170,50,14 + LTEXT "O&utput",IDC_STATIC,7,194,22,8 + EDITTEXT IDC_OUTPUT,33,192,127,12,ES_AUTOHSCROLL + PUSHBUTTON "Copy",IDC_COPY_OUT,164,192,38,14 + PUSHBUTTON "Close",IDCANCEL,81,217,50,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_NUMBERCONVERSIONDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 202 + TOPMARGIN, 7 + BOTTOMMARGIN, 231 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\NumberConversionDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\NumberConversionDemo.ico" +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\NumberConversionDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.vcproj new file mode 100644 index 0000000..8270f5c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemo.vcproj @@ -0,0 +1,863 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.cpp new file mode 100644 index 0000000..d83a05e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.cpp @@ -0,0 +1,299 @@ +// NumberConversionDemoDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "NumberConversionDemo.h" +#include "NumberConversionDemoDlg.h" +#include "OxInteger.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoDlg dialog + +CNumberConversionDemoDlg::CNumberConversionDemoDlg(CWnd* pParent /*=NULL*/) +: CDialog(CNumberConversionDemoDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CNumberConversionDemoDlg) + m_nBaseIn = -1; + m_nBaseOut = -1; + m_nRadixIn = 0; + m_nRadixOut = 0; + m_sInput = _T(""); + m_sOutput = _T(""); + m_bSeparated = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CNumberConversionDemoDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CNumberConversionDemoDlg) + DDX_Control(pDX, IDC_OUTPUT, m_wndOutput); + DDX_Control(pDX, IDC_INPUT, m_wndInput); + DDX_Control(pDX, IDC_RADIX_OUT, m_wndRadixOut); + DDX_Control(pDX, IDC_RADIX_IN, m_wndRadixIn); + DDX_Control(pDX, IDC_SPIN_OUT, m_wndSpinOut); + DDX_Control(pDX, IDC_SPIN_IN, m_wndSpinIn); + DDX_Radio(pDX, IDC_BINARY_IN, m_nBaseIn); + DDX_Radio(pDX, IDC_BINARY_OUT, m_nBaseOut); + DDX_Text(pDX, IDC_RADIX_IN, m_nRadixIn); + DDX_Text(pDX, IDC_RADIX_OUT, m_nRadixOut); + DDX_Text(pDX, IDC_INPUT, m_sInput); + DDX_Text(pDX, IDC_OUTPUT, m_sOutput); + DDX_Check(pDX, IDC_SEPARATED, m_bSeparated); + //}}AFX_DATA_MAP + } + +BEGIN_MESSAGE_MAP(CNumberConversionDemoDlg, CDialog) + //{{AFX_MSG_MAP(CNumberConversionDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_OTHER_IN, OnOtherIn) + ON_BN_CLICKED(IDC_OTHER_OUT, OnOtherOut) + ON_BN_CLICKED(IDC_BINARY_IN, OnStandardIn) + ON_BN_CLICKED(IDC_BINARY_OUT, OnStandardOut) + ON_BN_CLICKED(IDC_CONVERT, OnConvert) + ON_BN_CLICKED(IDC_DECIMAL_IN, OnStandardIn) + ON_BN_CLICKED(IDC_HEXADECIMAL_IN, OnStandardIn) + ON_BN_CLICKED(IDC_OCTAL_IN, OnStandardIn) + ON_BN_CLICKED(IDC_DECIMAL_OUT, OnStandardOut) + ON_BN_CLICKED(IDC_HEXADECIMAL_OUT, OnStandardOut) + ON_BN_CLICKED(IDC_OCTAL_OUT, OnStandardOut) + ON_BN_CLICKED(IDC_COPY_IN, OnCopyIn) + ON_BN_CLICKED(IDC_PAST_IN, OnPastIn) + ON_BN_CLICKED(IDC_COPY_OUT, OnCopyOut) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoDlg message handlers + +BOOL CNumberConversionDemoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Initialization + m_wndSpinIn.SetRange((short)COXInteger::m_nMinRadix, (short)COXInteger::m_nMaxRadix); + m_wndSpinOut.SetRange((short)COXInteger::m_nMinRadix, (short)COXInteger::m_nMaxRadix); + + // Enable other by default + m_wndRadixIn.EnableWindow(FALSE); + m_wndSpinIn.EnableWindow(FALSE); + m_wndRadixOut.EnableWindow(FALSE); + m_wndSpinOut.EnableWindow(FALSE); + + // ... Decimal + m_nBaseIn = 2; + // ... Hex + m_nBaseOut = 3; + + m_nRadixIn = 2; + m_nRadixOut = 2; + + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + } + +void CNumberConversionDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAM,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CNumberConversionDemoDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CNumberConversionDemoDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CNumberConversionDemoDlg::OnOtherIn() + { + m_wndRadixIn.EnableWindow(TRUE); + m_wndSpinIn.EnableWindow(TRUE); + } + +void CNumberConversionDemoDlg::OnOtherOut() + { + m_wndRadixOut.EnableWindow(TRUE); + m_wndSpinOut.EnableWindow(TRUE); + } + +void CNumberConversionDemoDlg::OnStandardIn() + { + m_wndRadixIn.EnableWindow(FALSE); + m_wndSpinIn.EnableWindow(FALSE); + } + +void CNumberConversionDemoDlg::OnStandardOut() + { + m_wndRadixOut.EnableWindow(FALSE); + m_wndSpinOut.EnableWindow(FALSE); + } + +void CNumberConversionDemoDlg::OnConvert() + { + if (!UpdateData(TRUE)) + return; + + int nRadixIn = 10; + int nRadixOut = 10; + switch (m_nBaseIn) + { + case 0: + nRadixIn = 2; + break; + case 1: + nRadixIn = 8; + break; + case 2: + nRadixIn = 10; + break; + case 3: + nRadixIn = 16; + break; + case 4: + nRadixIn = m_nRadixIn; + break; + default: + TRACE1("CNumberConversionDemoDlg::OnConvert : Unexpected case in switch m_nBaseIn = %i\n", m_nBaseIn); + ASSERT(FALSE); + break; + } + + switch (m_nBaseOut) + { + case 0: + nRadixOut = 2; + break; + case 1: + nRadixOut = 8; + break; + case 2: + nRadixOut = 10; + break; + case 3: + nRadixOut = 16; + break; + case 4: + nRadixOut = m_nRadixOut; + break; + default: + TRACE1("CNumberConversionDemoDlg::OnConvert : Unexpected case in switch m_nBaseOut = %i\n", m_nBaseOut); + ASSERT(FALSE); + break; + } + + COXInteger integer; + integer.SetStringNumber(m_sInput, nRadixIn); + m_sOutput = integer.GetStringNumber(nRadixOut, m_bSeparated); + + // Test conversion features + COXInteger a(_T("7B"), 16); + COXInteger b(456); + COXInteger c; + + ASSERT(a == 123); + + c = a + b; + ASSERT(c == 579); + + a = b / 3; + ASSERT(a == 152); + + c = c - 79; + ASSERT(c == 500); + ASSERT(c.GetStringNumber(2) == _T("111110100")); + + UpdateData(FALSE); + } + +void CNumberConversionDemoDlg::OnCopyIn() + { + m_wndInput.SetSel(0, -1); + m_wndInput.Copy(); + } + +void CNumberConversionDemoDlg::OnPastIn() + { + m_wndInput.SetSel(0, -1); + m_wndInput.Clear(); + m_wndInput.Paste(); + } + +void CNumberConversionDemoDlg::OnCopyOut() + { + m_wndOutput.SetSel(0, -1); + m_wndOutput.Copy(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.h new file mode 100644 index 0000000..ed0ede8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/NumberConversionDemoDlg.h @@ -0,0 +1,59 @@ +// NumberConversionDemoDlg.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CNumberConversionDemoDlg dialog + +class CNumberConversionDemoDlg : public CDialog +{ +// Construction +public: + CNumberConversionDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CNumberConversionDemoDlg) + enum { IDD = IDD_NUMBERCONVERSIONDEMO_DIALOG }; + CEdit m_wndOutput; + CEdit m_wndInput; + CEdit m_wndRadixOut; + CEdit m_wndRadixIn; + CSpinButtonCtrl m_wndSpinOut; + CSpinButtonCtrl m_wndSpinIn; + int m_nBaseIn; + int m_nBaseOut; + int m_nRadixIn; + int m_nRadixOut; + CString m_sInput; + CString m_sOutput; + BOOL m_bSeparated; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CNumberConversionDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CNumberConversionDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnOtherIn(); + afx_msg void OnOtherOut(); + afx_msg void OnStandardIn(); + afx_msg void OnStandardOut(); + afx_msg void OnConvert(); + afx_msg void OnCopyIn(); + afx_msg void OnPastIn(); + afx_msg void OnCopyOut(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.cpp new file mode 100644 index 0000000..c04b006 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// NumberConversionDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.h new file mode 100644 index 0000000..12f6912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/numConInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/numConInfo.rtf new file mode 100644 index 0000000..07039b2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/numConInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.rc2 new file mode 100644 index 0000000..54ad12e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/res/NumberConversionDemo.rc2 @@ -0,0 +1,13 @@ +// +// NUMBERCONVERSIONDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/resource.h new file mode 100644 index 0000000..1b09943 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/NumberConversionDemo/resource.h @@ -0,0 +1,43 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by NumberConversionDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_NUMBERCONVERSIONDEMO_DIALOG 102 +#define IDR_MAINFRAM 102 +#define ID_DESCRIPTION_FILE 103 +#define IDR_MAINFRAME 128 +#define IDC_INPUT 1000 +#define IDC_BINARY_IN 1001 +#define IDC_OCTAL_IN 1002 +#define IDC_DECIMAL_IN 1003 +#define IDC_HEXADECIMAL_IN 1004 +#define IDC_OTHER_IN 1005 +#define IDC_OUTPUT 1006 +#define IDC_CONVERT 1007 +#define IDC_RADIX_IN 1008 +#define IDC_SPIN_IN 1009 +#define IDC_BINARY_OUT 1010 +#define IDC_OCTAL_OUT 1011 +#define IDC_DECIMAL_OUT 1012 +#define IDC_HEXADECIMAL_OUT 1013 +#define IDC_OTHER_OUT 1014 +#define IDC_RADIX_OUT 1015 +#define IDC_SPIN_OUT 1016 +#define IDC_COPY_OUT 1017 +#define IDC_COPY_IN 1018 +#define IDC_PAST_IN 1019 +#define IDC_SEPARATED 1020 + +// 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 1021 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.cpp new file mode 100644 index 0000000..04dcb38 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.cpp @@ -0,0 +1,101 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "ChildFrm.h" +#include "LeftView.h" +#include "ParserViewView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame construction/destruction + +CChildFrame::CChildFrame() +{ + // TODO: add member initialization code here + +} + +CChildFrame::~CChildFrame() +{ +} + +BOOL CChildFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/, + CCreateContext* pContext) +{ + // create splitter window + if (!m_wndSplitter.CreateStatic(this, 1, 2)) + return FALSE; + + if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(300, 100), pContext) || + !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CParserViewView), CSize(100, 100), pContext)) + { + m_wndSplitter.DestroyWindow(); + return FALSE; + } + + CLeftView *pLeftView = (CLeftView *) m_wndSplitter.GetPane(0,0); + CParserViewView *pRightView = (CParserViewView *) m_wndSplitter.GetPane(0,1); + + pLeftView->m_pRightView = pRightView; + + return TRUE; +} + +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 + +void CChildFrame::ActivateFrame(int nCmdShow) +{ + nCmdShow=SW_SHOWMAXIMIZED; + + CMDIChildWnd::ActivateFrame(nCmdShow); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.h new file mode 100644 index 0000000..27381c7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ChildFrm.h @@ -0,0 +1,59 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__8E0F092C_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_CHILDFRM_H__8E0F092C_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CParserViewView; + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +protected: + CSplitterWnd m_wndSplitter, m_subSplitter; +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void ActivateFrame(int nCmdShow = -1); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__8E0F092C_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.cpp new file mode 100644 index 0000000..782a1a7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.cpp @@ -0,0 +1,506 @@ +// LeftView.cpp : implementation of the CLeftView class +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "ParserViewDoc.h" +#include "LeftView.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CLeftView + +IMPLEMENT_DYNCREATE(CLeftView, CTreeView) + +BEGIN_MESSAGE_MAP(CLeftView, CTreeView) + //{{AFX_MSG_MAP(CLeftView) + ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemExpanding) + ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelChanged) + ON_COMMAND(ID_EXPAND_ALL, OnExpandAll) + ON_COMMAND(ID_COLLAPSE_ALL, OnCollapseAll) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CTreeView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CTreeView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CTreeView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CLeftView construction/destruction + +CLeftView::CLeftView() +{ + m_nCloseEmptyFolder = 0; + m_nCloseFolder = 1; + m_nOpenFolder = 2; + m_nTextItem = 3; + m_nAttribute = 4; + m_nComment = 5; + m_nProcInstr = 6; + m_nMarkup = 7; + m_nCData = 8; + + m_pRightView = NULL; +} + +CLeftView::~CLeftView() +{ +} + +BOOL CLeftView::PreCreateWindow(CREATESTRUCT& cs) +{ + cs.style |= (TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT|TVS_FULLROWSELECT); + + return CTreeView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CLeftView drawing + +void CLeftView::OnDraw(CDC* /*pDC*/) +{ +} + + +///////////////////////////////////////////////////////////////////////////// +// CLeftView printing + +BOOL CLeftView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CLeftView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CLeftView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + + +// Returns a string that is less than or equal to 20 chars long +LPCTSTR CLeftView::BriefText(LPCTSTR szText) +{ +#define BRIEF_LENGTH 20 + + static TCHAR szBrief[BRIEF_LENGTH+1]; + + if (_tcslen(szText) <= BRIEF_LENGTH) + return szText; + + UTBStr::tcsncpy(szBrief, 20, szText, BRIEF_LENGTH-3); + szBrief[BRIEF_LENGTH-3] = TEXT('\0'); + UTBStr::tcscat(szBrief, BRIEF_LENGTH, TEXT("...")); + + return szBrief; +} + +// Fills the tree recursively with the contents of the parser tree +void CLeftView::FillTree(HTREEITEM hParent, COXParserElement* pElement) +{ + if (pElement->GetType() != COXParserObject::ELEMENT) + return; + + int i = 0; + for (i = 0; i < pElement->NumAttributes(); i++) + { + COXAttribute* pAttribute = pElement->Attribute(i); + if (!pAttribute) continue; + + TCHAR szText[1024]; + + if (pAttribute->GetAttributeType() == COXAttribute::ATTR_STRING) + UTBStr::stprintf(szText, 1024, TEXT("\"%s\"=\"%s\""), pAttribute->GetName(), pAttribute->GetStringValue()); + else if (pAttribute->GetAttributeType() == COXAttribute::ATTR_INTEGER) + UTBStr::stprintf(szText, 1024, TEXT("\"%s\"=%d"), pAttribute->GetName(), pAttribute->GetIntValue()); + + HTREEITEM hItem = GetTreeCtrl().InsertItem(szText, m_nAttribute, m_nAttribute, hParent); + GetTreeCtrl().SetItemData(hItem, (DWORD) pAttribute); + } + + for (i = 0; i < pElement->NumObjects(); i++) + { + COXParserObject* pObject = pElement->Object(i); + if (!pObject) continue; + + HTREEITEM hNewParent; + switch (pObject->GetType()) + { + case COXParserObject::CDATA: + hNewParent = GetTreeCtrl().InsertItem(BriefText(pObject->GetText()), + m_nCData, m_nCData, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + break; + + case COXParserObject::COMMENT: + hNewParent = GetTreeCtrl().InsertItem(BriefText(pObject->GetText()), + m_nComment, m_nComment, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + break; + + case COXParserObject::ELEMENT: + if (!((COXParserElement*)pObject)->NumObjects()) + hNewParent = GetTreeCtrl().InsertItem(pObject->GetText(), + m_nCloseEmptyFolder, m_nCloseEmptyFolder, + hParent); + else + hNewParent = GetTreeCtrl().InsertItem(pObject->GetText(), + m_nCloseFolder, m_nCloseFolder, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + FillTree(hNewParent, (COXParserElement*)pObject); + break; + + case COXParserObject::MARKUP: + hNewParent = GetTreeCtrl().InsertItem(BriefText(pObject->GetText()), + m_nMarkup, m_nMarkup, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + break; + + case COXParserObject::PLAINTEXT: + hNewParent = GetTreeCtrl().InsertItem(BriefText(pObject->GetText()), + m_nTextItem, m_nTextItem, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + break; + + case COXParserObject::PROCINSTR: + hNewParent = GetTreeCtrl().InsertItem(BriefText(pObject->GetText()), + m_nProcInstr, m_nProcInstr, + hParent); + GetTreeCtrl().SetItemData(hNewParent, (DWORD) pObject); + break; + } + } +} + + +void CLeftView::OnInitialUpdate() +{ + CTreeView::OnInitialUpdate(); + + m_Images.Create(IDB_BITMAP, 16, 1, RGB(255,255,255)); + GetTreeCtrl().SetImageList(&m_Images, TVSIL_NORMAL); + + if (m_pRightView) + m_pRightView->GetListCtrl()->SetImageList(&m_Images, LVSIL_SMALL); + + CParserViewDoc* pDoc = GetDocument(); + COXParser* pParser = pDoc->GetParser(); + + HTREEITEM hItem = GetTreeCtrl().InsertItem(pParser->Root()->GetName(), + m_nCloseFolder, m_nCloseFolder); + GetTreeCtrl().SetItemData(hItem, (DWORD) pParser->Root()); + + CWaitCursor wait; + FillTree(hItem, pParser->Root()); +} + +///////////////////////////////////////////////////////////////////////////// +// CLeftView diagnostics + +#ifdef _DEBUG +void CLeftView::AssertValid() const +{ + CTreeView::AssertValid(); +} + +void CLeftView::Dump(CDumpContext& dc) const +{ + CTreeView::Dump(dc); +} + +CParserViewDoc* CLeftView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CParserViewDoc))); + return (CParserViewDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CLeftView message handlers + +void CLeftView::OnItemExpanding(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + + HTREEITEM hItem = pNMTreeView->itemNew.hItem; + COXParserObject* pObject = (COXParserObject*) GetTreeCtrl().GetItemData(hItem); + if (!pObject) + return; + + if (pObject->GetType() == COXParserObject::ELEMENT) + { + COXParserElement* pElement = (COXParserElement*) pObject; + if (pNMTreeView->action == TVE_COLLAPSE) + { + if (pElement->NumObjects()) + GetTreeCtrl().SetItemImage(hItem, m_nCloseFolder, m_nCloseFolder); + else + GetTreeCtrl().SetItemImage(hItem, m_nCloseEmptyFolder, m_nCloseEmptyFolder); + } + else if (pNMTreeView -> action == TVE_EXPAND) + GetTreeCtrl().SetItemImage(hItem, m_nOpenFolder, m_nOpenFolder); + } + + *pResult = 0; +} + +void CLeftView::OnSelChanged(NMHDR* pNMHDR, LRESULT* pResult) +{ + if (!m_pRightView || !m_pRightView->GetEditView() || !m_pRightView->GetListView()) + return; + + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + + HTREEITEM hItem = pNMTreeView->itemNew.hItem; + COXParserObject* pObject = (COXParserObject*) GetTreeCtrl().GetItemData(hItem); + if (!pObject) + return; + + //////////////////////////////////////////////////////////////////////// + // Fill in edit control + //////////////////////////////////////////////////////////////////////// + + CString strType; + int nNumObjects = 0; + int nNumAttributes = 0; + + switch (pObject->GetType()) + { + case COXParserObject::ATTRIBUTE: + strType = "Attribute"; + break; + + case COXParserObject::CDATA: + strType = "Character Data"; + break; + + case COXParserObject::COMMENT: + strType = "Comment"; + break; + + case COXParserObject::MARKUP: + strType = "Markup"; + break; + + case COXParserObject::PLAINTEXT: + strType = "Plain text"; + break; + + case COXParserObject::PROCINSTR: + strType = "Processing Instruction"; + break; + + case COXParserObject::ELEMENT: + strType = "Element"; + nNumObjects = ((COXParserElement*)pObject)->NumObjects(); + nNumAttributes = ((COXParserElement*)pObject)->NumAttributes(); + break; + + default: + strType = "Unknown"; + break; + } + + // Need to convert \n's to \r\n's + LPCTSTR szValue = pObject->GetText(); + COXQuickString strNew; + strNew.SetLength(_tcslen(szValue)+1); + while (*szValue) + { + if (*szValue == TEXT('\n')) + strNew.Append(TEXT('\r')); + strNew.Append(*szValue); + szValue++; + } + + CString str; + str.Format(_T("Object Type:\t%s\r\n") + _T("Attributes:\t%d\r\n") + _T("SubObjects:\t%d\r\n") + _T("Flags:\t\t%d\r\n") + _T("Name/Text:\r\n%s"), + strType, nNumAttributes, nNumObjects, + pObject->GetFlags(), (LPCTSTR)strNew); + + if (pObject->GetType() == COXParserObject::ATTRIBUTE) + { + COXAttribute* pAttr = (COXAttribute*) pObject; + CString tmp; + if ( pAttr->GetAttributeType() == COXAttribute::ATTR_STRING) + tmp.Format(_T("Value:\t\t\"%s\"\r\n"), pAttr->GetStringValue()); + else + tmp.Format(_T("Value:\t\t%d\r\n"), pAttr->GetIntValue()); + + str += tmp; + } + + m_pRightView->GetEditView()->SetWindowText(str); + + + //////////////////////////////////////////////////////////////////////// + // Fill in list control + //////////////////////////////////////////////////////////////////////// + + CListCtrl *pList = m_pRightView->GetListCtrl(); + m_pRightView->SetRedraw(FALSE); + + pList->DeleteAllItems(); + if (pList->GetHeaderCtrl()) + { + for (int i = pList->GetHeaderCtrl()->GetItemCount()-1; i >= 0; i--) + m_pRightView->GetListCtrl()->DeleteColumn(i); + } + + if (pObject->GetType() == COXParserObject::ELEMENT) + { + pList->InsertColumn(0, _T("Object type")); + pList->InsertColumn(1, _T("Name")); + pList->InsertColumn(2, _T("SubObjects")); + pList->InsertColumn(3, _T("Value/Text")); + + COXParserElement* pElement = (COXParserElement*) pObject; + + int nRow = 0; + + int i = 0; + for (i = 0; i < pElement->NumAttributes(); i++) + { + COXAttribute* pAttribute = pElement->Attribute(i); + if (!pAttribute) continue; + + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Attribute"), 0,0, m_nAttribute, 0); + pList->SetItemText(nRow, 1, pAttribute->GetName()); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pAttribute->GetStringValue()); + nRow++; + } + + for (i = 0; i < pElement->NumObjects(); i++) + { + COXParserObject* pSubObject = pElement->Object(i); + if (!pSubObject) continue; + + switch (pSubObject->GetType()) + { + case COXParserObject::CDATA: + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("CDATA"), 0,0, m_nCData, 0); + pList->SetItemText(nRow, 1, _T("")); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pSubObject->GetText()); + nRow++; + break; + + case COXParserObject::PLAINTEXT: + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Plain Text"), 0,0, m_nTextItem, 0); + pList->SetItemText(nRow, 1, _T("")); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pSubObject->GetText()); + nRow++; + break; + + case COXParserObject::COMMENT: + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Comment"), 0,0, m_nComment, 0); + pList->SetItemText(nRow, 1, _T("")); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pSubObject->GetText()); + nRow++; + break; + + case COXParserObject::MARKUP: + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Markup"), 0,0, m_nMarkup, 0); + pList->SetItemText(nRow, 1, _T("")); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pSubObject->GetText()); + nRow++; + break; + + case COXParserObject::PROCINSTR: + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Processing Instruction"), 0,0, m_nProcInstr, 0); + pList->SetItemText(nRow, 1, _T("")); + pList->SetItemText(nRow, 2, _T("0")); + pList->SetItemText(nRow, 3, pSubObject->GetText()); + nRow++; + break; + + case COXParserObject::ELEMENT: + { + COXParserElement* pSubElement = (COXParserElement*) pSubObject; + if (pSubElement->NumObjects()) + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Element"), + 0,0, m_nCloseFolder, 0); + else + pList->InsertItem(LVIF_TEXT|LVIF_IMAGE, nRow, _T("Element"), + 0,0, m_nCloseEmptyFolder, 0); + + CString strNum; + strNum.Format(_T("%d"), pSubElement->NumObjects()); + pList->SetItemText(nRow, 1, pSubElement->GetName()); + pList->SetItemText(nRow, 2, strNum); + pList->SetItemText(nRow, 3, _T("")); + nRow++; + } + break; + } + } + + for (int col = 0; col < 3; col++) + { + pList->SetColumnWidth(col, LVSCW_AUTOSIZE); + int wc1 = pList->GetColumnWidth(col); + pList->SetColumnWidth(col,LVSCW_AUTOSIZE_USEHEADER); + int wc2 = pList->GetColumnWidth(col); + int wc = max(20, max(wc1,wc2)); + pList->SetColumnWidth(col, wc); + } + pList->SetColumnWidth(3, LVSCW_AUTOSIZE_USEHEADER); + } + + m_pRightView->SetRedraw(TRUE); + m_pRightView->Invalidate(); + + *pResult = 0; +} + +void CLeftView::OnExpandAll() +{ + GetTreeCtrl().SetRedraw(FALSE); + ExpandBranch(GetTreeCtrl().GetRootItem(), TVE_EXPAND); + GetTreeCtrl().SetRedraw(TRUE); +} + +void CLeftView::OnCollapseAll() +{ + GetTreeCtrl().SetRedraw(FALSE); + ExpandBranch(GetTreeCtrl().GetRootItem(), TVE_COLLAPSE); + GetTreeCtrl().SetRedraw(TRUE); +} + +void CLeftView::ExpandBranch(HTREEITEM hItem, UINT nCode) +{ + GetTreeCtrl().Expand(hItem, nCode); + + HTREEITEM hChild = GetTreeCtrl().GetChildItem(hItem); + while (hChild) + { + ExpandBranch(hChild, nCode); + hChild = GetTreeCtrl().GetNextSiblingItem(hChild); + } +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.h new file mode 100644 index 0000000..10670d8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/LeftView.h @@ -0,0 +1,93 @@ +// LeftView.h : interface of the CLeftView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_LEFTVIEW_H__8E0F0932_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_LEFTVIEW_H__8E0F0932_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CParserViewDoc; + +#include "ParserViewView.h" + + +class CLeftView : public CTreeView +{ +protected: // create from serialization only + CLeftView(); + DECLARE_DYNCREATE(CLeftView) + +// Attributes +public: + CParserViewDoc* GetDocument(); + + CParserViewView* m_pRightView; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CLeftView) + 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); + virtual void OnInitialUpdate(); // called first time after construct + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CLeftView(); + void FillTree(HTREEITEM hParent, COXParserElement* pElement); + LPCTSTR BriefText(LPCTSTR szText); + void ExpandBranch(HTREEITEM hItem, UINT nCode); + +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COXParser parser; + int m_nCloseEmptyFolder; + int m_nCloseFolder; + int m_nOpenFolder; + int m_nTextItem; + int m_nAttribute; + int m_nComment; + int m_nMarkup; + int m_nProcInstr; + int m_nCData; + + CImageList m_Images; + + +// Generated message map functions +protected: + //{{AFX_MSG(CLeftView) + afx_msg void OnItemExpanding(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnSelChanged(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnExpandAll(); + afx_msg void OnCollapseAll(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in LeftView.cpp +inline CParserViewDoc* CLeftView::GetDocument() + { return (CParserViewDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_LEFTVIEW_H__8E0F0932_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MSDNVS6A.xml b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MSDNVS6A.xml new file mode 100644 index 0000000..0d18459 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MSDNVS6A.xml @@ -0,0 +1,1048 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.cpp new file mode 100644 index 0000000..75b90b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.cpp @@ -0,0 +1,107 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.h new file mode 100644 index 0000000..0c3b02f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/MainFrm.h @@ -0,0 +1,58 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__8E0F092A_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_MAINFRM_H__8E0F092A_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__8E0F092A_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/OXParser.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/OXParser.rtf new file mode 100644 index 0000000..c5d15ab Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/OXParser.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.cpp new file mode 100644 index 0000000..277c7c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.cpp @@ -0,0 +1,77 @@ +// ParseEditView.cpp : implementation file +// + +#include "stdafx.h" +#include "ParserView.h" +#include "ParseEditView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CParseEditView + +IMPLEMENT_DYNCREATE(CParseEditView, CEditView) + +CParseEditView::CParseEditView() +{ +} + +CParseEditView::~CParseEditView() +{ +} + + +BEGIN_MESSAGE_MAP(CParseEditView, CEditView) + //{{AFX_MSG_MAP(CParseEditView) + ON_WM_CTLCOLOR_REFLECT() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CParseEditView drawing + +void CParseEditView::OnDraw(CDC* /*pDC*/) +{ + // TODO: add draw code here +} + +///////////////////////////////////////////////////////////////////////////// +// CParseEditView diagnostics + +#ifdef _DEBUG +void CParseEditView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CParseEditView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CParseEditView message handlers + +HBRUSH CParseEditView::CtlColor(CDC* /*pDC*/, UINT nCtlColor) +{ + if (CTLCOLOR_STATIC == nCtlColor) + return (HBRUSH) GetStockObject(WHITE_BRUSH); + + // TODO: Return a non-NULL brush if the parent's handler should not be called + return NULL; +} + +BOOL CParseEditView::PreCreateWindow(CREATESTRUCT& cs) +{ + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + + cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping + cs.style |= ES_READONLY; + + return bPreCreated; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.h new file mode 100644 index 0000000..70472c8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParseEditView.h @@ -0,0 +1,54 @@ +#if !defined(AFX_PARSEEDITVIEW_H__D58F87C4_2833_11D3_AA1A_D8EC0A000000__INCLUDED_) +#define AFX_PARSEEDITVIEW_H__D58F87C4_2833_11D3_AA1A_D8EC0A000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// ParseEditView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CParseEditView view + +class CParseEditView : public CEditView +{ +protected: + CParseEditView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CParseEditView) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CParseEditView) + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CParseEditView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions +protected: + //{{AFX_MSG(CParseEditView) + afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PARSEEDITVIEW_H__D58F87C4_2833_11D3_AA1A_D8EC0A000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.clw new file mode 100644 index 0000000..8ddf794 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.clw @@ -0,0 +1,136 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CChildFrame +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "parserview.h" +LastPage=0 + +ClassCount=8 +Class1=CChildFrame +Class2=CLeftView +Class3=CMainFrame +Class4=CParseEditView +Class5=CParserViewApp +Class6=CAboutDlg +Class7=CParserViewDoc +Class8=CParserViewView + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDR_PARSERTYPE +Resource3=IDD_ABOUTBOX + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M +VirtualFilter=mfWC +LastObject=CChildFrame + +[CLS:CLeftView] +Type=0 +BaseClass=CTreeView +HeaderFile=LeftView.h +ImplementationFile=LeftView.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CParseEditView] +Type=0 +BaseClass=CEditView +HeaderFile=ParseEditView.h +ImplementationFile=ParseEditView.cpp + +[CLS:CParserViewApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ParserView.h +ImplementationFile=ParserView.cpp +Filter=N +VirtualFilter=AC + +[CLS:CAboutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ParserView.cpp +ImplementationFile=ParserView.cpp +LastObject=CAboutDlg + +[CLS:CParserViewDoc] +Type=0 +BaseClass=CDocument +HeaderFile=ParserViewDoc.h +ImplementationFile=ParserViewDoc.cpp + +[CLS:CParserViewView] +Type=0 +BaseClass=CView +HeaderFile=ParserViewView.h +ImplementationFile=ParserViewView.cpp + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_PARSERTYPE] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_WINDOW_NEW +Command5=ID_WINDOW_CASCADE +Command6=ID_WINDOW_TILE_HORZ +Command7=ID_WINDOW_ARRANGE +Command8=ID_APP_ABOUT +CommandCount=8 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_APP_ABOUT +CommandCount=2 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.cpp new file mode 100644 index 0000000..2975c4b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.cpp @@ -0,0 +1,190 @@ +// ParserView.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "ParserViewDoc.h" +#include "LeftView.h" +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CParserViewApp + +BEGIN_MESSAGE_MAP(CParserViewApp, CWinApp) + //{{AFX_MSG_MAP(CParserViewApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CParserViewApp construction + +CParserViewApp::CParserViewApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CParserViewApp object + +CParserViewApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CParserViewApp initialization + +BOOL CParserViewApp::InitInstance() +{ + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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_PARSERTYPE, + RUNTIME_CLASS(CParserViewDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CLeftView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew) + cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; + + // Dispatch commands specified on the command line + 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 + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CParserViewApp::OnAppAbout() +{ + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CParserViewApp message handlers + + +int CParserViewApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsp new file mode 100644 index 0000000..a047209 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsp @@ -0,0 +1,326 @@ +# Microsoft Developer Studio Project File - Name="ParserView" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ParserView - Win32 Release_Shared +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ParserView.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ParserView.mak" CFG="ParserView - Win32 Release_Shared" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ParserView - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ParserView - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ParserView - Win32 DebugUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ParserView - Win32 ReleaseUnicode" (based on "Win32 (x86) Application") +!MESSAGE "ParserView - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ParserView - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:".\ParserView.exe" + +!ELSEIF "$(CFG)" == "ParserView - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:".\ParserView.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ParserView - Win32 DebugUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ParserView___Win32_DebugUnicode" +# PROP BASE Intermediate_Dir "ParserView___Win32_DebugUnicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 ../AddHelpDLL/Debug/AddHelpDLLd.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:"../bin/ParserView.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /incremental:no /debug /machine:I386 /out:".\ParserView.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "ParserView - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ParserView___Win32_ReleaseUnicode" +# PROP BASE Intermediate_Dir "ParserView___Win32_ReleaseUnicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:".\ParserView.exe" + +!ELSEIF "$(CFG)" == "ParserView - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ParserView___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "ParserView___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0xc09 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /incremental:no /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /incremental:no /machine:I386 /out:".\ParserView.exe" /pdbtype:sept +# SUBTRACT LINK32 /debug + +!ENDIF + +# Begin Target + +# Name "ParserView - Win32 Release" +# Name "ParserView - Win32 Debug" +# Name "ParserView - Win32 DebugUnicode" +# Name "ParserView - Win32 ReleaseUnicode" +# Name "ParserView - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\LeftView.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHashTable.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHTMLParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXQuickString.cpp +# End Source File +# Begin Source File + +SOURCE=.\ParseEditView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ParserView.cpp +# End Source File +# Begin Source File + +SOURCE=.\ParserView.rc +# End Source File +# Begin Source File + +SOURCE=.\ParserViewDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\ParserViewView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\LeftView.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHashTable.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHTMLParser.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXParser.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXQuickString.h +# End Source File +# Begin Source File + +SOURCE=.\ParseEditView.h +# End Source File +# Begin Source File + +SOURCE=.\ParserView.h +# End Source File +# Begin Source File + +SOURCE=.\ParserViewDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ParserViewView.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ParserView.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ParserView.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ParserViewDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsw new file mode 100644 index 0000000..eadf1a1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ParserView"=".\ParserView.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.h new file mode 100644 index 0000000..21a5c1a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.h @@ -0,0 +1,50 @@ +// ParserView.h : main header file for the PARSERVIEW application +// + +#if !defined(AFX_PARSERVIEW_H__8E0F0926_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_PARSERVIEW_H__8E0F0926_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CParserViewApp: +// See ParserView.cpp for the implementation of this class +// + +class CParserViewApp : public CWinApp +{ +public: + CParserViewApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CParserViewApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CParserViewApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PARSERVIEW_H__8E0F0926_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.rc new file mode 100644 index 0000000..6e1bdb3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.rc @@ -0,0 +1,428 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\ParserView.ico" +IDR_PARSERTYPE ICON DISCARDABLE "res\\ParserViewDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 15, 15 +BEGIN + BUTTON ID_FILE_OPEN + SEPARATOR + BUTTON ID_APP_ABOUT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ParserView...", ID_APP_ABOUT + END +END + +IDR_PARSERTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + 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 ParserView...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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 DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About ParserView" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "ParserView Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 1999",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ParserView MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ParserView\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ParserView.EXE\0" + VALUE "ProductName", "ParserView Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "ParserView" + IDR_PARSERTYPE "\nParser\n\nXML - files(*.xml), HTML - files(*.htm)\n.xml;.htm\nParserView.Document\nParser Document" + ID_DESCRIPTION_FILE "OXParser.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "ParserView" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_EXPAND_ALL "Expand all folders\nExpand all" + ID_COLLAPSE_ALL "Collapse all folders\nCollapse all" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_ID_PREVIEW_CLOSE "Expand all folders\nExpand all" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Australia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP BITMAP DISCARDABLE "res\\bitmap1.bmp" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "\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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\ParserView.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 + +#endif // English (Australia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" + +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\ParserView.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.vcproj new file mode 100644 index 0000000..d587716 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserView.vcproj @@ -0,0 +1,1306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.cpp new file mode 100644 index 0000000..93a3569 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.cpp @@ -0,0 +1,134 @@ +// ParserViewDoc.cpp : implementation of the CParserViewDoc class +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "ParserViewDoc.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CParserViewDoc + +IMPLEMENT_DYNCREATE(CParserViewDoc, CDocument) + +BEGIN_MESSAGE_MAP(CParserViewDoc, CDocument) + //{{AFX_MSG_MAP(CParserViewDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CParserViewDoc construction/destruction + +CParserViewDoc::CParserViewDoc() +{ + m_parser.SetErrorRptFunction(ReportError, (DWORD) this); + m_HTMLparser.SetErrorRptFunction(ReportError, (DWORD) this); + m_bHTML = FALSE; +} + +CParserViewDoc::~CParserViewDoc() +{ +} + +COXParser* CParserViewDoc::GetParser() +{ + if (m_bHTML) + return &m_HTMLparser; + else + return &m_parser; +} + +BOOL CParserViewDoc::OnNewDocument() +{ + return FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// CParserViewDoc serialization + +void CParserViewDoc::Serialize(CArchive& /*ar*/) +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CParserViewDoc diagnostics + +#ifdef _DEBUG +void CParserViewDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CParserViewDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CParserViewDoc commands + +BOOL CParserViewDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + //CWaitCursor wait; + SetPathName(lpszPathName); + +#ifdef _UNICODE + USES_CONVERSION + LPTSTR ptr = (LPTSTR)wcsrchr(A2W(lpszPathName), TCHAR('.')); +#else + LPTSTR ptr = (LPTSTR)strrchr(lpszPathName, TCHAR('.')); +#endif + if (ptr) + m_bHTML = (_tcsstr(ptr, _T("htm")) != NULL); + + +#ifdef _DEBUG + clock_t start = clock(); +#endif + + GetParser()->ParseFile(lpszPathName); + +#ifdef _DEBUG + CString str; + str.Format(_T("Parse time: %0.2f seconds"), (double) (clock() - start) / (double) CLOCKS_PER_SEC); + //AfxMessageBox(str); + TRACE1("%s\n", str); +#endif + + return TRUE; +} + +BOOL CParserViewDoc::OnSaveDocument(LPCTSTR lpszPathName) +{ + CWaitCursor wait; + return GetParser()->WriteFile(lpszPathName); +} + +BOOL CParserViewDoc::ReportError(int nError, LPCTSTR szError, int nLine, int nCol, DWORD dwData) +{ + CString str; + CParserViewDoc* pDoc = (CParserViewDoc*) dwData; + + if (pDoc) + str.Format(_T("Error parsing file %s.\n\nLine %d, Column %d. Error %d: %s\n\n%s"), + pDoc->GetPathName(), nLine, nCol, + nError, pDoc->GetParser()->TranslateErrorCode(nError), + szError); + else + str.Format(_T("Error parsing file.\n\nLine %d, Column %d. Error %d: %s\n\n%s"), + nLine, nCol, nError, pDoc->GetParser()->TranslateErrorCode(nError), + szError); + + AfxMessageBox(str, MB_ICONEXCLAMATION); + return FALSE; +} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.h new file mode 100644 index 0000000..fb555e7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewDoc.h @@ -0,0 +1,67 @@ +// ParserViewDoc.h : interface of the CParserViewDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PARSERVIEWDOC_H__8E0F092E_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_PARSERVIEWDOC_H__8E0F092E_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CParserViewDoc : public CDocument +{ +protected: // create from serialization only + CParserViewDoc(); + DECLARE_DYNCREATE(CParserViewDoc) + +// Attributes +public: + COXParser* GetParser(); + BOOL IsHTML() { return m_bHTML; } + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CParserViewDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CParserViewDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + static BOOL ReportError(int nError, LPCTSTR szError, int nLine, int nCol, DWORD dwData); + +protected: + COXParser m_parser; + COXHTMLParser m_HTMLparser; + BOOL m_bHTML; + +// Generated message map functions +protected: + //{{AFX_MSG(CParserViewDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PARSERVIEWDOC_H__8E0F092E_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.cpp new file mode 100644 index 0000000..70cab6f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.cpp @@ -0,0 +1,114 @@ +// ParserViewView.cpp : implementation of the CParserViewView class +// + +#include "stdafx.h" +#include "ParserView.h" + +#include "ParserViewDoc.h" +#include "ParseEditView.h" +#include "ParserViewView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CParserViewView + +IMPLEMENT_DYNCREATE(CParserViewView, CView) + +BEGIN_MESSAGE_MAP(CParserViewView, CView) + //{{AFX_MSG_MAP(CParserViewView) + ON_WM_CREATE() + ON_WM_SIZE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CParserViewView construction/destruction + +CParserViewView::CParserViewView() +{ + // TODO: add construction code here + +} + +CParserViewView::~CParserViewView() +{ +} + +BOOL CParserViewView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CParserViewView drawing + +void CParserViewView::OnDraw(CDC* /*pDC*/) +{ + CParserViewDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CParserViewView diagnostics + +#ifdef _DEBUG +void CParserViewView::AssertValid() const +{ + CView::AssertValid(); +} + +void CParserViewView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CParserViewDoc* CParserViewView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CParserViewDoc))); + return (CParserViewDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CParserViewView message handlers + +int CParserViewView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // create splitter window + if (!m_wndSplitter.CreateStatic(this, 2, 1)) + return -1; + + // The context information is passed on from the framework + CCreateContext *pContext = (CCreateContext*)lpCreateStruct->lpCreateParams; + + if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CParseEditView), CSize(100, 100), pContext) || + !m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CListView), CSize(100, 100), pContext)) + { + m_wndSplitter.DestroyWindow(); + return -1; + } + + GetListCtrl()->ModifyStyle(0, LVS_REPORT); + + return 0; +} + +void CParserViewView::OnSize(UINT nType, int cx, int cy) +{ + CView::OnSize(nType, cx, cy); + + CSize Margin(GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); + m_wndSplitter.MoveWindow(-Margin.cx,-Margin.cy, cx+2*Margin.cx, cy+2*Margin.cy); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.h new file mode 100644 index 0000000..a9d430a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/ParserViewView.h @@ -0,0 +1,69 @@ +// ParserViewView.h : interface of the CParserViewView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PARSERVIEWVIEW_H__8E0F0930_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_PARSERVIEWVIEW_H__8E0F0930_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CParserViewView : public CView +{ +protected: // create from serialization only + CParserViewView(); + DECLARE_DYNCREATE(CParserViewView) + +// Attributes +public: + CParserViewDoc* GetDocument(); + + CEditView *GetEditView() { return (CEditView *) m_wndSplitter.GetPane(0,0); } + CListView *GetListView() { return (CListView*) m_wndSplitter.GetPane(1,0); } + + CListCtrl* GetListCtrl() { return (GetListView())? &(GetListView()->GetListCtrl()) : NULL; } + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CParserViewView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CParserViewView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CSplitterWnd m_wndSplitter; + +// Generated message map functions +protected: + //{{AFX_MSG(CParserViewView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ParserViewView.cpp +inline CParserViewDoc* CParserViewView::GetDocument() + { return (CParserViewDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PARSERVIEWVIEW_H__8E0F0930_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.cpp new file mode 100644 index 0000000..80f7241 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ParserView.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.h new file mode 100644 index 0000000..d6aff60 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/StdAfx.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__8E0F0928_0728_11D3_A9F8_2EA565000000__INCLUDED_) +#define AFX_STDAFX_H__8E0F0928_0728_11D3_A9F8_2EA565000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#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 + +#include "OXParser.h" +#include "OXHTMLParser.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__8E0F0928_0728_11D3_A9F8_2EA565000000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.rc2 new file mode 100644 index 0000000..218f8cf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserView.rc2 @@ -0,0 +1,13 @@ +// +// PARSERVIEW.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserViewDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserViewDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/ParserViewDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/Toolbar.bmp new file mode 100644 index 0000000..21b6389 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/bitmap1.bmp new file mode 100644 index 0000000..02a0813 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/resource.h new file mode 100644 index 0000000..106d7e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Parser/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ParserView.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_PARSERTYPE 129 +#define IDB_BITMAP 130 +#define ID_DESCRIPTION_FILE 130 +#define ID_EXPAND_ALL 32771 +#define ID_COLLAPSE_ALL 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/COXRegular.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/COXRegular.rtf new file mode 100644 index 0000000..8bb5475 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/COXRegular.rtf @@ -0,0 +1,134 @@ +{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f23\froman\fcharset128\fprq1{\*\panose 00000000000000000000}MS Mincho{\*\falt MS ??};}{\f28\froman\fcharset128\fprq1{\*\panose 00000000000000000000}@MS Mincho;} +{\f29\froman\fcharset238\fprq2 Times New Roman CE;}{\f30\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f32\froman\fcharset161\fprq2 Times New Roman Greek;}{\f33\froman\fcharset162\fprq2 Times New Roman Tur;} +{\f36\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f37\fswiss\fcharset238\fprq2 Arial CE;}{\f38\fswiss\fcharset204\fprq2 Arial Cyr;}{\f40\fswiss\fcharset161\fprq2 Arial Greek;}{\f41\fswiss\fcharset162\fprq2 Arial Tur;} +{\f44\fswiss\fcharset186\fprq2 Arial Baltic;}{\f45\fmodern\fcharset238\fprq1 Courier New CE;}{\f46\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f48\fmodern\fcharset161\fprq1 Courier New Greek;}{\f49\fmodern\fcharset162\fprq1 Courier New Tur;} +{\f52\fmodern\fcharset186\fprq1 Courier New Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; +\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red51\green102\blue255;\red255\green153\blue0;}{\stylesheet{ +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs10 \additive Default Paragraph Font;}{\s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\f2\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 Plain Text;}}{\*\listtable{\list\listtemplateid2111475034\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 +{\leveltext\leveltemplateid-1177110348\'02\'00);}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li1080\jclisttab\tx1080 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li1800\jclisttab\tx1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-180\li2520\jclisttab\tx2520 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li3240\jclisttab\tx3240 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li3960\jclisttab\tx3960 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-180\li4680\jclisttab\tx4680 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li5400\jclisttab\tx5400 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li6120\jclisttab\tx6120 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-180\li6840\jclisttab\tx6840 }{\listname ;}\listid1770730755}}{\*\listoverridetable{\listoverride\listid1770730755 +\listoverridecount0\ls1}}{\info{\title COXRegular - new class that implements regular expression functionality}{\author DmitriyF}{\operator DmitriyF}{\creatim\yr1999\mo12\dy17\hr12\min26}{\revtim\yr1999\mo12\dy22\hr15\min31}{\version6}{\edmins31} +{\nofpages3}{\nofwords835}{\nofchars4764}{\*\company Dundas}{\nofcharsws0}{\vern8247}}\margl1319\margr1319 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180 +\dghorigin1319\dgvorigin1440\dghshow1\dgvshow1\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd +\linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain +\s3\qc \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\dbch\af23 \hich\af1\dbch\af23\loch\f1 COXRegExpression +\par }\pard\plain \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f2\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 COXRegExpression}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 + - new class that implements regular expression functionality. +\par +\par }\pard \s15\qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 \tab \hich\af2\dbch\af23\loch\f2 Most of us had problems with searching some text in text files. Yes, we can use searching capabilities that are provided with +\tab many programs. But, in case we have to do some generic search it is not the case. For such cases }{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 COXRegExpression}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 class is exactly what \hich\af2\dbch\af23\loch\f2 +we had to have. This class provided generic search regarding the rule you've supplied. To do search, you have to load regular expression that defines what do you want to search. There are different formats and different implementation for regular expressi +\hich\af2\dbch\af23\loch\f2 o\hich\af2\dbch\af23\loch\f2 n. This implementation is most close to that one described in MSDN that comes with Visual Studio 6.0 +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 +\par \tab \hich\af2\dbch\af23\loch\f2 The rules: +\par +\par \hich\af2\dbch\af23\loch\f2 Character\tab \tab \tab \tab Description +\par +\par \tab \\\tab \tab \hich\af2\dbch\af23\loch\f2 Marks the next character as special. All characters that are +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 special but you want to define it for sear\hich\af2\dbch\af23\loch\f2 ch should be +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 preceding by this character. +\par \tab \hich\af2\dbch\af23\loch\f2 ^\tab \tab Matches the begining of input or line. In this implementation \tab \tab \tab it cannot be defined in charset. +\par \tab \hich\af2\dbch\af23\loch\f2 $\tab \tab Matches the end of input or line. In this implementation it +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 cannot be defined in charset. +\par \tab \hich\af2\dbch\af23\loch\f2 *\tab \tab \hich\af2\dbch\af23\loch\f2 Matches preceding character zero or more times. In this \tab \tab \tab \tab implementation cannot be defined if only one character \tab \tab \tab \tab + specified in the regular expression. That means that /}{\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 zo*}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 / \tab \tab \tab matches z and zoo, but /}{\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 z*}{\dbch\af23 +\hich\af2\dbch\af23\loch\f2 / will match nothing because only \tab \tab \tab one char\hich\af2\dbch\af23\loch\f2 acter has been specified. +\par \tab \hich\af2\dbch\af23\loch\f2 +\tab \tab Matches preceding character one or more times. +\par \tab \hich\af2\dbch\af23\loch\f2 ?\tab \tab Matches preceding character zero or one time. In this \tab \tab \tab \tab implementation cannot be defined if only one character \tab \tab \tab \tab specified in the regular expression. +\par \tab \hich\af2\dbch\af23\loch\f2 .\tab \tab Matches any\hich\af2\dbch\af23\loch\f2 single character except '\\n' +\par \hich\af2\dbch\af23\loch\f2 (pattern)\tab \tab Matches pattern and remembers the match. The matched \tab \tab \tab \tab substring can be retrieved by using '\\0'-'\\9' in regular \tab \tab \tab \tab + expression, where '0'-'9' are number of the pattern. Example: +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 regular expression '}{\cf17\dbch\af23 \hich\af2\dbch\af23\loch\f2 (re).*\\\hich\af2\dbch\af23\loch\f2 0s+ion}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' will match }{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 +'regular \tab \tab \tab \tab expression}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' because first matches pattern '}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 re}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' and remember \tab \tab \tab + the pattern with index 0. '}{\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 .*}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' will match '}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 gular exp}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' in \tab \tab \tab \tab ' +}{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 re}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 gular exp}{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 ression}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 '. Now we retrieve pattern with index 0, \tab \tab \tab + that has been remembered with in\hich\af2\dbch\af23\loch\f2 dex 0, this is '}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 re}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' that \tab \tab \tab \tab matches '}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 re +}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' in '}{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 regular exp}{\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 re}{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 ssion}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' before '}{ +\b\cf18\dbch\af23 \hich\af2\dbch\af23\loch\f2 ssion}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' and , \tab \tab \tab \tab finally, '}{\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 s+ion}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' matches '}{\b\cf18\dbch\af23 +\hich\af2\dbch\af23\loch\f2 ssion}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' +\par \tab \hich\af2\dbch\af23\loch\f2 x|y\tab \tab Matches either character 'x' or 'y'. You can combine more \tab \tab \tab \tab than two characters like '}{\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 x|y|z}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 ' +\par \hich\af2\dbch\af23\loch\f2 \{n\}\tab \tab Means precedin\hich\af2\dbch\af23\loch\f2 g character will match exactly n times \tab \tab \tab \tab (nonnegative, of course) +\par \hich\af2\dbch\af23\loch\f2 \{n,\}\tab \tab Means preseding character will match at least n times \tab \tab \tab \tab (nonnegative) +\par \hich\af2\dbch\af23\loch\f2 \{n,m\}\tab \tab Means preceding character will match at least n times and at +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 most m times. (n,m - no\hich\af2\dbch\af23\loch\f2 nnegative) +\par \hich\af2\dbch\af23\loch\f2 [xyz]\tab \tab A character set. Matches any one of enclosed characters +\par }\pard \s15\ql \fi-2160\li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 [^xyz]\tab A non-matching character set. Matches any character +\par }\pard \s15\ql \li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 that is not in the set. +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 \tab \\\hich\af2\dbch\af23\loch\f2 b\tab \tab Matches word boundary, that is boundary between any character +\par }\pard \s15\ql \fi720\li1440\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1440\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 excluding space characters (" \\f\\n\\r\\t\\v") and space +\par \hich\af2\dbch\af23\loch\f2 characters +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 \tab \\\hich\af2\dbch\af23\loch\f2 B\tab \tab Matches non-word boundary. Matches any boundary between space +\par \tab \tab \tab \hich\af2\dbch\af23\loch\f2 characters or between nonspace characters. +\par \tab \\\hich\af2\dbch\af23\loch\f2 d\tab \tab Matches any digit /0-9/ +\par \tab \\\hich\af2\dbch\af23\loch\f2 D\tab \tab Matches any non-digit. +\par \tab \\\hich\af2\dbch\af23\loch\f2 f\tab \tab Matches \hich\af2\dbch\af23\loch\f2 a formfeed. +\par \tab \\\hich\af2\dbch\af23\loch\f2 n\tab \tab Matches a new-line character +\par \tab \\\hich\af2\dbch\af23\loch\f2 r\tab \tab Matches a carridge return character. +\par \tab \\\hich\af2\dbch\af23\loch\f2 s\tab \tab Matches any white space character +\par \tab \\\hich\af2\dbch\af23\loch\f2 S\tab \tab Matches any non-white space character +\par \tab \\\hich\af2\dbch\af23\loch\f2 t\tab \tab Matches a tab character +\par \tab \\\hich\af2\dbch\af23\loch\f2 v\tab \tab Matches any vertical tab character +\par \tab \\\hich\af2\dbch\af23\loch\f2 w\tab \tab Match\hich\af2\dbch\af23\loch\f2 es any word character including underscore. [A-Za-z0-9_] +\par }\pard \s15\ql \fi-1440\li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \\\hich\af2\dbch\af23\loch\f2 W\tab Matches any non-word character (any character that does not +\par }\pard \s15\ql \li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 match \\w) +\par }\pard \s15\ql \fi-1440\li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \\\hich\af2\dbch\af23\loch\f2 num\tab Where num is number between 0 and 9. Matches +\par }\pard \s15\ql \li2160\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 remembered pattern. (See description of pattern) +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 \tab \hich\af2\dbch\af23\loch\f2 /n/\tab \tab Where n is bet\hich\af2\dbch\af23\loch\f2 ween 1 and 255. Matches supplied in n ASCII +\par }\pard \s15\ql \fi720\li1440\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1440\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 code +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 +\par +\par \hich\af2\dbch\af23\loch\f2 Three easy steps to use: +\par {\listtext\pard\plain\s15 \fs20\loch\af2\hich\af2\dbch\af23 \hich\af2\dbch\af23\loch\f2 1)\tab}}\pard \s15\ql \fi-360\li1080\ri0\widctlpar\jclisttab\tx1080\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin1080\itap0 {\dbch\af23 \hich\af2\dbch\af23\loch\f2 +Create your own derived from }{\b\dbch\af23 \hich\af2\dbch\af23\loch\f2 COXRegExpression}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 class and override function +\par }\pard \s15\ql \fi360\li720\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 {\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 OnMatch()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 This virtual function is always called when a matched +\par \hich\af2\dbch\af23\loch\f2 substring has been found. When this function is called you can return +\par \hich\af2\dbch\af23\loch\f2 TRUE to continue search or FALSE if you do not want continue search. +\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\dbch\af23 \tab \hich\af2\dbch\af23\loch\f2 2) Load your regular expression by function }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 LoadRule()}{\dbch\af23 +\par \hich\af2\dbch\af23\loch\f2 \tab 3) Call function }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Match()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 to do the search in supplied tex\hich\af2\dbch\af23\loch\f2 t. +\par +\par +\par \hich\af2\dbch\af23\loch\f2 Now how it works. +\par \hich\af2\dbch\af23\loch\f2 There are two steps in the work -1)load regular expression and 2) search the +\par \hich\af2\dbch\af23\loch\f2 text +\par +\par \hich\af2\dbch\af23\loch\f2 1)load regular expression +\par \hich\af2\dbch\af23\loch\f2 When you are loading regular expression, }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 LoadRule()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 calls function }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Parse()}{\dbch\af23 +\hich\af2\dbch\af23\loch\f2 +\par \hich\af2\dbch\af23\loch\f2 that has a huge switch. This function do \hich\af2\dbch\af23\loch\f2 parsing of the rule and create tags +\par \hich\af2\dbch\af23\loch\f2 of different types for every sequences of special characters, depends on the +\par \hich\af2\dbch\af23\loch\f2 type of special characters. For some special characters founded it calls +\par \hich\af2\dbch\af23\loch\f2 appropriate functions like }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 GetAsciiChar()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 or }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 GetEither()}{\dbch\af23 +\hich\af2\dbch\af23\loch\f2 to d\hich\af2\dbch\af23\loch\f2 o this special +\par \hich\af2\dbch\af23\loch\f2 parsing. The tags are added to the collection of tags. Any tag can be +\par \hich\af2\dbch\af23\loch\f2 retrieved by }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 GetTag()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 . The function Parse is virtual, so, if you need to +\par \hich\af2\dbch\af23\loch\f2 process some special characters, that are not specified here, you can override +\par \hich\af2\dbch\af23\loch\f2 it. Onc\hich\af2\dbch\af23\loch\f2 e }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Parse()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 or called subfunction found error, Parce stops parsing and +\par \hich\af2\dbch\af23\loch\f2 returns FALSE. You can retrieve error code by }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 GetError()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 and translate it to +\par \hich\af2\dbch\af23\loch\f2 description by }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 TranslateError()}{\dbch\af23 +\par +\par \hich\af2\dbch\af23\loch\f2 2) search the text +\par \hich\af2\dbch\af23\loch\f2 The search text makes function }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Match()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 that call r\hich\af2\dbch\af23\loch\f2 ecursive function +\par \hich\af2\dbch\af23\loch\f2 }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 MatchNextTag()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 with start tag number=0. }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Match()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 + does loop, every time +\par \hich\af2\dbch\af23\loch\f2 incrementing start position in the supplied text for the search untill end of +\par \hich\af2\dbch\af23\loch\f2 the text has been reached. }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 MatchNextTag()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 does main job and once the tag +\par \hich\af2\dbch\af23\loch\f2 matches the text at the specified position does either, call }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 OnMatch()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 if the +\par \hich\af2\dbch\af23\loch\f2 tag was last in the collection of the tags or calls }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 MatchNextTag()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 to match +\par \hich\af2\dbch\af23\loch\f2 next tag from the collection. +\par +\par \hich\af2\dbch\af23\loch\f2 The function }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 MatchNextTag()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 like }{\b\cf2\dbch\af23 \hich\af2\dbch\af23\loch\f2 Parse()}{\dbch\af23 \hich\af2\dbch\af23\loch\f2 is +\par \hich\af2\dbch\af23\loch\f2 virtual, so, it\hich\af2\dbch\af23\loch\f2 's up to you override it if you want to process some special +\par \hich\af2\dbch\af23\loch\f2 sequences. +\par }} \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.cpp new file mode 100644 index 0000000..ee17949 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.cpp @@ -0,0 +1,70 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "RegExpression.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CFrameWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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( !CFrameWnd::PreCreateWindow(cs) ) + return FALSE; + + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.h new file mode 100644 index 0000000..ae3cf83 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ChildFrm.h @@ -0,0 +1,53 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHILDFRM_H__68584120_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_CHILDFRM_H__68584120_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CChildFrame : public CFrameWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CHILDFRM_H__68584120_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.cpp new file mode 100644 index 0000000..264661d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.cpp @@ -0,0 +1,192 @@ +// FindDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "RegExpression.h" +#include "FindDialog.h" +#include "MainFrm.h" +#include "OXRegExpression.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CFindDialog dialog + + +CFindDialog::CFindDialog(CWnd* pParent /*=NULL*/) + : CDialog(CFindDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CFindDialog) + m_bFocus = FALSE; + //}}AFX_DATA_INIT + m_cmbHistory.SetAutoPersistent(AfxGetAppName()); +} + + +void CFindDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CFindDialog) + DDX_Control(pDX, IDC_LIST_RESULT, m_lstResult); + DDX_Control(pDX, IDC_COMBO_HISTORY, m_cmbHistory); + DDX_Check(pDX, IDC_CHECK_FOCUS, m_bFocus); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CFindDialog, CDialog) + //{{AFX_MSG_MAP(CFindDialog) + ON_WM_CLOSE() + ON_BN_CLICKED(ID_FIND_BUTTON, OnFindButton) + ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_RESULT, OnItemchangedListResult) + ON_NOTIFY(NM_CLICK, IDC_LIST_RESULT, OnClickListResult) + //}}AFX_MSG_MAP + ON_MESSAGE(WM_KICKIDLE, OnKickIdle) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CFindDialog message handlers + +BOOL CFindDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + ModifyStyleEx(0,WS_EX_TOPMOST); + ASSERT(::IsWindow(m_lstResult.m_hWnd)); + RECT rct; + m_lstResult.GetClientRect(&rct); + + m_lstResult.InsertColumn(0,_T("Found"),LVCFMT_LEFT, + rct.right-rct.left-80); + m_lstResult.InsertColumn(1,_T("Start"),LVCFMT_LEFT, + 40); + m_lstResult.InsertColumn(2,_T("Length"),LVCFMT_LEFT, + 40); + m_lstResult.SetExtendedStyle(m_lstResult.GetExtendedStyle() + | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); + m_reg.m_pParent=this; + m_cmbHistory.RestoreContents(AfxGetAppName()); + if (!m_cmbHistory.GetCount()) + { + m_cmbHistory.AddNewItem(_T("(re).*\\0s+ion")); + m_cmbHistory.AddNewItem(_T("^C.{0,}s{2}")); + m_cmbHistory.AddNewItem(_T("al\\b")); + m_cmbHistory.SetWindowText(_T("(re).*\\0s+ion")); + } + m_cmbHistory.SetFocus(); + CMainFrame* pFrame; + pFrame=(CMainFrame*) AfxGetMainWnd(); + ASSERT(pFrame); + m_pView=(CEditView*) pFrame->GetActiveView(); + ASSERT(m_pView); + return FALSE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CFindDialog::OnOK() +{ + UpdateData(TRUE); + if (m_cmbHistory.GetWindowTextLength()) + m_cmbHistory.AddNewItem(); + CDialog::OnOK(); +} + +LRESULT CFindDialog::OnKickIdle(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + UNUSED(wParam); + ASSERT(wParam == MSGF_DIALOGBOX); + BOOL bContinueIdle = TRUE; + + // Update the edit list + m_cmbHistory.OnIdle(); + return bContinueIdle; +} + + +void CFindDialog::OnClose() +{ + + CDialog::OnClose(); +} + +void CFindDialog::OnFindButton() +{ + + TCHAR szBuffer[_MAX_PATH]; + m_nStartSearch=0; + SetWindowText(_T("0 items found")); + CString sText; + + m_lstResult.DeleteAllItems(); + + + m_pView->GetWindowText(sText); + if (sText.IsEmpty()) + return; + + CString sRule; + m_cmbHistory.GetWindowText(sRule); + if (!m_reg.LoadRule(sRule)) + { + CString sError; + m_reg.TranslateError(m_reg.GetError(),sError); + AfxMessageBox(sError); + return; + } + int nEnd; + m_pView->GetEditCtrl().GetSel(m_nStartSearch, nEnd); + sText=sText.Right(sText.GetLength()-m_nStartSearch); + m_reg.Match(sText); + if (!m_lstResult.GetItemCount() && m_nStartSearch) + wsprintf(szBuffer, _T("%d items found - start search from the begining"),m_lstResult.GetItemCount()); + else + wsprintf(szBuffer, _T("%d items found"),m_lstResult.GetItemCount()); + SetWindowText(szBuffer); + UpdateData(TRUE); + if (m_bFocus) + m_pView->SetFocus(); + +} + + + + +void CFindDialog::OnItemchangedListResult(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; + // TODO: Add your control notification handler code here + if (pNMListView->uNewState & LVIS_FOCUSED) + { + int nStart, nLength; + CString sText=m_lstResult.GetItemText(pNMListView->iItem,1); + + nStart=_ttoi((LPCTSTR) sText); + sText=m_lstResult.GetItemText(pNMListView->iItem,2); + + nLength=_ttoi((LPCTSTR) sText); + m_pView->GetEditCtrl().SetSel(nStart, nStart+nLength); + UpdateData(TRUE); + if (m_bFocus) + m_pView->SetFocus(); + + + } + + *pResult = 0; +} + + + +void CFindDialog::OnClickListResult(NMHDR* pNMHDR, LRESULT* pResult) +{ + UNREFERENCED_PARAMETER(pNMHDR); + UpdateData(TRUE); + if (m_bFocus) + m_pView->SetFocus(); + + *pResult = 0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.h new file mode 100644 index 0000000..0c0c55a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/FindDialog.h @@ -0,0 +1,62 @@ +#if !defined(AFX_FINDDIALOG_H__390D85A1_9E9C_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_FINDDIALOG_H__390D85A1_9E9C_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#include "OXRegExpression.h" // Added by ClassView +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// FindDialog.h : header file +// +#include "OXHistoryCombo.h" +#include "MyRegular.h" + +const int ACTION_CANCEL=1; +const int ACTION_CONTINUE=2; + +///////////////////////////////////////////////////////////////////////////// +// CFindDialog dialog + +class CFindDialog : public CDialog +{ +// Construction +public: + CEditView* m_pView; + int m_nStartSearch; + CMyRegular m_reg; + CFindDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CFindDialog) + enum { IDD = IDD_DIALOG_FIND }; + CListCtrl m_lstResult; + COXHistoryCombo m_cmbHistory; + BOOL m_bFocus; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CFindDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CFindDialog) + virtual BOOL OnInitDialog(); + virtual void OnOK(); + afx_msg void OnClose(); + afx_msg void OnFindButton(); + afx_msg void OnItemchangedListResult(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnClickListResult(NMHDR* pNMHDR, LRESULT* pResult); + //}}AFX_MSG + LRESULT OnKickIdle(WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FINDDIALOG_H__390D85A1_9E9C_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.cpp new file mode 100644 index 0000000..6e105d5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.cpp @@ -0,0 +1,125 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "RegExpression.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_COMMAND(ID_FIND_BUTTON, OnFind) + //}}AFX_MSG_MAP +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 (CFrameWnd::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); + + + m_bAutoMenuEnable=FALSE; + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + if( !CFrameWnd::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 +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + + +void CMainFrame::OnFind() +{ + + m_dlgFind.m_cmbHistory.SetToolbarResource(MAKEINTRESOURCE(IDR_HISTORY_COMBO)); + if (::IsWindow(m_dlgFind.m_hWnd)) + m_dlgFind.ShowWindow(SW_SHOW); + else + VERIFY(m_dlgFind.Create((LPCTSTR) IDD_DIALOG_FIND)); + +} + +BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) +{ + return CFrameWnd::PreTranslateMessage(pMsg); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.h new file mode 100644 index 0000000..5e55984 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MainFrm.h @@ -0,0 +1,60 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MAINFRM_H__6858411E_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_MAINFRM_H__6858411E_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "FindDialog.h" + +class CMainFrame : public CFrameWnd +{ + DECLARE_DYNCREATE(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual BOOL PreTranslateMessage(MSG* pMsg); + //}}AFX_VIRTUAL +// 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; + CFindDialog m_dlgFind; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnFind(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAINFRM_H__6858411E_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.cpp new file mode 100644 index 0000000..a9ec5b6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.cpp @@ -0,0 +1,65 @@ +// MyRegular.cpp: implementation of the CMyRegular class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "RegExpression.h" +#include "MyRegular.h" +#include "FindDialog.h" +#include "MainFrm.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CMyRegular::CMyRegular() +{ +m_pParent=NULL; +} + +CMyRegular::~CMyRegular() +{ + +} + +BOOL CMyRegular::OnMatch(int nStart, int nLength) +{ + if (m_pParent && ::IsWindow(m_pParent->GetSafeHwnd()) + && ::IsWindow(m_pParent->m_lstResult.m_hWnd)) + { + + CMainFrame* pFrame=(CMainFrame*) AfxGetMainWnd(); + ASSERT(pFrame); + CEditView* pView=(CEditView*) pFrame->GetActiveView(); + ASSERT(pView); + pView->GetEditCtrl().SetSel(nStart+m_pParent->m_nStartSearch, + nLength+nStart+m_pParent->m_nStartSearch); + TCHAR szBuffer[_MAX_PATH]; + UTBStr::itot(nStart+m_pParent->m_nStartSearch,szBuffer,_MAX_PATH,10); + m_pParent->m_lstResult.InsertItem( + m_pParent->m_lstResult.GetItemCount(), + (LPCTSTR) m_sString.Mid(nStart,nLength)); + m_pParent->m_lstResult.SetItemText( + m_pParent->m_lstResult.GetItemCount()-1, + 1,szBuffer); + UTBStr::itot(nLength,szBuffer,_MAX_PATH,10); + m_pParent->m_lstResult.SetItemText( + m_pParent->m_lstResult.GetItemCount()-1, + 2,szBuffer); + } + return TRUE; +} + +BOOL CMyRegular::Match(CString sString) +{ + m_sString=sString; + return COXRegExpression::Match(sString); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.h new file mode 100644 index 0000000..90afc3b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/MyRegular.h @@ -0,0 +1,28 @@ +// MyRegular.h: interface for the CMyRegular class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_MYREGULAR_H__458C0FD3_B2F6_11D3_AC61_0050BAAB46B1__INCLUDED_) +#define AFX_MYREGULAR_H__458C0FD3_B2F6_11D3_AC61_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXRegExpression.h" +class CFindDialog; + +class CMyRegular : public COXRegExpression +{ +public: + BOOL Match(CString sString); + CFindDialog* m_pParent; + virtual BOOL OnMatch(int nStart, int nLength); + CMyRegular(); + virtual ~CMyRegular(); + +protected: + CString m_sString; +}; + +#endif // !defined(AFX_MYREGULAR_H__458C0FD3_B2F6_11D3_AC61_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.cpp new file mode 100644 index 0000000..7aee46d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.cpp @@ -0,0 +1,284 @@ +// ParseDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "RegExpression.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CParseDialog dialog + + +CParseDialog::CParseDialog(CWnd* pParent /*=NULL*/) + : CDialog(CParseDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CParseDialog) + m_sRule = _T(""); + m_sInfo = _T(""); + //}}AFX_DATA_INIT +} + + +void CParseDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CParseDialog) + DDX_Control(pDX, ID_PARSE, m_btnParse); + DDX_Control(pDX, IDC_LIST_PARSING, m_wndListResult); + DDX_Text(pDX, IDC_EDIT_RULE, m_sRule); + DDX_Text(pDX, IDC_STATICINFO, m_sInfo); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CParseDialog, CDialog) + //{{AFX_MSG_MAP(CParseDialog) + ON_BN_CLICKED(ID_PARSE, OnParse) + ON_EN_CHANGE(IDC_EDIT_RULE, OnChangeEditRule) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CParseDialog message handlers + +BOOL CParseDialog::OnParse() +{ + UpdateData(TRUE); + if (m_sRule.IsEmpty()) + { + + return FALSE; + } + this->m_wndListResult.DeleteAllItems(); + int nStop=0; + BOOL bRet=this->m_reg.LoadRule(m_sRule, &nStop); + if (!bRet) + { + ASSERT(nStopGetDlgItem(IDC_EDIT_RULE); + pEdit->SetSel(nStop,nStop+1); + int nError=this->m_reg.GetError(); + this->m_reg.TranslateError(nError,m_sInfo); + pEdit->SetFocus(); + UpdateData(FALSE); + return FALSE; + } + else + m_sInfo=_T("OK"); + UpdateData(FALSE); + tRegExpTag* pTag; + CString sType; + for (int n=0;nm_reg.GetTagCount();n++) + { + pTag=this->m_reg.GetTag(n); + switch (pTag->nType) + { + case OX_REGEXP_TAG_COMMON_CHAR: + sType=_T("TAG_COMMON_CHAR"); + break; + case OX_REGEXP_TAG_SPECCHAR: + sType=_T("TAG_SPECCHAR"); + break; + case OX_REGEXP_TAG_COMA: + sType=_T("TAG_COMA"); + break; + case OX_REGEXP_TAG_NOT_DEFINED: + sType=_T("TAG_NOT_DEFINED"); + break; + case OX_REGEXP_TAG_BEGINING_OF_THE_LINE: + sType=_T("BEGINING_OF_THE_LINE"); + break; + case OX_REGEXP_TAG_END_OF_THE_LINE: + sType=_T("TAG_END_OF_THE_LINE"); + break; + case OX_REGEXP_TAG_CHAR_ZERO_OR_MORE: + sType=_T("TAG_CHAR_ZERO_OR_MORE"); + break; + case OX_REGEXP_TAG_CHAR_ONE_OR_MORE: + sType=_T("TAG_CHAR_ONE_OR_MORE"); + break; + case OX_REGEXP_TAG_CHAR_ZERO_OR_ONE: + sType=_T("TAG_CHAR_ZERO_OR_ONE"); + break; + case OX_REGEXP_TAG_CHAR_NOT_NEW_LINE: + sType=_T("TAG_CHAR_NOT_NEW_LINE"); + break; + case OX_REGEXP_TAG_PATTERN_START: + sType=_T("TAG_PATTERN_START"); + break; + case OX_REGEXP_TAG_PATTERN: + sType=_T("TAG_PATTERN"); + break; + case OX_REGEXP_TAG_PATTERN_END: + sType=_T("TAG_PATTERN_END"); + break; + case OX_REGEXP_TAG_CHARS_EITHER: + sType=_T("TAG_CHARS_EITHER"); + break; + case OX_REGEXP_TAG_CHARS_EXACTLY: + sType=_T("TAG_CHARS_EXACTLY"); + break; + case OX_REGEXP_TAG_CHARS_EXACTLY_END: + sType=_T("TAG_CHARS_EXACTLY_END"); + break; + case OX_REGEXP_TAG_CHARS_AT_LEAST: + sType=_T("TAG_CHARS_AT_LEAST"); + break; + case OX_REGEXP_TAG_CHARS_AT_LEAST_MOST: + sType=_T("TAG_CHARS_AT_LEAST_MOST"); + break; + case OX_REGEXP_TAG_CHARSET: + sType=_T("TAG_CHARSET"); + break; + case OX_REGEXP_TAG_NON_CHARSET: + sType=_T("TAG_NON_CHARSET"); + break; + case OX_REGEXP_TAG_WORD_BOUNDARY: + sType=_T("TAG_WORD_BOUNDARY"); + break; + case OX_REGEXP_TAG_NON_WORD_BOUNDARY: + sType=_T("TAG_NON_WORD_BOUNDARY"); + break; + case OX_REGEXP_TAG_DIGIT: + sType=_T("TAG_DIGIT"); + break; + case OX_REGEXP_TAG_NON_DIGIT: + sType=_T("TAG_NON_DIGIT"); + break; + case OX_REGEXP_TAG_FORMFEED: + sType=_T("TAG_FORMFEED"); + break; + case OX_REGEXP_TAG_NEWLINE: + sType=_T("TAG_NEWLINE"); + break; + case OX_REGEXP_TAG_RETURN: + sType=_T("TAG_RETURN"); + break; + case OX_REGEXP_TAG_WHITESPACE: + sType=_T("TAG_WHITESPACE"); + break; + case OX_REGEXP_TAG_NON_WHITESPACE: + sType=_T("TAG_NON_WHITESPACE"); + break; + case OX_REGEXP_TAG_TAB: + sType=_T("TAG_TAB"); + break; + case OX_REGEXP_TAG_VERT_TAB: + sType=_T("TAG_VERT_TAB"); + break; + case OX_REGEXP_TAG_ANY_WORD: + sType=_T("TAG_ANY_WORD"); + break; + case OX_REGEXP_TAG_ANY_NON_WORD: + sType=_T("TAG_ANY_NON_WORD"); + break; + case OX_REGEXP_TAG_REFERENCE_BACK: + sType=_T("TAG_REFERENCE_BACK"); + break; + case OX_REGEXP_TAG_ASCII_CODE: + sType=_T("TAG_ASCII_CODE"); + break; + case OX_REGEXP_TAG_CHARSET_BEGIN_LINE: + sType=_T("TAG_CHARSET_BEGIN_LINE"); + break; + case OX_REGEXP_TAG_NON_CHARSET_BEGIN_LINE: + sType=_T("TAG_NON_CHARSET_BEGIN_LINE"); + break; + case OX_REGEXP_TAG_CHARSET_END_LINE: + sType=_T("TAG_CHARSET_END_LINE"); + break; + case OX_REGEXP_TAG_NON_CHARSET_END_LINE: + sType=_T("TAG_NON_CHARSET_END_LINE"); + break; + case OX_REGEXP_TAG_CHARSET_BEGIN_END_LINE: + sType=_T("TAG_CHARSET_BEGIN_END_LINE"); + break; + case OX_REGEXP_TAG_NON_CHARSET_BEGIN_END_LINE: + sType=_T("TAG_NON_CHARSET_BEGIN_END_LINE"); + break; + case OX_REGEXP_TAG_ANY_EXACTLY: + sType=_T("TAG_ANY_EXACTLY"); + break; + case OX_REGEXP_TAG_ANY_AT_LEAST: + sType=_T("TAG_ANY_AT_LEAST"); + break; + case OX_REGEXP_TAG_ANY_AT_LEAST_MOST: + sType=_T("TAG_ANY_AT_LEAST_MOST"); + break; + case OX_REGEXP_TAG_ANY_ZERO_OR_MORE: + sType=_T("TAG_ANY_ZERO_OR_MORE"); + break; + case OX_REGEXP_TAG_ANY_ONE_OR_MORE: + sType=_T("TAG_ANY_ONE_OR_MORE"); + break; + case OX_REGEXP_TAG_ANY_ZERO_OR_ONE: + sType=_T("TAG_ANY_ZERO_OR_ONE"); + break; + default: + sType=_T("Unknown Tag."); + } + this->m_wndListResult.InsertItem(n,(LPCTSTR) sType); + if (!pTag->sValue.IsEmpty()) + m_wndListResult.SetItemText(n,1,(LPCTSTR) pTag->sValue); + if (pTag->nType==OX_REGEXP_TAG_CHARS_EXACTLY || + pTag->nType==OX_REGEXP_TAG_CHARS_AT_LEAST || + pTag->nType==OX_REGEXP_TAG_CHARS_AT_LEAST_MOST || + pTag->nType==OX_REGEXP_TAG_CHAR_NOT_NEW_LINE || + pTag->nType==OX_REGEXP_TAG_DIGIT || + pTag->nType==OX_REGEXP_TAG_NON_DIGIT || + pTag->nType==OX_REGEXP_TAG_WHITESPACE || + pTag->nType==OX_REGEXP_TAG_NON_WHITESPACE || + pTag->nType==OX_REGEXP_TAG_ANY_WORD || + pTag->nType==OX_REGEXP_TAG_ANY_NON_WORD) + { + TCHAR szBuffer[_MAX_PATH]; + itoa(pTag->nFirstValue,(char*) szBuffer,10); + m_wndListResult.SetItemText(n,2,(LPCTSTR) szBuffer); +// if (pTag->nType==OX_REGEXP_TAG_CHARS_AT_LEAST_MOST || +// pTag->nType==OX_REGEXP_TAG_ANY_AT_LEAST_MOST) + { + itoa(pTag->nSecondValue,(char*) szBuffer,10); + m_wndListResult.SetItemText(n,3,(LPCTSTR) szBuffer); + } + } + } + return TRUE; +} + +void CParseDialog::OnChangeEditRule() +{ + // TODO: If this is a RICHEDIT control, the control will not + // send this notification unless you override the CDialog::OnInitDialog() + // function and call CRichEditCtrl().SetEventMask() + // with the ENM_CHANGE flag ORed into the mask. + UpdateData(TRUE); + +} + +BOOL CParseDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + + m_wndListResult.InsertColumn(0,_T("Type"),LVCFMT_LEFT,200); + m_wndListResult.InsertColumn(1,_T("Value"),LVCFMT_LEFT,50); + m_wndListResult.InsertColumn(2,_T("Min"),LVCFMT_LEFT,30); + m_wndListResult.InsertColumn(3,_T("Max"),LVCFMT_LEFT,30); + + CWnd* pWnd=this->GetDlgItem(IDC_EDIT_RULE); + pWnd->SetFocus(); + return FALSE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +void CParseDialog::OnOK() +{ + if (OnParse()) + CDialog::OnOK(); + else + CDialog::OnCancel(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.h new file mode 100644 index 0000000..4596553 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ParseDialog.h @@ -0,0 +1,55 @@ +#if !defined(AFX_PARSEDIALOG_H__5303F544_A729_11D3_AC52_0050BAAB46B1__INCLUDED_) +#define AFX_PARSEDIALOG_H__5303F544_A729_11D3_AC52_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// ParseDialog.h : header file +// + +#include "OXRegExpression.h" +#include "MyRegular.h" // Added by ClassView + +///////////////////////////////////////////////////////////////////////////// +// CParseDialog dialog + +class CParseDialog : public CDialog +{ +// Construction +public: + CParseDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CParseDialog) + enum { IDD = IDD_DIALOG1 }; + CButton m_btnParse; + CListCtrl m_wndListResult; + CString m_sRule; + CString m_sInfo; + //}}AFX_DATA + CMyRegular m_reg; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CParseDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CParseDialog) + afx_msg BOOL OnParse(); + afx_msg void OnChangeEditRule(); + virtual BOOL OnInitDialog(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PARSEDIALOG_H__5303F544_A729_11D3_AC52_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ReadMe.txt new file mode 100644 index 0000000..407b81d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/ReadMe.txt @@ -0,0 +1,105 @@ +COXRegular - new class that implements regular expression functionality. + + + Most of us had problems with searching some text in text files. + Yes, we can use searching capabilities that are provided with + many programs. But, in case we have to do some generic search + it is not the case. For such cases COXRegular class is exactly + what we had to have. This class provided generic search regarding + the rule you've supplied. To do search, you have to load regular + expression that defines what do you want to search. There are + different formats and different implementation for regular expression. + This implementation is most close to that one described in + MSDN that comes with Visual Studio 6.0 + + The rules: + + Character Description + + \ Marks the next character as special. All characters that are + special but you want to define it for search should be + preceding by this character. + ^ Matches the begining of input or line. In this implementation this + cannot be defined in charset. + $ Matches the end of input or line. In this implementation this + cannot be defined in charset. + * Matches preceding character zero or more times. In this implementation + cannot be defined if only one character specified in the regular + expression. That means that /zo*/ matches z and zoo, but + /z*/ will match nothing because only one character has been specified. + + Matches preceding character one or more times. + ? Matches preceding character zero or one time. In this implementation + cannot be defined if only one character specified in the regular + expression. + . Matches any single character except '\n' + (pattern) Matches pattern and remembers the match. The matched substring can + be retrieved by using '\0'-'\9' in regular expression, where '0'-'9' + are number of the pattern. Example: + regular expression '(re).*\0s+ion' will match 'regular expression' + because first matches pattern 're' and remember the pattern with + index 0. '.*' will match 'gular exp' in 'regular expression'. + Now we rettrieve pattern with index 0, that has been remembered + with index 0, this is 're' that matches 're' in 'regular expression' + before 'ssion' and , finally, 's+ion' matches 'ssion' + x|y Matches either character 'x' or 'y'. You can combine more than two + characters like 'x|y|z' + {n} Means preceding character will match exactly n times (nonnegative, of course) + {n,} Means preseding character will match at least n times (nonnegative) + {n,m} Means preceding character will match at keast n times and at + most m times. (n,m - nonnegative) + [xyz] A character set. Matches any one of enclosed characters + [^xyz] A non-matching character set. Matches any character that is not in the set. + \b Matches word boundary, that is boundary between any character excluding + space characters (" \f\n\r\t\v") and space characters + \B Matches non-word boundary. Matches any boundary between space + characters or between nonspace characters. + \d Matches any digit /0-9/ + \D Matches any non-digit. + \f Matches a formfeed. + \n Matches a new-line character + \r Matches a carridge return character. + \s Matches any white space character + \S Matches any non-white space character + \t Matches a tab character + \v Matches any vertical tab character + \w Matches any word character including underscore. [A-Za-z0-9_] + \W Matches any non-word character (any character that does not match \w) + \num Where num is number between 0 and 9. Matches remmembered pattern. + (See description of pattern) + /n/ Where n is between 1 and 255. Matches supplied in n ASCII code + + + Three easy steps to use: + 1) Create your own derived from COXRegular class and override function OnMatch() + This virtual function is always called when a matched substring has been found. + When this function is called you can return TRUE to continue search or FALSE + if you do not want continue search. + 2) Load your regular expression by function LoadRule() + 3) Call function Match to do the search in supplied text. + + + Now how it works. + There are two steps in the work -1)load regular expression and 2) search the text + +1)load regular expression + When you are loading regular expression, LoadRule() calls function Parse() that + has a huge switch. This function do parsing of the rule and create tags of different + types for every sequences of special characters, depends on the type of special + characters. For some special characters founded it calls appropriate functions + like GetAsciiChar() or GetEither() to do this special parsing. The tags are added + to the collection of tags. Any tag can be retrieved by GetTag(). + The function Parse is virtual, so, if you need to process some special characters, + that are not specified here, you can override it. Once Parse() or called subfunction + found error, Parce stops parsing and returns FALSE. You can retrieve error code + by GetError() and translate it to description by TranslateError() + +2) search the text + The search text makes function Match() that call recursive function MatchNextTag() + with start tag number=0. Match() does loop, every time incrementing start position + in the supplied text for the search untill end of the text has been reached. + MatchNextTag() does main job and once the tag matches the text at the specified + position does either, call OnMatch() if the tag was last in the collection of the tags + or calls MatchNextTag() to match next tag from the collection. + + The function MatchNextTag() like Parse() is virtual, so, it's up to you override it + if you want to process some special sequences. \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/Readme_u.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/Readme_u.txt new file mode 100644 index 0000000..90a9f2e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/Readme_u.txt differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.clw new file mode 100644 index 0000000..3b3c5d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.clw @@ -0,0 +1,185 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CFindDialog +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "RegExpression.h" +LastPage=0 + +ClassCount=8 +Class1=CRegExpressionApp +Class2=CRegExpressionDoc +Class3=CRegExpressionView +Class4=CMainFrame + +ResourceCount=5 +Resource1=IDR_MAINFRAME +Resource2=IDD_ABOUTBOX +Class5=CChildFrame +Class6=CAboutDlg +Resource3=IDR_HISTORY_COMBO +Class7=CFindDialog +Resource4=IDR_REGEXPTYPE +Class8=CParseDialog +Resource5=IDD_DIALOG_FIND + +[CLS:CRegExpressionApp] +Type=0 +HeaderFile=RegExpression.h +ImplementationFile=RegExpression.cpp +Filter=N +BaseClass=CWinApp +VirtualFilter=AC + +[CLS:CRegExpressionDoc] +Type=0 +HeaderFile=RegExpressionDoc.h +ImplementationFile=RegExpressionDoc.cpp +Filter=N +BaseClass=CDocument +VirtualFilter=DC +LastObject=CRegExpressionDoc + +[CLS:CRegExpressionView] +Type=0 +HeaderFile=RegExpressionView.h +ImplementationFile=RegExpressionView.cpp +Filter=C +LastObject=CRegExpressionView + + +[CLS:CMainFrame] +Type=0 +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp +Filter=T +BaseClass=CFrameWnd +VirtualFilter=fWC +LastObject=CMainFrame + + +[CLS:CChildFrame] +Type=0 +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +Filter=M + + +[CLS:CAboutDlg] +Type=0 +HeaderFile=RegExpression.cpp +ImplementationFile=RegExpression.cpp +Filter=D +LastObject=CAboutDlg + +[DLG:IDD_ABOUTBOX] +Type=1 +Class=CAboutDlg +ControlCount=4 +Control1=IDC_STATIC,static,1342177283 +Control2=IDC_STATIC,static,1342308480 +Control3=IDC_STATIC,static,1342308352 +Control4=IDOK,button,1342373889 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_MRU_FILE1 +Command4=ID_APP_EXIT +Command5=ID_VIEW_TOOLBAR +Command6=ID_VIEW_STATUS_BAR +Command7=ID_APP_ABOUT +CommandCount=7 + +[TB:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_REGEXPTYPE] +Type=1 +Class=CRegExpressionView +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_MRU_FILE1 +Command7=ID_APP_EXIT +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_VIEW_TOOLBAR +Command13=ID_VIEW_STATUS_BAR +Command14=ID_FIND_BUTTON +Command15=ID_APP_ABOUT +CommandCount=15 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=CMainFrame +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + +[DLG:IDD_DIALOG_FIND] +Type=1 +Class=CFindDialog +ControlCount=7 +Control1=IDOK,button,1342242816 +Control2=ID_FIND_BUTTON,button,1342242817 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_COMBO_HISTORY,combobox,1344340034 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_LIST_RESULT,SysListView32,1350664333 +Control7=IDC_CHECK_FOCUS,button,1342242819 + +[CLS:CFindDialog] +Type=0 +HeaderFile=FindDialog.h +ImplementationFile=FindDialog.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=IDC_LIST_RESULT + +[CLS:CParseDialog] +Type=0 +HeaderFile=ParseDialog.h +ImplementationFile=ParseDialog.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=IDC_STATICINFO + +[TB:IDR_HISTORY_COMBO] +Type=1 +Class=? +Command1=ID_HISTORY_COMBO_NEW +Command2=ID_HISTORY_COMBO_DELETE +CommandCount=2 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.cpp new file mode 100644 index 0000000..d3437d4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.cpp @@ -0,0 +1,180 @@ +// RegExpression.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "RegExpression.h" +#include "utsampleabout.h" + +#include "MainFrm.h" +#include "RegExpressionDoc.h" +#include "RegExpressionView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionApp + +BEGIN_MESSAGE_MAP(CRegExpressionApp, CWinApp) + //{{AFX_MSG_MAP(CRegExpressionApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionApp construction + +CRegExpressionApp::CRegExpressionApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRegExpressionApp object + +CRegExpressionApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionApp initialization + +BOOL CRegExpressionApp::InitInstance() +{ + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // 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(); // 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. + + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_REGEXPTYPE, + RUNTIME_CLASS(CRegExpressionDoc), + RUNTIME_CLASS(CMainFrame), // custom MDI child frame + RUNTIME_CLASS(CRegExpressionView)); + AddDocTemplate(pDocTemplate); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + m_pMainWnd->ShowWindow(m_nCmdShow); + m_pMainWnd->UpdateWindow(); + +#ifdef UNICODE + OpenDocumentFile(_T("Readme_u.txt")); +#else + OpenDocumentFile(_T("Readme.txt")); +#endif + + + return TRUE; +} + + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CRegExpressionApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionApp message handlers + + +int CRegExpressionApp::ExitInstance() +{ + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsp new file mode 100644 index 0000000..a8ae479 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsp @@ -0,0 +1,438 @@ +# Microsoft Developer Studio Project File - Name="RegExpression" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RegExpression - Win32 Debug_Unicode +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RegExpression.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RegExpression.mak" CFG="RegExpression - Win32 Debug_Unicode" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RegExpression - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RegExpression - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegExpression - Win32 Debug_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "RegExpression - Win32 Release_Unicode" (based on "Win32 (x86) Application") +!MESSAGE "RegExpression - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RegExpression - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# SUBTRACT RSC /x +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegExpression.exe" + +!ELSEIF "$(CFG)" == "RegExpression - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RegExpression.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "RegExpression - Win32 Debug_Unicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "RegExpression___Win32_Debug_Unicode" +# PROP BASE Intermediate_Dir "RegExpression___Win32_Debug_Unicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Unicode" +# PROP Intermediate_Dir "Debug_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "f:\Ultimate Toolbox\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /D "UNICODE" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "f:\Ultimate Toolbox\Include" /i "f:\Ultimate Toolbox\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "UNICODE" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"RegExpression.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "RegExpression - Win32 Release_Unicode" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RegExpression___Win32_Release_Unicode" +# PROP BASE Intermediate_Dir "RegExpression___Win32_Release_Unicode" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Unicode" +# PROP Intermediate_Dir "Release_Unicode" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "f:\Ultimate Toolbox\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /D "UNICODE" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "f:\Ultimate Toolbox\Include" /i "f:\Ultimate Toolbox\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# SUBTRACT BASE RSC /x +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "UNICODE" +# SUBTRACT RSC /x +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"RegExpression.exe" + +!ELSEIF "$(CFG)" == "RegExpression - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RegExpression___Win32_Release_Shared" +# PROP BASE Intermediate_Dir "RegExpression___Win32_Release_Shared" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /GX /O2 /I "f:\Ultimate Toolbox\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "f:\Ultimate Toolbox\Include" /i "f:\Ultimate Toolbox\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# SUBTRACT BASE RSC /x +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +# SUBTRACT RSC /x +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegExpression.exe" + +!ENDIF + +# Begin Target + +# Name "RegExpression - Win32 Release" +# Name "RegExpression - Win32 Debug" +# Name "RegExpression - Win32 Debug_Unicode" +# Name "RegExpression - Win32 Release_Unicode" +# Name "RegExpression - Win32 Release_Shared" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "Skins Framework" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXToolTipCtrl.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\FindDialog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=.\MyRegular.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXHistoryCombo.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Source\OXRegExpression.cpp" +# End Source File +# Begin Source File + +SOURCE=.\RegExpression.cpp +# End Source File +# Begin Source File + +SOURCE=.\RegExpression.rc +# End Source File +# Begin Source File + +SOURCE=.\RegExpressionDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\RegExpressionView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\FindDialog.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MyRegular.h +# End Source File +# Begin Source File + +SOURCE="..\..\..\Ultimate Toolbox\Include\OXHistoryCombo.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\Ultimate Toolbox\Include\OXHistoryComboRes.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegExpression.h +# End Source File +# Begin Source File + +SOURCE=.\RegExpression.h +# End Source File +# Begin Source File + +SOURCE=.\RegExpressionDoc.h +# End Source File +# Begin Source File + +SOURCE=.\RegExpressionView.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\indicato.bmp +# End Source File +# Begin Source File + +SOURCE="..\..\..\Ultimate Toolbox\Include\RES\OXHistoryComboImg.bmp" +# End Source File +# Begin Source File + +SOURCE=.\res\RegExpression.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RegExpression.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\RegExpressionDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsw new file mode 100644 index 0000000..a1cb529 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RegExpression"=".\RegExpression.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.h new file mode 100644 index 0000000..553a420 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.h @@ -0,0 +1,50 @@ +// RegExpression.h : main header file for the REGEXPRESSION application +// + +#if !defined(AFX_REGEXPRESSION_H__6858411A_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_REGEXPRESSION_H__6858411A_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionApp: +// See RegExpression.cpp for the implementation of this class +// + +class CRegExpressionApp : public CWinApp +{ +public: + CRegExpressionApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegExpressionApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + //{{AFX_MSG(CRegExpressionApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGEXPRESSION_H__6858411A_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.rc new file mode 100644 index 0000000..8928661 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.rc @@ -0,0 +1,457 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\RegExpression.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXRegExpression.rc""\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 DISCARDABLE "res\\RegExpression.ico" +IDR_REGEXPTYPE ICON DISCARDABLE "res\\RegExpressionDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDR_HISTORY_COMBO BITMAP DISCARDABLE "res\\toolbar1.bmp" +IDB_INDICATOR_FOUND BITMAP DISCARDABLE "res\\indicato.bmp" +IDB_INDICATOR_NOTFOUND BITMAP DISCARDABLE "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 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 + SEPARATOR + BUTTON ID_APP_ABOUT +END + +IDR_HISTORY_COMBO TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_HISTORY_COMBO_NEW + BUTTON ID_HISTORY_COMBO_DELETE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + 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 RegExpression...", ID_APP_ABOUT + END +END + +IDR_REGEXPTYPE MENU PRELOAD DISCARDABLE +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 "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 "Search" + BEGIN + MENUITEM "Find", ID_FIND_BUTTON + END + POPUP "&Help" + BEGIN + MENUITEM "&About RegExpression...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, 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 DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About RegExpression" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "RegExpression Version 1.0",IDC_STATIC,40,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 1999",IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_DIALOG_FIND DIALOG DISCARDABLE 0, 0, 235, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "OK",IDOK,179,133,50,14 + DEFPUSHBUTTON "FIND",ID_FIND_BUTTON,125,133,50,14 + LTEXT "Text to find",IDC_STATIC,13,21,38,10 + COMBOBOX IDC_COMBO_HISTORY,63,16,111,42,CBS_DROPDOWN | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + GROUPBOX "",IDC_STATIC,7,31,221,96 + CONTROL "List1",IDC_LIST_RESULT,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOLABELWRAP | + LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,13,39,208,81 + CONTROL "Focus on View",IDC_CHECK_FOCUS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,7,137,72,10 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "RegExpression MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "RegExpression\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "RegExpression.EXE\0" + VALUE "ProductName", "RegExpression Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_DIALOG_FIND, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "RegExpression" + IDR_REGEXPTYPE "\nRegExp\nRegExp\n*.txt(Text Files)\n.txt\nRegExpression.Document\nRegExp Document" + ID_DESCRIPTION_FILE "COXRegular.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "RegExpression" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_FIND_BUTTON "Find an expression in the text. You can use regular expression" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\RegExpression.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXHistoryCombo.rc" +#include "OXRegExpression.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.vcproj new file mode 100644 index 0000000..b01e5a8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpression.vcproj @@ -0,0 +1,2405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.cpp new file mode 100644 index 0000000..ad67de9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.cpp @@ -0,0 +1,85 @@ +// RegExpressionDoc.cpp : implementation of the CRegExpressionDoc class +// + +#include "stdafx.h" +#include "RegExpression.h" + +#include "RegExpressionDoc.h" +#include "FindDialog.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionDoc + +IMPLEMENT_DYNCREATE(CRegExpressionDoc, CDocument) + +BEGIN_MESSAGE_MAP(CRegExpressionDoc, CDocument) + //{{AFX_MSG_MAP(CRegExpressionDoc) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionDoc construction/destruction + +CRegExpressionDoc::CRegExpressionDoc() +{ + // TODO: add one-time construction code here + +} + +CRegExpressionDoc::~CRegExpressionDoc() +{ +} + +BOOL CRegExpressionDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + POSITION pos=this->GetFirstViewPosition(); + CEditView* pEditView=(CEditView*) this->GetNextView(pos); + pEditView->SetWindowText(_T("")); + return TRUE; +} + + + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionDoc serialization + +void CRegExpressionDoc::Serialize(CArchive& ar) +{ + + POSITION pos=this->GetFirstViewPosition(); + CEditView* pEditView=(CEditView*) this->GetNextView(pos); + pEditView->SerializeRaw(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionDoc diagnostics + +#ifdef _DEBUG +void CRegExpressionDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CRegExpressionDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionDoc commands + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.h new file mode 100644 index 0000000..4d179f9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionDoc.h @@ -0,0 +1,55 @@ +// RegExpressionDoc.h : interface of the CRegExpressionDoc class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_REGEXPRESSIONDOC_H__68584122_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_REGEXPRESSIONDOC_H__68584122_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +#include "OXRegExpression.h" + + +class CRegExpressionDoc : public CDocument +{ +protected: // create from serialization only + CRegExpressionDoc(); + DECLARE_DYNCREATE(CRegExpressionDoc) + +// Attributes +public: +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegExpressionDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRegExpressionDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CRegExpressionDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGEXPRESSIONDOC_H__68584122_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.cpp new file mode 100644 index 0000000..e3e5558 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.cpp @@ -0,0 +1,82 @@ +// RegExpressionView.cpp : implementation of the CRegExpressionView class +// + +#include "stdafx.h" +#include "RegExpression.h" + +#include "RegExpressionDoc.h" +#include "RegExpressionView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionView + +IMPLEMENT_DYNCREATE(CRegExpressionView, CEditView) + +BEGIN_MESSAGE_MAP(CRegExpressionView, CEditView) + //{{AFX_MSG_MAP(CRegExpressionView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionView construction/destruction + +CRegExpressionView::CRegExpressionView() +{ + // TODO: add construction code here + +} + +CRegExpressionView::~CRegExpressionView() +{ +} + +BOOL CRegExpressionView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CEditView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionView drawing + +void CRegExpressionView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + CRegExpressionDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionView diagnostics + +#ifdef _DEBUG +void CRegExpressionView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CRegExpressionView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CRegExpressionDoc* CRegExpressionView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRegExpressionDoc))); + return (CRegExpressionDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CRegExpressionView message handlers diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.h new file mode 100644 index 0000000..7571ad0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/RegExpressionView.h @@ -0,0 +1,64 @@ +// RegExpressionView.h : interface of the CRegExpressionView class +// +///////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_REGEXPRESSIONVIEW_H__68584124_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_REGEXPRESSIONVIEW_H__68584124_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +class CRegExpressionView : public CEditView +{ +protected: // create from serialization only + CRegExpressionView(); + DECLARE_DYNCREATE(CRegExpressionView) + +// Attributes +public: + CRegExpressionDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegExpressionView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CRegExpressionView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CRegExpressionView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in RegExpressionView.cpp +inline CRegExpressionDoc* CRegExpressionView::GetDocument() + { return (CRegExpressionDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGEXPRESSIONVIEW_H__68584124_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.cpp new file mode 100644 index 0000000..215853e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// RegExpression.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.h new file mode 100644 index 0000000..f405b69 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/StdAfx.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__6858411C_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) +#define AFX_STDAFX_H__6858411C_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#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 +#include +#include +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__6858411C_9E83_11D3_AC4A_0050BAAB46B1__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.rc2 new file mode 100644 index 0000000..3faf8eb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpression.rc2 @@ -0,0 +1,13 @@ +// +// REGEXPRESSION.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpressionDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpressionDoc.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/RegExpressionDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/bitmap1.bmp new file mode 100644 index 0000000..e108168 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/indicato.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/indicato.bmp new file mode 100644 index 0000000..591e806 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/indicato.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/toolbar1.bmp new file mode 100644 index 0000000..68e55c9 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/resource.h new file mode 100644 index 0000000..9611151 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegExpression/resource.h @@ -0,0 +1,36 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RegExpression.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_REGEXPTYPE 129 +#define IDD_DIALOG_FIND 130 +#define ID_DESCRIPTION_FILE 130 +#define IDR_HISTORY_COMBO 136 +#define IDD_DIALOG1 137 +#define IDB_INDICATOR_FOUND 138 +#define IDB_INDICATOR_NOTFOUND 139 +#define IDC_COMBO_HISTORY 1001 +#define IDC_LIST_PARSING 1002 +#define IDC_EDIT_RULE 1003 +#define IDC_STATICINFO 1004 +#define ID_FIND_BUTTON 1005 +#define ID_TEST 1006 +#define ID_PARSE 1007 +#define IDC_LIST_RESULT 1010 +#define IDC_CHECK_FOCUS 1011 +#define ID_HISTORY_COMBO_NEW 53320 +#define ID_HISTORY_COMBO_DELETE 53321 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 141 +#define _APS_NEXT_COMMAND_VALUE 32776 +#define _APS_NEXT_CONTROL_VALUE 1012 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.clw new file mode 100644 index 0000000..fa8c49e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.clw @@ -0,0 +1,62 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CRegEventDlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "regevent.h" +LastPage=0 + +ClassCount=3 +Class1=CRegEventApp +Class2=CRegEventDlg +Class3=CRemBttn + +ResourceCount=1 +Resource1=IDD_REGEVENT_DIALOG + +[CLS:CRegEventApp] +Type=0 +BaseClass=CWinApp +HeaderFile=RegEvent.h +ImplementationFile=RegEvent.cpp +Filter=N +VirtualFilter=AC +LastObject=CRegEventApp + +[CLS:CRegEventDlg] +Type=0 +BaseClass=CDialog +HeaderFile=RegEventDlg.h +ImplementationFile=RegEventDlg.cpp +LastObject=IDC_CHANGELIST + +[CLS:CRemBttn] +Type=0 +BaseClass=CButton +HeaderFile=RemBttn.h +ImplementationFile=RemBttn.cpp + +[DLG:IDD_REGEVENT_DIALOG] +Type=1 +Class=CRegEventDlg +ControlCount=17 +Control1=IDC_STATIC,button,1342177287 +Control2=IDC_HKEY,edit,1350631552 +Control3=IDC_HKEY_CURRENT_USER_RADIO,button,1342242825 +Control4=IDC_HKEY_LOCAL_MACHINE_RADIO,button,1342242825 +Control5=IDC_SUBTREE,button,1342242819 +Control6=IDOK,button,1342242817 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_NAMECHANGE,button,1342242819 +Control9=IDC_VALCHANGE,button,1342242819 +Control10=IDC_ATTRCHANGE,button,1342242819 +Control11=IDC_SECCHANGE,button,1342242819 +Control12=IDC_KEYLIST,SysListView32,1350633741 +Control13=IDC_CHANGELIST,SysListView32,1350633741 +Control14=IDC_REMBTTN,button,1476460544 +Control15=IDC_REMALLBTTN,button,1476460544 +Control16=IDC_CLRBTTN,button,1476460544 +Control17=IDCANCEL,button,1342242816 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.cpp new file mode 100644 index 0000000..d6377be --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.cpp @@ -0,0 +1,103 @@ +// RegEvent.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "RegEvent.h" +#include "RegEventDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegEventApp + +BEGIN_MESSAGE_MAP(CRegEventApp, CWinApp) + //{{AFX_MSG_MAP(CRegEventApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegEventApp construction + +CRegEventApp::CRegEventApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRegEventApp object + +CRegEventApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CRegEventApp initialization + +BOOL CRegEventApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CRegEventDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CRegEventApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsp new file mode 100644 index 0000000..1835d7b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsp @@ -0,0 +1,256 @@ +# Microsoft Developer Studio Project File - Name="RegEvent" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RegEvent - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RegEvent.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RegEvent.mak" CFG="RegEvent - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RegEvent - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RegEvent - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegEvent - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "RegEvent - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegEvent - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RegEvent - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegEvent.exe" + +!ELSEIF "$(CFG)" == "RegEvent - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RegEvent.exe" + +!ELSEIF "$(CFG)" == "RegEvent - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RegEvent" +# PROP BASE Intermediate_Dir "RegEvent" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegEvent.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegEvent.exe" + +!ELSEIF "$(CFG)" == "RegEvent - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "RegEven0" +# PROP BASE Intermediate_Dir "RegEven0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RegEvent.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"RegEvent.exe" + +!ELSEIF "$(CFG)" == "RegEvent - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RegEven1" +# PROP BASE Intermediate_Dir "RegEven1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegEvent.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"RegEvent.exe" + +!ENDIF + +# Begin Target + +# Name "RegEvent - Win32 Release" +# Name "RegEvent - Win32 Debug" +# Name "RegEvent - Win32 Release_Shared" +# Name "RegEvent - Win32 Unicode_Debug" +# Name "RegEvent - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryWatcher.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryWatchNotifier.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\RegEvent.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\RegEvent.rc +# End Source File +# Begin Source File + +SOURCE=.\RegEventDlg.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\RemBttn.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\RegEvent.h +# End Source File +# Begin Source File + +SOURCE=.\RegEventDlg.h +# End Source File +# Begin Source File + +SOURCE=.\RemBttn.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\idr_main.ico +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsw new file mode 100644 index 0000000..2de0f50 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RegEvent"=".\RegEvent.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.h new file mode 100644 index 0000000..009188c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.h @@ -0,0 +1,50 @@ +// RegEvent.h : main header file for the REGEVENT application +// + +#if !defined(AFX_REGEVENT_H__8CB72080_D8EC_11D0_A21F_0000929B340A__INCLUDED_) +#define AFX_REGEVENT_H__8CB72080_D8EC_11D0_A21F_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRegEventApp: +// See RegEvent.cpp for the implementation of this class +// + +class CRegEventApp : public CWinApp +{ +public: + CRegEventApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegEventApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CRegEventApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGEVENT_H__8CB72080_D8EC_11D0_A21F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.rc new file mode 100644 index 0000000..a748b1c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.rc @@ -0,0 +1,218 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "idr_main.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_REGEVENT_DIALOG DIALOGEX 0, 0, 313, 268 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "RegEvent" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + GROUPBOX "Enter a Registry Key to be watched (e.g. Software\\Microsoft\\Clock)", + IDC_STATIC,7,7,299,54 + EDITTEXT IDC_HKEY,13,16,171,12,ES_AUTOHSCROLL + CONTROL "HKEY_CURRENT_USER",IDC_HKEY_CURRENT_USER_RADIO,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,13,34,96,8 + CONTROL "HKEY_LOCAL_MACHINE",IDC_HKEY_LOCAL_MACHINE_RADIO,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,13,48,96,8 + CONTROL "Watch subtree (+)",IDC_SUBTREE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,125,31,69,8 + DEFPUSHBUTTON "Add Watch",IDOK,125,42,59,14 + LTEXT "Watch for changes of...",IDC_STATIC,202,18,89,8 + CONTROL "Name (N)",IDC_NAMECHANGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,202,31,43,8 + CONTROL "Value (V)",IDC_VALCHANGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,202,47,43,8 + CONTROL "Attributes (A)",IDC_ATTRCHANGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,250,31,54,8 + CONTROL "Security (S)",IDC_SECCHANGE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,250,47,54,8 + CONTROL "List1",IDC_KEYLIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE | + LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,65,232,96, + WS_EX_CLIENTEDGE + CONTROL "List1",IDC_CHANGELIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE | + LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,165,232,96, + WS_EX_CLIENTEDGE + PUSHBUTTON "Remove Watch",IDC_REMBTTN,247,65,59,14,WS_DISABLED + PUSHBUTTON "Remove All",IDC_REMALLBTTN,247,85,59,14,WS_DISABLED + PUSHBUTTON "Clear List",IDC_CLRBTTN,247,165,59,14,WS_DISABLED + PUSHBUTTON "Close",IDCANCEL,247,247,59,14 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "RegEvent MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "RegEvent\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "RegEvent.EXE\0" + VALUE "ProductName", "RegEvent Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_REGEVENT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 306 + TOPMARGIN, 7 + BOTTOMMARGIN, 261 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About RegEvent..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Registry events viewer" + ID_DESCRIPTION_FILE "regeventInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.vcproj new file mode 100644 index 0000000..b2e9e77 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEvent.vcproj @@ -0,0 +1,962 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.cpp new file mode 100644 index 0000000..356839e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.cpp @@ -0,0 +1,367 @@ +// RegEventDlg.cpp : implementation file +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "RegEvent.h" +#include "RegEventDlg.h" +#include "OXRegistryWatcher.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CRegEventDlg dialog + +CRegEventDlg::CRegEventDlg(CWnd* pParent /*=NULL*/) + : CDialog(CRegEventDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CRegEventDlg) + m_HkeyStr = _T(""); + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CRegEventDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRegEventDlg) + DDX_Control(pDX, IDOK, m_AddBttn); + DDX_Control(pDX, IDC_CLRBTTN, m_ClrBttn); + DDX_Control(pDX, IDC_REMBTTN, m_RemBttn); + DDX_Control(pDX, IDC_REMALLBTTN, m_RemAllBttn); + DDX_Control(pDX, IDC_CHANGELIST, m_ChangeList); + DDX_Control(pDX, IDC_KEYLIST, m_KeyList); + DDX_Text(pDX, IDC_HKEY, m_HkeyStr); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CRegEventDlg, CDialog) + //{{AFX_MSG_MAP(CRegEventDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_NOTIFY(NM_CLICK, IDC_KEYLIST, OnClickKeylist) + ON_NOTIFY(NM_KILLFOCUS, IDC_KEYLIST, OnKillfocusKeylist) + ON_BN_CLICKED(IDC_REMBTTN, OnRembttn) + ON_BN_CLICKED(IDC_REMALLBTTN, OnRemallbttn) + ON_BN_CLICKED(IDC_CLRBTTN, OnClrbttn) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegEventDlg message handlers + +BOOL CRegEventDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + // Set columns od lists. + CRect rect; + m_KeyList.GetWindowRect(rect); + m_KeyList.InsertColumn(0, _T("Watched Keys List"), LVCFMT_LEFT, rect.Width()-20); + m_ChangeList.GetWindowRect(rect); + m_ChangeList.InsertColumn(0, _T("Registry Changes List"), LVCFMT_LEFT, rect.Width()-20); + + // Initial settings for Radio & Check Buttons: HKEY_CURRENT_USER key is default, + // "Name" and "Value" buttons have a check mark. + CheckRadioButton(IDC_HKEY_CURRENT_USER_RADIO, IDC_HKEY_LOCAL_MACHINE_RADIO, IDC_HKEY_CURRENT_USER_RADIO); + CheckDlgButton(IDC_NAMECHANGE, 1); + CheckDlgButton(IDC_VALCHANGE, 1); + + // Check whether Registry key watching is supported. + if ( !m_RegWatch.IsWatchingSupported() ) + { + m_AddBttn.EnableWindow(FALSE); + AfxMessageBox(_T("Registry key watching isn't supported on your system.\nPlease run this program on Windows NT 4.0."), MB_OK|MB_ICONSTOP); + } + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CRegEventDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CRegEventDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CRegEventDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +BOOL CRegEventDlg::PreTranslateMessage(MSG* pMsg) +{ + // Translate message from COXRegistryWatcher class when Registry key is changed. + if ( pMsg->message == WM_OX_REGISTRY_NOTIFY ) + { + ::Beep(2000, 200); + TCHAR szBuffer[_MAX_PATH]; + VERIFY(!::RegEnumKey((HKEY) pMsg->lParam,0,(LPTSTR) &szBuffer, + _MAX_PATH)); + CString sKey((LPCTSTR) &szBuffer); + CString sMess; + DWORD dwKey = (DWORD)pMsg->wParam; + if ( m_MesMap.Lookup(dwKey, sMess) ) + { + m_ChangeList.InsertItem(m_ChangeList.GetItemCount(), sKey); + m_ClrBttn.EnableWindow(); + } + } + + return CDialog::PreTranslateMessage(pMsg); +} + +void CRegEventDlg::OnOK() +// Called when the user clicks the "Add Watch" button (this button has ID = IDOK). +// Adds Registry Key watch to "watch queue". +// Standard CDialog::OnOK() implementation doesn't perform. +{ + UpdateData(TRUE); + CString sAdded = ""; + HKEY hKey = NULL, hKeyAdd = NULL; + BOOL bWatchSubtree = FALSE; + DWORD dwWatchFilter = 0; + + // Define: description string for added watch; + // whether HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE key is used; + // whether key subtrees are watched; + // which changes should be reported. + switch ( GetCheckedRadioButton(IDC_HKEY_CURRENT_USER_RADIO, IDC_HKEY_LOCAL_MACHINE_RADIO) ) + { + case IDC_HKEY_CURRENT_USER_RADIO: + hKey = HKEY_CURRENT_USER; + sAdded = "HKEY_CURRENT_USER\\" + m_HkeyStr; + break; + case IDC_HKEY_LOCAL_MACHINE_RADIO: + hKey = HKEY_LOCAL_MACHINE; + sAdded = "HKEY_LOCAL_MACHINE\\" + m_HkeyStr; + break; + } + sAdded += "; "; + if ( IsDlgButtonChecked(IDC_SUBTREE) ) + { + bWatchSubtree = TRUE; + sAdded += " +"; + } + else + { + bWatchSubtree = FALSE; + sAdded += " -"; + } + if ( IsDlgButtonChecked(IDC_NAMECHANGE) ) + { + dwWatchFilter |= COXRegistryWatcher::OXRegistryWatchChangeName; + sAdded += "N"; + } + else + sAdded += "."; + if ( IsDlgButtonChecked(IDC_VALCHANGE) ) + { + dwWatchFilter |= COXRegistryWatcher::OXRegistryWatchChangeLastSet; + sAdded += "V"; + } + else + sAdded += "."; + if ( IsDlgButtonChecked(IDC_ATTRCHANGE) ) + { + dwWatchFilter |= COXRegistryWatcher::OXRegistryWatchChangeAttributes; + sAdded += "A"; + } + else + sAdded += "."; + if ( IsDlgButtonChecked(IDC_SECCHANGE) ) + { + dwWatchFilter |= COXRegistryWatcher::OXRegistryWatchChangeSecurity; + sAdded += "S"; + } + else + sAdded += "."; + + // Attempt to add watch. + LV_FINDINFO FindInfo = {LVFI_STRING, sAdded}; + if ( m_KeyList.FindItem(&FindInfo, -1) < 0 ) + { + if ( hKey ) + { + if ( ::RegOpenKeyEx(hKey, (LPCTSTR)m_HkeyStr, 0, KEY_NOTIFY | KEY_ENUMERATE_SUB_KEYS, &hKeyAdd) == + ERROR_SUCCESS && hKeyAdd ) + { + DWORD dwID = m_RegWatch.AddWatch(hKeyAdd, bWatchSubtree, dwWatchFilter); + if ( dwID > 0 ) + { + if ( m_RegWatch.EnableWindowNotification(dwID, this) ) + { + m_MesMap[dwID] = sAdded; + CString sMessAdd = "."; + if ( m_KeyList.InsertItem(m_KeyList.GetItemCount(), + (LPCTSTR)sAdded) >= 0 ) + m_RemAllBttn.EnableWindow(); + else + sMessAdd = ",\nbut record wasn't added to Watched Keys List."; + AfxMessageBox(_T("Registry Key watch was successfully set"+ + sMessAdd), MB_OK|MB_ICONINFORMATION); + } + else + AfxMessageBox(_T("Failure to set window to receive notification."), + MB_OK|MB_ICONSTOP); + } + else + AfxMessageBox(_T("Failure to add Registry Key watch."), + MB_OK|MB_ICONSTOP); + //::RegCloseKey(hKeyAdd); + } + else + AfxMessageBox(_T("Failure to open Registry Key."), MB_OK|MB_ICONSTOP); + } + else + AfxMessageBox(_T("Registry Key is not defined."), MB_OK|MB_ICONSTOP); + } + else + AfxMessageBox(_T("This Registry Key is already watched."), MB_OK|MB_ICONSTOP); + + //CDialog::OnOK(); +} + +void CRegEventDlg::OnClickKeylist(NMHDR* /* pNMHDR */, LRESULT* pResult) +// Called when the user clicks the list of watched keys. "Remove Watch" button becomes enabled. +{ + m_RemBttn.EnableWindow(); + *pResult = 0; +} + +void CRegEventDlg::OnKillfocusKeylist(NMHDR* /* pNMHDR */, LRESULT* pResult) +// Called when the user kills focus from the list of watched keys. +// "Remove Watch" button becomes disabled if focus doesn't move to it. +{ + if ( !m_RemBttn.m_bClick || !m_KeyList.GetItemCount() ) + m_RemBttn.EnableWindow(FALSE); + m_RemBttn.m_bClick = FALSE; + *pResult = 0; +} + +void CRegEventDlg::OnRembttn() +// Called when the user clicks the "Remove Watch" button. +// Removes Registry Key watch from "watch queue". +{ + AfxGetApp()->DoWaitCursor(1); + int nItemInd = m_KeyList.GetNextItem(-1, LVNI_SELECTED); + + if ( nItemInd >= 0 ) + { + CString sItem = m_KeyList.GetItemText(nItemInd, 0), sRet = ""; + DWORD dwKey = 0; + POSITION map_pos = m_MesMap.GetStartPosition(); + while ( map_pos ) + { + m_MesMap.GetNextAssoc(map_pos, dwKey, sRet); + if ( sRet == sItem ) + { + if ( m_RegWatch.RemoveWatch(dwKey) ) + { + m_MesMap.RemoveKey(dwKey); + m_KeyList.DeleteItem(nItemInd); + } + break; + } + } + } + + m_RemBttn.EnableWindow(FALSE); + if ( !m_KeyList.GetItemCount() ) + m_RemAllBttn.EnableWindow(FALSE); + AfxGetApp()->DoWaitCursor(-1); +} + +void CRegEventDlg::OnRemallbttn() +// Called when the user clicks the "Remove All" button. +// Removes all Registry Key watches from "watch queue". +{ + AfxGetApp()->DoWaitCursor(1); + if ( m_RegWatch.RemoveAllWatches() ) + { + m_MesMap.RemoveAll(); + m_KeyList.DeleteAllItems(); + m_RemBttn.EnableWindow(FALSE); + m_RemAllBttn.EnableWindow(FALSE); + } + AfxGetApp()->DoWaitCursor(-1); +} + +void CRegEventDlg::OnClrbttn() +// Called when the user clicks the "Clear List" button. +// Empties the "Registry Changes List". +{ + m_ChangeList.DeleteAllItems(); + m_ClrBttn.EnableWindow(FALSE); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.h new file mode 100644 index 0000000..32fb972 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RegEventDlg.h @@ -0,0 +1,73 @@ +// RegEventDlg.h : header file +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#if !defined(AFX_REGEVENTDLG_H__8CB72082_D8EC_11D0_A21F_0000929B340A__INCLUDED_) +#define AFX_REGEVENTDLG_H__8CB72082_D8EC_11D0_A21F_0000929B340A__INCLUDED_ + +#include "OXRegistryWatcher.h" // Added by ClassView +#include "RemBttn.h" +#include + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CRegEventDlg dialog + +class CRegEventDlg : public CDialog +{ +// Construction +public: + CMap m_MesMap; + + // The single COXRegistryWatcher object. It watches for Registry changes. + COXRegistryWatcher m_RegWatch; + + CRegEventDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CRegEventDlg) + enum { IDD = IDD_REGEVENT_DIALOG }; + CButton m_AddBttn; + CButton m_ClrBttn; + CRemBttn m_RemBttn; + CButton m_RemAllBttn; + CListCtrl m_ChangeList; + CListCtrl m_KeyList; + CString m_HkeyStr; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegEventDlg) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CRegEventDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnOK(); + afx_msg void OnClickKeylist(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnKillfocusKeylist(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnRembttn(); + afx_msg void OnRemallbttn(); + afx_msg void OnClrbttn(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGEVENTDLG_H__8CB72082_D8EC_11D0_A21F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.cpp new file mode 100644 index 0000000..1725f2c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.cpp @@ -0,0 +1,46 @@ +// RemBttn.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "RegEvent.h" +#include "RemBttn.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRemBttn + +CRemBttn::CRemBttn() +{ + m_bClick = FALSE; +} + +CRemBttn::~CRemBttn() +{ +} + + +BEGIN_MESSAGE_MAP(CRemBttn, CButton) + //{{AFX_MSG_MAP(CRemBttn) + ON_WM_LBUTTONDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRemBttn message handlers + +void CRemBttn::OnLButtonDown(UINT nFlags, CPoint point) +// Called when the user presses the left mouse button. Member m_bClick set to TRUE. +// If previous focus was in the list of watched keys, CRegEventDlg::OnKillfocusKeylist() +// function sets m_bClick to FALSE. This lets to keep "Remove Watch" button enabled +// when user kills focus from the list of watched keys. +{ + m_bClick = TRUE; + CButton::OnLButtonDown(nFlags, point); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.h new file mode 100644 index 0000000..474d19a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/RemBttn.h @@ -0,0 +1,51 @@ +#if !defined(AFX_REMBTTN_H__401B21F9_ED61_11D0_A23A_0000929B340A__INCLUDED_) +#define AFX_REMBTTN_H__401B21F9_ED61_11D0_A23A_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// RemBttn.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CRemBttn window + +class CRemBttn : public CButton +{ +// Construction +public: + CRemBttn(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRemBttn) + //}}AFX_VIRTUAL + +// Implementation +public: + BOOL m_bClick; + virtual ~CRemBttn(); + + // Generated message map functions +protected: + //{{AFX_MSG(CRemBttn) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REMBTTN_H__401B21F9_ED61_11D0_A23A_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.cpp new file mode 100644 index 0000000..e9af63c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// RegEvent.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.h new file mode 100644 index 0000000..18612ec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__8CB72084_D8EC_11D0_A21F_0000929B340A__INCLUDED_) +#define AFX_STDAFX_H__8CB72084_D8EC_11D0_A21F_0000929B340A__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__8CB72084_D8EC_11D0_A21F_0000929B340A__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/idr_main.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/idr_main.ico new file mode 100644 index 0000000..ae9a905 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/idr_main.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/regeventInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/regeventInfo.rtf new file mode 100644 index 0000000..b261828 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/regeventInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/resource.h new file mode 100644 index 0000000..644c583 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Regevent/resource.h @@ -0,0 +1,34 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RegEvent.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_REGEVENT_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_HKEY 1001 +#define IDC_KEYLIST 1003 +#define IDC_HKEY_CURRENT_USER_RADIO 1004 +#define IDC_HKEY_LOCAL_MACHINE_RADIO 1005 +#define IDC_CHANGELIST 1006 +#define IDC_SUBTREE 1007 +#define IDC_REMBTTN 1010 +#define IDC_REMALLBTTN 1011 +#define IDC_CLRBTTN 1013 +#define IDC_NAMECHANGE 1014 +#define IDC_ATTRCHANGE 1015 +#define IDC_VALCHANGE 1016 +#define IDC_SECCHANGE 1017 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1015 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.clw new file mode 100644 index 0000000..c5a9411 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.clw @@ -0,0 +1,92 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CRegistryDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "registrydemo.h" +LastPage=0 + +ClassCount=3 +Class1=CRegistryDemoApp +Class2=CRegistryDemoDlg +Class3=CRegistryListDlg + +ResourceCount=2 +Resource1=IDD_REGISTRY_LIST (Dutch (Belgium)) +Resource2=IDD_REGISTRYDEMO_DIALOG (Dutch (Belgium)) + +[CLS:CRegistryDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=RegistryDemo.h +ImplementationFile=RegistryDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CRegistryDemoApp + +[CLS:CRegistryDemoDlg] +Type=0 +BaseClass=CDialog +HeaderFile=RegistryDemoDlg.h +ImplementationFile=RegistryDemoDlg.cpp + +[CLS:CRegistryListDlg] +Type=0 +BaseClass=CDialog +HeaderFile=RegistryListDlg.h +ImplementationFile=RegistryListDlg.cpp + +[DLG:IDD_REGISTRYDEMO_DIALOG] +Type=1 +Class=CRegistryDemoDlg + +[DLG:IDD_REGISTRY_LIST] +Type=1 +Class=CRegistryListDlg + +[DLG:IDD_REGISTRYDEMO_DIALOG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=32 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_MACHINE_NAME,edit,1350631552 +Control3=IDC_STATIC,static,1342308352 +Control4=IDC_REGISTRY_NAME,combobox,1344339970 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_KEY_NAMES,edit,1350631552 +Control7=IDC_STATIC,static,1342308352 +Control8=IDC_VALUE_NAME,edit,1350631552 +Control9=IDC_COMBINE,button,1342242816 +Control10=IDC_SPLIT,button,1342242816 +Control11=IDC_DEFAULT,button,1342242816 +Control12=IDC_STATIC,button,1342177287 +Control13=IDC_FULL_REGISTRY_ITEM_STATIC,static,1342308352 +Control14=IDC_FULL_REGISTRY_ITEM,edit,1350631552 +Control15=IDC_BOOL_1,button,1342242819 +Control16=IDC_TEXT_1_STATIC,static,1342308352 +Control17=IDC_TEXT_1,edit,1350631552 +Control18=IDC_NEW_VALUE_STATIC,static,1342308352 +Control19=IDC_NEW_VALUE,edit,1350631552 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_ACTIONS,combobox,1344340227 +Control22=IDC_DO,button,1342242816 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_RESULT,edit,1350633604 +Control25=IDC_STATIC,button,1342177287 +Control26=IDC_INCLUDE_VALUES,button,1342242819 +Control27=IDC_INCLUDE_SUBKEYS,button,1342242819 +Control28=IDC_REVERSED_ORDER,button,1342242819 +Control29=IDC_RECURSE,button,1342242819 +Control30=IDC_DEPTH_FIRST,button,1342242819 +Control31=IDC_LIST,button,1342242816 +Control32=IDCANCEL,button,1342242816 + +[DLG:IDD_REGISTRY_LIST (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=2 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_LIST,listbox,1353777409 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.cpp new file mode 100644 index 0000000..618ad0e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.cpp @@ -0,0 +1,106 @@ +// RegistryDemo.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + + +#include "stdafx.h" +#include "RegistryDemo.h" +#include "RegistryDemoDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoApp + +BEGIN_MESSAGE_MAP(CRegistryDemoApp, CWinApp) + //{{AFX_MSG_MAP(CRegistryDemoApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoApp construction + +CRegistryDemoApp::CRegistryDemoApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRegistryDemoApp object + +CRegistryDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoApp initialization + +BOOL CRegistryDemoApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Set the company name used for registry operations + SetRegistryKey(_T("Dundas")); + + CRegistryDemoDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CRegistryDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsp new file mode 100644 index 0000000..0db429c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsp @@ -0,0 +1,269 @@ +# Microsoft Developer Studio Project File - Name="RegistryDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RegistryDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RegistryDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RegistryDemo.mak" CFG="RegistryDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RegistryDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RegistryDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegistryDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "RegistryDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegistryDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RegistryDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegistryDemo.exe" + +!ELSEIF "$(CFG)" == "RegistryDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RegistryDemo.exe" + +!ELSEIF "$(CFG)" == "RegistryDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Registry" +# PROP BASE Intermediate_Dir "Registry" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegistryDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegistryDemo.exe" + +!ELSEIF "$(CFG)" == "RegistryDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Registr0" +# PROP BASE Intermediate_Dir "Registr0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"RegistryDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"RegistryDemo.exe" + +!ELSEIF "$(CFG)" == "RegistryDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Registr1" +# PROP BASE Intermediate_Dir "Registr1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"RegistryDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"RegistryDemo.exe" + +!ENDIF + +# Begin Target + +# Name "RegistryDemo - Win32 Release" +# Name "RegistryDemo - Win32 Debug" +# Name "RegistryDemo - Win32 Release_Shared" +# Name "RegistryDemo - Win32 Unicode_Debug" +# Name "RegistryDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIteratorRegistryItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\RegistryDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\RegistryDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\RegistryDemoDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\RegistryListDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=..\..\..\Include\OXIteratorRegistryItem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryItem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXRegistryItem.inl +# End Source File +# Begin Source File + +SOURCE=.\RegistryDemo.h +# End Source File +# Begin Source File + +SOURCE=.\RegistryDemoDlg.h +# End Source File +# Begin Source File + +SOURCE=.\RegistryListDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\RegistryDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RegistryDemo.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsw new file mode 100644 index 0000000..bbf8407 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RegistryDemo"=".\RegistryDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.h new file mode 100644 index 0000000..ad48f37 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.h @@ -0,0 +1,40 @@ +// RegistryDemo.h : main header file for the REGISTRYDEMO application +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoApp: +// See RegistryDemo.cpp for the implementation of this class +// + +class CRegistryDemoApp : public CWinApp +{ +public: + CRegistryDemoApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegistryDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CRegistryDemoApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.rc new file mode 100644 index 0000000..fede104 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.rc @@ -0,0 +1,260 @@ +//Microsoft Developer Studio 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 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,1,0,1 + PRODUCTVERSION 1,1,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "REGISTRYDEMO MFC Application\0" + VALUE "FileVersion", "1, 1, 0, 1\0" + VALUE "InternalName", "REGISTRYDEMO\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software\0" + VALUE "OriginalFilename", "REGISTRYDEMO.EXE\0" + VALUE "ProductName", "REGISTRYDEMO Application\0" + VALUE "ProductVersion", "1, 1, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About RegistryDemo..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Registry Demo" + ID_DESCRIPTION_FILE "regdemoInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_REGISTRYDEMO_DIALOG DIALOGEX 0, 0, 225, 292 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "RegistryDemo" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "&Machine name",IDC_STATIC,7,10,48,8 + EDITTEXT IDC_MACHINE_NAME,58,7,88,14,ES_AUTOHSCROLL + LTEXT "&Registry name",IDC_STATIC,7,25,48,8 + COMBOBOX IDC_REGISTRY_NAME,58,23,88,54,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + LTEXT "&Key names",IDC_STATIC,8,40,40,8 + EDITTEXT IDC_KEY_NAMES,58,37,126,14,ES_AUTOHSCROLL + LTEXT "&Value name",IDC_STATIC,7,56,37,8 + EDITTEXT IDC_VALUE_NAME,58,53,88,14,ES_AUTOHSCROLL + PUSHBUTTON "&Combine",IDC_COMBINE,23,74,50,14 + PUSHBUTTON "&Split",IDC_SPLIT,88,74,50,14 + PUSHBUTTON "App &Default",IDC_DEFAULT,153,74,50,14 + GROUPBOX "Input",IDC_STATIC,7,90,211,62 + LTEXT "&Full registry item",IDC_FULL_REGISTRY_ITEM_STATIC,13, + 99,49,8 + EDITTEXT IDC_FULL_REGISTRY_ITEM,13,109,197,14,ES_AUTOHSCROLL + CONTROL "&BOOL",IDC_BOOL_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 13,128,35,10 + LTEXT "&LPCTSTR",IDC_TEXT_1_STATIC,58,126,37,8 + EDITTEXT IDC_TEXT_1,58,135,62,14,ES_AUTOHSCROLL + LTEXT "&New value",IDC_NEW_VALUE_STATIC,137,126,44,8 + EDITTEXT IDC_NEW_VALUE,137,135,62,14,ES_AUTOHSCROLL + LTEXT "&Action",IDC_STATIC,7,154,20,8 + COMBOBOX IDC_ACTIONS,7,164,211,66,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Do",IDC_DO,81,179,50,14 + LTEXT "&Output",IDC_STATIC,7,188,22,8 + EDITTEXT IDC_RESULT,7,197,211,31,ES_MULTILINE | ES_AUTOHSCROLL | + ES_READONLY + GROUPBOX "List",IDC_STATIC,7,231,211,35 + CONTROL "&Values",IDC_INCLUDE_VALUES,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,14,239,37,10 + CONTROL "&Subkeys",IDC_INCLUDE_SUBKEYS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,63,239,43,10 + CONTROL "&Reversed",IDC_REVERSED_ORDER,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,109,239,46,10 + CONTROL "&Recursive",IDC_RECURSE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,14,253,48,10 + CONTROL "&Depth first",IDC_DEPTH_FIRST,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,63,253,46,10 + PUSHBUTTON "&List",IDC_LIST,160,244,50,14 + PUSHBUTTON "Close",IDCANCEL,81,271,50,14 +END + +IDD_REGISTRY_LIST DIALOG DISCARDABLE 0, 0, 307, 100 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Registry List" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Close",IDCANCEL,128,79,50,14 + LISTBOX IDC_LIST,7,7,293,65,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_HSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_REGISTRYDEMO_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 218 + TOPMARGIN, 7 + BOTTOMMARGIN, 285 + END + + IDD_REGISTRY_LIST, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 300 + TOPMARGIN, 7 + BOTTOMMARGIN, 93 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\RegistryDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\RegistryDemo.ico" +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\RegistryDemo.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.vcproj new file mode 100644 index 0000000..e13db0c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemo.vcproj @@ -0,0 +1,977 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.cpp new file mode 100644 index 0000000..e08e613 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.cpp @@ -0,0 +1,498 @@ +// RegistryDemoDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "RegistryDemo.h" +#include "RegistryDemoDlg.h" +#include "RegistryListDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoDlg dialog +static const TCHAR szOpen[] = _T("Open(BOOL bCreate)"); +static const TCHAR szClose[] = _T("Close()"); +static const TCHAR szDelete[] = _T("Delete()"); +static const TCHAR szIsOpen[] = _T("IsOpen()"); +static const TCHAR szFlush[] = _T("Flush()"); +static const TCHAR szGetStringValue[] = _T("GetStringValue(LPCTSTR pszName, BOOL bAllowUnexpanded)"); +static const TCHAR szGetMultiStringValue[] =_T("GetMultiStringValue(LPCTSTR pszName)"); +static const TCHAR szGetMultiStringValue2[]=_T("GetMultiStringValue(CStringArray& array, LPCTSTR pszName)"); +static const TCHAR szGetNumberValue[] = _T("GetNumberValue(LPCTSTR pszName, BOOL bLittleEndian)"); +static const TCHAR szGetBinaryValue[] = _T("GetBinaryValue(LPCTSTR pszName)"); + +static const TCHAR szSetStringValue[] = _T("SetStringValue(LPCTSTR pszNew, LPCTSTR pszName, BOOL bUnexpanded)"); +static const TCHAR szSetMultiStringValue[] = _T("SetMultiStringValue(LPCTSTR pszNew, LPCTSTR pszName)"); +static const TCHAR szSetNumberValue[] = _T("SetNumberValue(DWORD nNew, LPCTSTR pszName, BOOL bLittleEndian)"); +static const TCHAR szSetBinaryValue[] = _T("SetBinaryValue(LPCTSTR pszName)"); +static const TCHAR szGetClassName[] = _T("GetClassName()"); +static const TCHAR szGetNumberOfSubKeys[] = _T("GetNumberOfSubkeys()"); +static const TCHAR szGetLongestSubkeyNameLength[] = _T("GetLongestSubkeyNameLength()"); +static const TCHAR szGetLongestClassNameLength[] = _T("GetLongestClassNameLength()"); +static const TCHAR szGetNumberOfValues[] = _T("GetNumberOfValues()"); +static const TCHAR szGetLongestValueNameLength[] = _T("GetLongestValueNameLength()"); + +static const TCHAR szGetLongestValueDataLength[] = _T("GetLongestValueDataLength()"); +static const TCHAR szGetSecurityDescriptorLength[] =_T("GetSecurityDescriptorLength()"); +static const TCHAR szGetLastWriteTime[] =_T("GetLastWriteTime()"); +static const TCHAR szGetValueSize[] =_T("GetValueSize()"); +static const TCHAR szGetValueType[] =_T("GetValueType()"); + +#define OPEN_INDEX 0 +#define CLOSE_INDEX 1 +#define DELETE_INDEX 2 +#define IS_OPEN 3 +#define FLUSH 4 +#define GET_STRING_VALUE 5 +#define GET_MULTI_STRING_VALUE 6 +#define GET_MULTI_STRING_VALUE_2 7 +#define GET_NUMBER_VALUE 8 +#define GET_BINARY_VALUE 9 + +#define SET_STRING_VALUE 10 +#define SET_MULTI_STRING_VALUE 11 +#define SET_NUMBER_VALUE 12 +#define SET_BINARY_VALUE 13 +#define GET_CLASS_NAME 14 +#define GET_NUMBER_OF_SUBKEYS 15 +#define GET_LONGEST_SUBKEY_NAME_LENGTH 16 +#define GET_LONGEST_CLASS_NAME_LENGTH 17 +#define GET_NUMBER_OF_VALUES 18 +#define GET_LONGEST_VALUE_NAME_LENGTH 19 + +#define GET_LONGEST_VALUE_DATA_LENGTH 20 +#define GET_SECURITY_DESCRIPTOR_LENGTH 21 +#define GET_LAST_WRITE_TIME 22 +#define GET_VALUE_SIZE 23 +#define GET_VALUE_TYPE 24 + +CRegistryDemoDlg::COXAction CRegistryDemoDlg::m_actions[] = + { + // m_bEnableFullRegistryItem; + // | m_bEnableBool1 + // | | m_bEnableText1 + // | | | m_bEnableNewValue + // | | | | m_pszText + // | | | | | + // | | | | | + + { TRUE, TRUE, FALSE, FALSE, szOpen }, + { FALSE,FALSE, FALSE, FALSE, szClose }, + { TRUE, FALSE, FALSE, FALSE, szDelete }, + { FALSE,FALSE, FALSE, FALSE, szIsOpen }, + { FALSE,FALSE, FALSE, FALSE, szFlush }, + { TRUE, TRUE, TRUE, FALSE, szGetStringValue }, + { TRUE, FALSE, TRUE, FALSE, szGetMultiStringValue }, + { TRUE, FALSE, TRUE, FALSE, szGetMultiStringValue2 }, + { TRUE, TRUE, TRUE, FALSE, szGetNumberValue }, + { TRUE, FALSE, TRUE, FALSE, szGetBinaryValue }, + + { TRUE, TRUE, TRUE, TRUE, szSetStringValue }, + { TRUE, FALSE, TRUE, TRUE, szSetMultiStringValue }, + { TRUE, TRUE, TRUE, TRUE, szSetNumberValue }, + { TRUE, FALSE, TRUE, FALSE, szSetBinaryValue }, + { TRUE, FALSE, FALSE, FALSE, szGetClassName }, + { TRUE, FALSE, FALSE, FALSE, szGetNumberOfSubKeys }, + { TRUE, FALSE, FALSE, FALSE, szGetLongestSubkeyNameLength }, + { TRUE, FALSE, FALSE, FALSE, szGetLongestClassNameLength }, + { TRUE, FALSE, FALSE, FALSE, szGetNumberOfValues }, + { TRUE, FALSE, FALSE, FALSE, szGetLongestValueNameLength }, + + { TRUE, FALSE, FALSE, FALSE, szGetLongestValueDataLength }, + { TRUE, FALSE, FALSE, FALSE, szGetSecurityDescriptorLength }, + { TRUE, FALSE, FALSE, FALSE, szGetLastWriteTime }, + { TRUE, FALSE, TRUE, FALSE, szGetValueSize }, + { TRUE, FALSE, TRUE, FALSE, szGetValueType }, + + // ... End with m_pszText == NULL + { FALSE, FALSE, FALSE, FALSE, NULL} + }; + + +CRegistryDemoDlg::CRegistryDemoDlg(CWnd* pParent /*=NULL*/) +: CDialog(CRegistryDemoDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CRegistryDemoDlg) + m_sFullRegistryItem = _T(""); + m_sKeyNames = _T(""); + m_sMachineName = _T(""); + m_sRegistryName = _T(""); + m_sValueName = _T(""); + m_bBool1 = FALSE; + m_sText1 = _T(""); + m_sNewValue = _T(""); + m_bDepthFirst = FALSE; + m_bIncludeSubkeys = FALSE; + m_bIncludeValues = TRUE; + m_bRecursive = FALSE; + m_bReversedOrder = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + } + +void CRegistryDemoDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRegistryDemoDlg) + DDX_Control(pDX, IDC_NEW_VALUE_STATIC, m_wndNewValueStatic); + DDX_Control(pDX, IDC_NEW_VALUE, m_wndNewValue); + DDX_Control(pDX, IDC_TEXT_1_STATIC, m_wndText1Static); + DDX_Control(pDX, IDC_TEXT_1, m_wndText1); + DDX_Control(pDX, IDC_BOOL_1, m_wndBool1); + DDX_Control(pDX, IDC_RESULT, m_wndResult); + DDX_Control(pDX, IDC_FULL_REGISTRY_ITEM_STATIC, m_wndFullRegistryItemStatic); + DDX_Control(pDX, IDC_FULL_REGISTRY_ITEM, m_wndFullRegistryItem); + DDX_Control(pDX, IDC_ACTIONS, m_wndActions); + DDX_Control(pDX, IDC_REGISTRY_NAME, m_wndRegistryName); + DDX_Text(pDX, IDC_FULL_REGISTRY_ITEM, m_sFullRegistryItem); + DDX_Text(pDX, IDC_KEY_NAMES, m_sKeyNames); + DDX_Text(pDX, IDC_MACHINE_NAME, m_sMachineName); + DDX_CBString(pDX, IDC_REGISTRY_NAME, m_sRegistryName); + DDX_Text(pDX, IDC_VALUE_NAME, m_sValueName); + DDX_Check(pDX, IDC_BOOL_1, m_bBool1); + DDX_Text(pDX, IDC_TEXT_1, m_sText1); + DDX_Text(pDX, IDC_NEW_VALUE, m_sNewValue); + DDX_Check(pDX, IDC_DEPTH_FIRST, m_bDepthFirst); + DDX_Check(pDX, IDC_INCLUDE_SUBKEYS, m_bIncludeSubkeys); + DDX_Check(pDX, IDC_INCLUDE_VALUES, m_bIncludeValues); + DDX_Check(pDX, IDC_RECURSE, m_bRecursive); + DDX_Check(pDX, IDC_REVERSED_ORDER, m_bReversedOrder); + //}}AFX_DATA_MAP + } + +BEGIN_MESSAGE_MAP(CRegistryDemoDlg, CDialog) + //{{AFX_MSG_MAP(CRegistryDemoDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_COMBINE, OnCombine) + ON_BN_CLICKED(IDC_SPLIT, OnSplit) + ON_BN_CLICKED(IDC_DO, OnDo) + ON_CBN_SELCHANGE(IDC_ACTIONS, OnSelchangeActions) + ON_BN_CLICKED(IDC_DEFAULT, OnDefault) + ON_BN_CLICKED(IDC_LIST, OnList) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoDlg message handlers + +BOOL CRegistryDemoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Initalize the controls contents + m_wndRegistryName.AddString(_T("")); + m_wndRegistryName.AddString(COXRegistryItem::m_pszClassesRoot); + m_wndRegistryName.AddString(COXRegistryItem::m_pszCurrentUser); + m_wndRegistryName.AddString(COXRegistryItem::m_pszLocalMachine); + m_wndRegistryName.AddString(COXRegistryItem::m_pszUsers); + m_wndRegistryName.AddString(COXRegistryItem::m_pszPerformanceData); + m_wndRegistryName.AddString(COXRegistryItem::m_pszCurrentConfig); + m_wndRegistryName.AddString(COXRegistryItem::m_pszDynData); + + // Init combo contents + int nComboIndex = 0; + DWORD nArrayIndex = 0; + COXAction* pAction = m_actions; + while (pAction->m_pszText != NULL) + { + nComboIndex = m_wndActions.AddString(pAction->m_pszText); + m_wndActions.SetItemData(nComboIndex, nArrayIndex); + nArrayIndex++; + pAction++; + } + + // Init combo selection + m_wndActions.SelectString(-1, szOpen); + OnSelchangeActions(); + + return TRUE; // return TRUE unless you set the focus to a control + } + +void CRegistryDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) + { + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } + } + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CRegistryDemoDlg::OnPaint() + { + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } + } + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CRegistryDemoDlg::OnQueryDragIcon() + { + return (HCURSOR) m_hIcon; + } + +void CRegistryDemoDlg::OnCombine() + { + if (!UpdateData(TRUE)) + return; + + m_registryItem.SetMachineName(m_sMachineName); + m_registryItem.SetRegistryName(m_sRegistryName); + m_registryItem.SetKeyNames(m_sKeyNames); + m_registryItem.SetValueName(m_sValueName); + + // Get the full (and the parts) + m_sFullRegistryItem = m_registryItem.GetFullRegistryItem(); + m_sMachineName = m_registryItem.GetMachineName(); + m_sRegistryName = m_registryItem.GetRegistryName(); + m_sKeyNames = m_registryItem.GetKeyNames(); + m_sValueName = m_registryItem.GetValueName(); + + UpdateData(FALSE); + } + +void CRegistryDemoDlg::OnSplit() + { + if (!UpdateData(TRUE)) + return; + + m_registryItem.SetFullRegistryItem(m_sFullRegistryItem); + + // Get the parts (and the full) + m_sMachineName = m_registryItem.GetMachineName(); + m_sRegistryName = m_registryItem.GetRegistryName(); + m_sKeyNames = m_registryItem.GetKeyNames(); + m_sValueName = m_registryItem.GetValueName(); + m_sFullRegistryItem = m_registryItem.GetFullRegistryItem(); + + UpdateData(FALSE); + } + +void CRegistryDemoDlg::OnDo() + { + int nComboIndex = m_wndActions.GetCurSel(); + DWORD nArrayIndex = m_wndActions.GetItemData(nComboIndex); + COXAction* pAction = &m_actions[nArrayIndex]; + + // Default to no result + m_sCallResult.Empty(); + + // First build the parts again + if (m_wndFullRegistryItem.IsWindowEnabled()) + OnSplit(); + + // Then execute the correct function + switch (nArrayIndex) + { + case OPEN_INDEX: + m_registryItem.Open(m_bBool1); + break; + case CLOSE_INDEX: + m_registryItem.Close(); + break; + case DELETE_INDEX: + m_registryItem.Delete(); + break; + case IS_OPEN: + m_sCallResult = m_registryItem.IsOpen() ? _T("TRUE") : _T("FALSE"); + break; + case FLUSH: + m_registryItem.Flush(); + break; + case GET_STRING_VALUE: + m_sCallResult = m_registryItem.GetStringValue(m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1, m_bBool1); + break; + case GET_MULTI_STRING_VALUE: + m_sCallResult = m_registryItem.GetMultiStringValue(m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1); + break; + case GET_MULTI_STRING_VALUE_2: + { + CStringArray stringArray; + m_registryItem.GetMultiStringValue(stringArray, m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1); + } + break; + case GET_NUMBER_VALUE: + m_sCallResult.Format(_T("%u"), + m_registryItem.GetNumberValue(m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1, m_bBool1)); + break; + case GET_BINARY_VALUE: + { + CByteArray binaryValue; + m_registryItem.GetBinaryValue(binaryValue, m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1); + } + break; + case SET_STRING_VALUE: + m_registryItem.SetStringValue(m_sNewValue, m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1, m_bBool1); + break; + case SET_MULTI_STRING_VALUE: + m_registryItem.SetMultiStringValue(m_sNewValue, m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1); + break; + case SET_NUMBER_VALUE: + m_registryItem.SetNumberValue(_ttol(m_sNewValue), m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1, m_bBool1); + break; + case SET_BINARY_VALUE: + { + CByteArray binaryValue; + binaryValue.Add((BYTE)1); + binaryValue.Add((BYTE)2); + binaryValue.Add((BYTE)3); + binaryValue.Add((BYTE)4); + m_registryItem.SetBinaryValue(binaryValue, m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1); + } + break; + case GET_CLASS_NAME: + m_sCallResult = m_registryItem.GetClassName(); + break; + case GET_NUMBER_OF_SUBKEYS: + m_sCallResult.Format(_T("%i"), m_registryItem.GetNumberOfSubkeys()); + break; + case GET_LONGEST_SUBKEY_NAME_LENGTH: + m_sCallResult.Format(_T("%i"), m_registryItem.GetLongestSubkeyNameLength()); + break; + case GET_LONGEST_CLASS_NAME_LENGTH: + m_sCallResult.Format(_T("%i"), m_registryItem.GetLongestClassNameLength()); + break; + case GET_NUMBER_OF_VALUES: + m_sCallResult.Format(_T("%i"), m_registryItem.GetNumberOfValues()); + break; + case GET_LONGEST_VALUE_NAME_LENGTH: + m_sCallResult.Format(_T("%i"), m_registryItem.GetLongestValueNameLength()); + break; + case GET_LONGEST_VALUE_DATA_LENGTH: + m_sCallResult.Format(_T("%i"), m_registryItem.GetLongestValueDataLength()); + break; + case GET_SECURITY_DESCRIPTOR_LENGTH: + m_sCallResult.Format(_T("%i"), m_registryItem.GetSecurityDescriptorLength()); + break; + case GET_LAST_WRITE_TIME: + m_sCallResult = m_registryItem.GetLastWriteTime().Format(_T("%#c")); + break; + case GET_VALUE_SIZE: + m_sCallResult.Format(_T("%i"), m_registryItem.GetValueSize(m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1)); + break; + case GET_VALUE_TYPE: + m_sCallResult.Format(_T("%i"), m_registryItem.GetValueType(m_sText1.IsEmpty() ? (LPCTSTR)NULL : (LPCTSTR)m_sText1)); + break; + default: + TRACE1("CRegistryDemoDlg::OnDo : Unexpected case in switch : %i\n", nArrayIndex); + ASSERT(FALSE); + break; + } + + // Process the result + CString sResult = pAction->m_pszText; + sResult += _T("\r\n"); + if (SUCCEEDED(m_registryItem.GetLastError())) + sResult += _T("Succeeded"); + else + { + CString sError; + sError.Format(_T("FAILED with Error Code : %i"), HRESULT_CODE(m_registryItem.GetLastError())); + sResult += sError; + } + if (!m_sCallResult.IsEmpty()) + { + sResult += _T("\r\n"); + sResult += _T("Result = "); + sResult += m_sCallResult; + } + m_wndResult.SetWindowText(sResult); + } + +void CRegistryDemoDlg::OnSelchangeActions() + { + int nComboIndex = m_wndActions.GetCurSel(); + DWORD nArrayIndex = m_wndActions.GetItemData(nComboIndex); + COXAction* pAction = &m_actions[nArrayIndex]; + + // Conditionally enable/disable the window + m_wndFullRegistryItemStatic.EnableWindow(pAction->m_bEnableFullRegistryItem); + m_wndFullRegistryItem.EnableWindow(pAction->m_bEnableFullRegistryItem); + m_wndBool1.EnableWindow(pAction->m_bEnableBool1); + m_wndText1Static.EnableWindow(pAction->m_bEnableText1); + m_wndText1.EnableWindow(pAction->m_bEnableText1); + m_wndNewValueStatic.EnableWindow(pAction->m_bEnableNewValue); + m_wndNewValue.EnableWindow(pAction->m_bEnableNewValue); + } + +void CRegistryDemoDlg::OnDefault() + { + m_registryItem.InitializeFromApplication(); + + // Get the parts (and the full) + m_sMachineName = m_registryItem.GetMachineName(); + m_sRegistryName = m_registryItem.GetRegistryName(); + m_sKeyNames = m_registryItem.GetKeyNames(); + m_sValueName = m_registryItem.GetValueName(); + m_sFullRegistryItem = m_registryItem.GetFullRegistryItem(); + + UpdateData(FALSE); + } + +void CRegistryDemoDlg::OnList() + { + OnSplit(); + + CRegistryListDlg regListDlg; + regListDlg.SetSearchItem(m_registryItem, m_bIncludeValues, m_bIncludeSubkeys, m_bReversedOrder, + m_bRecursive, m_bDepthFirst); + regListDlg.DoModal(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.h new file mode 100644 index 0000000..6d615dc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryDemoDlg.h @@ -0,0 +1,82 @@ +// RegistryDemoDlg.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CRegistryDemoDlg dialog +#include "OXRegistryItem.h" + +class CRegistryDemoDlg : public CDialog +{ +// Construction +public: + CRegistryDemoDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CRegistryDemoDlg) + enum { IDD = IDD_REGISTRYDEMO_DIALOG }; + CStatic m_wndNewValueStatic; + CEdit m_wndNewValue; + CStatic m_wndText1Static; + CEdit m_wndText1; + CButton m_wndBool1; + CEdit m_wndResult; + CStatic m_wndFullRegistryItemStatic; + CEdit m_wndFullRegistryItem; + CComboBox m_wndActions; + CComboBox m_wndRegistryName; + CString m_sFullRegistryItem; + CString m_sKeyNames; + CString m_sMachineName; + CString m_sRegistryName; + CString m_sValueName; + BOOL m_bBool1; + CString m_sText1; + CString m_sNewValue; + BOOL m_bDepthFirst; + BOOL m_bIncludeSubkeys; + BOOL m_bIncludeValues; + BOOL m_bRecursive; + BOOL m_bReversedOrder; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegistryDemoDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + COXRegistryItem m_registryItem; + CString m_sCallResult; + + struct COXAction + { + BOOL m_bEnableFullRegistryItem; + BOOL m_bEnableBool1; + BOOL m_bEnableText1; + BOOL m_bEnableNewValue; + LPCTSTR m_pszText; + }; + static COXAction m_actions[]; + + + + // Generated message map functions + //{{AFX_MSG(CRegistryDemoDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnCombine(); + afx_msg void OnSplit(); + afx_msg void OnDo(); + afx_msg void OnSelchangeActions(); + afx_msg void OnDefault(); + afx_msg void OnList(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.cpp new file mode 100644 index 0000000..b737243 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.cpp @@ -0,0 +1,99 @@ +// UNCListDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "RegistryDemo.h" +#include "RegistryListDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegistryListDlg dialog + + +CRegistryListDlg::CRegistryListDlg(CWnd* pParent /*=NULL*/) + : CDialog(CRegistryListDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CRegistryListDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CRegistryListDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRegistryListDlg) + DDX_Control(pDX, IDCANCEL, m_wndClose); + DDX_Control(pDX, IDC_LIST, m_wndList); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CRegistryListDlg, CDialog) + //{{AFX_MSG_MAP(CRegistryListDlg) + ON_WM_TIMER() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegistryListDlg message handlers + +void CRegistryListDlg::SetSearchItem(COXIteratorRegistryItem iterItem, BOOL bIncludeValues, + BOOL bIncludeSubkeys, BOOL bReversedOrder, BOOL bRecursive, + BOOL bDepthFirst) + { + m_bIncludeValues = bIncludeValues; + m_bIncludeSubkeys = bIncludeSubkeys; + m_bReversedOrder = bReversedOrder; + m_bRecursive = bRecursive; + m_bDepthFirst = bDepthFirst; + m_iterItem = iterItem; + } + +BOOL CRegistryListDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // ... Set a timer so that the list will be filled whan this window is + // fully initialized and visisble + SetTimer(0, 10, NULL); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } + +void CRegistryListDlg::OnTimer(UINT nIDEvent) + { + if (!IsWindowVisible()) + // ... Only start the list when we are visible, + // otherwise wait for the next timer event. + return; + + // ... Kill the running timer + KillTimer(0); + + m_wndClose.EnableWindow(FALSE); + + int nTopIndex = 0; + m_iterItem.Start(m_bIncludeValues, m_bIncludeSubkeys, m_bReversedOrder, + m_bRecursive, m_bDepthFirst); + while(!m_iterItem.IsEmpty()) + { + m_wndList.AddString(m_iterItem.GetFullRegistryItem()); + m_wndList.SetTopIndex(nTopIndex++); + m_wndList.RedrawWindow(NULL, NULL, RDW_UPDATENOW); + m_iterItem++; + } + m_iterItem.End(); + + m_wndClose.EnableWindow(TRUE); + + CDialog::OnTimer(nIDEvent); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.h new file mode 100644 index 0000000..5479edc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/RegistryListDlg.h @@ -0,0 +1,51 @@ +// UNCListDlg.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CRegistryListDlg dialog + +#include "OXIteratorRegistryItem.h" + +class CRegistryListDlg : public CDialog +{ +// Construction +public: + void SetSearchItem(COXIteratorRegistryItem iterItem, BOOL bIncludeValues, + BOOL bIncludeSubkeys, BOOL bReversedOrder, BOOL bRecursive, + BOOL bDepthFirst); + + CRegistryListDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CRegistryListDlg) + enum { IDD = IDD_REGISTRY_LIST }; + CButton m_wndClose; + CListBox m_wndList; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegistryListDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + BOOL m_bIncludeValues; + BOOL m_bIncludeSubkeys; + BOOL m_bReversedOrder; + BOOL m_bRecursive; + BOOL m_bDepthFirst; + COXIteratorRegistryItem m_iterItem; + + // Generated message map functions + //{{AFX_MSG(CRegistryListDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnTimer(UINT nIDEvent); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.cpp new file mode 100644 index 0000000..5f87065 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// RegistryDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.h new file mode 100644 index 0000000..8fdde2c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Templates +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/regdemoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/regdemoInfo.rtf new file mode 100644 index 0000000..8cb6591 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/regdemoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.rc2 new file mode 100644 index 0000000..c0b5d55 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/res/RegistryDemo.rc2 @@ -0,0 +1,13 @@ +// +// REGISTRYDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/resource.h new file mode 100644 index 0000000..77bca74 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/RegistryDemo/resource.h @@ -0,0 +1,45 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RegistryDemo.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_REGISTRYDEMO_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDD_REGISTRY_LIST 130 +#define IDC_MACHINE_NAME 1000 +#define IDC_KEY_NAMES 1001 +#define IDC_VALUE_NAME 1002 +#define IDC_FULL_REGISTRY_ITEM 1003 +#define IDC_REGISTRY_NAME 1004 +#define IDC_COMBINE 1005 +#define IDC_SPLIT 1006 +#define IDC_BOOL_1 1008 +#define IDC_RESULT 1011 +#define IDC_ACTIONS 1013 +#define IDC_DO 1014 +#define IDC_FULL_REGISTRY_ITEM_STATIC 1015 +#define IDC_TEXT_1 1016 +#define IDC_TEXT_1_STATIC 1017 +#define IDC_NEW_VALUE_STATIC 1018 +#define IDC_NEW_VALUE 1019 +#define IDC_DEFAULT 1020 +#define IDC_LIST 1021 +#define IDC_INCLUDE_VALUES 1022 +#define IDC_INCLUDE_SUBKEYS 1023 +#define IDC_RECURSE 1024 +#define IDC_DEPTH_FIRST 1025 +#define IDC_REVERSED_ORDER 1026 + +// 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 1027 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.clw new file mode 100644 index 0000000..095ae7c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.clw @@ -0,0 +1,44 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CServiceApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "service.h" +LastPage=0 + +ClassCount=2 +Class1=CServiceApp +Class2=CServiceDlg + +ResourceCount=1 +Resource1=IDD_SERVICE_DIALOG + +[CLS:CServiceApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Service.h +ImplementationFile=Service.cpp +Filter=N +VirtualFilter=AC +LastObject=CServiceApp + +[CLS:CServiceDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ServiceDlg.h +ImplementationFile=ServiceDlg.cpp + +[DLG:IDD_SERVICE_DIALOG] +Type=1 +Class=CServiceDlg +ControlCount=7 +Control1=IDC_LIST_SERVICE,listbox,1352728835 +Control2=IDC_LIST_ACTION,listbox,1352728833 +Control3=IDOK,button,1342242817 +Control4=IDCANCEL,button,1342242816 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_STATIC,static,1342308352 +Control7=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.cpp new file mode 100644 index 0000000..035dfb4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.cpp @@ -0,0 +1,97 @@ +// Service.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + + +#include "stdafx.h" +#include "Service.h" +#include "ServiceDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CServiceApp + +BEGIN_MESSAGE_MAP(CServiceApp, CWinApp) + //{{AFX_MSG_MAP(CServiceApp) + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CServiceApp construction + +CServiceApp::CServiceApp() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CServiceApp object + +CServiceApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CServiceApp initialization + +BOOL CServiceApp::InitInstance() +{ + // Standard initialization + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + CServiceDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CServiceApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsp new file mode 100644 index 0000000..536eb24 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsp @@ -0,0 +1,249 @@ +# Microsoft Developer Studio Project File - Name="Service" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Service - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Service.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Service.mak" CFG="Service - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Service - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Service - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Service - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Service - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Service - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Service - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Service.exe" + +!ELSEIF "$(CFG)" == "Service - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Service.exe" + +!ELSEIF "$(CFG)" == "Service - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Service_" +# PROP BASE Intermediate_Dir "Service_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Service.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Service.exe" + +!ELSEIF "$(CFG)" == "Service - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Service0" +# PROP BASE Intermediate_Dir "Service0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Service.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Service.exe" + +!ELSEIF "$(CFG)" == "Service - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Service1" +# PROP BASE Intermediate_Dir "Service1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Service.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Service.exe" + +!ENDIF + +# Begin Target + +# Name "Service - Win32 Release" +# Name "Service - Win32 Debug" +# Name "Service - Win32 Release_Shared" +# Name "Service - Win32 Unicode_Debug" +# Name "Service - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXIteratorService.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXService.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Service.cpp +# End Source File +# Begin Source File + +SOURCE=.\Service.rc +# End Source File +# Begin Source File + +SOURCE=.\ServiceDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\Service.h +# End Source File +# Begin Source File + +SOURCE=.\ServiceDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Service.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Service.rc2 +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsw new file mode 100644 index 0000000..63887a4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Service"=".\Service.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.h new file mode 100644 index 0000000..ab8d80d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.h @@ -0,0 +1,48 @@ +// Service.h : main header file for the SERVICE application +// + +#if !defined(AFX_SERVICE_H__E906DAA4_18DB_11D1_B900_444553540000__INCLUDED_) +#define AFX_SERVICE_H__E906DAA4_18DB_11D1_B900_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CServiceApp: +// See Service.cpp for the implementation of this class +// + +class CServiceApp : public CWinApp +{ +public: + CServiceApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CServiceApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CServiceApp) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERVICE_H__E906DAA4_18DB_11D1_B900_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.rc new file mode 100644 index 0000000..25d5828 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.rc @@ -0,0 +1,198 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Service.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\Service.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SERVICE_DIALOG DIALOGEX 0, 0, 304, 175 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Demo of COXService" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LISTBOX IDC_LIST_SERVICE,7,17,171,131,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_LIST_ACTION,184,17,113,131,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,247,154,50,14 + PUSHBUTTON "Exit",IDCANCEL,7,154,50,14 + LTEXT "1. Choose a service:",IDC_STATIC,7,7,66,8 + LTEXT "2. Choose an action:",IDC_STATIC,183,7,66,8 + LTEXT "3. Click here --->",IDC_STATIC,183,156,52,8 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Service MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Service\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "Service.EXE\0" + VALUE "ProductName", "Service Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SERVICE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 297 + TOPMARGIN, 7 + BOTTOMMARGIN, 168 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About Service..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Service Demo" + ID_DESCRIPTION_FILE "ServiceInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Service.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.sln b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.sln new file mode 100644 index 0000000..c1b4ee5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Service", "Service.vcproj", "{DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release_Shared|Win32 = Release_Shared|Win32 + Release|Win32 = Release|Win32 + Unicode_Debug|Win32 = Unicode_Debug|Win32 + Unicode_Release|Win32 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Debug|Win32.Build.0 = Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release|Win32.ActiveCfg = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Release|Win32.Build.0 = Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Debug|Win32.ActiveCfg = Unicode_Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Debug|Win32.Build.0 = Unicode_Debug|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Release|Win32.ActiveCfg = Unicode_Release|Win32 + {DDFCEAB2-AF5D-4CEF-8C2D-D38FAD153A7F}.Unicode_Release|Win32.Build.0 = Unicode_Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.vcproj new file mode 100644 index 0000000..181e072 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/Service.vcproj @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.cpp new file mode 100644 index 0000000..cbcd45c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.cpp @@ -0,0 +1,424 @@ +// ServiceDlg.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "Service.h" +#include "ServiceDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define ACTION_GOBACK 0 +#define ACTION_ITERDEPEND 1 +#define ACTION_START 2 +#define ACTION_PAUSE 3 +#define ACTION_CONTINUE 4 +#define ACTION_STOP 5 +#define ACTION_GET_SERVICESTATUS 6 +#define ACTION_GET_DISPLAYNAME 7 +#define ACTION_GET_SERVICETYPE 8 +#define ACTION_GET_STARTYPE 9 +#define ACTION_GET_ERRORCONTROL 10 +#define ACTION_GET_BINARYPATHNAME 11 +#define ACTION_GET_LOADORDERGROUP 12 +#define ACTION_GET_TAGID 13 +#define ACTION_GET_DEPENDENCIES 14 +#define ACTION_GET_STARTNAME 15 + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CServiceDlg dialog + +CServiceDlg::CServiceDlg(CWnd* pParent /*=NULL*/) + : CDialog(CServiceDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CServiceDlg) + m_sDisplayName = _T(""); + //}}AFX_DATA_INIT + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CServiceDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CServiceDlg) + DDX_Control(pDX, IDC_LIST_SERVICE, m_ctrlListService); + DDX_Control(pDX, IDC_LIST_ACTION, m_ctrlListAction); + DDX_LBString(pDX, IDC_LIST_SERVICE, m_sDisplayName); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CServiceDlg, CDialog) + //{{AFX_MSG_MAP(CServiceDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_LBN_DBLCLK(IDC_LIST_ACTION, OnDblclkListAction) + ON_LBN_DBLCLK(IDC_LIST_SERVICE, OnDblclkListService) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CServiceDlg message handlers + +CServiceDlg::~CServiceDlg() +{ + COXService::CloseSCManager(); +} + +BOOL CServiceDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + m_ctrlListAction.AddString(_T("(go back)")); + m_ctrlListAction.AddString(_T("(enum dependents)")); + m_ctrlListAction.AddString(_T("Start")); + m_ctrlListAction.AddString(_T("Pause")); + m_ctrlListAction.AddString(_T("Continue")); + m_ctrlListAction.AddString(_T("Stop")); + m_ctrlListAction.AddString(_T("QueryStatus")); + m_ctrlListAction.AddString(_T("QueryDisplayName")); + m_ctrlListAction.AddString(_T("QueryServiceType")); + m_ctrlListAction.AddString(_T("QueryStartType")); + m_ctrlListAction.AddString(_T("QueryErrorControl")); + m_ctrlListAction.AddString(_T("QueryBinaryPathName")); + m_ctrlListAction.AddString(_T("QueryLoadOrderGroup")); + m_ctrlListAction.AddString(_T("QueryTagID")); + m_ctrlListAction.AddString(_T("QueryDependencies")); + m_ctrlListAction.AddString(_T("QueryStartName")); + + if (m_itersrv.StartIteration()) + UpdateServiceList(); + else + AfxMessageBox(_T("Failed to enumerate services.")); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CServiceDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CServiceDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +HCURSOR CServiceDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + + +void CServiceDlg::OnDblclkListAction() +{ + OnOK(); +} + +void CServiceDlg::OnDblclkListService() +{ + OnOK(); +} + +void CServiceDlg::OnOK() +{ + if (m_ctrlListAction.GetCurSel() != ACTION_GOBACK && + (m_ctrlListService.GetCurSel() == LB_ERR || + m_ctrlListAction.GetCurSel() == LB_ERR)) + { + AfxMessageBox(_T("Please follow step 1, 2 and then 3.")); + return; + } + + UpdateData(TRUE); + COXIteratorService itersrv(COXService::QueryKeyName(m_sDisplayName)); + switch(m_ctrlListAction.GetCurSel()) + { + case ACTION_GOBACK: + if (m_itersrvLast.GetServiceCount() > 0) + { + m_itersrv = m_itersrvLast; + m_itersrvLast.End(); + } + else + m_itersrv.StartIteration(); + UpdateServiceList(); + break; + case ACTION_ITERDEPEND: + m_itersrvLast = m_itersrv; + m_itersrv = itersrv; + m_itersrv.StartDependentIteration(); + UpdateServiceList(); + break; + case ACTION_START: + if (Confirm()) ReportIfFail(itersrv.Start()); break; + case ACTION_PAUSE: + if (Confirm()) ReportIfFail(itersrv.Pause()); break; + case ACTION_CONTINUE: + if (Confirm()) ReportIfFail(itersrv.Continue()); break; + case ACTION_STOP: + if (Confirm()) ReportIfFail(itersrv.Stop()); break; + case ACTION_GET_SERVICESTATUS: + SERVICE_STATUS ss; + itersrv.QueryStatus(&ss, TRUE); + OutputStatus(&ss); + break; + case ACTION_GET_DISPLAYNAME: + OutputString(itersrv.QueryDisplayName()); break; + case ACTION_GET_SERVICETYPE: + OutputDword(itersrv.QueryServiceType(), ACTION_GET_SERVICETYPE); break; + case ACTION_GET_STARTYPE: + OutputDword(itersrv.QueryStartType(), ACTION_GET_STARTYPE); break; + case ACTION_GET_ERRORCONTROL: + OutputDword(itersrv.QueryErrorControl(), ACTION_GET_ERRORCONTROL); break; + case ACTION_GET_BINARYPATHNAME: + OutputString(itersrv.QueryBinaryPathName()); break; + case ACTION_GET_LOADORDERGROUP: + OutputString(itersrv.QueryLoadOrderGroup()); break; + case ACTION_GET_TAGID: + OutputDword(itersrv.QueryTagId(), ACTION_GET_TAGID); break; + case ACTION_GET_DEPENDENCIES: + OutputString(BarToCR(itersrv.QueryDependencies())); break; + case ACTION_GET_STARTNAME: + OutputString(itersrv.QueryStartName()); break; + } +} + +BOOL CServiceDlg::Confirm() +{ + return AfxMessageBox(_T("Proceed? "), MB_OKCANCEL | MB_ICONQUESTION) + == IDOK; +} + +void CServiceDlg::OutputString(LPCTSTR sOut) +{ + CString sOutput = sOut; + if (sOutput.IsEmpty()) sOutput = _T("(empty)"); + AfxMessageBox(sOutput, MB_OK | MB_ICONINFORMATION); +} + +void CServiceDlg::OutputDword(DWORD dwOut, int nActionCode) +{ + CString sOut; + switch(nActionCode) + { + case ACTION_GET_SERVICETYPE: + if (dwOut & SERVICE_WIN32_OWN_PROCESS) + sOut = _T("SERVICE_WIN32_OWN_PROCESS"); + else if (dwOut & SERVICE_WIN32_SHARE_PROCESS) + sOut = _T("SERVICE_WIN32_SHARE_PROCESS"); + else if (dwOut & SERVICE_KERNEL_DRIVER) + sOut = _T("SERVICE_KERNEL_DRIVER"); + else if (dwOut & SERVICE_FILE_SYSTEM_DRIVER) + sOut = _T("SERVICE_FILE_SYSTEM_DRIVER"); + + if (dwOut & SERVICE_INTERACTIVE_PROCESS) + sOut += _T(" | SERVICE_INTERACTIVE_PROCESS"); + + OutputString(sOut); + break; + case ACTION_GET_STARTYPE: + switch(dwOut) + { + case SERVICE_BOOT_START: + OutputString(_T("SERVICE_BOOT_START")); + break; + case SERVICE_SYSTEM_START: + OutputString(_T("SERVICE_SYSTEM_START")); + break; + case SERVICE_AUTO_START: + OutputString(_T("SERVICE_AUTO_START")); + break; + case SERVICE_DEMAND_START: + OutputString(_T("SERVICE_DEMAND_START")); + break; + case SERVICE_DISABLED: + OutputString(_T("SERVICE_DISABLED")); + break; + default: + OutputString(_T("unknown start type")); + } + break; + case ACTION_GET_ERRORCONTROL: + switch(dwOut) + { + case SERVICE_ERROR_IGNORE: + OutputString(_T("SERVICE_ERROR_IGNORE")); + break; + case SERVICE_ERROR_NORMAL: + OutputString(_T("SERVICE_ERROR_NORMAL")); + break; + case SERVICE_ERROR_SEVERE: + OutputString(_T("SERVICE_ERROR_SEVERE")); + break; + case SERVICE_ERROR_CRITICAL: + OutputString(_T("SERVICE_ERROR_CRITICAL")); + break; + default: + OutputString(_T("unknown error control")); + } + break; + default: + sOut.Format(_T("%d"), dwOut); + OutputString(sOut); + } +} + +void CServiceDlg::OutputStatus(LPSERVICE_STATUS lpss) +{ + CString sOut = _T("Service Status:\r\n"); + + // DWORD dwServiceType; + sOut += _T("\r\nService Type:\t"); + if (lpss->dwServiceType & SERVICE_WIN32_OWN_PROCESS) + sOut += _T("SERVICE_WIN32_OWN_PROCESS"); + else if (lpss->dwServiceType & SERVICE_WIN32_SHARE_PROCESS) + sOut += _T("SERVICE_WIN32_SHARE_PROCESS"); + else if (lpss->dwServiceType & SERVICE_KERNEL_DRIVER) + sOut += _T("SERVICE_KERNEL_DRIVER"); + else if (lpss->dwServiceType & SERVICE_FILE_SYSTEM_DRIVER) + sOut += _T("SERVICE_FILE_SYSTEM_DRIVER"); + + if (lpss->dwServiceType & SERVICE_INTERACTIVE_PROCESS) + sOut += _T("\r\n\t\tSERVICE_INTERACTIVE_PROCESS"); + + // DWORD dwCurrentState; + sOut += _T("\r\nCurrent State:\t"); + switch (lpss->dwCurrentState) + { + case SERVICE_STOPPED: + sOut += _T("SERVICE_STOPPED"); break; + case SERVICE_START_PENDING: + sOut += _T("SERVICE_START_PENDING"); break; + case SERVICE_STOP_PENDING: + sOut += _T("SERVICE_STOP_PENDING"); break; + case SERVICE_RUNNING: + sOut += _T("SERVICE_RUNNING"); break; + case SERVICE_CONTINUE_PENDING: + sOut += _T("SERVICE_CONTINUE_PENDING"); break; + case SERVICE_PAUSE_PENDING: + sOut += _T("SERVICE_PAUSE_PENDING"); break; + case SERVICE_PAUSED: + sOut += _T("SERVICE_PAUSED"); break; + default: + sOut += _T("(unknown)"); + } + + // DWORD dwControlsAccepted; + sOut += _T("\r\nControls Accepted:\t"); + if (lpss->dwControlsAccepted & SERVICE_ACCEPT_STOP) + sOut += _T("SERVICE_ACCEPT_STOP"); + else if (lpss->dwControlsAccepted & SERVICE_ACCEPT_PAUSE_CONTINUE) + sOut += _T("SERVICE_ACCEPT_PAUSE_CONTINUE"); + else if (lpss->dwControlsAccepted & SERVICE_ACCEPT_SHUTDOWN) + sOut += _T("SERVICE_ACCEPT_SHUTDOWN"); + + if (lpss->dwControlsAccepted & SERVICE_CONTROL_INTERROGATE) + sOut += _T("\r\n\t\tSERVICE_CONTROL_INTERROGATE"); + + // DWORD dwWin32ExitCode; + // DWORD dwServiceSpecificExitCode; + // DWORD dwCheckPoint; + // DWORD dwWaitHint; + CString sFmt, sTemp; + sFmt = _T("\r\nWin32 Exit Code:\t%d"); + sFmt += _T("\r\nSpecific Exit Code:\t%d"); + sFmt += _T("\r\nCheck Point:\t%d"); + sFmt += _T("\r\nWait Hint:\t\t%d"); + + sTemp.Format(sFmt, lpss->dwWin32ExitCode, lpss->dwServiceSpecificExitCode, + lpss->dwCheckPoint, lpss->dwWaitHint); + sOut += sTemp; + + OutputString(sOut); +} + +void CServiceDlg::ReportIfFail(BOOL bReturn) +{ + if (!bReturn) + AfxMessageBox(_T("Failed. See output window for details"), + MB_OK | MB_ICONSTOP); +} + +void CServiceDlg::UpdateServiceList() +{ + m_ctrlListService.ResetContent(); + CStringArray SrvDspNames; + m_itersrv.GetDisplayNames(SrvDspNames); + for (int i = 0; i < SrvDspNames.GetSize(); i++) + m_ctrlListService.AddString(SrvDspNames[i]); +} + +CString CServiceDlg::BarToCR(LPCTSTR sIn) +{ + CString sOut = sIn; + for (int i = 0; i < sOut.GetLength(); i++) + { + if (sOut[i] == _T('|')) + sOut.SetAt(i, _T('\r')); + } + return sOut; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.h new file mode 100644 index 0000000..0165a87 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceDlg.h @@ -0,0 +1,66 @@ +// ServiceDlg.h : header file +// + +#if !defined(AFX_SERVICEDLG_H__E906DAA6_18DB_11D1_B900_444553540000__INCLUDED_) +#define AFX_SERVICEDLG_H__E906DAA6_18DB_11D1_B900_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXIteratorService.h" + +///////////////////////////////////////////////////////////////////////////// +// CServiceDlg dialog + +class CServiceDlg : public CDialog +{ +// Construction +public: + CServiceDlg(CWnd* pParent = NULL); // standard constructor + ~CServiceDlg(); + +// Dialog Data + //{{AFX_DATA(CServiceDlg) + enum { IDD = IDD_SERVICE_DIALOG }; + CListBox m_ctrlListService; + CListBox m_ctrlListAction; + CString m_sDisplayName; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CServiceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CString BarToCR(LPCTSTR sIn); + void UpdateServiceList(); + void ReportIfFail(BOOL bReturn); + void OutputDword(DWORD dwOut, int nActionCode); + void OutputString(LPCTSTR sOut); + void OutputStatus(LPSERVICE_STATUS lpss); + BOOL Confirm(); + HICON m_hIcon; + COXIteratorService m_itersrv; + COXIteratorService m_itersrvLast; + + // Generated message map functions + //{{AFX_MSG(CServiceDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnDblclkListAction(); + afx_msg void OnDblclkListService(); + virtual void OnOK(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SERVICEDLG_H__E906DAA6_18DB_11D1_B900_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceInfo.rtf new file mode 100644 index 0000000..d8a5442 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/ServiceInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.cpp new file mode 100644 index 0000000..a24332f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Service.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.h new file mode 100644 index 0000000..6d1528a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/StdAfx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__E906DAA8_18DB_11D1_B900_444553540000__INCLUDED_) +#define AFX_STDAFX_H__E906DAA8_18DB_11D1_B900_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__E906DAA8_18DB_11D1_B900_444553540000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.rc2 new file mode 100644 index 0000000..ec620a9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/res/Service.rc2 @@ -0,0 +1,13 @@ +// +// SERVICE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/resource.h new file mode 100644 index 0000000..70eeafd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Service/resource.h @@ -0,0 +1,24 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Service.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SERVICE_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_LIST_SERVICE 1000 +#define IDC_LIST_ACTION 1001 +#define IDC_BUTTON1 1002 + +// 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 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.clw new file mode 100644 index 0000000..cbe49fe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.clw @@ -0,0 +1,62 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CShortcutApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "shortcut.h" +LastPage=0 + +ClassCount=2 +Class1=CShortcutApp +Class2=CShortcutDlg + +ResourceCount=1 +Resource1=IDD_SHORTCUT_DIALOG + +[CLS:CShortcutApp] +Type=0 +BaseClass=CWinApp +HeaderFile=Shortcut.h +ImplementationFile=Shortcut.cpp +LastObject=CShortcutApp + +[CLS:CShortcutDlg] +Type=0 +BaseClass=CDialog +HeaderFile=ShortcutDlg.h +ImplementationFile=ShortcutDlg.cpp + +[DLG:IDD_SHORTCUT_DIALOG] +Type=1 +Class=CShortcutDlg +ControlCount=27 +Control1=IDC_RADIO_OPEN,button,1342242825 +Control2=IDC_EDIT_OPEN,edit,1350631552 +Control3=IDC_BUTTON_OPEN,button,1342242816 +Control4=IDC_RADIO_CREATE,button,1342242825 +Control5=IDC_EDIT_CREATE,edit,1350631552 +Control6=IDC_BUTTON_CREATE,button,1342242816 +Control7=IDC_CHECK_THROW_EXCEPTION,button,1342242819 +Control8=IDC_BUTTON_FILE_OK,button,1342242816 +Control9=IDC_COMBO_FN,combobox,1344340227 +Control10=IDC_PARAM_BOOL,button,1342242819 +Control11=IDC_PARAM_KEY,msctls_hotkey32,1350631424 +Control12=IDC_PARAM_NUMBER,edit,1350631552 +Control13=IDC_PARAM_SPIN,msctls_updown32,1342177334 +Control14=IDC_PARAM_STRING,edit,1350631552 +Control15=IDC_BUTTON_PARAM_STRING,button,1342242816 +Control16=IDC_BUTTON_FN_OK,button,1342242817 +Control17=IDC_EDIT_OUTPUT,edit,1351684164 +Control18=IDCANCEL,button,1342242816 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,button,1342177287 +Control21=IDC_STATIC,button,1342177287 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,button,1342177287 +Control25=IDC_STATIC,static,1342308352 +Control26=IDC_SAVE,button,1342242816 +Control27=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.cpp new file mode 100644 index 0000000..46f5d2a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.cpp @@ -0,0 +1,96 @@ +// Shortcut.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Shortcut.h" +#include "ShortcutDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CShortcutApp + +BEGIN_MESSAGE_MAP(CShortcutApp, CWinApp) + //{{AFX_MSG_MAP(CShortcutApp) + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CShortcutApp construction + +CShortcutApp::CShortcutApp() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CShortcutApp object + +CShortcutApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CShortcutApp initialization + +BOOL CShortcutApp::InitInstance() +{ + // Standard initialization + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // ... MFC will uninitialize OLE upon termination + AfxOleInit(); + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + CShortcutDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CShortcutApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsp new file mode 100644 index 0000000..247175b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsp @@ -0,0 +1,257 @@ +# Microsoft Developer Studio Project File - Name="Shortcut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Shortcut - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Shortcut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Shortcut.mak" CFG="Shortcut - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Shortcut - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Shortcut - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Shortcut - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "Shortcut - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "Shortcut - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Shortcut - Win32 Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Shortcut.exe" + +!ELSEIF "$(CFG)" == "Shortcut - Win32 Debug" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Shortcut.exe" + +!ELSEIF "$(CFG)" == "Shortcut - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Shortcut" +# PROP BASE Intermediate_Dir "Shortcut" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Shortcut.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Shortcut.exe" + +!ELSEIF "$(CFG)" == "Shortcut - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Shortcu0" +# PROP BASE Intermediate_Dir "Shortcu0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Shortcut.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"Shortcut.exe" + +!ELSEIF "$(CFG)" == "Shortcut - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Shortcu1" +# PROP BASE Intermediate_Dir "Shortcu1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Shortcut.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"Shortcut.exe" + +!ENDIF + +# Begin Target + +# Name "Shortcut - Win32 Release" +# Name "Shortcut - Win32 Debug" +# Name "Shortcut - Win32 Release_Shared" +# Name "Shortcut - Win32 Unicode_Debug" +# Name "Shortcut - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXShortcut.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Shortcut.cpp +# End Source File +# Begin Source File + +SOURCE=.\Shortcut.rc +# End Source File +# Begin Source File + +SOURCE=.\ShortcutDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=..\..\..\Include\OXShortcut.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXShortcut.inl +# End Source File +# Begin Source File + +SOURCE=.\Shortcut.h +# End Source File +# Begin Source File + +SOURCE=.\ShortcutDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Shortcut.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Shortcut.rc2 +# End Source File +# Begin Source File + +SOURCE=.\shortcutInfo.rtf +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsw new file mode 100644 index 0000000..45da312 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Shortcut"=".\Shortcut.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.h new file mode 100644 index 0000000..ca2a6e3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.h @@ -0,0 +1,36 @@ +// Shortcut.h : main header file for the SHORTCUT application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CShortcutApp: +// See Shortcut.cpp for the implementation of this class +// + +class CShortcutApp : public CWinApp +{ +public: + CShortcutApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CShortcutApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CShortcutApp) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.rc new file mode 100644 index 0000000..b04b784 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.rc @@ -0,0 +1,227 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\Shortcut.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXShortcut.rc""\r\n" + "#endif\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 DISCARDABLE "res\\Shortcut.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SHORTCUT_DIALOG DIALOGEX 0, 0, 239, 240 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Demo of COXShortcut" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Open:",IDC_RADIO_OPEN,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,14,14,35,10 + EDITTEXT IDC_EDIT_OPEN,59,12,142,14,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BUTTON_OPEN,208,13,13,12 + CONTROL "Create:",IDC_RADIO_CREATE,"Button",BS_AUTORADIOBUTTON | + WS_TABSTOP,14,32,39,10 + EDITTEXT IDC_EDIT_CREATE,59,30,142,14,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BUTTON_CREATE,208,31,13,12 + CONTROL "Throw COleException when failed", + IDC_CHECK_THROW_EXCEPTION,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,39,49,125,10 + PUSHBUTTON "OK",IDC_BUTTON_FILE_OK,98,63,43,14 + COMBOBOX IDC_COMBO_FN,55,95,171,134,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + CONTROL "FALSE",IDC_PARAM_BOOL,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,23,119,38,10 + CONTROL "Hotkey1",IDC_PARAM_KEY,"msctls_hotkey32",WS_BORDER | + WS_TABSTOP,87,117,55,14 + EDITTEXT IDC_PARAM_NUMBER,179,117,35,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_PARAM_SPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,208,117,7, + 14 + EDITTEXT IDC_PARAM_STRING,49,134,148,14,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BUTTON_PARAM_STRING,201,135,13,12 + DEFPUSHBUTTON "Call",IDC_BUTTON_FN_OK,98,155,43,14 + EDITTEXT IDC_EDIT_OUTPUT,14,174,203,32,ES_MULTILINE | + ES_AUTOVSCROLL | ES_WANTRETURN | WS_HSCROLL + PUSHBUTTON "Exit",IDCANCEL,125,219,43,14 + LTEXT "Functions:",IDC_STATIC,14,97,34,8 + GROUPBOX "Start",IDC_STATIC,9,4,223,78 + GROUPBOX "Test",IDC_STATIC,9,83,223,130 + LTEXT "Key:",IDC_STATIC,69,120,15,8 + LTEXT "String:",IDC_STATIC,23,137,21,8 + GROUPBOX "Parameters",IDC_STATIC,14,111,212,41 + LTEXT "Number:",IDC_STATIC,151,120,28,8 + PUSHBUTTON "Save",IDC_SAVE,71,219,43,14 + LTEXT "Result",IDC_STATIC,14,165,26,8 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SHORTCUT MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SHORTCUT\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software\0" + VALUE "OriginalFilename", "SHORTCUT.EXE\0" + VALUE "ProductName", "SHORTCUT Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SHORTCUT_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 232 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "COXShortcut class" + ID_DESCRIPTION_FILE "shortcutinfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\Shortcut.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXShortcut.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.vcproj new file mode 100644 index 0000000..a206514 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/Shortcut.vcproj @@ -0,0 +1,875 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.cpp new file mode 100644 index 0000000..d10582c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.cpp @@ -0,0 +1,572 @@ +// ShortcutDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "Shortcut.h" +#include "ShortcutDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// CShortcutDlg dialog + +CShortcutDlg::CShortcutDlg(CWnd* pParent /*=NULL*/) + : CDialog(CShortcutDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CShortcutDlg) + m_bThrowException = FALSE; + m_sPathCreate = _T(""); + m_sPathOpen = _T(""); + m_sFN = _T(""); + m_bParam = FALSE; + m_nParam = 0; + m_sParam = _T(""); + //}}AFX_DATA_INIT + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + m_bCreate = FALSE; + ::GetCurrentDirectory(MAX_PATH, m_sCurDir.GetBuffer(MAX_PATH)); + m_sCurDir.ReleaseBuffer(); +} + +void CShortcutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CShortcutDlg) + DDX_Control(pDX, IDC_PARAM_BOOL, m_ctlBool); + DDX_Control(pDX, IDC_PARAM_SPIN, m_ctlSpin); + DDX_Control(pDX, IDC_PARAM_KEY, m_ctlHotkey); + DDX_Control(pDX, IDC_COMBO_FN, m_ctlFn); + DDX_Check(pDX, IDC_CHECK_THROW_EXCEPTION, m_bThrowException); + DDX_Text(pDX, IDC_EDIT_CREATE, m_sPathCreate); + DDX_Text(pDX, IDC_EDIT_OPEN, m_sPathOpen); + DDX_CBString(pDX, IDC_COMBO_FN, m_sFN); + DDX_Check(pDX, IDC_PARAM_BOOL, m_bParam); + DDX_Text(pDX, IDC_PARAM_NUMBER, m_nParam); + DDV_MinMaxInt(pDX, m_nParam, 0, 99); + DDX_Text(pDX, IDC_PARAM_STRING, m_sParam); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CShortcutDlg, CDialog) + //{{AFX_MSG_MAP(CShortcutDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_CREATE, OnButtonCreate) + ON_BN_CLICKED(IDC_BUTTON_OPEN, OnButtonOpen) + ON_BN_CLICKED(IDC_BUTTON_FILE_OK, OnButtonFileOk) + ON_BN_CLICKED(IDC_BUTTON_FN_OK, OnButtonFnOk) + ON_BN_CLICKED(IDC_RADIO_CREATE, OnRadioCreate) + ON_BN_CLICKED(IDC_RADIO_OPEN, OnRadioOpen) + ON_CBN_SELCHANGE(IDC_COMBO_FN, OnSelchangeComboFn) + ON_BN_CLICKED(IDC_PARAM_BOOL, OnParamBool) + ON_BN_CLICKED(IDC_SAVE, OnSave) + ON_BN_CLICKED(IDC_BUTTON_PARAM_STRING, OnButtonParamString) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CShortcutDlg message handlers + +#define FN_CLOSE _T("Close(BOOL bSave)") +#define FN_GETARGUMENTS _T("GetArguments(...)") +#define FN_GETCURFILE _T("GetCurFile()") +#define FN_GETDESCRIPTION _T("GetDescription(...)") +#define FN_GETHOTKEY _T("GetHotkey(...)") +#define FN_GETICONINDEX _T("GetIconIndex(...)") +#define FN_GETICONPATH _T("GetIconPath(...)") +#define FN_GETIDLIST _T("GetIDList(...)") +#define FN_GETLASTERROR _T("GetLastError()") +#define FN_GETPATH _T("GetPath(..., BOOL bUNC)") +#define FN_GETSHOWCMD _T("GetShowCmd(...)") +#define FN_GETWORKINGDIRECTORY _T("GetWorkingDirectory(...)") +#define FN_ISDIRTY _T("IsDirty()") +#define FN_OPEN _T("Open()") +#define FN_RESOLVE _T("Resolve(this, SLR_ANY_MATCH)") +#define FN_SAVE _T("Save(LPCTSTR pszFileName, BOOL fRemember)") +#define FN_SETARGUMENTS _T("SetArguments(LPCTSTR pszArguments)") +#define FN_SETDESCRIPTION _T("SetDescription(LPCTSTR pszDescription)") +#define FN_SETHOTKEY _T("SetHotkey(WORD wHotkey)") +#define FN_SETICONINDEX _T("SetIconIndex(int nIconIndex)") +#define FN_SETICONPATH _T("SetIconPath(LPCTSTR pszPath)") +#define FN_SETIDLIST _T("SetIDList(pidlPrograms)") +#define FN_SETPATH _T("SetPath(LPCTSTR pszPath)") +#define FN_SETRELATIVEPATH _T("SetRelativePath(LPCTSTR pszPath)") +#define FN_SETSHOWCMD _T("SetShowCmd(int nShowCmd)") +#define FN_SETWORKINGDIRECTORY _T("SetWorkingDirectory(LPCTSTR pszWorkingDirectory)") + +BOOL CShortcutDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + m_ctlFn.AddString(FN_CLOSE); + m_ctlFn.AddString(FN_GETARGUMENTS); + m_ctlFn.AddString(FN_GETCURFILE); + m_ctlFn.AddString(FN_GETDESCRIPTION); + m_ctlFn.AddString(FN_GETHOTKEY); + m_ctlFn.AddString(FN_GETICONINDEX); + m_ctlFn.AddString(FN_GETICONPATH); + m_ctlFn.AddString(FN_GETIDLIST); + m_ctlFn.AddString(FN_GETLASTERROR); + m_ctlFn.AddString(FN_GETPATH); + m_ctlFn.AddString(FN_GETSHOWCMD); + m_ctlFn.AddString(FN_GETWORKINGDIRECTORY); + m_ctlFn.AddString(FN_ISDIRTY); +// m_ctlFn.AddString(FN_OPEN); + m_ctlFn.AddString(FN_RESOLVE); + m_ctlFn.AddString(FN_SAVE); + m_ctlFn.AddString(FN_SETARGUMENTS); + m_ctlFn.AddString(FN_SETDESCRIPTION); + m_ctlFn.AddString(FN_SETHOTKEY); + m_ctlFn.AddString(FN_SETICONINDEX); + m_ctlFn.AddString(FN_SETICONPATH); + m_ctlFn.AddString(FN_SETIDLIST); + m_ctlFn.AddString(FN_SETPATH); + m_ctlFn.AddString(FN_SETRELATIVEPATH); + m_ctlFn.AddString(FN_SETSHOWCMD); + m_ctlFn.AddString(FN_SETWORKINGDIRECTORY); + + m_ctlSpin.SetRange(0, 99); + + UpdateControls(); + ((CButton*)GetDlgItem(IDC_RADIO_OPEN))->SetCheck(1); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CShortcutDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CShortcutDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +HCURSOR CShortcutDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CShortcutDlg::UpdateControls() +{ + UpdateData(); + BOOL bOpened = !m_scDemo.GetCurFile().IsEmpty(); + + SetDlgItemText(IDC_EDIT_OUTPUT, m_sOutput); + GetDlgItem(IDC_EDIT_OPEN)->EnableWindow(!m_bCreate); + GetDlgItem(IDC_BUTTON_OPEN)->EnableWindow(!m_bCreate); + GetDlgItem(IDC_EDIT_CREATE)->EnableWindow(m_bCreate); + GetDlgItem(IDC_BUTTON_CREATE)->EnableWindow(m_bCreate); + + GetDlgItem(IDC_COMBO_FN)->EnableWindow(bOpened); + GetDlgItem(IDC_SAVE)->EnableWindow(bOpened); + GetDlgItem(IDC_BUTTON_FN_OK)->EnableWindow(bOpened && !m_sFN.IsEmpty()); + + GetDlgItem(IDC_PARAM_BOOL) ->EnableWindow(bOpened && m_sFN.Find(_T("BOOL")) != -1); + GetDlgItem(IDC_PARAM_KEY) ->EnableWindow(bOpened && m_sFN.Find(_T("WORD")) != -1); + GetDlgItem(IDC_PARAM_NUMBER)->EnableWindow(bOpened && m_sFN.Find(_T("int")) != -1); + GetDlgItem(IDC_PARAM_SPIN) ->EnableWindow(bOpened && m_sFN.Find(_T("int")) != -1); + GetDlgItem(IDC_PARAM_STRING)->EnableWindow(bOpened && m_sFN.Find(_T("LPCTSTR")) != -1); + GetDlgItem(IDC_BUTTON_PARAM_STRING)->EnableWindow(bOpened && m_sFN.Find(_T("LPCTSTR")) != -1); +} + +void CShortcutDlg::OnButtonCreate() +{ + CFileDialog dlg(FALSE, _T("LNK"), _T("New Shortcut"), + OFN_HIDEREADONLY | OFN_NODEREFERENCELINKS); + dlg.m_ofn.lpstrTitle = _T("Create..."); + dlg.m_ofn.lpstrInitialDir = m_sCurDir; + if (dlg.DoModal() == IDOK) + { + SetDlgItemText(IDC_EDIT_CREATE, dlg.GetPathName()); + m_sCurDir = dlg.GetPathName().Left(dlg.GetPathName().GetLength() + - dlg.GetFileTitle().GetLength()); + } +} + +void CShortcutDlg::OnButtonOpen() +{ + CFileDialog dlg(TRUE, _T(".LNK"), NULL, + OFN_HIDEREADONLY | OFN_NODEREFERENCELINKS, + _T("Shortcut Files (*.LNK) | *.LNK;*.lnk | All Files (*.*) | *.*;* ||"), this); + dlg.m_ofn.lpstrInitialDir = m_sCurDir; + if (dlg.DoModal() == IDOK) + { + SetDlgItemText(IDC_EDIT_OPEN, m_sCurDir = dlg.GetPathName()); + m_sCurDir = dlg.GetPathName().Left(dlg.GetPathName().GetLength() + - dlg.GetFileTitle().GetLength()); + } +} + +void CShortcutDlg::OnButtonParamString() +{ + CFileDialog dlg(TRUE, NULL, NULL, + OFN_HIDEREADONLY | OFN_NODEREFERENCELINKS); + dlg.m_ofn.lpstrTitle = _T("Get pathname..."); + dlg.m_ofn.lpstrInitialDir = m_sCurDir; + if (dlg.DoModal() == IDOK) + { + SetDlgItemText(IDC_PARAM_STRING, m_sCurDir = dlg.GetPathName()); + m_sCurDir = dlg.GetPathName().Left(dlg.GetPathName().GetLength() + - dlg.GetFileTitle().GetLength()); + } +} + +void CShortcutDlg::OnSave() +{ + CString sTemp = m_sParam; + SetDlgItemText(IDC_PARAM_STRING, _T("")); + if (UpdateData()) DemoOutput(FN_SAVE); + SetDlgItemText(IDC_PARAM_STRING, sTemp); +} + +void CShortcutDlg::OnButtonFileOk() +{ + if (UpdateData()) DemoOutput(FN_OPEN); +} + +void CShortcutDlg::OnButtonFnOk() +{ + if (UpdateData()) DemoOutput(m_sFN); +} + +void CShortcutDlg::OnRadioCreate() +{ + m_bCreate = TRUE; + UpdateControls(); +} + +void CShortcutDlg::OnRadioOpen() +{ + m_bCreate = FALSE; + UpdateControls(); +} + +void CShortcutDlg::OnSelchangeComboFn() +{ + UpdateControls(); + SetDlgItemText(IDC_EDIT_OUTPUT, _T("")); +} + +void CShortcutDlg::OnParamBool() +{ + UpdateData(); + m_ctlBool.SetWindowText(m_bParam ? _T("TRUE") : _T("FALSE")); +} + +// for CShortcutDlg::DemoOutput() only +#define SWITCH \ + if(FALSE) \ + { \ + +#define CASE(fn) \ + } \ + else if(sFN.Compare(fn) == 0) \ + { \ + +#define END_SWITCH \ + } \ + +////////////////////////////////////////////////////////////////////////////////////////////// +// This is the only function that you may need to look into in order to understand COXShortcut + +void CShortcutDlg::DemoOutput(LPCTSTR lpszFN) +{ + LPCTSTR fmtX = _T("%02X"); + LPCTSTR fmtN = _T("%d"); + LPCTSTR fmtS = _T("\"%s\""); + + CString sFN = lpszFN; + CString sBuffer; + + // ... assume successful + BOOL bSuccess = TRUE; + m_sOutput = CString(sFN) + _T("\r\nOK\r\n"); + + try + { + SWITCH + CASE(FN_CLOSE) + m_scDemo.Close(m_bParam); + + CASE(FN_GETARGUMENTS) + if (bSuccess == m_scDemo.GetArguments(sBuffer)) + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_GETCURFILE) + sBuffer = m_scDemo.GetCurFile(); + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_GETDESCRIPTION) + if (bSuccess == m_scDemo.GetDescription(sBuffer)) + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_GETHOTKEY) + WORD wVirtualKeyCode, wModifiers, wHotkey; + if (bSuccess == m_scDemo.GetHotkey(wHotkey)) + { + wVirtualKeyCode = (WORD)(wHotkey & 0x00FF); + wModifiers = (WORD)(wHotkey >> 8); + m_ctlHotkey.EnableWindow(TRUE); + m_ctlHotkey.SetHotKey(wVirtualKeyCode, wModifiers); + m_sOutput += _T("Please see 'Key' for the current value"); + } + + CASE(FN_GETICONINDEX) + int iIcon; + if (bSuccess == m_scDemo.GetIconIndex(iIcon)) + m_sOutput.Format(fmtN, iIcon); + + CASE(FN_GETICONPATH) + if (bSuccess == m_scDemo.GetIconPath(sBuffer)) + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_GETIDLIST) + LPMALLOC g_pMalloc; + LPITEMIDLIST pidl; + + // we need to call SHGetMalloc() to get an allocator + // pointer to free the memory allocation afterwards + if (SUCCEEDED(SHGetMalloc(&g_pMalloc)) && (bSuccess == m_scDemo.GetIDList(pidl))) + { + m_sOutput.Empty(); + + // output pidl + LPITEMIDLIST pidlWalkthrough = pidl; + int cb = pidl->mkid.cb; + while (cb) + { + int nLen = cb - sizeof(USHORT); + m_sOutput += _T('{'); + for (int i = 0; i < nLen; i++) + { + sBuffer.Format(fmtX, pidlWalkthrough->mkid.abID[i]); + m_sOutput += sBuffer + ((i == nLen - 1) ? _T("}\r\n") : _T(", ")); + } + + pidlWalkthrough = (LPITEMIDLIST) (((LPBYTE) pidlWalkthrough) + cb); + cb = pidlWalkthrough->mkid.cb; + } + + // ... now we're freeing it + g_pMalloc->Free(pidl); + } + + CASE(FN_GETLASTERROR) + m_sOutput.Format(fmtN, m_scDemo.GetLastError()); + + CASE(FN_GETPATH) + if (bSuccess == m_scDemo.GetPath(sBuffer, m_bParam)) + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_GETSHOWCMD) + int iShowCmd; + if (bSuccess == m_scDemo.GetShowCmd(iShowCmd)) + { + m_sOutput.Format(fmtN, iShowCmd); + m_sOutput += _T(": "); + + // NOTE: not all showcmd would be accepted as is + switch(iShowCmd) + { + case SW_HIDE: m_sOutput += _T("SW_HIDE"); break; + case SW_MAXIMIZE: m_sOutput += _T("SW_MAXIMIZE"); break; + case SW_MINIMIZE: m_sOutput += _T("SW_MINIMIZE"); break; + case SW_RESTORE: m_sOutput += _T("SW_RESTORE"); break; + case SW_SHOW: m_sOutput += _T("SW_SHOW"); break; + case SW_SHOWDEFAULT: m_sOutput += _T("SW_SHOWDEFAULT"); break; +// case SW_SHOWMAXIMIZED: m_sOutput += _T("SW_SHOWMAXIMIZED"); break; + case SW_SHOWMINIMIZED: m_sOutput += _T("SW_SHOWMINIMIZED"); break; + case SW_SHOWMINNOACTIVE:m_sOutput += _T("SW_SHOWMINNOACTIVE"); break; + case SW_SHOWNA: m_sOutput += _T("SW_SHOWNA"); break; + case SW_SHOWNOACTIVATE: m_sOutput += _T("SW_SHOWNOACTIVATE"); break; + case SW_SHOWNORMAL: m_sOutput += _T("SW_SHOWNORMAL"); break; + default: m_sOutput += _T("(undefined)"); break; + } + } + + CASE(FN_GETWORKINGDIRECTORY) + if (bSuccess == m_scDemo.GetWorkingDirectory(sBuffer)) + m_sOutput.Format(fmtS, sBuffer); + + CASE(FN_ISDIRTY) + m_sOutput.Format(fmtN, m_scDemo.IsDirty()); + + CASE(FN_OPEN) + if (m_bCreate) + { + // in real situation, you rarely use _T("") to start a new shortcut file + // because it appears as "My Computer" (the topest level, as you may find from + // the GetIDList()). + m_sOutput = _T("Here we use empty path as the object this shortcut points to."); + bSuccess = m_scDemo.Open(m_sPathCreate, _T(""), m_bThrowException); + } + else + { + bSuccess = m_scDemo.Open(m_sPathOpen, NULL, m_bThrowException); + } + + CASE(FN_RESOLVE) + bSuccess = m_scDemo.Resolve(this, SLR_ANY_MATCH); + + CASE(FN_SAVE) + if (m_sParam.IsEmpty()) + { + m_sOutput = _T("Here we use NULL as the first parameter."); + bSuccess = m_scDemo.Save(); + } + else + { + if (AfxMessageBox(CString(_T("Save as ")) + m_sParam, MB_OKCANCEL) == IDOK) + bSuccess = m_scDemo.Save(m_sParam, m_bParam); + } + + CASE(FN_SETARGUMENTS) + bSuccess = m_scDemo.SetArguments(m_sParam); + + CASE(FN_SETDESCRIPTION) + bSuccess = m_scDemo.SetDescription(m_sParam); + + CASE(FN_SETHOTKEY) + WORD wVirtualKeyCode, wModifiers, wHotkey; + m_ctlHotkey.GetHotKey(wVirtualKeyCode, wModifiers); + wHotkey = (WORD)((wModifiers << 8) + wVirtualKeyCode); + bSuccess = m_scDemo.SetHotkey(wHotkey); + + CASE(FN_SETICONINDEX) + bSuccess = m_scDemo.SetIconIndex(m_nParam); + + CASE(FN_SETICONPATH) + bSuccess = m_scDemo.SetIconPath(m_sParam); + + CASE(FN_SETIDLIST) + m_sOutput = _T("Here we use \"Programs\" folder as an example."); + int nFolder = CSIDL_PROGRAMS; + + LPMALLOC g_pMalloc; + LPITEMIDLIST pidl; + + if (SUCCEEDED(SHGetMalloc(&g_pMalloc)) && + SUCCEEDED(SHGetSpecialFolderLocation(NULL, nFolder, &pidl))) + { + bSuccess = m_scDemo.SetIDList(pidl); + g_pMalloc->Free(pidl); + } + + CASE(FN_SETPATH) + bSuccess = m_scDemo.SetPath(m_sParam); + + CASE(FN_SETRELATIVEPATH) + bSuccess = m_scDemo.SetRelativePath(m_sParam); + + CASE(FN_SETSHOWCMD) + bSuccess = m_scDemo.SetShowCmd(m_nParam); + + CASE(FN_SETWORKINGDIRECTORY) + bSuccess = m_scDemo.SetWorkingDirectory(m_sParam); + + END_SWITCH + } + catch (COleException* e) + { + bSuccess = FALSE; + e->ReportError(); + e->Delete(); + } + + if (!bSuccess) + { + CString sFormat = CString(sFN) + _T("\r\n"); + HRESULT hres = m_scDemo.GetLastError(); + + if (m_bThrowException) + sFormat += _T("Error: exception was thrown."); + else + { + // even when not successful, SUCCEEDED(hres) may be TRUE, e.g. S_FALSE; + // These kinds of HRESULT will cause a FALSE return on member functions + // (without throwing exceptions even when m_bThrowException == TRUE) + if (SUCCEEDED(hres)) + { + if (hres == S_FALSE) + sFormat += _T("Failed (or succeeded with S_FALSE)."); + else + // in case there are more codes (S_XXX) defined + // currently only S_OK (same as NOERROR) and S_FALSE are defined + // (check WinError.h) + sFormat += _T("Failed (or succeeded with unexpected result)."); + } + else + // These are OLE-defined errors (should we have set m_bThrowException == TRUE, + // an exception will be thrown) + sFormat += _T("Error: no exception was thrown."); + } + sFormat += _T(" HRESULT: $%08X"); + m_sOutput.Format(sFormat, hres); + } + + SetWindowText(CString(_T("Demo of COXShortcut - ")) + m_scDemo.GetCurFile()); + UpdateControls(); +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.h new file mode 100644 index 0000000..b933b72 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/ShortcutDlg.h @@ -0,0 +1,67 @@ +// ShortcutDlg.h : header file +// + +#include "resource.h" // main symbols +#include "OXShortcut.h" + +///////////////////////////////////////////////////////////////////////////// +// CShortcutDlg dialog + +class CShortcutDlg : public CDialog +{ +// Construction +public: + CShortcutDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CShortcutDlg) + enum { IDD = IDD_SHORTCUT_DIALOG }; + CButton m_ctlBool; + CSpinButtonCtrl m_ctlSpin; + CHotKeyCtrl m_ctlHotkey; + CComboBox m_ctlFn; + BOOL m_bThrowException; + CString m_sPathCreate; + CString m_sPathOpen; + CString m_sFN; + BOOL m_bParam; + int m_nParam; + CString m_sParam; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CShortcutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + void UpdateControls(); + void DemoOutput(LPCTSTR sFN); + + HICON m_hIcon; + COXShortcut m_scDemo; + BOOL m_bCreate; + CString m_sOutput; + CString m_sCurDir; + + // Generated message map functions + //{{AFX_MSG(CShortcutDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnButtonCreate(); + afx_msg void OnButtonOpen(); + afx_msg void OnButtonFileOk(); + afx_msg void OnButtonFnOk(); + afx_msg void OnRadioCreate(); + afx_msg void OnRadioOpen(); + afx_msg void OnSelchangeComboFn(); + afx_msg void OnParamBool(); + afx_msg void OnSave(); + afx_msg void OnButtonParamString(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.cpp new file mode 100644 index 0000000..e0665ac --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// Shortcut.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.h new file mode 100644 index 0000000..7e5e42b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/StdAfx.h @@ -0,0 +1,23 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC OLE classes +#include // MFC OLE dialog classes +#include // MFC OLE automation classes +#include +#include + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.rc2 new file mode 100644 index 0000000..62319e1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/res/Shortcut.rc2 @@ -0,0 +1,13 @@ +// +// SHORTCUT.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/resource.h new file mode 100644 index 0000000..7d951ba --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/resource.h @@ -0,0 +1,39 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Shortcut.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SHORTCUT_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDC_COMBO_FN 1000 +#define IDC_EDIT_OUTPUT 1001 +#define IDC_CHECK_THROW_EXCEPTION 1002 +#define IDC_RADIO_OPEN 1003 +#define IDC_RADIO_CREATE 1004 +#define IDC_EDIT_OPEN 1005 +#define IDC_EDIT_CREATE 1006 +#define IDC_BUTTON_FILE_OK 1007 +#define IDC_BUTTON_FN_OK 1008 +#define IDC_BUTTON_OPEN 1009 +#define IDC_BUTTON_CREATE 1010 +#define IDC_PARAM_KEY 1011 +#define IDC_SAVE 1012 +#define IDC_PARAM_STRING 1013 +#define IDC_BUTTON_PARAM_STRING 1014 +#define IDC_PARAM_BOOL 1015 +#define IDC_PARAM_NUMBER 1016 +#define IDC_PARAM_SPIN 1018 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/shortcutInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/shortcutInfo.rtf new file mode 100644 index 0000000..e0e279a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Shortcut/shortcutInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.cpp new file mode 100644 index 0000000..f5ddcfe --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.cpp @@ -0,0 +1,55 @@ +// MyAnimateCtrl.cpp : implementation file +// + +#include "stdafx.h" +#include "SoundManager.h" +#include "MyAnimateCtrl.h" + +#include "OXHookWnd.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyAnimateCtrl + +CMyAnimateCtrl::CMyAnimateCtrl() +{ +} + +CMyAnimateCtrl::~CMyAnimateCtrl() +{ +} + + +BEGIN_MESSAGE_MAP(CMyAnimateCtrl, CAnimateCtrl) + //{{AFX_MSG_MAP(CMyAnimateCtrl) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP + ON_MESSAGE(HWM_MOUSEENTER, OnMouseEnter) + ON_MESSAGE(HWM_MOUSELEAVE, OnMouseLeave) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMyAnimateCtrl message handlers + +LONG CMyAnimateCtrl::OnMouseEnter(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + Play(0,(UINT)-1,1); + + return (LONG)0; +} + +LONG CMyAnimateCtrl::OnMouseLeave(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + return (LONG)0; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.h new file mode 100644 index 0000000..6b954c6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyAnimateCtrl.h @@ -0,0 +1,51 @@ +#if !defined(AFX_MYANIMATECTRL_H__A3CC4434_1C26_11D2_8890_0080C83F712F__INCLUDED_) +#define AFX_MYANIMATECTRL_H__A3CC4434_1C26_11D2_8890_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// MyAnimateCtrl.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CMyAnimateCtrl window + +class CMyAnimateCtrl : public CAnimateCtrl +{ +// Construction +public: + CMyAnimateCtrl(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyAnimateCtrl) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMyAnimateCtrl(); + + // Generated message map functions +protected: + //{{AFX_MSG(CMyAnimateCtrl) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + + afx_msg LONG OnMouseEnter(WPARAM wParam, LPARAM lParam); + afx_msg LONG OnMouseLeave(WPARAM wParam, LPARAM lParam); + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MYANIMATECTRL_H__A3CC4434_1C26_11D2_8890_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.cpp new file mode 100644 index 0000000..1a5ed8b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.cpp @@ -0,0 +1,129 @@ +// MyStatic.cpp : implementation file +// + +#include "stdafx.h" +#include "SoundManager.h" +#include "MyStatic.h" + +#include "OXHookWnd.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMyStatic + +CMyStatic::CMyStatic() +{ + m_bPressedDown=FALSE; +} + +CMyStatic::~CMyStatic() +{ +} + + +BEGIN_MESSAGE_MAP(CMyStatic, COXStaticText) + //{{AFX_MSG_MAP(CMyStatic) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + //}}AFX_MSG_MAP + ON_MESSAGE(HWM_MOUSEENTER, OnMouseEnter) + ON_MESSAGE(HWM_MOUSELEAVE, OnMouseLeave) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMyStatic message handlers + +LONG CMyStatic::OnMouseEnter(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.OffsetRect(-1,-1); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + SetTextColor(RGB(192,0,0),TRUE); + + return (LONG)0; +} + +LONG CMyStatic::OnMouseLeave(WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + if(m_bPressedDown) + { + rect.OffsetRect(-1,-1); + m_bPressedDown=FALSE; + } + else + rect.OffsetRect(1,1); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + SetTextColor(::GetSysColor(COLOR_BTNTEXT),TRUE); + + return (LONG)0; +} + +void CMyStatic::OnLButtonDown(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.OffsetRect(2,2); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + m_bPressedDown=TRUE; + + COXStaticText::OnLButtonDown(nFlags, point); +} + +void CMyStatic::OnLButtonUp(UINT nFlags, CPoint point) +{ + // TODO: Add your message handler code here and/or call default + + if(m_bPressedDown) + { + CWnd* pParentWnd=GetParent(); + ASSERT(pParentWnd); + CRect rect; + GetWindowRect(rect); + rect.OffsetRect(-2,-2); + pParentWnd->ScreenToClient(rect); + MoveWindow(rect); + + CWnd* pWnd=GetParent(); + if(pWnd) + { + CString sText; + GetWindowText(sText); + if(sText==_T("Customize")) + pWnd->PostMessage(WM_APP_CUSTOMIZE); + else if(sText==_T("Exit")) + pWnd->PostMessage(WM_APP_CLOSE); + } + + m_bPressedDown=FALSE; + } + + COXStaticText::OnLButtonUp(nFlags, point); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.h new file mode 100644 index 0000000..98d2daa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/MyStatic.h @@ -0,0 +1,60 @@ +#if !defined(AFX_MYSTATIC_H__0AE83BA1_1C32_11D2_B475_B0D808C10000__INCLUDED_) +#define AFX_MYSTATIC_H__0AE83BA1_1C32_11D2_B475_B0D808C10000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// MyStatic.h : header file +// + +#include "OXStaticText.h" + +#define WM_APP_CUSTOMIZE WM_APP+122 +#define WM_APP_CLOSE WM_APP+123 + +///////////////////////////////////////////////////////////////////////////// +// CMyStatic window + +class CMyStatic : public COXStaticText +{ +// Construction +public: + CMyStatic(); + +// Attributes +public: + +protected: + BOOL m_bPressedDown; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMyStatic) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMyStatic(); + + // Generated message map functions +protected: + //{{AFX_MSG(CMyStatic) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + //}}AFX_MSG + + afx_msg LONG OnMouseEnter(WPARAM wParam, LPARAM lParam); + afx_msg LONG OnMouseLeave(WPARAM wParam, LPARAM lParam); + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MYSTATIC_H__0AE83BA1_1C32_11D2_B475_B0D808C10000__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/ReadMe.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/ReadMe.txt new file mode 100644 index 0000000..7c4faf0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/ReadMe.txt @@ -0,0 +1,81 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : SoundManager +======================================================================== + + +AppWizard has created this SoundManager 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 SoundManager application. + +SoundManager.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CSoundManagerApp application class. + +SoundManager.cpp + This is the main application source file that contains the application + class CSoundManagerApp. + +SoundManager.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 + Developer Studio. + +res\SoundManager.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file SoundManager.rc. + +res\SoundManager.rc2 + This file contains resources that are not edited by Microsoft + Developer Studio. You should place all resources not + editable by the resource editor in this file. + +SoundManager.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +SoundManagerDlg.h, SoundManagerDlg.cpp - the dialog + These files contain your CSoundManagerDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in SoundManager.rc, which can be edited in Microsoft + Developer Studio. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named SoundManager.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Developer Studio reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard 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 MFC40XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC40DEU.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Camera.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Camera.wav new file mode 100644 index 0000000..e9c185d Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Camera.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Cashreg.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Cashreg.wav new file mode 100644 index 0000000..ab5bfca Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Cashreg.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Castle.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Castle.wav new file mode 100644 index 0000000..6e5ed03 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Castle.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Deal.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Deal.wav new file mode 100644 index 0000000..13234a1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Deal.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Dff.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Dff.wav new file mode 100644 index 0000000..c42e8cc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Dff.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ForrestGump.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ForrestGump.wav new file mode 100644 index 0000000..d514554 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ForrestGump.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Goodbye.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Goodbye.wav new file mode 100644 index 0000000..3efaf9e Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Goodbye.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat.wav new file mode 100644 index 0000000..2dedbb2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat2.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat2.wav new file mode 100644 index 0000000..73636cc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/HeartBeat2.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Incorrect.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Incorrect.wav new file mode 100644 index 0000000..12c2dbd Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Incorrect.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Run.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Run.wav new file mode 100644 index 0000000..d3c9cf6 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Run.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Sledge.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Sledge.wav new file mode 100644 index 0000000..f512c43 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Sledge.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Splash.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Splash.wav new file mode 100644 index 0000000..541e43a Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Splash.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ThankYou.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ThankYou.wav new file mode 100644 index 0000000..e2f1642 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/ThankYou.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Type.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Type.wav new file mode 100644 index 0000000..0ce6e19 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Type.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Whoosh.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Whoosh.wav new file mode 100644 index 0000000..22b2a99 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Whoosh.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Wus.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Wus.wav new file mode 100644 index 0000000..4673e87 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/Wus.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/error.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/error.wav new file mode 100644 index 0000000..5dbfbb8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/error.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/pooboom.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/pooboom.wav new file mode 100644 index 0000000..2eb83a3 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/pooboom.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/sound.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/sound.wav new file mode 100644 index 0000000..f1087f2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/sound.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/tmyk.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/tmyk.wav new file mode 100644 index 0000000..adab1ac Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/tmyk.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/wshich.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/wshich.wav new file mode 100644 index 0000000..edfaf70 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/Sound/wshich.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.cpp new file mode 100644 index 0000000..0c2ff6c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.cpp @@ -0,0 +1,104 @@ +// SoundManager.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SoundManager.h" +#include "SoundManagerDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerApp + +BEGIN_MESSAGE_MAP(CSoundManagerApp, CWinApp) + //{{AFX_MSG_MAP(CSoundManagerApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerApp construction + +CSoundManagerApp::CSoundManagerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSoundManagerApp object + +CSoundManagerApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerApp initialization + +BOOL CSoundManagerApp::InitInstance() +{ + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + + // use registry if you want to save Sound Effects state + SetRegistryKey(_T("Ultimate Toolbox Samples")); + + CSoundManagerDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSoundManagerApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsp new file mode 100644 index 0000000..d27e19f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsp @@ -0,0 +1,560 @@ +# Microsoft Developer Studio Project File - Name="SoundManager" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SoundManager - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SoundManager.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SoundManager.mak" CFG="SoundManager - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SoundManager - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SoundManager - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SoundManager - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SoundManager - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SoundManager - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SoundManager - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SoundManager.exe" + +!ELSEIF "$(CFG)" == "SoundManager - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SoundManager.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SoundManager - Win32 Release_Shared" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SoundMan" +# PROP BASE Intermediate_Dir "SoundMan" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"SoundManager.exe" + +!ELSEIF "$(CFG)" == "SoundManager - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SoundMa0" +# PROP BASE Intermediate_Dir "SoundMa0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SoundManager.exe" /pdbtype:sept +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"SoundManager.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SoundManager - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SoundMa1" +# PROP BASE Intermediate_Dir "SoundMa1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x1009 /i "..\..\..\include" /i "..\..\..\source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SoundManager.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"SoundManager.exe" + +!ENDIF + +# Begin Target + +# Name "SoundManager - Win32 Release" +# Name "SoundManager - Win32 Debug" +# Name "SoundManager - Win32 Release_Shared" +# Name "SoundManager - Win32 Unicode_Debug" +# Name "SoundManager - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCalendarPopup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXCaptionPainter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHistoryCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHookWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXHyperLinkAction.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXItemTipWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXMultiComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXRegistryValFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSound.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSoundCustomizeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSoundEffectManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSoundWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticHyperLink.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXStaticText.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCal.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCombo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeEdit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeHeader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXTreeItem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Group "Skins Framework" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\oxdocktabctrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\MyAnimateCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\MyStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\SoundManager.cpp +# End Source File +# Begin Source File + +SOURCE=.\SoundManager.rc +# End Source File +# Begin Source File + +SOURCE=.\SoundManagerDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\MyAnimateCtrl.h +# End Source File +# Begin Source File + +SOURCE=.\MyStatic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXBitmapButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXCaptionPainter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHistoryCombo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXHookWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\oxmulticombobox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXMultiComboBox.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSound.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSoundCustomizeDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSoundEffectManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSoundWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticText.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXStaticText.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeCtrl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXTreeItem.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SoundManager.h +# End Source File +# Begin Source File + +SOURCE=.\SoundManagerDlg.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\sndplay.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\sndstop.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\SoundManager.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SoundManager.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\treelist.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\res\avi_test.avi +# End Source File +# Begin Source File + +SOURCE=.\res\Drumroll.wav +# End Source File +# Begin Source File + +SOURCE=.\Sound\Drumroll.wav +# End Source File +# Begin Source File + +SOURCE=.\res\Mfc2.avi +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsw new file mode 100644 index 0000000..e0a4ee0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SoundManager"=".\SoundManager.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.h new file mode 100644 index 0000000..e0b7614 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.h @@ -0,0 +1,50 @@ +// SoundManager.h : main header file for the SOUNDMANAGER application +// + +#if !defined(AFX_SOUNDMANAGER_H__A84121A8_1C0A_11D2_8890_0080C83F712F__INCLUDED_) +#define AFX_SOUNDMANAGER_H__A84121A8_1C0A_11D2_8890_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerApp: +// See SoundManager.cpp for the implementation of this class +// + +class CSoundManagerApp : public CWinApp +{ +public: + CSoundManagerApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSoundManagerApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSoundManagerApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SOUNDMANAGER_H__A84121A8_1C0A_11D2_8890_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.rc new file mode 100644 index 0000000..e0bd85f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.rc @@ -0,0 +1,246 @@ +//Microsoft Developer Studio 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 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SOUNDMANAGER_DIALOG DIALOGEX 0, 0, 239, 254 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "SoundManager" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Animate1",IDC_ANIMATE_MFC,"SysAnimate32",ACS_CENTER | + ACS_TRANSPARENT | WS_TABSTOP,203,14,29,25, + WS_EX_STATICEDGE + LTEXT "Database Management",IDC_STATIC_OPTION1,58,59,141,12, + SS_NOTIFY + LTEXT "Graphical User Interface",IDC_STATIC_OPTION2,58,79,149, + 12,SS_NOTIFY + LTEXT "File Management",IDC_STATIC_OPTION3,58,99,110,12, + SS_NOTIFY + LTEXT "Utilities",IDC_STATIC_OPTION4,58,119,49,13,SS_NOTIFY + LTEXT "Graphics",IDC_STATIC_OPTION5,58,139,55,13,SS_NOTIFY + LTEXT "Communications",IDC_STATIC_OPTION6,58,159,100,13, + SS_NOTIFY + LTEXT "MAPI/OLE",IDC_STATIC_OPTION7,58,179,73,13,SS_NOTIFY + LTEXT "Customize",IDC_STATIC_OPTION8,58,211,73,13,SS_NOTIFY + LTEXT "Exit",IDC_STATIC_OPTION9,58,231,27,13,SS_NOTIFY + LTEXT "Ultimate Toolbox",IDC_STATIC_INFO,24,59,22,185 + CTEXT "We associated sounds with the controls found in the dialog. Just move the mouse or/and click it over any control to hear sound effects. Click over to display Sound Customize Dialog", + IDC_STATIC_ABOUT,7,8,190,36 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SoundManager MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SoundManager\0" + VALUE "LegalCopyright", "Copyright (C) 1998\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "SoundManager.EXE\0" + VALUE "ProductName", "SoundManager Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SOUNDMANAGER_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 232 + TOPMARGIN, 7 + BOTTOMMARGIN, 247 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About SoundManager..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "Sound Manager" + ID_DESCRIPTION_FILE "SoundManagerInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""OXSoundCustomizeDlg.rc"" // Sound Manager Dialog resources\r\n" + "#include ""utsampleabout.rc""\r\n" + "\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SoundManager.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXCalendarPopup.rc""\r\n" + "#include ""OXBitmapButton.rc""\r\n" + "#include ""OXHistoryCombo.rc""\r\n" + "#include ""OXHyperLinkAction.rc""\r\n" + "#endif\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 DISCARDABLE "res\\SoundManager.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// AVI +// + +IDR_ANIMATEDLOGO AVI DISCARDABLE "res\\Mfc2.avi" + +///////////////////////////////////////////////////////////////////////////// +// +// WAVE +// + +IDR_DRUMROLL WAVE DISCARDABLE "res\\Drumroll.wav" +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "OXSoundCustomizeDlg.rc" // Sound Manager Dialog resources +#include "utsampleabout.rc" + +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SoundManager.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXCalendarPopup.rc" +#include "OXBitmapButton.rc" +#include "OXHistoryCombo.rc" +#include "OXHyperLinkAction.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.vcproj new file mode 100644 index 0000000..f4d4fd1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManager.vcproj @@ -0,0 +1,3473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.cpp new file mode 100644 index 0000000..ae5d0ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.cpp @@ -0,0 +1,327 @@ +// SoundManagerDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "SoundManager.h" +#include "SoundManagerDlg.h" +#include "OXSoundCustomizeDlg.h" + +#include "UTBStrOp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// message to react on "About" action +static UINT g_nAboutMsgID=RegisterWindowMessage(_T("AboutSoundEffectOrganizer")); + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerDlg dialog + +CSoundManagerDlg::CSoundManagerDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSoundManagerDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSoundManagerDlg) + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSoundManagerDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSoundManagerDlg) + DDX_Control(pDX, IDC_STATIC_OPTION9, m_ctlClose); + DDX_Control(pDX, IDC_STATIC_OPTION8, m_ctlCustomize); + DDX_Control(pDX, IDC_STATIC_OPTION7, m_ctlOption7); + DDX_Control(pDX, IDC_STATIC_OPTION6, m_ctlOption6); + DDX_Control(pDX, IDC_STATIC_OPTION5, m_ctlOption5); + DDX_Control(pDX, IDC_STATIC_ABOUT, m_ctlAbout); + DDX_Control(pDX, IDC_STATIC_OPTION4, m_ctlOption4); + DDX_Control(pDX, IDC_STATIC_OPTION3, m_ctlOption3); + DDX_Control(pDX, IDC_STATIC_OPTION2, m_ctlOption2); + DDX_Control(pDX, IDC_STATIC_OPTION1, m_ctlOption1); + DDX_Control(pDX, IDC_STATIC_INFO, m_ctlInfo); + DDX_Control(pDX, IDC_ANIMATE_MFC, m_animMFC); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSoundManagerDlg, CDialog) + //{{AFX_MSG_MAP(CSoundManagerDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP + ON_REGISTERED_MESSAGE(g_nAboutMsgID,OnAboutActivated) + ON_MESSAGE(WM_APP_CUSTOMIZE,OnCustomize) + ON_MESSAGE(WM_APP_CLOSE,OnClose) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerDlg message handlers + +BOOL CSoundManagerDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + LOGFONT lf; + + // set action as userdefined + // don't forget to set callback message and handle to recipient window + if(GetFont()->GetObject(sizeof(lf), &lf)) + { + lf.lfHeight=-12; + lf.lfUnderline=FALSE; + lf.lfWeight=FW_BOLD; + UTBStr::tcsncpy(lf.lfFaceName, LF_FACESIZE, _T("Arial"),LF_FACESIZE); + m_ctlAbout.SetTextLogFont(&lf); + } + m_ctlAbout.SetUnvisitedColor(RGB(0,128,128)); + m_ctlAbout.SetAction(ID_HLACTION_USERDEFINED,NULL,NULL,NULL, + SW_SHOWNORMAL,g_nAboutMsgID,GetSafeHwnd()); + m_ctlAbout.SetShowToolTip(TRUE); + m_ctlAbout.SetToolTipText(_T("Information about COXSoundEffectOrganizer")); + m_ctlAbout.SetFitToText(FALSE); + VERIFY(m_SoundEffectOrganizer.RegisterPlayEvent(&m_ctlAbout,HWM_MOUSEENTER, + _T(".\\Sound\\HeartBeat2.wav"),TRUE,-1,TRUE)); + VERIFY(m_SoundEffectOrganizer.RegisterPlayEvent(&m_ctlAbout,WM_LBUTTONDOWN, + _T(".\\Sound\\Camera.wav"))); + VERIFY(m_SoundEffectOrganizer.RegisterStopEvent(&m_ctlAbout,HWM_MOUSELEAVE)); + + // menu options + COLORREF clrText=::GetSysColor(COLOR_BTNTEXT); + COLORREF clrBack=::GetSysColor(COLOR_BTNFACE); + int nFontHeight=24; + int nFontWeight=FW_BOLD; + CString sFontName=_T("Times New Roman"); + BOOL bEmboss=TRUE; + int nHorzAlignment=OX_ALIGNHORZ_LEFT; + int nVertAlignment=OX_ALIGNVERT_CENTER; + CString sEnterSound=_T(".\\Sound\\camera.wav"); + CString sClickSound=_T(".\\Sound\\deal.wav"); + + SetupStaticControl(&m_ctlOption1,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption2,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption3,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption4,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption5,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption6,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlOption7,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + sFontName=_T("Arial"); + nFontHeight=24; + nFontWeight=FW_NORMAL; + SetupStaticControl(&m_ctlCustomize,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + SetupStaticControl(&m_ctlClose,clrText,clrBack,nFontHeight,nFontWeight, + sFontName,bEmboss,nHorzAlignment,nVertAlignment, sEnterSound, sClickSound); + + + // logo + m_ctlInfo.SetTextColor(::GetSysColor(COLOR_BTNFACE)); + m_ctlInfo.SetBkColor(::GetSysColor(COLOR_BTNSHADOW)); + m_ctlInfo.SetHorzAlignment(OX_ALIGNHORZ_CENTER); + m_ctlInfo.SetVertAlignment(OX_ALIGNVERT_BOTTOM); + if(m_ctlInfo.GetLogFont(&lf)) + { + lf.lfHeight=36; + lf.lfWidth=0; + lf.lfWeight=FW_BOLD; + m_ctlInfo.SetLogFont(&lf); + } + m_ctlInfo.SetFontName(_T("Arial")); + + m_ctlInfo.SetEmboss(); + m_ctlInfo.SetCharSet(ANSI_CHARSET); + m_ctlInfo.SetStringAngle(900,TRUE); + + // animation + m_animMFC.Open(IDR_ANIMATEDLOGO); + VERIFY(m_SoundEffectOrganizer. + RegisterPlayEvent(&m_animMFC,HWM_MOUSEENTER,IDR_DRUMROLL)); + + // load saved in registry sound effects + m_SoundEffectOrganizer.LoadState(&m_animMFC,_T("Animation")); + m_SoundEffectOrganizer.LoadState(&m_ctlAbout,_T("About Shortcut")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption1,_T("Option1")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption2,_T("Option2")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption3,_T("Option3")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption4,_T("Option4")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption5,_T("Option5")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption6,_T("Option6")); + m_SoundEffectOrganizer.LoadState(&m_ctlOption7,_T("Option7")); + m_SoundEffectOrganizer.LoadState(&m_ctlCustomize,_T("Customize")); + m_SoundEffectOrganizer.LoadState(&m_ctlClose,_T("Close")); + + // Install caption painter + m_Caption.Attach(this); + COXCaptionInfo* pCI=m_Caption.GetCaptionInfo(TRUE); + pCI->SetBackgroundColor(RGB(0xff,0x68,0x20)); + pCI=m_Caption.GetCaptionInfo(FALSE); + pCI->SetBackgroundColor(RGB(0xD2,0xB4,0x8C)); + SendMessage(WM_NCPAINT); + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSoundManagerDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSoundManagerDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSoundManagerDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSoundManagerDlg::SetupStaticControl(CMyStatic* m_pctl, COLORREF clrText, + COLORREF clrBack, int nFontHeight, + int nFontWeight,CString sFontName, + BOOL bEmboss, int nHorzAlignment, + int nVertAlignment, CString sEnterSound, + CString sClickSound) +{ + m_pctl->SetTextColor(clrText); + m_pctl->SetBkColor(clrBack); + LOGFONT lf; + if(m_pctl->GetLogFont(&lf)) + { + lf.lfHeight=nFontHeight; + lf.lfWeight=nFontWeight; + m_pctl->SetLogFont(&lf); + } + m_pctl->SetFontName(sFontName); + + m_pctl->SetEmboss(bEmboss); + m_pctl->SetHorzAlignment(nHorzAlignment); + m_pctl->SetVertAlignment(nVertAlignment); + m_pctl->SetCharSet(ANSI_CHARSET,TRUE); + + VERIFY(m_SoundEffectOrganizer. + RegisterPlayEvent(m_pctl,WM_LBUTTONDOWN,sEnterSound)); + VERIFY(m_SoundEffectOrganizer.RegisterPlayEvent(m_pctl,HWM_MOUSEENTER, + sClickSound,FALSE,-1,FALSE)); +} + +// "About" action was activated +LONG CSoundManagerDlg::OnAboutActivated(UINT wParam, LONG lParam) +{ + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME, ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + + return (LONG)1; +} + +LONG CSoundManagerDlg::OnCustomize(UINT wParam, LONG lParam) +{ + // TODO: Add your control notification handler code here + + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + COXSoundCustomizeDlg customizeDlg(this,&m_SoundEffectOrganizer, + LT_EVENT,SCDS_NOTOGGLE|SCDS_SAVESTATE|SCDS_LOADSTATE); + customizeDlg.DoModal(); + + return (LONG)0; +} + +LONG CSoundManagerDlg::OnClose(UINT wParam, LONG lParam) +{ + // TODO: Add your control notification handler code here + + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + + // save in registry sound effects + m_SoundEffectOrganizer.SaveState(&m_animMFC,_T("Animation")); + m_SoundEffectOrganizer.SaveState(&m_ctlAbout,_T("About Shortcut")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption1,_T("Option1")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption2,_T("Option2")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption3,_T("Option3")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption4,_T("Option4")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption5,_T("Option5")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption6,_T("Option6")); + m_SoundEffectOrganizer.SaveState(&m_ctlOption7,_T("Option7")); + m_SoundEffectOrganizer.SaveState(&m_ctlCustomize,_T("Customize")); + m_SoundEffectOrganizer.SaveState(&m_ctlClose,_T("Close")); + + CDialog::OnOK(); + + return (LONG)0; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.h new file mode 100644 index 0000000..e7cdcde --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerDlg.h @@ -0,0 +1,81 @@ +// SoundManagerDlg.h : header file +// + +#if !defined(AFX_SOUNDMANAGERDLG_H__A84121AA_1C0A_11D2_8890_0080C83F712F__INCLUDED_) +#define AFX_SOUNDMANAGERDLG_H__A84121AA_1C0A_11D2_8890_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "UTSampleAbout.h" +#include "OXSoundEffectManager.h" +#include "OXStaticHyperLink.h" +#include "OXCaptionPainter.h" + +#include "MyAnimateCtrl.h" +#include "MyStatic.h" + +///////////////////////////////////////////////////////////////////////////// +// CSoundManagerDlg dialog + +class CSoundManagerDlg : public CDialog +{ +// Construction +public: + CSoundManagerDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSoundManagerDlg) + enum { IDD = IDD_SOUNDMANAGER_DIALOG }; + CMyStatic m_ctlClose; + CMyStatic m_ctlCustomize; + CMyStatic m_ctlOption7; + CMyStatic m_ctlOption6; + CMyStatic m_ctlOption5; + COXStaticHyperLink m_ctlAbout; + CMyStatic m_ctlOption4; + CMyStatic m_ctlOption3; + CMyStatic m_ctlOption2; + CMyStatic m_ctlOption1; + CMyStatic m_ctlInfo; + CMyAnimateCtrl m_animMFC; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSoundManagerDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + COXSoundEffectOrganizer m_SoundEffectOrganizer; + + // caption painter + COXCaptionPainter m_Caption; + + void SetupStaticControl(CMyStatic* m_pctl, COLORREF clrText, + COLORREF clrBack, int nFontHeight, int nFontWeight,CString sFontName, + BOOL bEmboss, int nHorzAlignment, int nVertAlignment, CString sEnterSound, + CString sClickSound); + + // Generated message map functions + //{{AFX_MSG(CSoundManagerDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + afx_msg LONG OnAboutActivated(UINT wParam, LONG lParam); + afx_msg LONG OnCustomize(UINT wParam, LONG lParam); + afx_msg LONG OnClose(UINT wParam, LONG lParam); + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SOUNDMANAGERDLG_H__A84121AA_1C0A_11D2_8890_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerInfo.rtf new file mode 100644 index 0000000..96741ad Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/SoundManagerInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.cpp new file mode 100644 index 0000000..2c1ab93 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SoundManager.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.h new file mode 100644 index 0000000..97a8165 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__A84121AC_1C0A_11D2_8890_0080C83F712F__INCLUDED_) +#define AFX_STDAFX_H__A84121AC_1C0A_11D2_8890_0080C83F712F__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC templates +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__A84121AC_1C0A_11D2_8890_0080C83F712F__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Drumroll.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Drumroll.wav new file mode 100644 index 0000000..f66bfef Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Drumroll.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Mfc2.avi b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Mfc2.avi new file mode 100644 index 0000000..500ce76 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/Mfc2.avi differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.rc2 new file mode 100644 index 0000000..977e920 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/res/SoundManager.rc2 @@ -0,0 +1,13 @@ +// +// SOUNDMANAGER.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/resource.h new file mode 100644 index 0000000..61487e0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundManager/resource.h @@ -0,0 +1,34 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SoundManager.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_SOUNDMANAGER_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDR_ANIMATEDLOGO 135 +#define IDR_DRUMROLL 137 +#define IDC_ANIMATE_MFC 1000 +#define IDC_STATIC_OPTION1 1002 +#define IDC_STATIC_OPTION2 1003 +#define IDC_STATIC_OPTION3 1004 +#define IDC_STATIC_OPTION4 1005 +#define IDC_STATIC_INFO 1007 +#define IDC_STATIC_ABOUT 1008 +#define IDC_STATIC_OPTION5 1009 +#define IDC_STATIC_OPTION6 1010 +#define IDC_STATIC_OPTION7 1011 +#define IDC_STATIC_OPTION8 1012 +#define IDC_STATIC_OPTION9 1013 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 138 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1020 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/BOING.WAV b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/BOING.WAV new file mode 100644 index 0000000..20b1dac Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/BOING.WAV differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/POISON.WAV b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/POISON.WAV new file mode 100644 index 0000000..0ff39a0 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/POISON.WAV differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SLEDGE.WAV b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SLEDGE.WAV new file mode 100644 index 0000000..f512c43 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SLEDGE.WAV differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.clw new file mode 100644 index 0000000..5437274 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.clw @@ -0,0 +1,75 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSoundTestApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "soundtest.h" +LastPage=0 + +ClassCount=2 +Class1=CSoundTestApp +Class2=CSoundTestDlg + +ResourceCount=2 +Resource1=IDD_SOUNDTEST_DIALOG +Resource2=IDD_SOUNDTEST_DIALOG (English (U.S.)) + +[CLS:CSoundTestApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SoundTest.h +ImplementationFile=SoundTest.cpp +Filter=N +VirtualFilter=AC +LastObject=CSoundTestApp + +[CLS:CSoundTestDlg] +Type=0 +BaseClass=CDialog +HeaderFile=SoundTestDlg.h +ImplementationFile=SoundTestDlg.cpp +Filter=D +VirtualFilter=dWC +LastObject=IDC_ASYNC + +[DLG:IDD_SOUNDTEST_DIALOG] +Type=1 +Class=CSoundTestDlg +ControlCount=15 +Control1=IDC_OPEN,button,1342242816 +Control2=IDC_FILENAME,static,1342308352 +Control3=IDC_PLAY,button,1476460544 +Control4=IDC_STOP,button,1476460544 +Control5=IDC_ASYNC,button,1342242819 +Control6=IDC_LOOP,button,1476460547 +Control7=IDC_RADIO1,button,1342177289 +Control8=IDC_RADIO2,button,1342177289 +Control9=IDC_RADIO3,button,1342177289 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATUS,static,1342312448 +Control12=IDC_STATIC,static,1342177283 +Control13=IDC_INFO,button,1208025088 +Control14=IDC_LOOPCOUNT,static,1342308352 +Control15=IDC_STATIC,static,1342308352 + +[DLG:IDD_SOUNDTEST_DIALOG (English (U.S.))] +Type=1 +ControlCount=15 +Control1=IDC_OPEN,button,1342242816 +Control2=IDC_FILENAME,static,1342308352 +Control3=IDC_PLAY,button,1476460544 +Control4=IDC_STOP,button,1476460544 +Control5=IDC_ASYNC,button,1342242819 +Control6=IDC_LOOP,button,1476460547 +Control7=IDC_RADIO1,button,1342177289 +Control8=IDC_RADIO2,button,1342177289 +Control9=IDC_RADIO3,button,1342177289 +Control10=IDC_STATIC,static,1342308352 +Control11=IDC_STATUS,static,1342312448 +Control12=IDC_STATIC,static,1342177283 +Control13=IDC_INFO,button,1208025088 +Control14=IDC_LOOPCOUNT,static,1342308352 +Control15=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.cpp new file mode 100644 index 0000000..7771dce --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.cpp @@ -0,0 +1,101 @@ +// SoundTest.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SoundTest.h" +#include "SoundTestDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestApp + +BEGIN_MESSAGE_MAP(CSoundTestApp, CWinApp) + //{{AFX_MSG_MAP(CSoundTestApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestApp construction + +CSoundTestApp::CSoundTestApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSoundTestApp object + +CSoundTestApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestApp initialization + +BOOL CSoundTestApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + CSoundTestDlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} + +int CSoundTestApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsp new file mode 100644 index 0000000..3076cff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsp @@ -0,0 +1,267 @@ +# Microsoft Developer Studio Project File - Name="SoundTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SoundTest - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SoundTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SoundTest.mak" CFG="SoundTest - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SoundTest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SoundTest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SoundTest - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SoundTest - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "SoundTest - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SoundTest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /pdb:none /machine:I386 /out:"SoundTest.exe" + +!ELSEIF "$(CFG)" == "SoundTest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SoundTest.exe" + +!ELSEIF "$(CFG)" == "SoundTest - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SoundTes" +# PROP BASE Intermediate_Dir "SoundTes" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /pdb:none /machine:I386 /out:"SoundTest.exe" +# ADD LINK32 /nologo /subsystem:windows /pdb:none /machine:I386 /out:"SoundTest.exe" + +!ELSEIF "$(CFG)" == "SoundTest - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SoundTe0" +# PROP BASE Intermediate_Dir "SoundTe0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"SoundTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"SoundTest.exe" + +!ELSEIF "$(CFG)" == "SoundTest - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SoundTe1" +# PROP BASE Intermediate_Dir "SoundTe1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /pdb:none /machine:I386 /out:"SoundTest.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /pdb:none /machine:I386 /out:"SoundTest.exe" + +!ENDIF + +# Begin Target + +# Name "SoundTest - Win32 Release" +# Name "SoundTest - Win32 Debug" +# Name "SoundTest - Win32 Release_Shared" +# Name "SoundTest - Win32 Unicode_Debug" +# Name "SoundTest - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSound.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSoundWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\SoundTest.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\SoundTest.rc +# End Source File +# Begin Source File + +SOURCE=.\SoundTestDlg.cpp +# ADD CPP /Yu"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=..\..\..\Include\OXSound.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXSoundWnd.h +# End Source File +# Begin Source File + +SOURCE=.\SoundTest.h +# End Source File +# Begin Source File + +SOURCE=.\SoundTestDlg.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\photon.wav +# End Source File +# Begin Source File + +SOURCE=.\res\SoundTest.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SoundTest.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\res\Flamenco.wav +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsw new file mode 100644 index 0000000..9358192 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SoundTest"=".\SoundTest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.h new file mode 100644 index 0000000..2ccd1aa --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.h @@ -0,0 +1,38 @@ +// SoundTest.h : main header file for the SOUNDTEST application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestApp: +// See SoundTest.cpp for the implementation of this class +// + +class CSoundTestApp : public CWinApp +{ +public: + CSoundTestApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSoundTestApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSoundTestApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.rc new file mode 100644 index 0000000..fe69488 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.rc @@ -0,0 +1,217 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SoundTest.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\SoundTest.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SOUNDTEST_DIALOG DIALOGEX 0, 0, 185, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "COXSound Test" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "&Open...",IDC_OPEN,5,59,44,14 + LTEXT "",IDC_FILENAME,60,62,120,8 + PUSHBUTTON "&Play",IDC_PLAY,5,79,44,14,WS_DISABLED + PUSHBUTTON "&Stop",IDC_STOP,5,99,44,14,WS_DISABLED + CONTROL "&Async",IDC_ASYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 59,82,35,10 + CONTROL "&Loop",IDC_LOOP,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + WS_TABSTOP,106,82,32,10 + CONTROL "Load WAVE from file",IDC_RADIO1,"Button", + BS_AUTORADIOBUTTON,34,12,81,10 + CONTROL "Use WAVE resource: GUITAR",IDC_RADIO2,"Button", + BS_AUTORADIOBUTTON,34,24,113,10 + CONTROL "Use WAVE resource: PHOTON",IDC_RADIO3,"Button", + BS_AUTORADIOBUTTON,34,36,116,10 + LTEXT "Status:",IDC_STATIC,5,118,23,8 + LTEXT "",IDC_STATUS,5,128,175,10,SS_SUNKEN + ICON IDR_MAINFRAME,IDC_STATIC,6,4,20,20 + PUSHBUTTON "Wave Info...",IDC_INFO,62,99,50,14,NOT WS_VISIBLE | + WS_DISABLED + LTEXT "0",IDC_LOOPCOUNT,143,83,31,8 + LTEXT "Count:",IDC_STATIC,143,71,22,8 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "Barefoot Productions, Inc.\0" + VALUE "FileDescription", "SOUNDTEST MFC Application\0" + VALUE "FileVersion", "1.0\0" + VALUE "InternalName", "SOUNDTEST\0" + VALUE "LegalCopyright", "Copyright © 1997 Barefoot Productions, Inc.\0" + VALUE "OriginalFilename", "SOUNDTEST.EXE\0" + VALUE "ProductName", "SOUNDTEST Application\0" + VALUE "ProductVersion", "1.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SOUNDTEST_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 178 + TOPMARGIN, 7 + BOTTOMMARGIN, 136 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// WAVE +// + +IDW_GUITAR WAVE DISCARDABLE "res\\Flamenco.wav" +IDW_PHOTON WAVE DISCARDABLE "res\\photon.wav" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About SoundTest..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "SoundTest" + ID_DESCRIPTION_FILE "SoundTestInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SoundTest.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.vcproj new file mode 100644 index 0000000..8852a6a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTest.vcproj @@ -0,0 +1,925 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.cpp new file mode 100644 index 0000000..280cac4 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.cpp @@ -0,0 +1,317 @@ +// SoundTestDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "SoundTest.h" +#include "SoundTestDlg.h" +#include "OXSound.h" + +#include "utsampleabout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestDlg dialog + +CSoundTestDlg::CSoundTestDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSoundTestDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSoundTestDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSoundTestDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSoundTestDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSoundTestDlg, CDialog) + //{{AFX_MSG_MAP(CSoundTestDlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_OPEN, OnOpen) + ON_BN_CLICKED(IDC_PLAY, OnPlay) + ON_BN_CLICKED(IDC_STOP, OnStop) + ON_BN_CLICKED(IDC_ASYNC, OnAsync) + ON_MESSAGE(WM_OX_SOUNDPLAYBACKCOMPLETE, OnPlayComplete) + ON_MESSAGE(WM_OX_SOUNDPLAYLOOPING, OnPlayLoop) + ON_BN_CLICKED(IDC_RADIO1, OnRadio1) + ON_BN_CLICKED(IDC_RADIO2, OnRadio2) + ON_BN_CLICKED(IDC_RADIO3, OnRadio3) + ON_BN_CLICKED(IDC_INFO, OnInfo) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestDlg message handlers + +BOOL CSoundTestDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + m_oxSound.SetCallbackWnd(this) ; + + // Can this machine playback waves? + if (!m_oxSound.CanPlay()) + { + AfxMessageBox(_T("A waveout device does not exist for sound playback")) ; + + GetDlgItem(IDC_RADIO1)->EnableWindow(FALSE) ; + GetDlgItem(IDC_RADIO2)->EnableWindow(FALSE) ; + GetDlgItem(IDC_RADIO3)->EnableWindow(FALSE) ; + GetDlgItem(IDC_OPEN)->EnableWindow(FALSE) ; + GetDlgItem(IDC_PLAY)->EnableWindow(FALSE) ; + GetDlgItem(IDC_ASYNC)->EnableWindow(FALSE) ; + GetDlgItem(IDC_LOOP)->EnableWindow(FALSE) ; + GetDlgItem(IDC_LOOPCOUNT)->EnableWindow(FALSE) ; + GetDlgItem(IDC_STOP)->EnableWindow(FALSE) ; + GetDlgItem(IDC_INFO)->EnableWindow(FALSE) ; + } + + CheckRadioButton(IDC_RADIO1, IDC_RADIO3, IDC_RADIO1) ; + + ShowStatus(NULL) ; + + COXSound* pSound=new COXSound; + delete pSound; + pSound=NULL; + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSoundTestDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSoundTestDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSoundTestDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CSoundTestDlg::OnOpen() +{ + static TCHAR BASED_CODE szFilter[] = _T("Wave Files (*.wav)||"); + CFileDialog theDlg(TRUE, _T("*.wav"), _T("*.wav"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, this) ; + CString sFilename ; + CString buffer ; + + ShowStatus(_T("Opening WAVE file...")) ; + + if (theDlg.DoModal()) + { + sFilename = theDlg.GetPathName() ; + SetDlgItemText(IDC_FILENAME, sFilename) ; + + if (m_oxSound.Open(sFilename)) + { + // Enable the play button + GetDlgItem(IDC_PLAY)->EnableWindow(TRUE) ; + buffer.Format(_T("File: %s opened successfully"), sFilename) ; + ShowStatus(buffer) ; + } + else + { + buffer.Format(_T("Could not open %s"), sFilename) ; + ShowStatus(buffer) ; + } + } +} + +void CSoundTestDlg::OnPlay() +{ + BOOL bLoop = IsDlgButtonChecked(IDC_LOOP) ; + BOOL bAsync = IsDlgButtonChecked(IDC_ASYNC) ; + + CWaitCursor theCursor ; + + GetDlgItem(IDC_STOP)->EnableWindow(bAsync) ; + GetDlgItem(IDC_PLAY)->EnableWindow(FALSE) ; + + CString buffer ; + + buffer = _T("Playing WAVE ") ; + + if (bAsync) + buffer += "a" ; + + buffer += _T("synchronously...") ; + + ShowStatus(buffer) ; + + SetDlgItemInt(IDC_LOOPCOUNT, bLoop) ; + + m_oxSound.Play(bLoop, bAsync) ; + + if (!bAsync) + ShowStatus(_T("Wave playback complete...")) ; + + GetDlgItem(IDC_PLAY)->EnableWindow(!bAsync) ; +} + +void CSoundTestDlg::OnStop() +{ + // Stop the current sound from playing... + m_oxSound.Stop() ; + + ShowStatus(_T("WAVE stopped playing...")) ; + + GetDlgItem(IDC_PLAY)->EnableWindow(TRUE) ; + GetDlgItem(IDC_STOP)->EnableWindow(FALSE) ; +} + +void CSoundTestDlg::OnAsync() +{ + if (!IsDlgButtonChecked(IDC_ASYNC)) + { + CheckDlgButton(IDC_LOOP, FALSE) ; + } + + GetDlgItem(IDC_LOOP)->EnableWindow(IsDlgButtonChecked(IDC_ASYNC)) ; + GetDlgItem(IDC_LOOPCOUNT)->EnableWindow(IsDlgButtonChecked(IDC_ASYNC)) ; + +} + + +LRESULT CSoundTestDlg::OnPlayComplete(WPARAM /* wParam */, LPARAM /* lParam */) +{ + // Notification message to let us know the sound has completed playback... + + OnStop() ; + + return (0) ; +} + +LRESULT CSoundTestDlg::OnPlayLoop(WPARAM /* wParam */, LPARAM /* lParam */) +{ + // Notification message to let us know the sound is looping... + + int iCount = (int) GetDlgItemInt(IDC_LOOPCOUNT) ; + iCount++ ; + SetDlgItemInt(IDC_LOOPCOUNT, iCount) ; + + return (0) ; +} + +void CSoundTestDlg::OnRadio1() +{ + // Loaded from file... + GetDlgItem(IDC_OPEN)->EnableWindow(TRUE) ; +} + +void CSoundTestDlg::OnRadio2() +{ + // Load from IDW_GUITAR resource... + + if (m_oxSound.Open(IDW_GUITAR, AfxGetResourceHandle())) + { + // Enable the play button + GetDlgItem(IDC_PLAY)->EnableWindow(TRUE) ; + } + + GetDlgItem(IDC_OPEN)->EnableWindow(FALSE) ; +} + +void CSoundTestDlg::OnRadio3() +{ + // Load from IDW_PHOTON resource... + + if (m_oxSound.Open(IDW_PHOTON, AfxGetResourceHandle())) + { + // Enable the play button + GetDlgItem(IDC_PLAY)->EnableWindow(TRUE) ; + } + + GetDlgItem(IDC_OPEN)->EnableWindow(FALSE) ; +} + +void CSoundTestDlg::ShowStatus(LPCTSTR pStatus) +{ + SetDlgItemText(IDC_STATUS, pStatus) ; +} + +void CSoundTestDlg::OnInfo() +{ + WAVEFORMATEX wfx ; + CString buffer ; + + if (m_oxSound.IsWaveLoaded()) + { + m_oxSound.GetWaveFormat(&wfx) ; + + buffer.Format(_T("nChannels = %d\nnSamplesPerSec = %u\nwBitsPerSample=%u"), wfx.nChannels, wfx.nSamplesPerSec, wfx.wBitsPerSample) ; + MessageBox(buffer) ; + } +} + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.h new file mode 100644 index 0000000..072fd03 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestDlg.h @@ -0,0 +1,58 @@ +// SoundTestDlg.h : header file +// + +#ifndef _SOUNDTESTDLG_H_ +#define _SOUNDTESTDLG_H_ + +#include "OXSound.h" + +///////////////////////////////////////////////////////////////////////////// +// CSoundTestDlg dialog + +class CSoundTestDlg : public CDialog +{ +// Construction +public: + CSoundTestDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CSoundTestDlg) + enum { IDD = IDD_SOUNDTEST_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSoundTestDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + COXSound m_oxSound ; + + void ShowStatus(LPCTSTR pStatus) ; + + // Generated message map functions + //{{AFX_MSG(CSoundTestDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnOpen(); + afx_msg void OnPlay(); + afx_msg void OnStop(); + afx_msg void OnAsync(); + afx_msg LRESULT OnPlayComplete(WPARAM wParam, LPARAM lParam); + afx_msg LRESULT OnPlayLoop(WPARAM wParam, LPARAM lParam); + afx_msg void OnRadio1(); + afx_msg void OnRadio2(); + afx_msg void OnRadio3(); + afx_msg void OnInfo(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestInfo.rtf new file mode 100644 index 0000000..41ab299 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/SoundTestInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.cpp new file mode 100644 index 0000000..cf2d698 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SoundTest.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.h new file mode 100644 index 0000000..c6baf8f --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/StdAfx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/Flamenco.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/Flamenco.wav new file mode 100644 index 0000000..e923d97 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/Flamenco.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.ico new file mode 100644 index 0000000..af796e2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.rc2 new file mode 100644 index 0000000..2704dbf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/SoundTest.rc2 @@ -0,0 +1,13 @@ +// +// SOUNDTEST.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/photon.wav b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/photon.wav new file mode 100644 index 0000000..34c95f1 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/res/photon.wav differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/resource.h new file mode 100644 index 0000000..01eb952 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SoundTest/resource.h @@ -0,0 +1,36 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SoundTest.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_SOUNDTEST_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDW_GUITAR 129 +#define ID_DESCRIPTION_FILE 129 +#define IDW_PHOTON 131 +#define IDC_OPEN 1000 +#define IDC_FILENAME 1001 +#define IDC_PLAY 1002 +#define IDC_STOP 1003 +#define IDC_ASYNC 1004 +#define IDC_LOOP 1005 +#define IDC_RADIO1 1006 +#define IDC_RADIO2 1007 +#define IDC_RADIO3 1008 +#define IDC_STATUS 1009 +#define IDC_ABOUT 1010 +#define IDC_INFO 1011 +#define IDC_LOOPCOUNT 1012 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.cpp new file mode 100644 index 0000000..64028dd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// SysInfo1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.h new file mode 100644 index 0000000..88f15a6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__1CD38C2B_81E5_11D1_A4E0_0020359647BF__INCLUDED_) +#define AFX_STDAFX_H__1CD38C2B_81E5_11D1_A4E0_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC OLE automation classes +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#include +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__1CD38C2B_81E5_11D1_A4E0_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.clw new file mode 100644 index 0000000..52b619e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.clw @@ -0,0 +1,54 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CSysInfo1Dlg +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "SysInfo1.h" + +ClassCount=3 +Class1=CSysInfo1App +Class2=CSysInfo1Dlg +Class3=CAboutDlg + +ResourceCount=3 +Resource1=IDR_MAINFRAME +Resource2=IDD_SYSINFO1_DIALOG +Resource3=IDD_SYSINFO1_DIALOG (English (U.S.)) + +[CLS:CSysInfo1App] +Type=0 +HeaderFile=SysInfo1.h +ImplementationFile=SysInfo1.cpp +Filter=N + +[CLS:CSysInfo1Dlg] +Type=0 +HeaderFile=SysInfo1Dlg.h +ImplementationFile=SysInfo1Dlg.cpp +Filter=D +BaseClass=CDialog +VirtualFilter=dWC + +[CLS:CAboutDlg] +Type=0 +HeaderFile=SysInfo1Dlg.h +ImplementationFile=SysInfo1Dlg.cpp +Filter=D + +[DLG:IDD_SYSINFO1_DIALOG] +Type=1 +Class=CSysInfo1Dlg +ControlCount=3 +Control1=IDC_TREE1,SysTreeView32,1350631479 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 + +[DLG:IDD_SYSINFO1_DIALOG (English (U.S.))] +Type=1 +ControlCount=3 +Control1=IDC_TREE1,SysTreeView32,1350631479 +Control2=IDC_STATIC,static,1342308352 +Control3=IDC_STATIC,static,1342308352 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.cpp new file mode 100644 index 0000000..87cf6f6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.cpp @@ -0,0 +1,83 @@ +// SysInfo1.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "SysInfo1.h" +#include "SysInfo1Dlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1App + +BEGIN_MESSAGE_MAP(CSysInfo1App, CWinApp) + //{{AFX_MSG_MAP(CSysInfo1App) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1App construction + +CSysInfo1App::CSysInfo1App() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CSysInfo1App object + +CSysInfo1App theApp; + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1App initialization + +BOOL CSysInfo1App::InitInstance() +{ + 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + if (LoadLibrary(_T("riched32.dll"))==NULL) + TRACE0("unable to load library"); + CSysInfo1Dlg dlg; + m_pMainWnd = &dlg; + switch(dlg.DoModal()) + { + case IDOK: + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + break; + case IDCANCEL: + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + break; + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsp new file mode 100644 index 0000000..687e347 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsp @@ -0,0 +1,261 @@ +# Microsoft Developer Studio Project File - Name="SysInfo1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SysInfo1 - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SysInfo1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SysInfo1.mak" CFG="SysInfo1 - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SysInfo1 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SysInfo1 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SysInfo1 - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "SysInfo1 - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE "SysInfo1 - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SysInfo1 - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SysInfo1.exe" + +!ELSEIF "$(CFG)" == "SysInfo1 - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"SysInfo1.exe" /pdbtype:sept + +!ELSEIF "$(CFG)" == "SysInfo1 - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SysInfo1" +# PROP BASE Intermediate_Dir "SysInfo1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"SysInfo1.exe" +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SysInfo1.exe" + +!ELSEIF "$(CFG)" == "SysInfo1 - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SysInfo0" +# PROP BASE Intermediate_Dir "SysInfo0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SysInfo1.exe" +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfr.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"SysInfo1.exe" + +!ELSEIF "$(CFG)" == "SysInfo1 - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SysInfo2" +# PROP BASE Intermediate_Dir "SysInfo2" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /I "..\..\..\Lib\Processor\Intel\Cpuinf32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 ..\..\..\Lib\libs\Cpuinfd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"SysInfo1.exe" /pdbtype:sept +# ADD LINK32 ..\..\..\Lib\libs\Cpuinfd.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBCD" /out:"SysInfo1.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "SysInfo1 - Win32 Release" +# Name "SysInfo1 - Win32 Debug" +# Name "SysInfo1 - Win32 Release_Shared" +# Name "SysInfo1 - Win32 Unicode_Release" +# Name "SysInfo1 - Win32 Unicode_Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSysInfo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\SysInfo1.cpp +# End Source File +# Begin Source File + +SOURCE=.\SysInfo1.rc +# End Source File +# Begin Source File + +SOURCE=.\SysInfo1Dlg.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\Include\OXSysInfo.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\SysInfo1.h +# End Source File +# Begin Source File + +SOURCE=.\SysInfo1Dlg.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\SysInfo1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\SysInfo1.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsw new file mode 100644 index 0000000..93a677b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SysInfo1"=".\SysInfo1.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.h new file mode 100644 index 0000000..ed41727 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.h @@ -0,0 +1,49 @@ +// SysInfo1.h : main header file for the SYSINFO1 application +// + +#if !defined(AFX_SYSINFO1_H__1CD38C27_81E5_11D1_A4E0_0020359647BF__INCLUDED_) +#define AFX_SYSINFO1_H__1CD38C27_81E5_11D1_A4E0_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1App: +// See SysInfo1.cpp for the implementation of this class +// + +class CSysInfo1App : public CWinApp +{ +public: + CSysInfo1App(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSysInfo1App) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CSysInfo1App) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SYSINFO1_H__1CD38C27_81E5_11D1_A4E0_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.rc new file mode 100644 index 0000000..d7bd991 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.rc @@ -0,0 +1,205 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\SysInfo1.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#include ""OXSysInfo.rc""\r\n" + "#endif\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 DISCARDABLE "res\\SysInfo1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SYSINFO1_DIALOG DIALOGEX 0, 0, 195, 226 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "System information (Dundas Software)" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Tree1",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | + TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | + TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,5,53,184,153, + WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE + LTEXT "System Information: ",IDC_STATIC,18,6,67,10 + LTEXT "Expand the tree control to view more details about your system", + IDC_STATIC,17,21,99,28 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SysInfo1 MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SysInfo1\0" + VALUE "LegalCopyright", "Copyright (C) 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "SysInfo1.EXE\0" + VALUE "ProductName", "SysInfo1 Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SYSINFO1_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 188 + TOPMARGIN, 7 + BOTTOMMARGIN, 219 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IMAGELIST BITMAP DISCARDABLE "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUTBOX "&About SysInfo1..." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDR_MAINFRAME "System info class COXSysInfo" + ID_DESCRIPTION_FILE "sysinfoinfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\SysInfo1.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "OXSysInfo.rc" +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.vcproj new file mode 100644 index 0000000..4c22151 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1.vcproj @@ -0,0 +1,887 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.cpp new file mode 100644 index 0000000..9bcbac5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.cpp @@ -0,0 +1,574 @@ +// SysInfo1Dlg.cpp : implementation file +// + +#include "stdafx.h" +#include "utsampleabout.h" +#include "SysInfo1.h" +#include "SysInfo1Dlg.h" + +#include "UTBStrOp.h" +#include "UTB64Bit.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1Dlg dialog + +CSysInfo1Dlg::CSysInfo1Dlg(CWnd* pParent /*=NULL*/) + : CDialog(CSysInfo1Dlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CSysInfo1Dlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CSysInfo1Dlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSysInfo1Dlg) + DDX_Control(pDX, IDC_TREE1, m_InfoTree); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CSysInfo1Dlg, CDialog) + //{{AFX_MSG_MAP(CSysInfo1Dlg) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1Dlg message handlers + +BOOL CSysInfo1Dlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + m_hRootItem = NULL; + m_ilFolder.Create(IDB_IMAGELIST, 16, 0, RGB(255,0,255)); + m_InfoTree.SetImageList(&m_ilFolder, TVSIL_NORMAL); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + GetSystemInformation() ; + + return TRUE; // return TRUE unless you set the focus to a control +} + +void CSysInfo1Dlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CUTSampleAboutDlg dlgAbout(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + dlgAbout.DoModal(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CSysInfo1Dlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CSysInfo1Dlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} +void CSysInfo1Dlg::GetSystemInformation() +{ + CString theBuffer ; + int xRes, yRes ; + DWORD dwValue ; + CString theString ; + HTREEITEM hTypeItem = 0; + + + + // *************** + // Windows version + // *************** + DWORD dwPlatform, dwMajor, dwMinor ; + CString theVersion ; + HTREEITEM after = 0; + if (m_oxSysInfo.GetWindowsVersion(&dwPlatform, &dwMajor, &dwMinor)) + { + theBuffer.Format(_T(" WINDOWS ")); + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 0,1); + // + + if (dwPlatform == VER_PLATFORM_WIN32s) + theVersion = _T("Windows 3.1"); + else + if (dwPlatform == VER_PLATFORM_WIN32_WINDOWS) + { + if (dwMajor == 4) + { + switch (dwMinor) + { + case 0: + { + theVersion = _T("Windows 95"); + // if szCSDVersion[1] is C or B, it's OSR2, but we're not getting that info back + } + break; + case 10: + theVersion = _T("Windows 98"); + // if szCSDVersion[1] is A, it's SE, but one again, we don't get that back + break; + case 90: + theVersion = _T("Windows ME"); + break; + + + } + } + else + theVersion = _T("Unknown version"); + } + else + if (dwPlatform == VER_PLATFORM_WIN32_NT) + { + if (dwMajor == 5) + { + switch (dwMinor) + { + case 2: + theVersion=_T("Windows Server 2003"); + break; + case 1: + theVersion = _T("Windows XP"); + break; + case 0: + theVersion = _T("Windows 2000"); + break; + default: + theVersion = _T("Windows Vista"); + } + } + else + theVersion = _T("Windows NT"); + } + else + theVersion = _T("Unknown"); + + theBuffer.Format(_T("Windows Version: %s, %u.%u"), theVersion, dwMajor, dwMinor) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemImage(after, 2,2); + + } + + // ************** + // Processor Type + // ************** + DWORD dwProcessorType ; + + if (m_oxSysInfo.GetProcessorType(&dwProcessorType)) + { + theBuffer.Format(_T(" PROCESSOR ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 11,11); + //// + + theBuffer = _T("Processor: "); + + switch(dwProcessorType) + { + case PROCESSOR_INTEL_386: + theBuffer += _T("Intel 386"); + break ; + + case PROCESSOR_INTEL_486: + theBuffer += _T("Intel 486"); + break ; + + case PROCESSOR_INTEL_PENTIUM: + theBuffer += _T("Intel Pentium"); + break ; + + case PROCESSOR_MIPSR4000: + theBuffer += _T("MIPS R4000"); + break ; + + case PROCESSOR_ALPHA21064: + theBuffer += _T("Alpha 21064"); + break ; + + case PROCESSOR_ALPHA21066: + theBuffer += _T("Alpha 21066"); + break ; + + case PROCESSOR_ALPHA21164: + theBuffer += _T("Alpha 21164"); + break ; + + case PROCESSOR_PPC601: + theBuffer += _T("PowerPC 601"); + break ; + + case PROCESSOR_PPC603: + theBuffer += _T("PowerPC 603"); + break ; + + case PROCESSOR_PPC604: + theBuffer += _T("PowerPC 604"); + break ; + + case PROCESSOR_PPC603PLUS: + theBuffer += _T("PowerPC 603+"); + break ; + + case PROCESSOR_PPC604PLUS: + theBuffer += _T("PowerPC 604+"); + break ; + + case PROCESSOR_PPC620: + theBuffer += _T("PowerPC 620"); + break ; + + default: + theBuffer += _T("UNKNOWN"); + break ; + } + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + } + + // ************** + // Number of CPUs + // ************** + int iNumProcessors ; + if (m_oxSysInfo.GetNumProcessors(&iNumProcessors)) + { + theBuffer.Format(_T("Number of CPUs: %d"), iNumProcessors) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + } + + theBuffer.Format(_T(" COMPUTER ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 6,6); + // + + // ************* + // Computer name + // ************* + if (m_oxSysInfo.GetComputerName(&theString)) + { + theBuffer.Format(_T("Computer Name: %s"), theString) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + // ********* + // User & Domain name + // ********* + if (m_oxSysInfo.GetUserName(&theString)) + { + theBuffer.Format(_T("User Name: %s"), theString) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 9,9); + } + + CString sDomain; + if (m_oxSysInfo.GetUserAndDomainName(&theString, &sDomain)) + { + theBuffer.Format(_T("User Name: %s"), theString) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 9,9); + theBuffer.Format(_T("Domain Name: %s"), sDomain) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 9,9); + } + + // ********** + // IP Address + // ********** + + CStringArray IPArray; + if (m_oxSysInfo.GetListIPAddresses(&IPArray)) + { + for (int j = 0; j < IPArray.GetSize(); j++) + { + theBuffer.Format(_T("IP Address(%d): %s"), j, IPArray[j]); + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 5,5); + } + } + + + theBuffer.Format(_T(" DIRECTORIES ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(hTypeItem, 8,8); + // + + // ***************** + // Windows directory + // ***************** + if (m_oxSysInfo.GetWindowsDir(&theString)) + { + theBuffer.Format(_T("Windows Directory: %s"), theString) ; + after = m_InfoTree.InsertItem(theBuffer,hTypeItem ); + m_InfoTree.SetItemImage(after, 6,6); + } + + // **************** + // System directory + // **************** + if (m_oxSysInfo.GetSystemDir(&theString)) + { + theBuffer.Format(_T("System Directory: %s"), theString) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemImage(after, 6,6); + } + + // ******************* + // Temporary directory + // ******************* + if (m_oxSysInfo.GetTempDir(&theString)) + { + theBuffer.Format(_T("Temp Directory: %s"), theString) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemImage(after, 6,6); + } + + // **************** + // Disk information + // **************** + + theBuffer.Format(_T(" DISK INFORMATION ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + m_InfoTree.SetItemImage(after, 6,6); + // + + int i, iDiskType ; + CString theFileSysType ; + CString theVolName ; + DWORDLONG dwTotalSpace, dwFreeSpace; + DWORD dwVolSer ; + + for(i=0;i<26;i++) + { + if (m_oxSysInfo.GetDriveTypeInfo(i, &theFileSysType, &iDiskType)) + { + if (m_oxSysInfo.GetDriveVolumeInfo(i, &theVolName, &dwVolSer, &dwTotalSpace, &dwFreeSpace)) + { + if (iDiskType == DRIVE_FIXED) + { + theBuffer.Format(_T("Drive %c: Fixed Disk"), i + 65) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + //m_InfoTree.SetItemImage(after, 3,3); + theBuffer.Format(_T(" Volume Name: %s (%s)"), theVolName, + theFileSysType) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemImage(after, 3,3); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + theBuffer.Format(_T(" Volume Serial: %u"), dwVolSer) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemImage(after, 3,3); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + + LPTSTR psBuffer=theBuffer.GetBuffer(256); + UTBStr::stprintf(psBuffer, 256, _T(" Total Space: %I64d "), dwTotalSpace) ; + theBuffer.ReleaseBuffer(); + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + psBuffer=theBuffer.GetBuffer(256); + UTBStr::stprintf(psBuffer, 256,_T(" Total Space: %I64d "), dwFreeSpace) ; + theBuffer.ReleaseBuffer(); + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + } + else + if (iDiskType == DRIVE_CDROM) + { + theBuffer.Format(_T("Drive %c: CD-ROM"), i + 65) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + + theBuffer.Format(_T(" Volume Name: %s (%s)"), theVolName, theFileSysType) ; hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + else + if (iDiskType == DRIVE_REMOTE) + { + theBuffer.Format(_T("Drive %c: Network Disk"), i + 65) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + + theBuffer.Format(_T(" Volume Name: %s (%s)"), theVolName, theFileSysType) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + } + } + } + + theBuffer.Format(_T(" DISPLAY ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + // + + // ****************** + // Display resolution + // ****************** + if (m_oxSysInfo.GetDisplayResolution(&xRes, &yRes)) + { + theBuffer.Format(_T("Display Resolution: %d x %d"), xRes, yRes) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + // ************** + // Display colors + // ************** + int iNumBits ; + DWORDLONG dwNumColors; + + if (m_oxSysInfo.GetDisplayNumColors(&dwNumColors, &iNumBits)) + { + LPTSTR psBuffer=theBuffer.GetBuffer(256); + UTBStr::stprintf(psBuffer, 256,_T("Current Display Colors: %I64d (%d bits)"), + dwNumColors, iNumBits) ; + theBuffer.ReleaseBuffer(); + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + // ****** + // Memory + // ****** + + theBuffer.Format(_T(" MEMORY ")) ; + hTypeItem = m_InfoTree.InsertItem(theBuffer, m_hRootItem); + // + + if (m_oxSysInfo.GetTotalPhysicalMemory(&dwValue)) + { + theBuffer.Format(_T("Total Physical RAM: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + if (m_oxSysInfo.GetFreePhysicalMemory(&dwValue)) + { + theBuffer.Format(_T("Free Physical RAM: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + if (m_oxSysInfo.GetTotalPageFile(&dwValue)) + { + theBuffer.Format(_T("Total Page File: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + if (m_oxSysInfo.GetFreePageFile(&dwValue)) + { + theBuffer.Format(_T("Free Page File: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + if (m_oxSysInfo.GetTotalVirtual(&dwValue)) + { + theBuffer.Format(_T("Total Virtual Memory: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, TVI_DATA_FOLDER); + m_InfoTree.SetItemImage(after, 3,3); + + } + + if (m_oxSysInfo.GetFreeVirtual(&dwValue)) + { + theBuffer.Format(_T("Free Virtual Memory: %u bytes"), dwValue) ; + after = m_InfoTree.InsertItem(theBuffer, hTypeItem); + m_InfoTree.SetItemData(after, (DWORD)3); + m_InfoTree.SetItemImage(after, 3,3); + + } + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.h new file mode 100644 index 0000000..25636d3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/SysInfo1Dlg.h @@ -0,0 +1,59 @@ +// SysInfo1Dlg.h : header file +// + +#if !defined(AFX_SYSINFO1DLG_H__1CD38C29_81E5_11D1_A4E0_0020359647BF__INCLUDED_) +#define AFX_SYSINFO1DLG_H__1CD38C29_81E5_11D1_A4E0_0020359647BF__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXSysInfo.h" +// we will use this value to distinguish a folder from a resource item in the tree view +#define TVI_DATA_FOLDER 0xFFFFFFFF + +///////////////////////////////////////////////////////////////////////////// +// CSysInfo1Dlg dialog + +class CSysInfo1Dlg : public CDialog +{ +// Construction +public: + CSysInfo1Dlg(CWnd* pParent = NULL); // standard constructor + CImageList m_ilFolder; + HTREEITEM m_hRootItem; + +// Dialog Data + //{{AFX_DATA(CSysInfo1Dlg) + enum { IDD = IDD_SYSINFO1_DIALOG }; + CTreeCtrl m_InfoTree; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSysInfo1Dlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation + public: + COXSysInfo m_oxSysInfo ; + void GetSystemInformation() ; + +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CSysInfo1Dlg) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_SYSINFO1DLG_H__1CD38C29_81E5_11D1_A4E0_0020359647BF__INCLUDED_) diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.rc2 new file mode 100644 index 0000000..33d814c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/SysInfo1.rc2 @@ -0,0 +1,13 @@ +// +// SYSINFO1.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/bitmap1.bmp new file mode 100644 index 0000000..eb4e6d7 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/resource.h new file mode 100644 index 0000000..d76c514 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/resource.h @@ -0,0 +1,22 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SysInfo1.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDS_ABOUTBOX 101 +#define IDD_SYSINFO1_DIALOG 102 +#define IDR_MAINFRAME 128 +#define ID_DESCRIPTION_FILE 129 +#define IDB_IMAGELIST 129 +#define IDC_TREE1 1000 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/sysinfoinfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/sysinfoinfo.rtf new file mode 100644 index 0000000..b2ad8eb Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/SysInfo1/sysinfoinfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.CPP new file mode 100644 index 0000000..e5dd089 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.CPP @@ -0,0 +1,82 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame diagnostics + +#ifdef _DEBUG +void CChildFrame::AssertValid() const +{ + CMDIChildWnd::AssertValid(); +} + +void CChildFrame::Dump(CDumpContext& dc) const +{ + CMDIChildWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame message handlers + +BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT /* lpcs */, CCreateContext* pContext) +{ + return m_wndSplitter.Create(this, + 2, 2, // TODO: adjust the number of rows, columns + CSize(10, 10), // TODO: adjust the minimum pane size + pContext); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.H new file mode 100644 index 0000000..fb07098 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/CHILDFRM.H @@ -0,0 +1,54 @@ +// ChildFrm.h : interface of the CChildFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +protected: + CSplitterWnd m_wndSplitter; +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.CPP new file mode 100644 index 0000000..cb6e81c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.CPP @@ -0,0 +1,127 @@ +// IpFrame.cpp : implementation of the CInPlaceFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "IpFrame.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CInPlaceFrame + +IMPLEMENT_DYNCREATE(CInPlaceFrame, COleIPFrameWnd) + +BEGIN_MESSAGE_MAP(CInPlaceFrame, COleIPFrameWnd) + //{{AFX_MSG_MAP(CInPlaceFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP + // Global help commands + ON_COMMAND(ID_HELP_FINDER, COleIPFrameWnd::OnHelpFinder) + ON_COMMAND(ID_HELP, COleIPFrameWnd::OnHelp) + ON_COMMAND(ID_DEFAULT_HELP, COleIPFrameWnd::OnHelpFinder) + ON_COMMAND(ID_CONTEXT_HELP, COleIPFrameWnd::OnContextHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CInPlaceFrame construction/destruction + +CInPlaceFrame::CInPlaceFrame() +{ +} + +CInPlaceFrame::~CInPlaceFrame() +{ +} + +int CInPlaceFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (COleIPFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + // CResizeBar implements in-place resizing. + if (!m_wndResizeBar.Create(this)) + { + TRACE0("Failed to create resize bar\n"); + return -1; // fail to create + } + + // By default, it is a good idea to register a drop-target that does + // nothing with your frame window. This prevents drops from + // "falling through" to a container that supports drag-drop. + m_dropTarget.Register(this); + + return 0; +} + +// OnCreateControlBars is called by the framework to create control bars on the +// container application's windows. pWndFrame is the top level frame window of +// the container and is always non-NULL. pWndDoc is the doc level frame window +// and will be NULL when the container is an SDI application. A server +// application can place MFC control bars on either window. +BOOL CInPlaceFrame::OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc) +{ + UNREFERENCED_PARAMETER(pWndDoc); + // Set owner to this window, so messages are delivered to correct app + m_wndToolBar.SetOwner(this); + + // Create toolbar on client's frame window + if (!m_wndToolBar.Create(pWndFrame) || + !m_wndToolBar.LoadToolBar(IDR_SCRIBBTYPE_SRVR_IP)) + { + TRACE0("Failed to create toolbar\n"); + return FALSE; + } + + // TODO: Remove this if you don't want tool tips + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + pWndFrame->EnableDocking(CBRS_ALIGN_ANY); + pWndFrame->DockControlBar(&m_wndToolBar); + + + return TRUE; +} + +BOOL CInPlaceFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return COleIPFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CInPlaceFrame diagnostics + +#ifdef _DEBUG +void CInPlaceFrame::AssertValid() const +{ + COleIPFrameWnd::AssertValid(); +} + +void CInPlaceFrame::Dump(CDumpContext& dc) const +{ + COleIPFrameWnd::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CInPlaceFrame commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.H new file mode 100644 index 0000000..99a84b7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/IPFRAME.H @@ -0,0 +1,56 @@ +// IpFrame.h : interface of the CInPlaceFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +class CInPlaceFrame : public COleIPFrameWnd +{ + DECLARE_DYNCREATE(CInPlaceFrame) +public: + CInPlaceFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CInPlaceFrame) + public: + virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CInPlaceFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CToolBar m_wndToolBar; + COleResizeBar m_wndResizeBar; + COleDropTarget m_dropTarget; + +// Generated message map functions +protected: + //{{AFX_MSG(CInPlaceFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.CPP new file mode 100644 index 0000000..bb4798b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.CPP @@ -0,0 +1,121 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP + ON_COMMAND(ID_HELP_FINDER, CMDIFrameWnd::OnHelpFinder) + ON_COMMAND(ID_HELP, CMDIFrameWnd::OnHelp) + ON_COMMAND(ID_CONTEXT_HELP, CMDIFrameWnd::OnContextHelp) + ON_COMMAND(ID_DEFAULT_HELP, CMDIFrameWnd::OnHelpFinder) +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.Create(this) || + !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: Remove this if you don't want tool tips + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.H new file mode 100644 index 0000000..4eb7f19 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/MAINFRM.H @@ -0,0 +1,54 @@ +// MainFrm.h : interface of the CMainFrame class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.CPP new file mode 100644 index 0000000..783636b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.CPP @@ -0,0 +1,64 @@ +// PenDlg.cpp : implementation file +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" +#include "PenDlg.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPenWidthsDlg dialog + + +CPenWidthsDlg::CPenWidthsDlg(CWnd* pParent /*=NULL*/) + : CDialog(CPenWidthsDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CPenWidthsDlg) + m_nThinWidth = 0; + m_nThickWidth = 0; + //}}AFX_DATA_INIT +} + + +void CPenWidthsDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPenWidthsDlg) + DDX_Text(pDX, IDC_THIN_PEN_WIDTH, m_nThinWidth); + DDV_MinMaxInt(pDX, m_nThinWidth, 1, 20); + DDX_Text(pDX, IDC_THICK_PEN_WIDTH, m_nThickWidth); + DDV_MinMaxInt(pDX, m_nThickWidth, 1, 20); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPenWidthsDlg, CDialog) + //{{AFX_MSG_MAP(CPenWidthsDlg) + ON_BN_CLICKED(IDC_DEFAULT_PEN_WIDTHS, OnDefaultPenWidths) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPenWidthsDlg message handlers + +void CPenWidthsDlg::OnDefaultPenWidths() +{ + m_nThinWidth = 2; + m_nThickWidth = 5; + UpdateData(FALSE); // causes DoDataExchange() + // bSave=FALSE means don't save from screen, + // rather, write to screen +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.H new file mode 100644 index 0000000..e942045 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/PENDLG.H @@ -0,0 +1,45 @@ +// PenDlg.h : header file +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +///////////////////////////////////////////////////////////////////////////// +// CPenWidthsDlg dialog + +class CPenWidthsDlg : public CDialog +{ +// Construction +public: + CPenWidthsDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CPenWidthsDlg) + enum { IDD = IDD_PEN_WIDTHS }; + int m_nThinWidth; + int m_nThickWidth; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPenWidthsDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CPenWidthsDlg) + afx_msg void OnDefaultPenWidths(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.H new file mode 100644 index 0000000..7d9a0b0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.H @@ -0,0 +1,50 @@ +// Scribble.h : main header file for the SCRIBBLE application +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp: +// See Scribble.cpp for the implementation of this class +// + +class CScribbleApp : public CWinApp +{ +public: + CScribbleApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScribbleApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + COleTemplateServer m_server; + // Server object for document creation + + //{{AFX_MSG(CScribbleApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.REG b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.REG new file mode 100644 index 0000000..e5afb86 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBBLE.REG @@ -0,0 +1,30 @@ +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\.SCB = Scribble.Document +HKEY_CLASSES_ROOT\Scribble.Document\shell\open\command = SCRIBBLE.EXE %1 +HKEY_CLASSES_ROOT\Scribble.Document\shell\open\ddeexec = [open("%1")] +HKEY_CLASSES_ROOT\Scribble.Document\shell\open\ddeexec\application = SCRIBBLE + ; note: the application is optional + ; (it defaults to the app name in "command") + +HKEY_CLASSES_ROOT\Scribble.Document = Scribb Document +HKEY_CLASSES_ROOT\Scribble.Document\protocol\StdFileEditing\server = SCRIBBLE.EXE +HKEY_CLASSES_ROOT\Scribble.Document\protocol\StdFileEditing\verb\0 = &Edit +HKEY_CLASSES_ROOT\Scribble.Document\Insertable = +HKEY_CLASSES_ROOT\Scribble.Document\CLSID = {AF8A8120-9BA5-11CE-B0F0-00AA006C28B3} + +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3} = Scribb Document +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\DefaultIcon = SCRIBBLE.EXE,1 +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\LocalServer32 = SCRIBBLE.EXE +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\ProgId = Scribble.Document +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\MiscStatus = 32 +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\AuxUserType\3 = Scribble +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\AuxUserType\2 = Scribb +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\Insertable = +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\verb\1 = &Open,0,2 +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\verb\0 = &Edit,0,2 +HKEY_CLASSES_ROOT\CLSID\{AF8A8120-9BA5-11CE-B0F0-00AA006C28B3}\InprocHandler32 = ole32.dll diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.CPP new file mode 100644 index 0000000..5292a52 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.CPP @@ -0,0 +1,125 @@ +// ScribItm.cpp : implementation of the CScribbleItem class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "ScribDoc.h" +#include "ScribItm.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribbleItem implementation + +IMPLEMENT_DYNAMIC(CScribbleItem, COleServerItem) + +CScribbleItem::CScribbleItem(CScribbleDoc* pContainerDoc) + : COleServerItem(pContainerDoc, TRUE) +{ + // TODO: add one-time construction code here + // (eg, adding additional clipboard formats to the item's data source) +} + +CScribbleItem::~CScribbleItem() +{ + // TODO: add cleanup code here +} + +void CScribbleItem::Serialize(CArchive& ar) +{ + // CScribbleItem::Serialize will be called by the framework if + // the item is copied to the clipboard. This can happen automatically + // through the OLE callback OnGetClipboardData. A good default for + // the embedded item is simply to delegate to the document's Serialize + // function. If you support links, then you will want to serialize + // just a portion of the document. + + if (!IsLinkedItem()) + { + CScribbleDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + pDoc->Serialize(ar); + } +} + +BOOL CScribbleItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize) +{ + // Most applications, like this one, only handle drawing the content + // aspect of the item. If you wish to support other aspects, such + // as DVASPECT_THUMBNAIL (by overriding OnDrawEx), then this + // implementation of OnGetExtent should be modified to handle the + // additional aspect(s). + + if (dwDrawAspect != DVASPECT_CONTENT) + return COleServerItem::OnGetExtent(dwDrawAspect, rSize); + + // CScribbleItem::OnGetExtent is called to get the extent in + // HIMETRIC units of the entire item. The default implementation + // here simply returns a hard-coded number of units. + + CScribbleDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + rSize = pDoc->GetDocSize(); + CClientDC dc(NULL); + + // use a mapping mode based on logical units + // (we can't use MM_LOENGLISH because MM_LOENGLISH uses physical inches) + dc.SetMapMode(MM_ANISOTROPIC); + dc.SetViewportExt(dc.GetDeviceCaps(LOGPIXELSX), dc.GetDeviceCaps(LOGPIXELSY)); + dc.SetWindowExt(100, -100); + dc.LPtoHIMETRIC(&rSize); + + return TRUE; +} + +BOOL CScribbleItem::OnDraw(CDC* pDC, CSize& /* rSize */) +{ + CScribbleDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + pDC->SetMapMode(MM_ANISOTROPIC); + CSize sizeDoc = pDoc->GetDocSize(); + sizeDoc.cy = -sizeDoc.cy; + pDC->SetWindowOrg(0,0); + pDC->SetWindowExt(sizeDoc); + + CTypedPtrList& strokeList = pDoc->m_strokeList; + POSITION pos = strokeList.GetHeadPosition(); + while (pos != NULL) + { + strokeList.GetNext(pos)->DrawStroke(pDC); + } + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleItem diagnostics + +#ifdef _DEBUG +void CScribbleItem::AssertValid() const +{ + COleServerItem::AssertValid(); +} + +void CScribbleItem::Dump(CDumpContext& dc) const +{ + COleServerItem::Dump(dc); +} +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.H new file mode 100644 index 0000000..1e88ebc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBITM.H @@ -0,0 +1,45 @@ +// ScribItm.h : interface of the CScribbleItem class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +class CScribbleItem : public COleServerItem +{ + DECLARE_DYNAMIC(CScribbleItem) + +// Constructors +public: + CScribbleItem(CScribbleDoc* pContainerDoc); + +// Attributes + CScribbleDoc* GetDocument() const + { return (CScribbleDoc*)COleServerItem::GetDocument(); } + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScribbleItem) + public: + virtual BOOL OnDraw(CDC* pDC, CSize& rSize); + virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize); + //}}AFX_VIRTUAL + +// Implementation +public: + ~CScribbleItem(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + virtual void Serialize(CArchive& ar); // overridden for document i/o +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBVW.H b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBVW.H new file mode 100644 index 0000000..0d0e74e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/SCRIBVW.H @@ -0,0 +1,77 @@ +// ScribVw.h : interface of the CScribbleView class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. +///////////////////////////////////////////////////////////////////////////// + +class CScribbleView : public CScrollView +{ +protected: // create from serialization only + CScribbleView(); + DECLARE_DYNCREATE(CScribbleView) + +// Attributes +public: + CScribbleDoc* GetDocument(); + +protected: + CStroke* m_pStrokeCur; // the stroke in progress + CPoint m_ptPrev; // the last mouse pt in the stroke in progress + +// Operations +public: + void ResyncScrollSizes(); // ensure scroll info is up-to-date + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScribbleView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + void PrintTitlePage(CDC* pDC, CPrintInfo* pInfo); + void PrintPageHeader(CDC* pDC, CPrintInfo* pInfo, CString& strHeader); + virtual ~CScribbleView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CScribbleView) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnCancelEditSrvr(); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ScribVw.cpp +inline CScribbleDoc* CScribbleView::GetDocument() + { return (CScribbleDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/STDAFX.CPP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/STDAFX.CPP new file mode 100644 index 0000000..e01ea84 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/STDAFX.CPP @@ -0,0 +1,16 @@ +// stdafx.cpp : source file that includes just the standard includes +// Scribble.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.clw new file mode 100644 index 0000000..e6c1d36 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.clw @@ -0,0 +1,397 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CScribbleApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "scribble.h" +LastPage=0 + +ClassCount=7 +Class1=CChildFrame +Class2=CInPlaceFrame +Class3=CMainFrame +Class4=CPenWidthsDlg +Class5=CScribbleApp +Class6=CScribbleView +Class7=CScribbleDoc + +ResourceCount=9 +Resource1=IDR_SCRIBBTYPE_SRVR_EMB (_MAC) +Resource2=IDR_SCRIBBTYPE +Resource3=IDR_SCRIBBTYPE (_MAC) +Resource4=IDR_SCRIBBTYPE_SRVR_IP (_MAC) +Resource5=IDR_MAINFRAME +Resource6=IDR_MAINFRAME (_MAC) +Resource7=IDR_SCRIBBTYPE_SRVR_EMB +Resource8=IDR_SCRIBBTYPE_SRVR_IP +Resource9=IDD_PEN_WIDTHS + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=CHILDFRM.H +ImplementationFile=CHILDFRM.CPP + +[CLS:CInPlaceFrame] +Type=0 +BaseClass=COleIPFrameWnd +HeaderFile=IPFRAME.H +ImplementationFile=IPFRAME.CPP + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MAINFRM.H +ImplementationFile=MAINFRM.CPP +LastObject=ID_FILE_SEND_MAIL +Filter=T + +[CLS:CPenWidthsDlg] +Type=0 +BaseClass=CDialog +HeaderFile=PENDLG.H +ImplementationFile=PENDLG.CPP + +[CLS:CScribbleApp] +Type=0 +BaseClass=CWinApp +HeaderFile=SCRIBBLE.H +ImplementationFile=SCRIBBLE.CPP +Filter=N +VirtualFilter=AC +LastObject=CScribbleApp + +[CLS:CScribbleDoc] +Type=0 +BaseClass=COleServerDoc +HeaderFile=Scribdoc.h +ImplementationFile=Scribdoc.cpp +Filter=N +LastObject=ID_FILE_SEND_MAIL + +[CLS:CScribbleView] +Type=0 +BaseClass=CScrollView +HeaderFile=SCRIBVW.H +ImplementationFile=Scribvw.cpp + +[DLG:IDD_PEN_WIDTHS] +Type=1 +Class=CPenWidthsDlg +ControlCount=7 +Control1=IDOK,button,1342242817 +Control2=IDCANCEL,button,1342242816 +Control3=IDC_DEFAULT_PEN_WIDTHS,button,1342242816 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_STATIC,static,1342308352 +Control6=IDC_THIN_PEN_WIDTH,edit,1350631552 +Control7=IDC_THICK_PEN_WIDTH,edit,1350631552 + +[MNU:IDR_SCRIBBTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_SEND_MAIL +Command10=ID_FILE_MRU_FILE1 +Command11=ID_APP_EXIT +Command12=ID_EDIT_UNDO +Command13=ID_EDIT_REDO +Command14=ID_EDIT_CLEAR_ALL +Command15=ID_PEN_THICK_OR_THIN +Command16=ID_PEN_WIDTHS +Command17=ID_VIEW_TOOLBAR +Command18=ID_VIEW_STATUS_BAR +Command19=ID_WINDOW_NEW +Command20=ID_WINDOW_CASCADE +Command21=ID_WINDOW_TILE_HORZ +Command22=ID_WINDOW_ARRANGE +Command23=ID_HELP_FINDER +Command24=ID_APP_ABOUT +CommandCount=24 + +[TB:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_PEN_THICK_OR_THIN +Command5=ID_FILE_PRINT +Command6=ID_APP_ABOUT +Command7=ID_CONTEXT_HELP +CommandCount=7 + +[TB:IDR_SCRIBBTYPE_SRVR_IP] +Type=1 +Class=? +Command1=ID_PEN_THICK_OR_THIN +Command2=ID_APP_ABOUT +Command3=ID_CONTEXT_HELP +CommandCount=3 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_HELP_FINDER +Command9=ID_APP_ABOUT +CommandCount=9 + +[MNU:IDR_SCRIBBTYPE_SRVR_EMB] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_UPDATE +Command5=ID_FILE_SAVE_COPY_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_SEND_MAIL +Command10=ID_FILE_MRU_FILE1 +Command11=ID_APP_EXIT +Command12=ID_EDIT_UNDO +Command13=ID_EDIT_REDO +Command14=ID_EDIT_CLEAR_ALL +Command15=ID_PEN_THICK_OR_THIN +Command16=ID_PEN_WIDTHS +Command17=ID_VIEW_TOOLBAR +Command18=ID_VIEW_STATUS_BAR +Command19=ID_WINDOW_NEW +Command20=ID_WINDOW_CASCADE +Command21=ID_WINDOW_TILE_HORZ +Command22=ID_WINDOW_ARRANGE +Command23=ID_HELP_FINDER +Command24=ID_APP_ABOUT +CommandCount=24 + +[MNU:IDR_SCRIBBTYPE_SRVR_IP] +Type=1 +Class=? +Command1=ID_EDIT_UNDO +Command2=ID_EDIT_REDO +Command3=ID_EDIT_CLEAR_ALL +Command4=ID_PEN_THICK_OR_THIN +Command5=ID_PEN_WIDTHS +Command6=ID_VIEW_TOOLBAR +Command7=ID_HELP_FINDER +Command8=ID_APP_ABOUT +CommandCount=8 + +[MNU:IDR_MAINFRAME (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_HELP_FINDER +CommandCount=8 + +[MNU:IDR_SCRIBBTYPE (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT_SETUP +Command7=ID_FILE_PRINT +Command8=ID_FILE_PRINT_PREVIEW +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CLEAR_ALL +Command13=ID_PEN_THICK_OR_THIN +Command14=ID_PEN_WIDTHS +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_HELP_FINDER +CommandCount=20 + +[MNU:IDR_SCRIBBTYPE_SRVR_EMB (_MAC)] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_UPDATE +Command5=ID_FILE_SAVE_COPY_AS +Command6=ID_FILE_PRINT_SETUP +Command7=ID_FILE_PRINT +Command8=ID_FILE_PRINT_PREVIEW +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CLEAR_ALL +Command13=ID_PEN_THICK_OR_THIN +Command14=ID_PEN_WIDTHS +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_WINDOW_NEW +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_HELP_FINDER +CommandCount=20 + +[MNU:IDR_SCRIBBTYPE_SRVR_IP (_MAC)] +Type=1 +Class=? +Command1=ID_EDIT_UNDO +Command2=ID_EDIT_CLEAR_ALL +Command3=ID_PEN_THICK_OR_THIN +Command4=ID_PEN_WIDTHS +Command5=ID_VIEW_TOOLBAR +Command6=ID_HELP_FINDER +CommandCount=6 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_PRINT +Command5=ID_FILE_SAVE +Command6=ID_EDIT_PASTE +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_HELP +Command10=ID_CONTEXT_HELP +Command11=ID_NEXT_PANE +Command12=ID_PREV_PANE +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_EDIT_CUT +Command16=ID_EDIT_REDO +Command17=ID_EDIT_UNDO +CommandCount=17 + +[ACL:IDR_SCRIBBTYPE_SRVR_EMB] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_PRINT +Command5=ID_FILE_UPDATE +Command6=ID_EDIT_PASTE +Command7=ID_EDIT_UNDO +Command8=ID_EDIT_CUT +Command9=ID_HELP +Command10=ID_CONTEXT_HELP +Command11=ID_NEXT_PANE +Command12=ID_PREV_PANE +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_EDIT_CUT +Command16=ID_EDIT_REDO +Command17=ID_EDIT_UNDO +CommandCount=17 + +[ACL:IDR_SCRIBBTYPE_SRVR_IP] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_EDIT_PASTE +Command3=ID_EDIT_UNDO +Command4=ID_EDIT_CUT +Command5=ID_CANCEL_EDIT_SRVR +Command6=ID_HELP +Command7=ID_CONTEXT_HELP +Command8=ID_EDIT_COPY +Command9=ID_EDIT_PASTE +Command10=ID_EDIT_CUT +Command11=ID_EDIT_REDO +Command12=ID_EDIT_UNDO +CommandCount=12 + +[ACL:IDR_MAINFRAME (_MAC)] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_PRINT +Command5=ID_APP_EXIT +Command6=ID_FILE_SAVE +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_HELP +Command11=ID_CONTEXT_HELP +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +Command14=ID_EDIT_COPY +Command15=ID_EDIT_PASTE +Command16=ID_FILE_CLOSE +Command17=ID_EDIT_CUT +Command18=ID_EDIT_REDO +Command19=ID_EDIT_UNDO +Command20=ID_EDIT_UNDO +CommandCount=20 + +[ACL:IDR_SCRIBBTYPE_SRVR_IP (_MAC)] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_EDIT_PASTE +Command3=ID_EDIT_UNDO +Command4=ID_EDIT_CUT +Command5=ID_CANCEL_EDIT_SRVR +Command6=ID_HELP +Command7=ID_CONTEXT_HELP +Command8=ID_EDIT_COPY +Command9=ID_EDIT_PASTE +Command10=ID_EDIT_CUT +Command11=ID_EDIT_REDO +Command12=ID_EDIT_UNDO +CommandCount=12 + +[ACL:IDR_SCRIBBTYPE_SRVR_EMB (_MAC)] +Type=1 +Class=? +Command1=ID_EDIT_COPY +Command2=ID_FILE_NEW +Command3=ID_FILE_OPEN +Command4=ID_FILE_PRINT +Command5=ID_APP_EXIT +Command6=ID_FILE_UPDATE +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_HELP +Command11=ID_CONTEXT_HELP +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +Command14=ID_EDIT_COPY +Command15=ID_EDIT_PASTE +Command16=ID_FILE_CLOSE +Command17=ID_EDIT_CUT +Command18=ID_EDIT_REDO +Command19=ID_EDIT_UNDO +CommandCount=19 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.cpp new file mode 100644 index 0000000..4cf9acf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.cpp @@ -0,0 +1,173 @@ +// Scribble.cpp : Defines the class behaviors for the application. +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" +#include "UTsampleabout.h" +#include "MainFrm.h" +#include "ChildFrm.h" +#include "IpFrame.h" +#include "ScribDoc.h" +#include "ScribVw.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp + +BEGIN_MESSAGE_MAP(CScribbleApp, CWinApp) + //{{AFX_MSG_MAP(CScribbleApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp construction + +CScribbleApp::CScribbleApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CScribbleApp object + +CScribbleApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +// This identifier was generated to be statistically unique for your app. +// You may change it if you prefer to choose a specific identifier. + +// {7559FD90-9B93-11CE-B0F0-00AA006C28B3} +static const CLSID clsid = +{ 0x7559fd90, 0x9b93, 0x11ce, { 0xb0, 0xf0, 0x0, 0xaa, 0x0, 0x6c, 0x28, 0xb3 } }; + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp initialization + +BOOL CScribbleApp::InitInstance() +{ + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // 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. + + LoadStdProfileSettings(); // 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_SCRIBBTYPE, + RUNTIME_CLASS(CScribbleDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CScribbleView)); + + pDocTemplate->SetServerInfo( + IDR_SCRIBBTYPE_SRVR_EMB, IDR_SCRIBBTYPE_SRVR_IP, + RUNTIME_CLASS(CInPlaceFrame)); + + AddDocTemplate(pDocTemplate); + // Connect the COleTemplateServer to the document template. + // The COleTemplateServer creates new documents on behalf + // of requesting OLE containers by using information + // specified in the document template. + m_server.ConnectTemplate(clsid, pDocTemplate, FALSE); + + // Register all OLE server factories as running. This enables the + // OLE libraries to create objects from other applications. + COleTemplateServer::RegisterAll(); + // Note: MDI applications register all server objects without regard + // to the /Embedding or /Automation on the command line. + + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Enable drag/drop open. We don't call this in Win32, since a + // document file extension wasn't chosen while running AppWizard. + m_pMainWnd->DragAcceptFiles(); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Check to see if launched as OLE server + if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated) + { + // Application was run with /Embedding or /Automation. Don't show the + // main window in this case. + return TRUE; + } + + // When a server application is launched stand-alone, it is a good idea + // to update the system registry in case it has been damaged. + m_server.UpdateRegistry(OAT_INPLACE_SERVER); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CScribbleApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleApp commands + +int CScribbleApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.rc new file mode 100644 index 0000000..81b8427 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribble.rc @@ -0,0 +1,830 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#include ""res\\Scribble.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" + "#include ""OXUndo.rc""\r\n" + "#include ""UTsampleAbout.rc""\r\n" + "\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 DISCARDABLE "res\\Scribble.ico" +IDR_SCRIBBTYPE ICON DISCARDABLE "res\\ScribDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDR_SCRIBBTYPE_SRVR_IP BITMAP MOVEABLE PURE "res\\itoolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_FILE_NEW + BUTTON ID_FILE_OPEN + BUTTON ID_FILE_SAVE + SEPARATOR + BUTTON ID_PEN_THICK_OR_THIN + SEPARATOR + BUTTON ID_FILE_PRINT + BUTTON ID_APP_ABOUT + BUTTON ID_CONTEXT_HELP +END + +IDR_SCRIBBTYPE_SRVR_IP TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_PEN_THICK_OR_THIN + SEPARATOR + BUTTON ID_APP_ABOUT + BUTTON ID_CONTEXT_HELP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "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 "&Help Topics", ID_HELP_FINDER + MENUITEM SEPARATOR + MENUITEM "&About Scribble...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_SCRIBBTYPE MENU PRELOAD DISCARDABLE +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 "Sen&d...", ID_FILE_SEND_MAIL + 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 "Redo\tCtrl+Y", ID_EDIT_REDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + 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 "&Help Topics", ID_HELP_FINDER + MENUITEM SEPARATOR + MENUITEM "&About Scribble...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_SCRIBBTYPE_SRVR_EMB MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "&Update\tCtrl+S", ID_FILE_UPDATE + MENUITEM "Save Copy &As...", ID_FILE_SAVE_COPY_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 "Sen&d...", ID_FILE_SEND_MAIL + 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 "Redo\tCtrl+Y", ID_EDIT_REDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + 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 "&Help Topics", ID_HELP_FINDER + MENUITEM SEPARATOR + MENUITEM "&About Scribble...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_SCRIBBTYPE_SRVR_IP MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO + MENUITEM "Redo\tCtrl+Y", ID_EDIT_REDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + END + MENUITEM SEPARATOR + MENUITEM SEPARATOR + POPUP "&Help" + BEGIN + MENUITEM "&Help Topics", ID_HELP_FINDER + MENUITEM SEPARATOR + MENUITEM "&About Scribble...", ID_APP_ABOUT + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) MENU PRELOAD DISCARDABLE +#else +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Page Setup...", ID_FILE_PRINT_SETUP + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "Quit\t\021Q", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help", HELP + BEGIN + MENUITEM "&Help Topics", ID_HELP_FINDER + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_SCRIBBTYPE$(_MAC) MENU PRELOAD DISCARDABLE +#else +IDR_SCRIBBTYPE MENU PRELOAD DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Save\t\021S", ID_FILE_SAVE + MENUITEM "Save &As...", ID_FILE_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "Page Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM "Print Pre&view", ID_FILE_PRINT_PREVIEW + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + 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 + END + POPUP "&Help", HELP + BEGIN + MENUITEM "&Help Topics", ID_HELP_FINDER + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_SCRIBBTYPE_SRVR_EMB$(_MAC) MENU PRELOAD DISCARDABLE +#else +IDR_SCRIBBTYPE_SRVR_EMB MENU PRELOAD DISCARDABLE +#endif +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\t\021N", ID_FILE_NEW + MENUITEM "&Open...\t\021O", ID_FILE_OPEN + MENUITEM "&Close\t\021W", ID_FILE_CLOSE + MENUITEM "&Update\t\021S", ID_FILE_UPDATE + MENUITEM "Save Copy &As...", ID_FILE_SAVE_COPY_AS + MENUITEM SEPARATOR + MENUITEM "Page Setup...", ID_FILE_PRINT_SETUP + MENUITEM "&Print...\t\021P", ID_FILE_PRINT + MENUITEM "Print Pre&view", ID_FILE_PRINT_PREVIEW + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "Quit\t\021Q", ID_APP_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + 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 + END + POPUP "&Help", HELP + BEGIN + MENUITEM "&Help Topics", ID_HELP_FINDER + END +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_SCRIBBTYPE_SRVR_IP$(_MAC) MENU PRELOAD DISCARDABLE +#else +IDR_SCRIBBTYPE_SRVR_IP MENU PRELOAD DISCARDABLE +#endif +BEGIN + POPUP "&Edit" + BEGIN + MENUITEM "&Undo\t\021Z", ID_EDIT_UNDO + MENUITEM SEPARATOR + MENUITEM "Clear &All", ID_EDIT_CLEAR_ALL + END + POPUP "&Pen" + BEGIN + MENUITEM "Thick &Line", ID_PEN_THICK_OR_THIN + MENUITEM "Pen &Widths...", ID_PEN_WIDTHS + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + END + MENUITEM SEPARATOR + MENUITEM SEPARATOR + POPUP "&Help", HELP + BEGIN + MENUITEM "&Help Topics", ID_HELP_FINDER + END +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_SCRIBBTYPE_SRVR_EMB ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT + "S", ID_FILE_UPDATE, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || !defined(_MAC) +IDR_SCRIBBTYPE_SRVR_IP ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_ESCAPE, ID_CANCEL_EDIT_SRVR, VIRTKEY, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_MAINFRAME$(_MAC) ACCELERATORS PRELOAD MOVEABLE PURE +#else +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +#endif +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SAVE, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_SCRIBBTYPE_SRVR_IP$(_MAC) ACCELERATORS PRELOAD MOVEABLE PURE +#else +IDR_SCRIBBTYPE_SRVR_IP ACCELERATORS PRELOAD MOVEABLE PURE +#endif +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_ESCAPE, ID_CANCEL_EDIT_SRVR, VIRTKEY, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT +END +#endif + +#if defined(APSTUDIO_INVOKED) || defined(_MAC) +#if defined(APSTUDIO_INVOKED) +IDR_SCRIBBTYPE_SRVR_EMB$(_MAC) ACCELERATORS PRELOAD MOVEABLE PURE +#else +IDR_SCRIBBTYPE_SRVR_EMB ACCELERATORS PRELOAD MOVEABLE PURE +#endif +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + "N", ID_FILE_NEW, VIRTKEY, ALT, NOINVERT + "O", ID_FILE_OPEN, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PRINT, VIRTKEY, ALT, NOINVERT + "Q", ID_APP_EXIT, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_UPDATE, VIRTKEY, ALT, NOINVERT + "V", ID_EDIT_PASTE, VIRTKEY, ALT, NOINVERT + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F1, ID_CONTEXT_HELP, VIRTKEY, SHIFT, NOINVERT + VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, ALT, NOINVERT + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT + "W", ID_FILE_CLOSE, VIRTKEY, ALT, NOINVERT + "X", ID_EDIT_CUT, VIRTKEY, ALT, NOINVERT + "Y", ID_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT + "Z", ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT +END +#endif + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_PEN_WIDTHS DIALOG DISCARDABLE 0, 0, 203, 65 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Pen Widths" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,148,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,148,24,50,14 + PUSHBUTTON "Default",IDC_DEFAULT_PEN_WIDTHS,148,41,50,14 + LTEXT "Thin Pen Width:",IDC_STATIC,10,12,70,10 + LTEXT "Thick Pen Width:",IDC_STATIC,10,33,70,10 + EDITTEXT IDC_THIN_PEN_WIDTH,86,12,40,13,ES_AUTOHSCROLL + EDITTEXT IDC_THICK_PEN_WIDTH,86,33,40,13,ES_AUTOHSCROLL +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SCRIBBLE MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SCRIBBLE\0" + VALUE "LegalCopyright", "Copyright © 1997\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "SCRIBBLE.EXE\0" + VALUE "ProductName", "SCRIBBLE Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_PEN_WIDTHS, DIALOG + BEGIN + LEFTMARGIN, 10 + RIGHTMARGIN, 198 + VERTGUIDE, 1 + TOPMARGIN, 7 + BOTTOMMARGIN, 55 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Scribble" + IDR_SCRIBBTYPE "\nScribb\nScribb\nScribble Files (*.scb)\n.SCB\nScribble.Document\nScribb Document\nSCRI\nScribble Files" + ID_DESCRIPTION_FILE "UndoInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Scribble" + AFX_IDS_IDLEMESSAGE "For Help, press F1" + AFX_IDS_HELPMODEMESSAGE "Select an object on which to get Help" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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_FILE_UPDATE "Update the container to show any changes\nUpdate" + ID_FILE_SAVE_COPY_AS "Save a copy of the active document with a new name\nSave Copy" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" + ID_HELP_INDEX "Opens Help\nHelp Topics" + ID_HELP_FINDER "List Help topics\nHelp Topics" + ID_HELP_USING "Display instructions about how to use help\nHelp" + ID_CONTEXT_HELP "Display help for clicked on buttons, menus and windows\nHelp" + ID_HELP "Display help for current task or command\nHelp" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_EDIT_CLEAR "Erase the selection\nErase" + ID_EDIT_CLEAR_ALL "Clears the drawing" + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_DESKACCESSORY "Opens the selected item" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_PEN_THICK_OR_THIN "Toggles the line thickness between thin and thick\nToggle pen" + ID_PEN_WIDTHS "Sets the size of the thin and thick pen" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#include "res\Scribble.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#include "afxprint.rc" // printing/print preview resources +#include "OXUndo.rc" +#include "UTsampleAbout.rc" + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.cpp new file mode 100644 index 0000000..758192c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.cpp @@ -0,0 +1,338 @@ +// ScribDoc.cpp : implementation of the CScribbleDoc class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "ScribDoc.h" +#include "ScribItm.h" +#include "PenDlg.h" +#include "ScribVw.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribbleDoc + +IMPLEMENT_DYNCREATE(CScribbleDoc, COleServerDoc) + +BEGIN_MESSAGE_MAP(CScribbleDoc, COleServerDoc) + //{{AFX_MSG_MAP(CScribbleDoc) + ON_COMMAND(ID_EDIT_CLEAR_ALL, OnEditClearAll) + ON_COMMAND(ID_PEN_THICK_OR_THIN, OnPenThickOrThin) + ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR_ALL, OnUpdateEditClearAll) + ON_UPDATE_COMMAND_UI(ID_PEN_THICK_OR_THIN, OnUpdatePenThickOrThin) + ON_COMMAND(ID_PEN_WIDTHS, OnPenWidths) + ON_COMMAND(ID_EDIT_COPY, OnEditCopy) + ON_COMMAND(ID_EDIT_UNDO, OnEditUndo) + ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateEditUndo) + ON_COMMAND(ID_EDIT_REDO, OnEditRedo) + ON_UPDATE_COMMAND_UI(ID_EDIT_REDO, OnUpdateEditRedo) + //}}AFX_MSG_MAP +#ifndef _MAC + ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail) + ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail) +#endif +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScribbleDoc construction/destruction + +CScribbleDoc::CScribbleDoc() : COXUndo(10, 32768, TRUE) +{ + // Use OLE compound files + EnableCompoundFile(); + + m_sizeDoc = CSize(200, 200); +} + +CScribbleDoc::~CScribbleDoc() +{ +} + +BOOL CScribbleDoc::OnNewDocument() +{ + if (!COleServerDoc::OnNewDocument()) + return FALSE; + InitDocument(); + CheckPoint(); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleDoc serialization + +void CScribbleDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + ar << m_sizeDoc; + } + else + { + ar >> m_sizeDoc; + } + m_strokeList.Serialize(ar); +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleDoc diagnostics + +#ifdef _DEBUG +void CScribbleDoc::AssertValid() const +{ + COleServerDoc::AssertValid(); +} + +void CScribbleDoc::Dump(CDumpContext& dc) const +{ + COleServerDoc::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScribbleDoc commands + +BOOL CScribbleDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + if (!COleServerDoc::OnOpenDocument(lpszPathName)) + return FALSE; + InitDocument(); + CheckPoint(); + return TRUE; +} + +void CScribbleDoc::DeleteContents() +{ + while (!m_strokeList.IsEmpty()) + { + delete m_strokeList.RemoveHead(); + } + COleServerDoc::DeleteContents(); +} + +void CScribbleDoc::InitDocument() +{ + m_bThickPen = FALSE; + m_nThinWidth = 2; // default thin pen is 2 pixels wide + m_nThickWidth = 5; // default thick pen is 5 pixels wide + ReplacePen(); // initialize pen according to current width + + // default document size is 2 x 2 inches + m_sizeDoc = CSize(200,200); +} + +CStroke* CScribbleDoc::NewStroke() +{ + CStroke* pStrokeItem = new CStroke(m_nPenWidth); + m_strokeList.AddTail(pStrokeItem); + SetModifiedFlag(); // Mark the document as having been modified, for + // purposes of confirming File Close. + return pStrokeItem; +} + + + + +///////////////////////////////////////////////////////////////////////////// +// CStroke + +IMPLEMENT_SERIAL(CStroke, CObject, 2) +CStroke::CStroke() +{ + // This empty constructor should be used by serialization only +} + +CStroke::CStroke(UINT nPenWidth) +{ + m_nPenWidth = nPenWidth; + m_rectBounding.SetRectEmpty(); +} + +void CStroke::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + ar << m_rectBounding; + ar << (WORD)m_nPenWidth; + m_pointArray.Serialize(ar); + } + else + { + ar >> m_rectBounding; + WORD w; + ar >> w; + m_nPenWidth = w; + m_pointArray.Serialize(ar); + } +} + +BOOL CStroke::DrawStroke(CDC* pDC) +{ + CPen penStroke; + if (!penStroke.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0))) + return FALSE; + CPen* pOldPen = pDC->SelectObject(&penStroke); + pDC->MoveTo(m_pointArray[0]); + for (int i=1; i < m_pointArray.GetSize(); i++) + { + pDC->LineTo(m_pointArray[i]); + } + + pDC->SelectObject(pOldPen); + return TRUE; +} +void CScribbleDoc::OnEditClearAll() +{ + DeleteContents(); + SetModifiedFlag(); // Mark the document as having been modified, for + // purposes of confirming File Close. + CheckPoint(_T("Clear All")); + UpdateAllViews(NULL); +} + +void CScribbleDoc::OnPenThickOrThin() +{ + // Toggle the state of the pen between thin or thick. + m_bThickPen = !m_bThickPen; + + // Change the current pen to reflect the new user-specified width. + ReplacePen(); +} + +void CScribbleDoc::ReplacePen() +{ + m_nPenWidth = m_bThickPen? m_nThickWidth : m_nThinWidth; + + // Change the current pen to reflect the new user-specified width. + m_penCur.DeleteObject(); + m_penCur.CreatePen(PS_SOLID, m_nPenWidth, RGB(0,0,0)); // solid black +} + +void CScribbleDoc::OnUpdateEditClearAll(CCmdUI* pCmdUI) +{ + // Enable the command user interface object (menu item or tool bar + // button) if the document is non-empty, i.e., has at least one stroke. + pCmdUI->Enable(!m_strokeList.IsEmpty()); +} + +void CScribbleDoc::OnUpdatePenThickOrThin(CCmdUI* pCmdUI) +{ + // Add check mark to Draw Thick Line menu item, if the current + // pen width is "thick". + pCmdUI->SetCheck(m_bThickPen); +} + +void CScribbleDoc::OnPenWidths() +{ + CPenWidthsDlg dlg; + // Initialize dialog data + dlg.m_nThinWidth = m_nThinWidth; + dlg.m_nThickWidth = m_nThickWidth; + + // Invoke the dialog box + if (dlg.DoModal() == IDOK) + { + // retrieve the dialog data + m_nThinWidth = dlg.m_nThinWidth; + m_nThickWidth = dlg.m_nThickWidth; + + // Update the pen that is used by views when drawing new strokes, + // to reflect the new pen width definitions for "thick" and "thin". + ReplacePen(); + CheckPoint(_T("Pen Width")); + } +} + +void CStroke::FinishStroke() +{ + // Calculate the bounding rectangle. It's needed for smart + // repainting. + + if (m_pointArray.GetSize()==0) + { + m_rectBounding.SetRectEmpty(); + return; + } + CPoint pt = m_pointArray[0]; + m_rectBounding = CRect(pt.x, pt.y, pt.x, pt.y); + + for (int i=1; i < m_pointArray.GetSize(); i++) + { + // If the point lies outside of the accumulated bounding + // rectangle, then inflate the bounding rect to include it. + pt = m_pointArray[i]; + m_rectBounding.left = __min(m_rectBounding.left, pt.x); + m_rectBounding.right = __max(m_rectBounding.right, pt.x); + m_rectBounding.top = __max(m_rectBounding.top, pt.y); + m_rectBounding.bottom = __min(m_rectBounding.bottom, pt.y); + } + + // Add the pen width to the bounding rectangle. This is necessary + // to account for the width of the stroke when invalidating + // the screen. + m_rectBounding.InflateRect(CSize(m_nPenWidth, -(int)m_nPenWidth)); + return; +} + +COleServerItem* CScribbleDoc::OnGetEmbeddedItem() +{ + // OnGetEmbeddedItem is called by the framework to get the COleServerItem + // that is associated with the document. It is only called when necessary. + + CScribbleItem* pItem = new CScribbleItem(this); + ASSERT_VALID(pItem); + return pItem; +} + +void CScribbleDoc::OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect) +{ + // call base class to change the size of the window + COleServerDoc::OnSetItemRects(lpPosRect, lpClipRect); + + // notify first view that scroll info should change + POSITION pos = GetFirstViewPosition(); + CScribbleView* pView = (CScribbleView*)GetNextView(pos); + pView->ResyncScrollSizes(); +} + +void CScribbleDoc::OnEditCopy() +{ + CScribbleItem* pItem = GetEmbeddedItem(); + pItem->CopyToClipboard(TRUE); +} + +void CScribbleDoc::OnEditUndo() +{ + Undo(); + UpdateAllViews(NULL); +} + +void CScribbleDoc::OnUpdateEditUndo(CCmdUI* pCmdUI) +{ + OnUpdateUndo(pCmdUI); +} + +void CScribbleDoc::OnEditRedo() +{ + Redo(); + UpdateAllViews(NULL); +} + +void CScribbleDoc::OnUpdateEditRedo(CCmdUI* pCmdUI) +{ + OnUpdateRedo(pCmdUI); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.h new file mode 100644 index 0000000..7868694 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribdoc.h @@ -0,0 +1,134 @@ +// ScribDoc.h : interface of the CScribbleDoc class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. +///////////////////////////////////////////////////////////////////////////// + + +// Forward declaration of data structure class +class CScribbleItem; + +///////////////////////////////////////////////////////////////////////////// +// class CStroke +// +// A stroke is a series of connected points in the scribble drawing. +// A scribble document may have multiple strokes. + +class CStroke : public CObject +{ +public: + CStroke(UINT nPenWidth); + +protected: + CStroke(); + DECLARE_SERIAL(CStroke) + +// Attributes +protected: + UINT m_nPenWidth; // one pen width applies to entire stroke +public: + CArray m_pointArray; // series of connected points + CRect m_rectBounding; // smallest rect that surrounds all + // of the points in the stroke + // measured in MM_LOENGLISH units + // (0.01 inches, with Y-axis inverted) +public: + CRect& GetBoundingRect() { return m_rectBounding; } + +// Operations +public: + BOOL DrawStroke(CDC* pDC); + void FinishStroke(); + +public: + virtual void Serialize(CArchive& ar); +}; + + + +class CScribbleDoc : public COleServerDoc, public COXUndo +{ +protected: // create from serialization only + CScribbleDoc(); + DECLARE_DYNCREATE(CScribbleDoc) + +// Attributes +protected: + // The document keeps track of the current pen width on + // behalf of all views. We'd like the user interface of + // Scribble to be such that if the user chooses the Draw + // Thick Line command, it will apply to all views, not just + // the view that currently has the focus. + + UINT m_nPenWidth; // current user-selected pen width + BOOL m_bThickPen; // TRUE if current pen is thick + UINT m_nThinWidth; + UINT m_nThickWidth; + CPen m_penCur; // pen created according to + // user-selected pen style (width) +public: + CTypedPtrList m_strokeList; + CPen* GetCurrentPen() { return &m_penCur; } + +protected: + CSize m_sizeDoc; +public: + CSize GetDocSize() { return m_sizeDoc; } + CScribbleItem* GetEmbeddedItem() + { return (CScribbleItem*)COleServerDoc::GetEmbeddedItem(); } + +// Operations +public: + CStroke* NewStroke(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScribbleDoc) + protected: + virtual COleServerItem* OnGetEmbeddedItem(); + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + virtual void DeleteContents(); + //}}AFX_VIRTUAL + +// Implementation +protected: + void ReplacePen(); + void OnSetItemRects(LPCRECT lpPosRect, LPCRECT lpClipRect); + +public: + virtual ~CScribbleDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + void InitDocument(); + +// Generated message map functions +protected: + //{{AFX_MSG(CScribbleDoc) + afx_msg void OnEditClearAll(); + afx_msg void OnPenThickOrThin(); + afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI); + afx_msg void OnUpdatePenThickOrThin(CCmdUI* pCmdUI); + afx_msg void OnPenWidths(); + afx_msg void OnEditCopy(); + afx_msg void OnEditUndo(); + afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI); + afx_msg void OnEditRedo(); + afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribvw.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribvw.cpp new file mode 100644 index 0000000..af61dbd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Scribvw.cpp @@ -0,0 +1,395 @@ +// ScribVw.cpp : implementation of the CScribbleView class +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include "stdafx.h" +#include "Scribble.h" + +#include "ScribDoc.h" +#include "ScribVw.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView + +IMPLEMENT_DYNCREATE(CScribbleView, CScrollView) + +BEGIN_MESSAGE_MAP(CScribbleView, CScrollView) + //{{AFX_MSG_MAP(CScribbleView) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_MOUSEMOVE() + ON_COMMAND(ID_CANCEL_EDIT_SRVR, OnCancelEditSrvr) + ON_WM_SIZE() + //}}AFX_MSG_MAP + // 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() + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView construction/destruction + +CScribbleView::CScribbleView() +{ + SetScrollSizes(MM_TEXT, CSize(0, 0)); +} + +CScribbleView::~CScribbleView() +{ +} + +BOOL CScribbleView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView drawing + +void CScribbleView::OnDraw(CDC* pDC) +{ + CScribbleDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // Get the invalidated rectangle of the view, or in the case + // of printing, the clipping region of the printer dc. + CRect rectClip; + CRect rectStroke; + pDC->GetClipBox(&rectClip); + pDC->LPtoDP(&rectClip); + rectClip.InflateRect(1, 1); // avoid rounding to nothing + + // Note: CScrollView::OnPaint() will have already adjusted the + // viewport origin before calling OnDraw(), to reflect the + // currently scrolled position. + + // Show a small text to explain the meaning of this sample + // ... Draw in red + pDC->SetTextColor(RGB(255, 0, 0)); + // ... Use the client area of the view + CRect rectClient; + GetClientRect(rectClient); + pDC->LPtoDP(&rectClient); + rectClient.InflateRect(-10, 10); + // ... Show a hint what to do + pDC->DrawText(CString(_T("Draw some strokes and then try to undo/redo them...")), + rectClient, DT_LEFT | DT_WORDBREAK); + + // The view delegates the drawing of individual strokes to + // CStroke::DrawStroke(). + CTypedPtrList& strokeList = pDoc->m_strokeList; + POSITION pos = strokeList.GetHeadPosition(); + while (pos != NULL) + { + CStroke* pStroke = strokeList.GetNext(pos); + rectStroke = pStroke->GetBoundingRect(); + pDC->LPtoDP(&rectStroke); + rectStroke.InflateRect(1, 1); // avoid rounding to nothing + if (!rectStroke.IntersectRect(&rectStroke, &rectClip)) + continue; + pStroke->DrawStroke(pDC); + } +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView printing + +BOOL CScribbleView::OnPreparePrinting(CPrintInfo* pInfo) +{ + pInfo->SetMaxPage(2); // the document is two pages long: + // the first page is the title page + // the second is the drawing + BOOL bRet = DoPreparePrinting(pInfo); // default preparation + pInfo->m_nNumPreviewPages = 2; // Preview 2 pages at a time + // Set this value after calling DoPreparePrinting to override + // value read from .INI file + return bRet; +} + +void CScribbleView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add extra initialization before printing +} + +void CScribbleView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ + // TODO: add cleanup after printing +} + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView diagnostics + +#ifdef _DEBUG +void CScribbleView::AssertValid() const +{ + CScrollView::AssertValid(); +} + +void CScribbleView::Dump(CDumpContext& dc) const +{ + CScrollView::Dump(dc); +} + +CScribbleDoc* CScribbleView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScribbleDoc))); + return (CScribbleDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScribbleView message handlers + +void CScribbleView::OnLButtonDown(UINT, CPoint point) +{ + // Pressing the mouse button in the view window starts a new stroke + + // CScrollView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + CClientDC dc(this); + OnPrepareDC(&dc); + dc.DPtoLP(&point); + + m_pStrokeCur = GetDocument()->NewStroke(); + // Add first point to the new stroke + m_pStrokeCur->m_pointArray.Add(point); + + SetCapture(); // Capture the mouse until button up. + m_ptPrev = point; // Serves as the MoveTo() anchor point for the + // LineTo() the next point, as the user drags the + // mouse. + + return; +} + +void CScribbleView::OnLButtonUp(UINT, CPoint point) +{ + // Mouse button up is interesting in the Scribble application + // only if the user is currently drawing a new stroke by dragging + // the captured mouse. + + if (GetCapture() != this) + return; // If this window (view) didn't capture the mouse, + // then the user isn't drawing in this window. + + CScribbleDoc* pDoc = GetDocument(); + + CClientDC dc(this); + + // CScrollView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + OnPrepareDC(&dc); // set up mapping mode and viewport origin + dc.DPtoLP(&point); + + CPen* pOldPen = dc.SelectObject(pDoc->GetCurrentPen()); + dc.MoveTo(m_ptPrev); + dc.LineTo(point); + dc.SelectObject(pOldPen); + m_pStrokeCur->m_pointArray.Add(point); + + // Tell the stroke item that we're done adding points to it. + // This is so it can finish computing its bounding rectangle. + m_pStrokeCur->FinishStroke(); + + pDoc->CheckPoint(_T("Stroke")); + + // Tell the other views that this stroke has been added + // so that they can invalidate this stroke's area in their + // client area. + pDoc->UpdateAllViews(this, 0L, m_pStrokeCur); + + ReleaseCapture(); // Release the mouse capture established at + // the beginning of the mouse drag. + pDoc->NotifyChanged(); + return; +} + +void CScribbleView::OnMouseMove(UINT, CPoint point) +{ + // Mouse movement is interesting in the Scribble application + // only if the user is currently drawing a new stroke by dragging + // the captured mouse. + + if (GetCapture() != this) + return; // If this window (view) didn't capture the mouse, + // then the user isn't drawing in this window. + + CClientDC dc(this); + // CScrollView changes the viewport origin and mapping mode. + // It's necessary to convert the point from device coordinates + // to logical coordinates, such as are stored in the document. + OnPrepareDC(&dc); + dc.DPtoLP(&point); + + m_pStrokeCur->m_pointArray.Add(point); + + // Draw a line from the previous detected point in the mouse + // drag to the current point. + CPen* pOldPen = dc.SelectObject(GetDocument()->GetCurrentPen()); + dc.MoveTo(m_ptPrev); + dc.LineTo(point); + dc.SelectObject(pOldPen); + m_ptPrev = point; + return; +} + +void CScribbleView::OnUpdate(CView* /* pSender */, LPARAM /* lHint */, + CObject* pHint) +{ + // The document has informed this view that some data has changed. + + if (pHint != NULL) + { + if (pHint->IsKindOf(RUNTIME_CLASS(CStroke))) + { + // The hint is that a stroke as been added (or changed). + // So, invalidate its rectangle. + CStroke* pStroke = (CStroke*)pHint; + CClientDC dc(this); + OnPrepareDC(&dc); + CRect rectInvalid = pStroke->GetBoundingRect(); + dc.LPtoDP(&rectInvalid); + InvalidateRect(&rectInvalid); + return; + } + } + // We can't interpret the hint, so assume that anything might + // have been updated. + Invalidate(TRUE); + return; +} + +void CScribbleView::OnInitialUpdate() +{ + ResyncScrollSizes(); + CScrollView::OnInitialUpdate(); +} + +void CScribbleView::ResyncScrollSizes() +{ + CClientDC dc(NULL); + OnPrepareDC(&dc); + CSize sizeDoc = GetDocument()->GetDocSize(); + dc.LPtoDP(&sizeDoc); + SetScrollSizes(MM_TEXT, sizeDoc); +} + +void CScribbleView::OnPrint(CDC* pDC, CPrintInfo* pInfo) +{ + if (pInfo->m_nCurPage == 1) // page no. 1 is the title page + { + PrintTitlePage(pDC, pInfo); + return; // nothing else to print on page 1 but the page title + } + CString strHeader = GetDocument()->GetTitle(); + + PrintPageHeader(pDC, pInfo, strHeader); + // PrintPageHeader() subtracts out from the pInfo->m_rectDraw the + // amount of the page used for the header. + + pDC->SetWindowOrg(pInfo->m_rectDraw.left,-pInfo->m_rectDraw.top); + + // Now print the rest of the page + OnDraw(pDC); +} + +void CScribbleView::PrintTitlePage(CDC* pDC, CPrintInfo* pInfo) +{ + // Prepare a font size for displaying the file name + LOGFONT logFont; + memset(&logFont, 0, sizeof(LOGFONT)); + logFont.lfHeight = 75; // 3/4th inch high in MM_LOENGLISH + // (1/100th inch) + CFont font; + CFont* pOldFont = NULL; + if (font.CreateFontIndirect(&logFont)) + pOldFont = pDC->SelectObject(&font); + + // Get the file name, to be displayed on title page + CString strPageTitle = GetDocument()->GetTitle(); + + // Display the file name 1 inch below top of the page, + // centered horizontally + pDC->SetTextAlign(TA_CENTER); + pDC->TextOut(pInfo->m_rectDraw.right/2, -100, strPageTitle); + + if (pOldFont != NULL) + pDC->SelectObject(pOldFont); +} + +void CScribbleView::PrintPageHeader(CDC* pDC, CPrintInfo* pInfo, + CString& strHeader) +{ + // Print a page header consisting of the name of + // the document and a horizontal line + pDC->SetTextAlign(TA_LEFT); + pDC->TextOut(0,-25, strHeader); // 1/4 inch down + + // Draw a line across the page, below the header + TEXTMETRIC textMetric; + pDC->GetTextMetrics(&textMetric); + int y = -35 - textMetric.tmHeight; // line 1/10th inch below text + pDC->MoveTo(0, y); // from left margin + pDC->LineTo(pInfo->m_rectDraw.right, y); // to right margin + + // Subtract out from the drawing rectange the space used by the header. + y -= 25; // space 1/4 inch below (top of) line + pInfo->m_rectDraw.top += y; +} + +// The following command handler provides the standard keyboard +// user interface to cancel an in-place editing session. Here, +// the server (not the container) causes the deactivation. +void CScribbleView::OnCancelEditSrvr() +{ + GetDocument()->OnDeactivateUI(FALSE); +} + +void CScribbleView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) +{ + CScribbleDoc* pDoc = GetDocument(); + CScrollView::OnPrepareDC(pDC, pInfo); + + pDC->SetMapMode(MM_ANISOTROPIC); + CSize sizeDoc = pDoc->GetDocSize(); + sizeDoc.cy = -sizeDoc.cy; + pDC->SetWindowExt(sizeDoc); + + CSize sizeNum, sizeDenom; + pDoc->GetZoomFactor(&sizeNum, &sizeDenom); + + int xLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSX); + int yLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSY); + + long xExt = (long)sizeDoc.cx * xLogPixPerInch * sizeNum.cx; + xExt /= 100 * (long)sizeDenom.cx; + long yExt = (long)sizeDoc.cy * yLogPixPerInch * sizeNum.cy; + yExt /= 100 * (long)sizeDenom.cy; + pDC->SetViewportExt((int)xExt, (int)-yExt); +} + +void CScribbleView::OnSize(UINT nType, int cx, int cy) +{ + ResyncScrollSizes(); // ensure that scroll info is up-to-date + CScrollView::OnSize(nType, cx, cy); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Stdafx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Stdafx.h new file mode 100644 index 0000000..38357b3 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/Stdafx.h @@ -0,0 +1,25 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// +// This is a part of the Microsoft Foundation Classes C++ library. +// Copyright (C) 1992-1997 Microsoft Corporation +// All rights reserved. +// +// This source code is only intended as a supplement to the +// Microsoft Foundation Classes Reference and related +// electronic documentation provided with the library. +// See these sources for detailed information regarding the +// Microsoft Foundation Classes product. + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC templates + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows 95 Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC OLE classes + +#include "oxundo.h" // Undo/Redo classes diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/UndoInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/UndoInfo.rtf new file mode 100644 index 0000000..4922396 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/UndoInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/ITOOLBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/ITOOLBAR.BMP new file mode 100644 index 0000000..20d84ec Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/ITOOLBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.ICO new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.RC2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.RC2 new file mode 100644 index 0000000..c9a20d7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBBLE.RC2 @@ -0,0 +1,13 @@ +// +// SCRIBBLE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBDOC.ICO b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBDOC.ICO new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/SCRIBDOC.ICO differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/TOOLBAR.BMP b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/TOOLBAR.BMP new file mode 100644 index 0000000..7b0c877 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/res/TOOLBAR.BMP differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/resource.h new file mode 100644 index 0000000..7ec5a8a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Scribble.rc +// +#define IDR_SCRIBBTYPE_SRVR_IP 4 +#define IDR_SCRIBBTYPE_SRVR_EMB 5 +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDR_MAINFRAME 128 +#define IDR_SCRIBBTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDD_PEN_WIDTHS 131 +#define IDC_THIN_PEN_WIDTH 1000 +#define IDC_THICK_PEN_WIDTH 1001 +#define IDC_DEFAULT_PEN_WIDTHS 1002 +#define IDC_SPIN1 1003 +#define ID_PEN_THICK_OR_THIN 32772 +#define ID_PEN_WIDTHS 32773 +#define ID_CANCEL_EDIT_SRVR 32774 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 132 +#define _APS_NEXT_COMMAND_VALUE 32775 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsp new file mode 100644 index 0000000..cc622b1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsp @@ -0,0 +1,305 @@ +# Microsoft Developer Studio Project File - Name="undo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=undo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "undo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "undo.mak" CFG="undo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "undo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "undo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "undo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "undo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "undo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "undo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"undo.exe" + +!ELSEIF "$(CFG)" == "undo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"undo.exe" + +!ELSEIF "$(CFG)" == "undo - Win32 Release_Shared" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "undo___W" +# PROP BASE Intermediate_Dir "undo___W" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"undo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"undo.exe" + +!ELSEIF "$(CFG)" == "undo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "undo___0" +# PROP BASE Intermediate_Dir "undo___0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"undo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"undo.exe" + +!ELSEIF "$(CFG)" == "undo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "undo___1" +# PROP BASE Intermediate_Dir "undo___1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"undo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"undo.exe" + +!ENDIF + +# Begin Target + +# Name "undo - Win32 Release" +# Name "undo - Win32 Debug" +# Name "undo - Win32 Release_Shared" +# Name "undo - Win32 Unicode_Debug" +# Name "undo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\CHILDFRM.CPP +# End Source File +# Begin Source File + +SOURCE=.\IPFRAME.CPP +# End Source File +# Begin Source File + +SOURCE=.\MAINFRM.CPP +# End Source File +# Begin Source File + +SOURCE=.\PENDLG.CPP +# End Source File +# Begin Source File + +SOURCE=.\SCRIBBLE.CPP +# End Source File +# Begin Source File + +SOURCE=.\Scribble.rc +# End Source File +# Begin Source File + +SOURCE=.\Scribdoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\SCRIBITM.CPP +# End Source File +# Begin Source File + +SOURCE=.\Scribvw.cpp +# End Source File +# Begin Source File + +SOURCE=.\STDAFX.CPP +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\IpFrame.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\oxundo.h +# End Source File +# Begin Source File + +SOURCE=.\PenDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Scribble.h +# End Source File +# Begin Source File + +SOURCE=.\ScribDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ScribItm.h +# End Source File +# Begin Source File + +SOURCE=.\ScribVw.h +# End Source File +# Begin Source File + +SOURCE=.\stdafx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\itoolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\Scribble.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Scribble.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ScribDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsw new file mode 100644 index 0000000..ba60680 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "undo"=".\undo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.vcproj new file mode 100644 index 0000000..cc59cd1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/Undo/undo.vcproj @@ -0,0 +1,1150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.cpp new file mode 100644 index 0000000..12ae930 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Graph1.gph b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Graph1.gph new file mode 100644 index 0000000..d30bb4f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Graph1.gph differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.cpp new file mode 100644 index 0000000..7889f8e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.cpp @@ -0,0 +1,128 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" +#include "OXWorkspaceState.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + ON_WM_CLOSE() + //}}AFX_MSG_MAP +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.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, 0xE800) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + if (!m_wndSecondToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, 0xE804) || + !m_wndSecondToolBar.LoadToolBar(IDR_SECOND_TOOLBAR)) + { + TRACE0("Failed to create second 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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndSecondToolBar.SetBarStyle(m_wndSecondToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + m_wndSecondToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + DockControlBar(&m_wndSecondToolBar); + + return 0; + } + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) + { + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); + } + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const + { + CMDIFrameWnd::AssertValid(); + } + +void CMainFrame::Dump(CDumpContext& dc) const + { + CMDIFrameWnd::Dump(dc); + } + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers + +void CMainFrame::OnClose() + { + + COXWorkspaceState workspaceState; + if (!workspaceState.StoreToRegistry()) + TRACE0("CMainFrame::OnClose : Failed to save workspace to registry, continuing\n"); + + CMDIFrameWnd::OnClose(); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.h new file mode 100644 index 0000000..796afa2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/MainFrm.h @@ -0,0 +1,45 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + CToolBar m_wndSecondToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnClose(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.cpp new file mode 100644 index 0000000..ae2eff9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.cpp @@ -0,0 +1,135 @@ +// ========================================================================== +// Class Implementation : CSplitChildFrame +// ========================================================================== + +// Source file : SplitChildFrm.cpp + +//==================================================================== +//=============== Dundas Software ================================== + +// ////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "WorkspaceDemo.h" +#include // For CDialogTemplate + +#include "SplitChildFrm.h" +#include "WorkspaceGraphView.h" +#include "WorkspaceGraphPropView.h" + + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +IMPLEMENT_DYNCREATE(CSplitChildFrame, CMDIChildWnd) + +#define new DEBUG_NEW + +///////////////////////////////////////////////////////////////////////////// +// Definition of static members +// Data members ------------------------------------------------------------- +// protected: + +// private: + +// Member functions --------------------------------------------------------- +// public: + +CSplitChildFrame::CSplitChildFrame() + { + ASSERT_VALID(this); + } + +BEGIN_MESSAGE_MAP(CSplitChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CSplitChildFrame) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BOOL CSplitChildFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) + { + // create a splitter with 1 row, 2 columns + if (!m_wndSplitter.CreateStatic(this, 1, 2)) + { + TRACE0("CSplitChildFrame::OnCreateClient : Failed to CreateStaticSplitter\n"); + return FALSE; + } + + // Get the size of the first pane (size of the resource) + CSize firstSize(0,0); + CSize secondSize(0,0); + // Block : Dialog template + { + CDialogTemplate dlgTempl1; + VERIFY(dlgTempl1.Load(MAKEINTRESOURCE(CWorkspaceGraphView::IDD))); + dlgTempl1.GetSizeInPixels(&firstSize); + + CDialogTemplate dlgTempl2; + VERIFY(dlgTempl2.Load(MAKEINTRESOURCE(CWorkspaceGraphPropView::IDD))); + dlgTempl2.GetSizeInPixels(&secondSize); + + // Make same width and height + if (firstSize.cx < secondSize.cx) + firstSize.cx = secondSize.cx; + else + secondSize.cx = firstSize.cx; + + if (firstSize.cy < secondSize.cy) + firstSize.cy = secondSize.cy; + else + secondSize.cy = firstSize.cy; + } + + // add the first splitter pane - the default view in column 0 + if (!m_wndSplitter.CreateView(0, 0, + pContext->m_pNewViewClass, firstSize, pContext)) + { + TRACE0("CSplitChildFrame::OnCreateClient : Failed to create first pane\n"); + return FALSE; + } + + // add the second splitter pane - an property view in column 1 + if (!m_wndSplitter.CreateView(0, 1, + RUNTIME_CLASS(CWorkspaceGraphPropView), secondSize, pContext)) + { + TRACE0("CSplitChildFrame::OnCreateClient : Failed to create second pane\n"); + return FALSE; + } + + // activate the tree view + SetActiveView((CView*)m_wndSplitter.GetPane(0,0)); + + return TRUE; + } + +BOOL CSplitChildFrame::PreCreateWindow(CREATESTRUCT& cs) + { + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIChildWnd::PreCreateWindow(cs); + } + +#ifdef _DEBUG +void CSplitChildFrame::AssertValid() const + { + CMDIChildWnd::AssertValid(); + } + +void CSplitChildFrame::Dump(CDumpContext& dc) const + { + CMDIChildWnd::Dump(dc); + } +#endif //_DEBUG + +CSplitChildFrame::~CSplitChildFrame() + { + } + +// protected: +// private: + +// ========================================================================== + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.h new file mode 100644 index 0000000..669d776 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/SplitChildFrm.h @@ -0,0 +1,99 @@ +// ========================================================================== +// Class Specification : CSplitChildFrame +// ========================================================================== + +// Header file : SplitChildFrm.h + + +//=============== Dundas Software ================================== + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CMDIChildWnd + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : + +// Remark: + +// Prerequisites (necessary conditions): + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __SPLITCHILDFRM_H__ +#define __SPLITCHILDFRM_H__ + +class CSplitChildFrame : public CMDIChildWnd +{ +DECLARE_DYNCREATE(CSplitChildFrame) +// Data members ------------------------------------------------------------- +public: +protected: + CSplitterWnd m_wndSplitter; + +private: + +// Member functions --------------------------------------------------------- +public: + CSplitChildFrame(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + +#ifdef _DEBUG + virtual void AssertValid() const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + + virtual void Dump(CDumpContext& dc) const; + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns : + // --- Effect : Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. +#endif + + virtual ~CSplitChildFrame(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of the object + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSplitChildFrame) + public: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +protected: + //{{AFX_MSG(CSplitChildFrame) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + +}; + +#endif // __SPLITCHILDFRM_H__ +// ========================================================================== diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.cpp new file mode 100644 index 0000000..dfc9722 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// WorkspaceDemo.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.h new file mode 100644 index 0000000..e9a8189 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include "OXAdvancedAssert.h" + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Test.wsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Test.wsp new file mode 100644 index 0000000..64b5589 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Test.wsp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Text1.txt b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Text1.txt new file mode 100644 index 0000000..327515c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/Text1.txt @@ -0,0 +1 @@ +....... \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkSpaceInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkSpaceInfo.rtf new file mode 100644 index 0000000..fa8e9e8 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkSpaceInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.clw new file mode 100644 index 0000000..9609bcd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.clw @@ -0,0 +1,296 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CWorkspaceDemoApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "workspacedemo.h" +LastPage=0 + +ClassCount=11 +Class1=CChildFrame +Class2=CMainFrame +Class3=CSplitChildFrame +Class4=CWorkspaceDemoApp +Class5=CWorkspaceDlg +Class6=CWorkspaceGraphDoc +Class7=CWorkspaceGraphPropView +Class8=CWorkspaceGraphView +Class9=CWorkspaceLengthView +Class10=CWorkspaceTextDoc +Class11=CWorkspaceTextView + +ResourceCount=9 +Resource1=IDD_GRAPH_FORM (Dutch (Belgium)) +Resource2=IDD_LENGTH_FORM (Dutch (Belgium)) +Resource3=IDD_WORKSPACE_DLG (Dutch (Belgium)) +Resource4=IDR_SECOND_TOOLBAR (Dutch (Belgium)) +Resource5=IDR_GRAPHTYPE (Dutch (Belgium)) +Resource6=IDR_WORKSPTYPE (Dutch (Belgium)) +Resource7=IDR_LENGTHTYPE (Dutch (Belgium)) +Resource8=IDR_MAINFRAME (Dutch (Belgium)) +Resource9=IDD_GRAPHPROP_FORM (Dutch (Belgium)) + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CSplitChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=SplitChildFrm.h +ImplementationFile=SplitChildFrm.cpp + +[CLS:CWorkspaceDemoApp] +Type=0 +BaseClass=CWinApp +HeaderFile=WorkspaceDemo.h +ImplementationFile=WorkspaceDemo.cpp +Filter=N +VirtualFilter=AC +LastObject=CWorkspaceDemoApp + +[CLS:CWorkspaceDlg] +Type=0 +BaseClass=CDialog +HeaderFile=WorkspaceDlg.h +ImplementationFile=WorkspaceDlg.cpp + +[CLS:CWorkspaceGraphDoc] +Type=0 +BaseClass=CDocument +HeaderFile=WorkspaceGraphDoc.h +ImplementationFile=WorkspaceGraphDoc.cpp + +[CLS:CWorkspaceGraphPropView] +Type=0 +BaseClass=CFormView +HeaderFile=WorkspaceGraphPropView.h +ImplementationFile=WorkspaceGraphPropView.cpp + +[CLS:CWorkspaceGraphView] +Type=0 +BaseClass=CFormView +HeaderFile=WorkspaceGraphView.h +ImplementationFile=WorkspaceGraphView.cpp + +[CLS:CWorkspaceLengthView] +Type=0 +BaseClass=CFormView +HeaderFile=WorkspaceLengthView.h +ImplementationFile=WorkspaceLengthView.cpp + +[CLS:CWorkspaceTextDoc] +Type=0 +BaseClass=CDocument +HeaderFile=WorkspaceTextDoc.h +ImplementationFile=WorkspaceTextDoc.cpp + +[CLS:CWorkspaceTextView] +Type=0 +BaseClass=CEditView +HeaderFile=WorkspaceTextView.h +ImplementationFile=WorkspaceTextView.cpp + +[DLG:IDD_WORKSPACE_DLG] +Type=1 +Class=CWorkspaceDlg + +[DLG:IDD_GRAPHPROP_FORM] +Type=1 +Class=CWorkspaceGraphPropView + +[DLG:IDD_GRAPH_FORM] +Type=1 +Class=CWorkspaceGraphView + +[DLG:IDD_LENGTH_FORM] +Type=1 +Class=CWorkspaceLengthView + +[DLG:IDD_GRAPH_FORM (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=1 +Control1=IDC_GROUP,button,1342177287 + +[DLG:IDD_GRAPHPROP_FORM (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=6 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_COLOR,edit,1350633600 +Control3=IDC_COLOR_BROWSE,button,1342242816 +Control4=IDC_STATIC,static,1342308352 +Control5=IDC_SIDES,edit,1350633600 +Control6=IDC_SIDES_SPIN,msctls_updown32,1342177334 + +[TB:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_CUT +Command5=ID_EDIT_COPY +Command6=ID_EDIT_PASTE +Command7=ID_FILE_PRINT +Command8=ID_APP_ABOUT +CommandCount=8 + +[TB:IDR_SECOND_TOOLBAR (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_CIRCLE +Command2=ID_SQUARE +CommandCount=2 + +[MNU:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_PRINT_SETUP +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_VIEW_TOOLBAR +Command7=ID_VIEW_STATUS_BAR +Command8=ID_TOOLS_WORKSPACES +Command9=ID_APP_ABOUT +CommandCount=9 + +[MNU:IDR_WORKSPTYPE (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_TOOLS_WORKSPACES +Command18=ID_WINDOW_NEWTEXTWINDOW +Command19=ID_WINDOW_NEWLENGTHWINDOW +Command20=ID_WINDOW_CASCADE +Command21=ID_WINDOW_TILE_HORZ +Command22=ID_WINDOW_ARRANGE +Command23=ID_WINDOW_CLOSEALL +Command24=ID_APP_ABOUT +CommandCount=24 + +[MNU:IDR_LENGTHTYPE (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_TOOLS_WORKSPACES +Command18=ID_WINDOW_NEWTEXTWINDOW +Command19=ID_WINDOW_NEWLENGTHWINDOW +Command20=ID_WINDOW_CASCADE +Command21=ID_WINDOW_TILE_HORZ +Command22=ID_WINDOW_ARRANGE +Command23=ID_WINDOW_CLOSEALL +Command24=ID_APP_ABOUT +CommandCount=24 + +[MNU:IDR_GRAPHTYPE (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_CLOSE +Command4=ID_FILE_SAVE +Command5=ID_FILE_SAVE_AS +Command6=ID_FILE_PRINT +Command7=ID_FILE_PRINT_PREVIEW +Command8=ID_FILE_PRINT_SETUP +Command9=ID_FILE_MRU_FILE1 +Command10=ID_APP_EXIT +Command11=ID_EDIT_UNDO +Command12=ID_EDIT_CUT +Command13=ID_EDIT_COPY +Command14=ID_EDIT_PASTE +Command15=ID_VIEW_TOOLBAR +Command16=ID_VIEW_STATUS_BAR +Command17=ID_TOOLS_WORKSPACES +Command18=ID_WINDOW_CASCADE +Command19=ID_WINDOW_TILE_HORZ +Command20=ID_WINDOW_ARRANGE +Command21=ID_WINDOW_CLOSEALL +Command22=ID_APP_ABOUT +CommandCount=22 + +[ACL:IDR_MAINFRAME (Dutch (Belgium))] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_FILE_PRINT +Command5=ID_EDIT_UNDO +Command6=ID_EDIT_CUT +Command7=ID_EDIT_COPY +Command8=ID_EDIT_PASTE +Command9=ID_EDIT_UNDO +Command10=ID_EDIT_CUT +Command11=ID_EDIT_COPY +Command12=ID_EDIT_PASTE +Command13=ID_NEXT_PANE +Command14=ID_PREV_PANE +CommandCount=14 + +[DLG:IDD_WORKSPACE_DLG (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=8 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_REGISTRY_TYPE,button,1342308361 +Control3=IDC_FILE_TYPE,button,1342177289 +Control4=IDC_FILE_PATH,edit,1350762624 +Control5=IDC_BROWSE,button,1342242816 +Control6=IDC_LOAD,button,1342242816 +Control7=IDC_STORE,button,1342242816 +Control8=IDC_REGISTRY,edit,1350631552 + +[DLG:IDD_LENGTH_FORM (Dutch (Belgium))] +Type=1 +Class=? +ControlCount=3 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_LENGTH,edit,1350633600 +Control3=IDC_LENGTH_SPIN,msctls_updown32,1342177334 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.cpp new file mode 100644 index 0000000..5ecef1c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.cpp @@ -0,0 +1,223 @@ +// WorkspaceDemo.cpp : Defines the class behaviors for the application. +// +//==================================================================== +//=============== Dundas Software ================================== +//=================================================================== +#include "stdafx.h" +#include "utsampleabout.h" +#include "WorkspaceDemo.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "WorkspaceTextDoc.h" +#include "WorkspaceTextView.h" +#include "WorkspaceLengthView.h" +#include "WorkspaceGraphDoc.h" +#include "WorkspaceGraphView.h" +#include "SplitChildFrm.h" +#include "WorkspaceDlg.h" +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDemoApp + +BEGIN_MESSAGE_MAP(CWorkspaceDemoApp, CWinApp) +//{{AFX_MSG_MAP(CWorkspaceDemoApp) +ON_COMMAND(ID_APP_ABOUT, OnAppAbout) +ON_COMMAND(ID_TOOLS_WORKSPACES, OnToolsWorkspaces) +ON_COMMAND(ID_WINDOW_CLOSEALL, OnWindowCloseall) +//}}AFX_MSG_MAP +// 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() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDemoApp construction + +CWorkspaceDemoApp::CWorkspaceDemoApp() +: +m_pTextDocTemplate(NULL), +m_pLengthDocTemplate(NULL), +m_pGraphDocTemplate(NULL) + { + // TODO: add construction code here, + // Place all significant initialization in InitInstance + } + +///////////////////////////////////////////////////////////////////////////// +// The one and only CWorkspaceDemoApp object + +CWorkspaceDemoApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDemoApp initialization + +BOOL CWorkspaceDemoApp::InitInstance() + { + // 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. + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + // Set the comapny name + SetRegistryKey(_T("Dundas")); + + LoadStdProfileSettings(); // 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. + + m_pTextDocTemplate = new CMultiDocTemplate( + IDR_WORKSPTYPE, + RUNTIME_CLASS(CWorkspaceTextDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CWorkspaceTextView)); + AddDocTemplate(m_pTextDocTemplate); + + m_pLengthDocTemplate = new CMultiDocTemplate( + IDR_LENGTHTYPE, + RUNTIME_CLASS(CWorkspaceTextDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CWorkspaceLengthView)); + AddDocTemplate(m_pLengthDocTemplate); + + m_pGraphDocTemplate = new CMultiDocTemplate( + IDR_GRAPHTYPE, + RUNTIME_CLASS(CWorkspaceGraphDoc), + RUNTIME_CLASS(CSplitChildFrame), // custom splitter MDI child frame + RUNTIME_CLASS(CWorkspaceGraphView)); + AddDocTemplate(m_pGraphDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Do not open a new (empty) doc by default + if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew) + cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + COXWorkspaceState workspaceState; + if (!workspaceState.LoadFromRegistry()) + TRACE0("CWorkspaceDemoApp::InitInstance : Failed to load workspace from registry, continuing\n"); + + return TRUE; + } + +CString CWorkspaceDemoApp::GetAppDir() const + { + CString sAppDir; + LPTSTR pszAppDir = sAppDir.GetBuffer(_MAX_PATH); + VERIFY(::GetModuleFileName(AfxGetInstanceHandle(), pszAppDir, _MAX_PATH)); + sAppDir.ReleaseBuffer(); + int nBackSlashPos = sAppDir.ReverseFind(_T('\\')); + ASSERT(nBackSlashPos != -1); + if (nBackSlashPos != -1) + sAppDir = sAppDir.Left(nBackSlashPos + 1); + + return sAppDir; + } + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CWorkspaceDemoApp::OnAppAbout() + { + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); + } + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDemoApp commands + +void CWorkspaceDemoApp::OnToolsWorkspaces() + { + CWorkspaceDlg workspaceDlg; + workspaceDlg.DoModal(); + } + +void CWorkspaceDemoApp::OnWindowCloseall() + { + // See also Microsoft System Journal, December 1995 Number 12, C/C++ Q&A + +#ifdef NEVER + // Use this if you want pressing Cancel for any doc to + // cancel the entire Close All operation, and leave + // ALL documents still open. + + if (SaveAllModified()) + CloseAllDocuments(FALSE); +#else + // Use this if you want pressing Cancel to close whatever + // documents the user has already said it’s OK to close, + // but leave the remaining ones open. + + POSITION templatePos = GetFirstDocTemplatePosition(); + while (templatePos != NULL) + { + CDocTemplate* pTemplate = GetNextDocTemplate(templatePos); + ASSERT_KINDOF(CDocTemplate, pTemplate); + POSITION docPos = pTemplate->GetFirstDocPosition(); + while (docPos != NULL) + { + CDocument* pDoc = pTemplate->GetNextDoc(docPos); + if (!pDoc->SaveModified()) + // ... User aborted + return; + pDoc->OnCloseDocument(); + } + } +#endif + } + +int CWorkspaceDemoApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsp new file mode 100644 index 0000000..5916ab0 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsp @@ -0,0 +1,477 @@ +# Microsoft Developer Studio Project File - Name="WorkspaceDemo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=WorkspaceDemo - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WorkspaceDemo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WorkspaceDemo.mak" CFG="WorkspaceDemo - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WorkspaceDemo - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "WorkspaceDemo - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "WorkspaceDemo - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "WorkspaceDemo - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "WorkspaceDemo - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WorkspaceDemo - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"WorkspaceDemo.exe" + +!ELSEIF "$(CFG)" == "WorkspaceDemo - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 4 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"WorkspaceDemo.exe" + +!ELSEIF "$(CFG)" == "WorkspaceDemo - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Workspac" +# PROP BASE Intermediate_Dir "Workspac" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"WorkspaceDemo.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"WorkspaceDemo.exe" + +!ELSEIF "$(CFG)" == "WorkspaceDemo - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 4 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Workspa0" +# PROP BASE Intermediate_Dir "Workspa0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"WorkspaceDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"WorkspaceDemo.exe" + +!ELSEIF "$(CFG)" == "WorkspaceDemo - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Workspa1" +# PROP BASE Intermediate_Dir "Workspa1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x813 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"WorkspaceDemo.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"WorkspaceDemo.exe" + +!ENDIF + +# Begin Target + +# Name "WorkspaceDemo - Win32 Release" +# Name "WorkspaceDemo - Win32 Debug" +# Name "WorkspaceDemo - Win32 Release_Shared" +# Name "WorkspaceDemo - Win32 Unicode_Debug" +# Name "WorkspaceDemo - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\MFCToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OX3DTabView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssert.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXAdvancedAssertMail.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapButton.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXBitmapMenuOrganizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXChildFrameState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXColorPickerCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXCoolToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDockTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXDocTemplateSpy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXDragDockContext.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXFrameWndDock.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMDIFloatWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXMenuBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXPopupBarCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXRectTracker.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXShortcutBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeCtrlBar.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeDockBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSizeToolBar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedComboBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedSpinCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkinnedTabCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSkins.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXSplitterColRowState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSplitterRect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXStatic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXSzMiniDockFrmWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXTabClientWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXToolTipCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\OXUxTheme.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXWorkspaceState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\Xstatus4.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\SplitChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDemo.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDemo.rc +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphPropView.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphView.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceLengthView.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceTextDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceTextView.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXWorkspaceState.h +# End Source File +# Begin Source File + +SOURCE=.\SplitChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDemo.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceDlg.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphDoc.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphPropView.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceGraphView.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceLengthView.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceTextDoc.h +# End Source File +# Begin Source File + +SOURCE=.\WorkspaceTextView.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\idr_work.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\WorkspaceDemo.ico +# End Source File +# Begin Source File + +SOURCE=.\res\WorkspaceDemo.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\WorkspaceDemoDoc.ico +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsw new file mode 100644 index 0000000..35372e5 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "WorkspaceDemo"=".\WorkspaceDemo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.h new file mode 100644 index 0000000..394b5ea --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.h @@ -0,0 +1,45 @@ +// WorkspaceDemo.h : main header file for the WORKSPACEDEMO application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDemoApp: +// See WorkspaceDemo.cpp for the implementation of this class +// + +class CWorkspaceDemoApp : public CWinApp +{ +public: + CWorkspaceDemoApp(); + + CMultiDocTemplate* m_pTextDocTemplate; + CMultiDocTemplate* m_pLengthDocTemplate; + CMultiDocTemplate* m_pGraphDocTemplate; + + CString GetAppDir() const; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceDemoApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CWorkspaceDemoApp) + afx_msg void OnAppAbout(); + afx_msg void OnToolsWorkspaces(); + afx_msg void OnWindowCloseall(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.rc new file mode 100644 index 0000000..9335537 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.rc @@ -0,0 +1,629 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Dutch (Belgium) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLB) +#ifdef _WIN32 +LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\WorkspaceDemo.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\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 DISCARDABLE "res\\WorkspaceDemo.ico" +IDR_WORKSPTYPE ICON DISCARDABLE "res\\WorkspaceDemoDoc.ico" +IDR_LENGTHTYPE ICON DISCARDABLE "res\\idr_work.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDR_SECOND_TOOLBAR BITMAP DISCARDABLE "res\\toolbar1.bmp" +IDB_BITMAP1 BITMAP DISCARDABLE "res\\bitmap1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Toolbar +// + +IDR_MAINFRAME TOOLBAR DISCARDABLE 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 + +IDR_SECOND_TOOLBAR TOOLBAR DISCARDABLE 16, 15 +BEGIN + BUTTON ID_CIRCLE + BUTTON ID_SQUARE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +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 "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOLBAR + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Tools" + BEGIN + MENUITEM "&Workspaces...", ID_TOOLS_WORKSPACES + END + POPUP "&Help" + BEGIN + MENUITEM "&About WorkspaceDemo...", ID_APP_ABOUT + END +END + +IDR_WORKSPTYPE MENU PRELOAD DISCARDABLE +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 "&Tools" + BEGIN + MENUITEM "&Workspaces...", ID_TOOLS_WORKSPACES + END + POPUP "&Window" + BEGIN + MENUITEM "&New Text Window", ID_WINDOW_NEWTEXTWINDOW + MENUITEM "N&ew Length Window", ID_WINDOW_NEWLENGTHWINDOW + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + MENUITEM "C&lose All", ID_WINDOW_CLOSEALL + END + POPUP "&Help" + BEGIN + MENUITEM "&About WorkspaceDemo...", ID_APP_ABOUT + END +END + +IDR_LENGTHTYPE MENU PRELOAD DISCARDABLE +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 "&Tools" + BEGIN + MENUITEM "&Workspaces...", ID_TOOLS_WORKSPACES + END + POPUP "&Window" + BEGIN + MENUITEM "&New Text Window", ID_WINDOW_NEWTEXTWINDOW + MENUITEM "N&ew Length Window", ID_WINDOW_NEWLENGTHWINDOW + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + MENUITEM "C&lose All", ID_WINDOW_CLOSEALL + END + POPUP "&Help" + BEGIN + MENUITEM "&About WorkspaceDemo...", ID_APP_ABOUT + END +END + +IDR_GRAPHTYPE MENU PRELOAD DISCARDABLE +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 "&Tools" + BEGIN + MENUITEM "&Workspaces...", ID_TOOLS_WORKSPACES + END + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "&Tile", ID_WINDOW_TILE_HORZ + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + MENUITEM "C&lose All", ID_WINDOW_CLOSEALL + END + POPUP "&Help" + BEGIN + MENUITEM "&About WorkspaceDemo...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +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_WORKSPACE_DLG DIALOG DISCARDABLE 0, 0, 213, 74 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Close",IDCANCEL,144,52,50,14 + CONTROL "&Registry",IDC_REGISTRY_TYPE,"Button", + BS_AUTORADIOBUTTON | WS_GROUP,7,10,41,10 + CONTROL "&File",IDC_FILE_TYPE,"Button",BS_AUTORADIOBUTTON,7,26, + 27,10 + EDITTEXT IDC_FILE_PATH,53,24,132,14,ES_AUTOHSCROLL | WS_GROUP + PUSHBUTTON "...",IDC_BROWSE,189,24,17,14 + PUSHBUTTON "&Load",IDC_LOAD,20,52,50,14 + PUSHBUTTON "&Store",IDC_STORE,82,52,50,14 + EDITTEXT IDC_REGISTRY,53,8,84,14,ES_AUTOHSCROLL +END + +IDD_LENGTH_FORM DIALOG DISCARDABLE 0, 0, 100, 28 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Length : ",IDC_STATIC,7,10,26,8 + EDITTEXT IDC_LENGTH,53,7,29,14,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Spin1",IDC_LENGTH_SPIN,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS,83,7,10,14 +END + +IDD_GRAPHPROP_FORM DIALOG DISCARDABLE 0, 0, 119, 49 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Color : ",IDC_STATIC,7,10,22,8 + EDITTEXT IDC_COLOR,39,7,52,14,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "...",IDC_COLOR_BROWSE,94,7,18,14 + LTEXT "Sides :",IDC_STATIC,7,31,22,8 + EDITTEXT IDC_SIDES,39,28,40,14,ES_AUTOHSCROLL | ES_READONLY + CONTROL "Spin1",IDC_SIDES_SPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,79,28,10, + 14 +END + +IDD_GRAPH_FORM DIALOG DISCARDABLE 0, 0, 115, 132 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "",IDC_GROUP,7,7,101,118 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "WORKSPACEDEMO MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "WORKSPACEDEMO\0" + VALUE "LegalCopyright", "Copyright © 1998 Dundas Software Ltd.\0" + VALUE "OriginalFilename", "WORKSPACEDEMO.EXE\0" + VALUE "ProductName", "WORKSPACEDEMO Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_WORKSPACE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 206 + TOPMARGIN, 7 + BOTTOMMARGIN, 67 + END + + IDD_LENGTH_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 93 + TOPMARGIN, 7 + BOTTOMMARGIN, 21 + END + + IDD_GRAPHPROP_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 112 + TOPMARGIN, 7 + BOTTOMMARGIN, 42 + END + + IDD_GRAPH_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 108 + TOPMARGIN, 7 + BOTTOMMARGIN, 125 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "WorkspaceDemo" + IDR_WORKSPTYPE "\nText\nWorkspace Text Doc\n\n.txt\nWorkspaceDemo.Document\nWorksp Document" + IDR_LENGTHTYPE "\nText\nWorkspace Length Doc\n\n.txt\nWorkspaceDemo.Document\nWorksp Document" + IDR_GRAPHTYPE "\nGraph\nWorkspace Graph Doc\n\n.gph\nWorkspaceGraph.Document\nWorksp Document" + ID_DESCRIPTION_FILE "WorkSpaceInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "WorkspaceDemo" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_WINDOW_NEW "Open another text window for the active document\nNew Text 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_TOOLS_WORKSPACES "Organize workspaces" + ID_CIRCLE "Circle\nCircle" + ID_SQUARE "Square\nSquare" + ID_WINDOW_NEWLENGTHWINDOW + "Open another length window for the active document\nNew Length Window" + ID_WINDOW_NEWTEXTWINDOW "Open another text window for the active document\nNew Text Window" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_FAILED_LOAD_REG "Failed to load the settings from registry" + IDS_FAILED_LOAD_FILE "Failed to load the settings from file" + IDS_FAILED_STORE_REG "Failed to store the settings to registry" + IDS_FAILED_STORE_FILE "Failed to store the settings to file" +END + +#endif // Dutch (Belgium) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\WorkspaceDemo.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.vcproj new file mode 100644 index 0000000..06072e2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDemo.vcproj @@ -0,0 +1,2940 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.cpp new file mode 100644 index 0000000..a579828 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.cpp @@ -0,0 +1,128 @@ +// WorkspaceDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" +#include "WorkspaceDlg.h" +#include "OXWorkspaceState.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + + +CWorkspaceDlg::CWorkspaceDlg(CWnd* pParent /*=NULL*/) + : + CDialog(CWorkspaceDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CWorkspaceDlg) + m_sFilePath = ((CWorkspaceDemoApp*)AfxGetApp())->GetAppDir() + _T("Test.wsp"); + m_nRegistryType = 1; + m_sRegistry = _T("Test"); + //}}AFX_DATA_INIT + } + + +void CWorkspaceDlg::DoDataExchange(CDataExchange* pDX) + { + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceDlg) + DDX_Text(pDX, IDC_FILE_PATH, m_sFilePath); + DDX_Radio(pDX, IDC_REGISTRY_TYPE, m_nRegistryType); + DDX_Text(pDX, IDC_REGISTRY, m_sRegistry); + //}}AFX_DATA_MAP + } + + +BEGIN_MESSAGE_MAP(CWorkspaceDlg, CDialog) +//{{AFX_MSG_MAP(CWorkspaceDlg) +ON_BN_CLICKED(IDC_BROWSE, OnBrowse) +ON_BN_CLICKED(IDC_LOAD, OnLoad) +ON_BN_CLICKED(IDC_STORE, OnStore) +//}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg message handlers + +void CWorkspaceDlg::OnBrowse() + { + if (!UpdateData(TRUE)) + return; + + CFileDialog fileDlg(TRUE, NULL, _T("*.wsp"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + _T("Workspace (*.wsp)| *.* |All Files (*.*)| *.* ||")); + if (fileDlg.DoModal() == IDOK) + { + m_sFilePath = fileDlg.GetPathName(); + m_nRegistryType = 1; + UpdateData(FALSE); + } + } + +void CWorkspaceDlg::OnLoad() + { + if (!UpdateData(TRUE)) + return; + + COXWorkspaceState workspaceState; + BOOL bSuccess = FALSE; + switch(m_nRegistryType) + { + case 0: + bSuccess = workspaceState.LoadFromRegistry(m_sRegistry); + if (!bSuccess) + AfxMessageBox(IDS_FAILED_LOAD_REG, MB_ICONEXCLAMATION); + break; + case 1: + bSuccess = workspaceState.LoadFromFile(m_sFilePath); + if (!bSuccess) + AfxMessageBox(IDS_FAILED_LOAD_FILE, MB_ICONEXCLAMATION); + break; + default: + TRACE1("CWorkspaceDlg::OnLoad : Unexpected case in switch : %i\n", m_nRegistryType); + ASSERT(FALSE); + break; + } + + if (bSuccess) + // ... Close this dialog + EndDialog(IDCANCEL); + } + + +void CWorkspaceDlg::OnStore() + { + if (!UpdateData(TRUE)) + return; + + COXWorkspaceState workspaceState; + BOOL bSuccess = FALSE; + switch(m_nRegistryType) + { + case 0: + bSuccess = workspaceState.StoreToRegistry(m_sRegistry); + if (!bSuccess) + AfxMessageBox(IDS_FAILED_STORE_REG, MB_ICONEXCLAMATION); + break; + case 1: + bSuccess = workspaceState.StoreToFile(m_sFilePath); + if (!bSuccess) + AfxMessageBox(IDS_FAILED_STORE_FILE, MB_ICONEXCLAMATION); + break; + default: + TRACE1("CWorkspaceDlg::OnStore : Unexpected case in switch : %i\n", m_nRegistryType); + ASSERT(FALSE); + break; + } + + if (bSuccess) + // ... Close this dialog + EndDialog(IDCANCEL); + } + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.h new file mode 100644 index 0000000..5910c3a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceDlg.h @@ -0,0 +1,38 @@ +// WorkspaceDlg.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceDlg dialog + +class CWorkspaceDlg : public CDialog +{ +// Construction +public: + CWorkspaceDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CWorkspaceDlg) + enum { IDD = IDD_WORKSPACE_DLG }; + CString m_sFilePath; + int m_nRegistryType; + CString m_sRegistry; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CWorkspaceDlg) + afx_msg void OnBrowse(); + afx_msg void OnLoad(); + afx_msg void OnStore(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.cpp new file mode 100644 index 0000000..5039710 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.cpp @@ -0,0 +1,121 @@ +// WorkspaceGraphDoc.cpp : implementation of the CWorkspaceGraphDoc class +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceGraphDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphDoc + +IMPLEMENT_DYNCREATE(CWorkspaceGraphDoc, CDocument) + +BEGIN_MESSAGE_MAP(CWorkspaceGraphDoc, CDocument) +//{{AFX_MSG_MAP(CWorkspaceGraphDoc) +// NOTE - the ClassWizard will add and remove mapping macros here. +// DO NOT EDIT what you see in these blocks of generated code! +//}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphDoc construction/destruction + +CWorkspaceGraphDoc::CWorkspaceGraphDoc() + : + m_color(0), + m_nSides(3) + { + } + +CWorkspaceGraphDoc::~CWorkspaceGraphDoc() + { + } + +BOOL CWorkspaceGraphDoc::OnNewDocument() + { + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; + } + +BOOL CWorkspaceGraphDoc::SetColor(COLORREF color) + { + BOOL bModified = FALSE; + if (color != m_color) + { + m_color = color; + bModified = TRUE; + SetModifiedFlag(TRUE); + } + + return bModified; + } + +COLORREF CWorkspaceGraphDoc::GetColor() const + { + return m_color; + } + +BOOL CWorkspaceGraphDoc::SetSides(int nSides) + { + BOOL bModified = FALSE; + if (nSides != m_nSides) + { + m_nSides = nSides; + bModified = TRUE; + SetModifiedFlag(TRUE); + } + + return bModified; + } + +int CWorkspaceGraphDoc::GetSides() const + { + return m_nSides; + } + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphDoc serialization + +void CWorkspaceGraphDoc::Serialize(CArchive& ar) + { + if (ar.IsStoring()) + { + ar << m_color; + ar << m_nSides; + } + else + { + ar >> m_color; + ar >> m_nSides; + } + } + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphDoc diagnostics + +#ifdef _DEBUG +void CWorkspaceGraphDoc::AssertValid() const + { + CDocument::AssertValid(); + } + +void CWorkspaceGraphDoc::Dump(CDumpContext& dc) const + { + CDocument::Dump(dc); + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.h new file mode 100644 index 0000000..16bf74e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphDoc.h @@ -0,0 +1,50 @@ +// WorkspaceGraphDoc.h : interface of the CWorkspaceGraphDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CWorkspaceGraphDoc : public CDocument +{ +protected: // create from serialization only + CWorkspaceGraphDoc(); + DECLARE_DYNCREATE(CWorkspaceGraphDoc) + +// Attributes +public: + +// Operations +public: + BOOL SetColor(COLORREF color); + COLORREF GetColor() const; + BOOL SetSides(int nSides); + int GetSides() const; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceGraphDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CWorkspaceGraphDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + COLORREF m_color; + int m_nSides; + +// Generated message map functions +protected: + //{{AFX_MSG(CWorkspaceGraphDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.cpp new file mode 100644 index 0000000..a12984b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.cpp @@ -0,0 +1,129 @@ +// WorkspaceGraphPropView.cpp : implementation file +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceGraphDoc.h" +#include "WorkspaceGraphPropView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphPropView + +IMPLEMENT_DYNCREATE(CWorkspaceGraphPropView, CFormView) + +CWorkspaceGraphPropView::CWorkspaceGraphPropView() +: CFormView(CWorkspaceGraphPropView::IDD) + { + //{{AFX_DATA_INIT(CWorkspaceGraphPropView) + m_sSides = _T(""); + m_sColor = _T(""); + //}}AFX_DATA_INIT + } + +CWorkspaceGraphPropView::~CWorkspaceGraphPropView() + { + } + +void CWorkspaceGraphPropView::DoDataExchange(CDataExchange* pDX) + { + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceGraphPropView) + DDX_Control(pDX, IDC_SIDES_SPIN, m_wndSidesSpin); + DDX_Text(pDX, IDC_SIDES, m_sSides); + DDX_Text(pDX, IDC_COLOR, m_sColor); + //}}AFX_DATA_MAP + } + + +BEGIN_MESSAGE_MAP(CWorkspaceGraphPropView, CFormView) + //{{AFX_MSG_MAP(CWorkspaceGraphPropView) + ON_BN_CLICKED(IDC_COLOR_BROWSE, OnColorBrowse) + ON_EN_CHANGE(IDC_SIDES, OnChangeSides) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphPropView diagnostics + +#ifdef _DEBUG +void CWorkspaceGraphPropView::AssertValid() const + { + CFormView::AssertValid(); + } + +void CWorkspaceGraphPropView::Dump(CDumpContext& dc) const + { + CFormView::Dump(dc); + } + +CWorkspaceGraphDoc* CWorkspaceGraphPropView::GetDocument() // non-debug version is inline + { + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWorkspaceGraphDoc))); + return (CWorkspaceGraphDoc*)m_pDocument; + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphPropView message handlers + +void CWorkspaceGraphPropView::OnInitialUpdate() + { + CFormView::OnInitialUpdate(); + + m_wndSidesSpin.SetRange(3, 20); + + // Fit frame around view + ResizeParentToFit(FALSE); + } + +void CWorkspaceGraphPropView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pSender); + UNREFERENCED_PARAMETER(lHint); + UNREFERENCED_PARAMETER(pHint); + + COLORREF color = GetDocument()->GetColor(); + int nSides = GetDocument()->GetSides(); + m_sSides.Format(_T("%i"), nSides); + m_sColor.Format(_T("%i"), color); + UpdateData(FALSE); + } + +void CWorkspaceGraphPropView::OnColorBrowse() + { + if (!UpdateData(TRUE)) + return; + + // Use color common dialog + CColorDialog colorDlg(_ttoi(m_sColor)); + if (colorDlg.DoModal() == IDOK) + { + m_sColor.Format(_T("%i"), colorDlg.GetColor()); + } + UpdateData(FALSE); + + if (GetDocument()->SetColor(colorDlg.GetColor())) + GetDocument()->UpdateAllViews(this); + } + +void CWorkspaceGraphPropView::OnChangeSides() + { + // ... Check whether OnInitialUpdate has been completed + if (m_wndSidesSpin.m_hWnd == NULL) + return; + + if (!UpdateData(TRUE)) + return; + + if (GetDocument()->SetSides(_ttoi(m_sSides))) + GetDocument()->UpdateAllViews(this); + + UpdateData(FALSE); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.h new file mode 100644 index 0000000..408d461 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphPropView.h @@ -0,0 +1,67 @@ +// WorkspaceGraphPropView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphPropView form view + +#ifndef __AFXEXT_H__ +#include +#endif + +class CWorkspaceGraphDoc; + +class CWorkspaceGraphPropView : public CFormView +{ +protected: + CWorkspaceGraphPropView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CWorkspaceGraphPropView) + +// Form Data +public: + CWorkspaceGraphDoc* GetDocument(); + + //{{AFX_DATA(CWorkspaceGraphPropView) + enum { IDD = IDD_GRAPHPROP_FORM }; + CSpinButtonCtrl m_wndSidesSpin; + CString m_sSides; + CString m_sColor; + //}}AFX_DATA + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceGraphPropView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CWorkspaceGraphPropView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions + //{{AFX_MSG(CWorkspaceGraphPropView) + afx_msg void OnColorBrowse(); + afx_msg void OnChangeSides(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in WorkspaceDemoView.cpp +inline CWorkspaceGraphDoc* CWorkspaceGraphPropView::GetDocument() + { return (CWorkspaceGraphDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.cpp new file mode 100644 index 0000000..5fd8937 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.cpp @@ -0,0 +1,148 @@ +// WorkspaceGraphView.cpp : implementation file +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceGraphDoc.h" +#include "WorkspaceGraphView.h" + +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define PI 3.1415926 + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphView + +IMPLEMENT_DYNCREATE(CWorkspaceGraphView, CFormView) + +CWorkspaceGraphView::CWorkspaceGraphView() + : + CFormView(CWorkspaceGraphView::IDD), + m_nPolyRadius(50), // Use some valid initial values (will be changed) + m_nPolyOffsetX(520), + m_nPolyOffsetY(90), + m_nSides(3), + m_color(0) + { + //{{AFX_DATA_INIT(CWorkspaceGraphView) + //}}AFX_DATA_INIT + } + +CWorkspaceGraphView::~CWorkspaceGraphView() + { + } + +void CWorkspaceGraphView::DoDataExchange(CDataExchange* pDX) + { + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceGraphView) + //}}AFX_DATA_MAP + } + + +BEGIN_MESSAGE_MAP(CWorkspaceGraphView, CFormView) + //{{AFX_MSG_MAP(CWorkspaceGraphView) + ON_WM_PAINT() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphView diagnostics + +#ifdef _DEBUG +void CWorkspaceGraphView::AssertValid() const + { + CFormView::AssertValid(); + } + +void CWorkspaceGraphView::Dump(CDumpContext& dc) const + { + CFormView::Dump(dc); + } + +CWorkspaceGraphDoc* CWorkspaceGraphView::GetDocument() // non-debug version is inline + { + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWorkspaceGraphDoc))); + return (CWorkspaceGraphDoc*)m_pDocument; + } +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphView message handlers + +void CWorkspaceGraphView::OnInitialUpdate() + { + CFormView::OnInitialUpdate(); + + // Calculate figure position relative to the group control + CWnd* pGroupCtrl; + CRect r; + pGroupCtrl = GetDlgItem(IDC_GROUP); + // ... Group control must exist + ASSERT(pGroupCtrl != NULL); + // Calculate the window rect of the group control relative to its parent (this dialog) + pGroupCtrl->GetWindowRect(r); + ScreenToClient(r); + + // Position the polygon at the right part of the group control + if (r.Height() < r.Width()) + m_nPolyRadius = UINT(r.Height() / 3); + else + m_nPolyRadius = UINT(r.Width() / 3); + m_nPolyOffsetX = r.left + r.Width() / 2; + m_nPolyOffsetY = r.top + r.Height() / 2; + + // Fit frame around view + ResizeParentToFit(FALSE); + } + +void CWorkspaceGraphView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pHint); + UNREFERENCED_PARAMETER(lHint); + UNREFERENCED_PARAMETER(pSender); + m_color = GetDocument()->GetColor(); + m_nSides = GetDocument()->GetSides(); + Invalidate(); + } + + +void CWorkspaceGraphView::OnPaint() + { + if (IsIconic()) + { + CFormView::OnPaint(); + } + else + { + // Draw the polygon using the current value of the data members + if (3 <= m_nSides && m_nSides <= 20) + { + CPaintDC dc(this); + // Calculate the corner positions + POINT* pPoint = new POINT[m_nSides]; + for (UINT nSide = 0; nSide < m_nSides; nSide++) + { + pPoint[nSide].x = long(cos(2 * PI * nSide / m_nSides) * m_nPolyRadius) + m_nPolyOffsetX; + pPoint[nSide].y = long(sin(2 * PI * nSide / m_nSides) * m_nPolyRadius) + m_nPolyOffsetY; + } + + // Use the correct color + CBrush brush(m_color); + CBrush* pOldBrush; + pOldBrush = dc.SelectObject(&brush); + dc.Polygon(pPoint, m_nSides); + dc.SelectObject(pOldBrush); + + // Clean up + delete[] pPoint; + } + } + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.h new file mode 100644 index 0000000..fabd2c9 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceGraphView.h @@ -0,0 +1,75 @@ +// WorkspaceGraphView.h : header file +// +//==================================================================== +//=============== Dundas Software ================================== +//=================================================================== + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceGraphView form view + +#ifndef __AFXEXT_H__ +#include +#endif + +class CWorkspaceGraphDoc; + +class CWorkspaceGraphView : public CFormView +{ +protected: + CWorkspaceGraphView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CWorkspaceGraphView) + +// Form Data +public: + CWorkspaceGraphDoc* GetDocument(); + + //{{AFX_DATA(CWorkspaceGraphView) + enum { IDD = IDD_GRAPH_FORM }; + CSpinButtonCtrl m_wndSidesSpin; + CString m_sSides; + CString m_sColor; + //}}AFX_DATA + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceGraphView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + //}}AFX_VIRTUAL + +// Implementation +protected: + UINT m_nPolyRadius; + UINT m_nPolyOffsetX; + UINT m_nPolyOffsetY; + UINT m_nSides; + UINT m_color; + + virtual ~CWorkspaceGraphView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions + //{{AFX_MSG(CWorkspaceGraphView) + afx_msg void OnPaint(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in WorkspaceDemoView.cpp +inline CWorkspaceGraphDoc* CWorkspaceGraphView::GetDocument() + { return (CWorkspaceGraphDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.cpp new file mode 100644 index 0000000..d108093 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.cpp @@ -0,0 +1,132 @@ +// WorkspaceLengthView.cpp : implementation file +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceTextDoc.h" +#include "WorkspaceLengthView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceLengthView + +IMPLEMENT_DYNCREATE(CWorkspaceLengthView, CFormView) + +CWorkspaceLengthView::CWorkspaceLengthView() + : CFormView(CWorkspaceLengthView::IDD) +{ + //{{AFX_DATA_INIT(CWorkspaceLengthView) + m_sLength = _T(""); + //}}AFX_DATA_INIT +} + +CWorkspaceLengthView::~CWorkspaceLengthView() +{ +} + +void CWorkspaceLengthView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CWorkspaceLengthView) + DDX_Control(pDX, IDC_LENGTH_SPIN, m_wndLengthSpin); + DDX_Text(pDX, IDC_LENGTH, m_sLength); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CWorkspaceLengthView, CFormView) + //{{AFX_MSG_MAP(CWorkspaceLengthView) + ON_COMMAND(ID_WINDOW_NEWTEXTWINDOW, OnWindowNewtextwindow) + ON_COMMAND(ID_WINDOW_NEWLENGTHWINDOW, OnWindowNewlengthwindow) + ON_EN_CHANGE(IDC_LENGTH, OnChangeLength) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceLengthView diagnostics + +#ifdef _DEBUG +void CWorkspaceLengthView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CWorkspaceLengthView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CWorkspaceTextDoc* CWorkspaceLengthView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWorkspaceTextDoc))); + return (CWorkspaceTextDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceLengthView message handlers + +void CWorkspaceLengthView::OnChangeLength() + { + // ... Check whether we have already passed OnInitialUpdate + if (m_wndLengthSpin.m_hWnd == NULL) + return; + + if (!UpdateData(TRUE)) + return; + int nNewLength = _ttoi(m_sLength); + + CString sText = GetDocument()->GetText(); + int nLength = sText.GetLength(); + if (nLength < nNewLength) + sText += CString(_T('.'), nNewLength - nLength); + else + sText = sText.Left(nNewLength); + GetDocument()->SetText(sText); + + m_sLength.Format(_T("%i"), nNewLength); + UpdateData(FALSE); + + GetDocument()->UpdateAllViews(this); + } + +void CWorkspaceLengthView::OnInitialUpdate() + { + CFormView::OnInitialUpdate(); + + m_wndLengthSpin.SetRange(0, UD_MAXVAL); + + // Fit frame around view + ResizeParentToFit(FALSE); + } + +void CWorkspaceLengthView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pSender); + UNREFERENCED_PARAMETER(lHint); + UNREFERENCED_PARAMETER(pHint); + + CString sText = GetDocument()->GetText(); + m_sLength.Format(_T("%i"), sText.GetLength()); + UpdateData(FALSE); + } + +void CWorkspaceLengthView::OnWindowNewtextwindow() + { + CFrameWnd * pFrame = + ((CWorkspaceDemoApp*)AfxGetApp())->m_pTextDocTemplate->CreateNewFrame(GetDocument(), GetParentFrame()); + ((CWorkspaceDemoApp*)AfxGetApp())->m_pTextDocTemplate->InitialUpdateFrame(pFrame, GetDocument()); + } + +void CWorkspaceLengthView::OnWindowNewlengthwindow() + { + CFrameWnd * pFrame = + ((CWorkspaceDemoApp*)AfxGetApp())->m_pLengthDocTemplate->CreateNewFrame(GetDocument(), GetParentFrame()); + ((CWorkspaceDemoApp*)AfxGetApp())->m_pLengthDocTemplate->InitialUpdateFrame(pFrame, GetDocument()); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.h new file mode 100644 index 0000000..41466ff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceLengthView.h @@ -0,0 +1,65 @@ +// WorkspaceLengthView.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceLengthView form view + +#ifndef __AFXEXT_H__ +#include +#endif + +class CWorkspaceLengthView : public CFormView +{ +protected: + CWorkspaceLengthView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CWorkspaceLengthView) + +// Form Data +public: + CWorkspaceTextDoc* GetDocument(); + + //{{AFX_DATA(CWorkspaceLengthView) + enum { IDD = IDD_LENGTH_FORM }; + CSpinButtonCtrl m_wndLengthSpin; + CString m_sLength; + //}}AFX_DATA + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceLengthView) + public: + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + //}}AFX_VIRTUAL + +// Implementation +protected: + virtual ~CWorkspaceLengthView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions + //{{AFX_MSG(CWorkspaceLengthView) + afx_msg void OnWindowNewtextwindow(); + afx_msg void OnWindowNewlengthwindow(); + afx_msg void OnChangeLength(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in WorkspaceDemoView.cpp +inline CWorkspaceTextDoc* CWorkspaceLengthView::GetDocument() + { return (CWorkspaceTextDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.cpp new file mode 100644 index 0000000..7fb0e81 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.cpp @@ -0,0 +1,128 @@ +// WorkspaceTextDoc.cpp : implementation of the CWorkspaceTextDoc class +// + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceTextDoc.h" + +#include "UTB64Bit.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextDoc + +IMPLEMENT_DYNCREATE(CWorkspaceTextDoc, CDocument) + +BEGIN_MESSAGE_MAP(CWorkspaceTextDoc, CDocument) + //{{AFX_MSG_MAP(CWorkspaceTextDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextDoc construction/destruction + +CWorkspaceTextDoc::CWorkspaceTextDoc() +{ + // TODO: add one-time construction code here + +} + +CWorkspaceTextDoc::~CWorkspaceTextDoc() +{ +} + +BOOL CWorkspaceTextDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +BOOL CWorkspaceTextDoc::SetText(CString sText) + { + BOOL bModified = FALSE; + if (sText != m_sText) + { + m_sText = sText; + bModified = TRUE; + SetModifiedFlag(TRUE); + } + + return bModified; + } + +CString CWorkspaceTextDoc::GetText() const + { + return m_sText; + } + + ///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextDoc serialization + +void CWorkspaceTextDoc::Serialize(CArchive& ar) + { + if (ar.IsStoring()) + { + DWORD nLength = 0; + +#ifdef _UNICODE + LPSTR pszText = NULL; + const int nMaxLength = m_sText.GetLength() + 2; + pszText = new char[nMaxLength]; + nLength = wcstombs(pszText, m_sText, nMaxLength); + VERIFY(nLength != (size_t)-1); +#else + LPCSTR pszText = NULL; + pszText = m_sText; + nLength = m_sText.GetLength(); +#endif + + ar.Write(pszText, nLength); + +#ifdef _UNICODE + delete[] pszText; +#endif + } + else + { + CFile* pFile = ar.GetFile(); + ASSERT(pFile->GetPosition() == 0); + DWORD_PTR nFileSize = (DWORD_PTR) pFile->GetLength(); + + char* pszText = new char[nFileSize + 1]; + ar.Read(pszText, (UINT)nFileSize); + pszText[nFileSize] = '\0'; + m_sText = pszText; + delete[] pszText; + } + } + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextDoc diagnostics + +#ifdef _DEBUG +void CWorkspaceTextDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CWorkspaceTextDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.h new file mode 100644 index 0000000..7a3b269 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextDoc.h @@ -0,0 +1,50 @@ +// WorkspaceTextDoc.h : interface of the CWorkspaceTextDoc class +// +///////////////////////////////////////////////////////////////////////////// +//==================================================================== +//=============== Dundas Software ================================== +//=================================================================== + +class CWorkspaceTextDoc : public CDocument +{ +protected: // create from serialization only + CWorkspaceTextDoc(); + DECLARE_DYNCREATE(CWorkspaceTextDoc) + +// Attributes +public: + +// Operations +public: + BOOL SetText(CString sText); + CString GetText() const; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceTextDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CWorkspaceTextDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + CString m_sText; + +// Generated message map functions +protected: + //{{AFX_MSG(CWorkspaceTextDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.cpp new file mode 100644 index 0000000..04f87bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.cpp @@ -0,0 +1,166 @@ +// WorkspaceDemoView.cpp : implementation of the CWorkspaceTextView class +// +//==================================================================== +//=============== Dundas Software ================================== +//=================================================================== + +#include "stdafx.h" +#include "WorkspaceDemo.h" + +#include "WorkspaceTextDoc.h" +#include "WorkspaceTextView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView + +IMPLEMENT_DYNCREATE(CWorkspaceTextView, CEditView) + +BEGIN_MESSAGE_MAP(CWorkspaceTextView, CEditView) + //{{AFX_MSG_MAP(CWorkspaceTextView) + ON_COMMAND(ID_SQUARE, OnSquare) + ON_COMMAND(ID_CIRCLE, OnCircle) + ON_CONTROL_REFLECT(EN_CHANGE, OnChange) + ON_COMMAND(ID_WINDOW_NEWLENGTHWINDOW, OnWindowNewlengthwindow) + ON_COMMAND(ID_WINDOW_NEWTEXTWINDOW, OnWindowNewtextwindow) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView construction/destruction + +CWorkspaceTextView::CWorkspaceTextView() +{ + // TODO: add construction code here + +} + +CWorkspaceTextView::~CWorkspaceTextView() +{ +} + +BOOL CWorkspaceTextView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + BOOL bPreCreated = CEditView::PreCreateWindow(cs); + cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping + + return bPreCreated; +} + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView drawing + +void CWorkspaceTextView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + + CWorkspaceTextDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + + // TODO: add draw code for native data here +} + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView printing + +BOOL CWorkspaceTextView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default CEditView preparation + return CEditView::OnPreparePrinting(pInfo); +} + +void CWorkspaceTextView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView begin printing. + CEditView::OnBeginPrinting(pDC, pInfo); +} + +void CWorkspaceTextView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) +{ + // Default CEditView end printing + CEditView::OnEndPrinting(pDC, pInfo); +} + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView diagnostics + +#ifdef _DEBUG +void CWorkspaceTextView::AssertValid() const +{ + CEditView::AssertValid(); +} + +void CWorkspaceTextView::Dump(CDumpContext& dc) const +{ + CEditView::Dump(dc); +} + +CWorkspaceTextDoc* CWorkspaceTextView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWorkspaceTextDoc))); + return (CWorkspaceTextDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CWorkspaceTextView message handlers + +void CWorkspaceTextView::OnSquare() + { + AfxMessageBox(_T("You clicked the square")); + } + +void CWorkspaceTextView::OnCircle() + { + AfxMessageBox(_T("You clicked the circle")); + } + +void CWorkspaceTextView::OnChange() + { + CString sText; + GetEditCtrl().GetWindowText(sText); + if (GetDocument()->SetText(sText)) + GetDocument()->UpdateAllViews(this); + + } + +void CWorkspaceTextView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) + { + UNREFERENCED_PARAMETER(pSender); + UNREFERENCED_PARAMETER(lHint); + UNREFERENCED_PARAMETER(pHint); + + CString sText = GetDocument()->GetText(); + GetEditCtrl().SetWindowText(sText); + } + +void CWorkspaceTextView::OnInitialUpdate() + { + CEditView::OnInitialUpdate(); + } + +void CWorkspaceTextView::OnWindowNewlengthwindow() + { + CFrameWnd * pFrame = + ((CWorkspaceDemoApp*)AfxGetApp())->m_pLengthDocTemplate->CreateNewFrame(GetDocument(), GetParentFrame()); + ((CWorkspaceDemoApp*)AfxGetApp())->m_pLengthDocTemplate->InitialUpdateFrame(pFrame, GetDocument()); + } + +void CWorkspaceTextView::OnWindowNewtextwindow() + { + CFrameWnd * pFrame = + ((CWorkspaceDemoApp*)AfxGetApp())->m_pTextDocTemplate->CreateNewFrame(GetDocument(), GetParentFrame()); + ((CWorkspaceDemoApp*)AfxGetApp())->m_pTextDocTemplate->InitialUpdateFrame(pFrame, GetDocument()); + } diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.h new file mode 100644 index 0000000..6002de1 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/WorkspaceTextView.h @@ -0,0 +1,59 @@ +// WorkspaceDemoView.h : interface of the CWorkspaceTextView class +// +///////////////////////////////////////////////////////////////////////////// + +class CWorkspaceTextView : public CEditView +{ +protected: // create from serialization only + CWorkspaceTextView(); + DECLARE_DYNCREATE(CWorkspaceTextView) + +// Attributes +public: + CWorkspaceTextDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CWorkspaceTextView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CWorkspaceTextView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CWorkspaceTextView) + afx_msg void OnSquare(); + afx_msg void OnCircle(); + afx_msg void OnChange(); + afx_msg void OnWindowNewlengthwindow(); + afx_msg void OnWindowNewtextwindow(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in WorkspaceDemoView.cpp +inline CWorkspaceTextDoc* CWorkspaceTextView::GetDocument() + { return (CWorkspaceTextDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.rc2 new file mode 100644 index 0000000..a282ac2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemo.rc2 @@ -0,0 +1,13 @@ +// +// WORKSPACEDEMO.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemoDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemoDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/WorkspaceDemoDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/bitmap1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/bitmap1.bmp new file mode 100644 index 0000000..9966f45 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/bitmap1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/idr_work.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/idr_work.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/idr_work.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/toolbar1.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/toolbar1.bmp new file mode 100644 index 0000000..370e458 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/res/toolbar1.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/resource.h new file mode 100644 index 0000000..c39876a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/WorkspaceDemo/resource.h @@ -0,0 +1,52 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by WorkspaceDemo.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_WORKSPTYPE 129 +#define IDD_WORKSPACE_DLG 130 +#define IDR_LENGTHTYPE 130 +#define IDR_SECOND_TOOLBAR 131 +#define IDR_GRAPHTYPE 132 +#define IDB_BITMAP1 133 +#define ID_DESCRIPTION_FILE 133 +#define IDD_LENGTH_FORM 134 +#define IDD_GRAPHPROP_FORM 135 +#define IDD_GRAPH_FORM 136 +#define IDC_REGISTRY_TYPE 1000 +#define IDS_FAILED_LOAD_REG 1000 +#define IDC_FILE_TYPE 1001 +#define IDS_FAILED_LOAD_FILE 1001 +#define IDC_FILE_PATH 1002 +#define IDS_FAILED_STORE_REG 1002 +#define IDC_BROWSE 1003 +#define IDS_FAILED_STORE_FILE 1003 +#define IDC_LOAD 1004 +#define IDC_STORE 1005 +#define IDC_LENGTH 1006 +#define IDC_LENGTH_SPIN 1007 +#define IDC_COLOR 1009 +#define IDC_COLOR_BROWSE 1010 +#define IDC_SIDES 1011 +#define IDC_SIDES_SPIN 1012 +#define IDC_GROUP 1013 +#define IDC_REGISTRY 1014 +#define ID_TOOLS_WORKSPACES 32771 +#define ID_CIRCLE 32775 +#define ID_SQUARE 32776 +#define ID_WINDOW_NEWLENGTHWINDOW 32777 +#define ID_WINDOW_NEWTEXTWINDOW 32778 +#define ID_WINDOW_CLOSEALL 32779 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 135 +#define _APS_NEXT_COMMAND_VALUE 32780 +#define _APS_NEXT_CONTROL_VALUE 1015 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.cpp new file mode 100644 index 0000000..71a74cf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.cpp @@ -0,0 +1,60 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "ResFile.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame construction/destruction + +CChildFrame::CChildFrame() +{ +} + +CChildFrame::~CChildFrame() +{ +} + +BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.h new file mode 100644 index 0000000..24e3127 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ChildFrm.h @@ -0,0 +1,38 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.cpp new file mode 100644 index 0000000..f2879b2 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.cpp @@ -0,0 +1,114 @@ +// DlgResEdit.cpp : implementation file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "ResFile.h" +#include "DlgResEdit.h" + +#include "OXResourceFile.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDlgResEdit dialog + + +CDlgResEdit::CDlgResEdit(COXResourceFile* pResFile, CWnd* pParent /*=NULL*/) + : CDialog(CDlgResEdit::IDD, pParent) +{ + //{{AFX_DATA_INIT(CDlgResEdit) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + m_pResFile = pResFile; +} + +void CDlgResEdit::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CDlgResEdit) + DDX_Control(pDX, IDC_DUMP, m_ctlDump); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CDlgResEdit, CDialog) + //{{AFX_MSG_MAP(CDlgResEdit) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDlgResEdit message handlers + +BOOL CDlgResEdit::OnInitDialog() + { + CDialog::OnInitDialog(); + + // ... set 10 point Courier font + if (m_fontCourier.CreatePointFont(100, _T("Courier"))) + m_ctlDump.SetFont(&m_fontCourier, FALSE); + + DumpResContents(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } + +void CDlgResEdit::DumpResContents() + { + const BYTE LOWER_PRINTABLE = 32; + const BYTE UPPER_PRINTABLE = 126; + const UINT LINE_SIZE = 16; + const UINT TEXT_POS0 = 6 + 2 + LINE_SIZE * (2 + 1) + 2; + const UINT CH_PER_LINE = TEXT_POS0 + LINE_SIZE + 2; + + BYTE lpBuffer[LINE_SIZE]; + CString sTemp; + BYTE nTemp; + int p, ptext, i, nBytesRead; + + DWORD_PTR nFileLen = (DWORD_PTR)m_pResFile->GetLength(); + ASSERT(nFileLen); + UINT nMax = ((UINT)((nFileLen - 1) / LINE_SIZE + 1)) * CH_PER_LINE; + CString sOutput(_T(' '), nMax); + + m_pResFile->SeekToBegin(); + for (UINT nLinePos0 = 0; nLinePos0 < nMax; nLinePos0 += CH_PER_LINE) + { + p = nLinePos0; + ptext = p + TEXT_POS0; + + sTemp.Format(_T("%06x"), m_pResFile->GetPosition()); + for (i = 0; i < 6; i++) sOutput.SetAt(p++, sTemp[i]); + + p += 2; // leave two space + nBytesRead = m_pResFile->Read(lpBuffer, LINE_SIZE); + for (i = 0; i < nBytesRead; i++) + { + nTemp = lpBuffer[i]; + sTemp.Format(_T("%02X"), nTemp); + sOutput.SetAt(p++, sTemp[0]); + sOutput.SetAt(p++, sTemp[1]); + p++; // leave one space + if (i == LINE_SIZE / 2 - 1) p++; // leave one more space after half block + + if (nTemp >= LOWER_PRINTABLE && nTemp <= UPPER_PRINTABLE) + { + sTemp.Format(_T("%c"), nTemp); + sOutput.SetAt(ptext++, sTemp[0]); + } + else + sOutput.SetAt(ptext++, _T('.')); + } + + sOutput.SetAt(nLinePos0 + CH_PER_LINE - 2, _T('\r')); + sOutput.SetAt(nLinePos0 + CH_PER_LINE - 1, _T('\n')); + } + + m_ctlDump.SetWindowText(sOutput); + } \ No newline at end of file diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.h new file mode 100644 index 0000000..88b3694 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/DlgResEdit.h @@ -0,0 +1,43 @@ +// DlgResEdit.h : header file +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +class COXResourceFile; + +///////////////////////////////////////////////////////////////////////////// +// CDlgResEdit dialog + +class CDlgResEdit : public CDialog +{ +// Construction +public: + CDlgResEdit(COXResourceFile* pResFile, CWnd* pParent = NULL); + +// Dialog Data + //{{AFX_DATA(CDlgResEdit) + enum { IDD = IDD_RES_EDIT }; + CEdit m_ctlDump; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDlgResEdit) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CFont m_fontCourier; + COXResourceFile* m_pResFile; + + void DumpResContents(); + + // Generated message map functions + //{{AFX_MSG(CDlgResEdit) + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.cpp new file mode 100644 index 0000000..1d057bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.cpp @@ -0,0 +1,68 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "ResFile.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.h new file mode 100644 index 0000000..08ed45e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/MainFrm.h @@ -0,0 +1,42 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + CToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.clw new file mode 100644 index 0000000..e24914b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.clw @@ -0,0 +1,95 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CResFileApp +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "resfile.h" +LastPage=0 + +ClassCount=6 +Class1=CChildFrame +Class2=CDlgResEdit +Class3=CMainFrame +Class4=CResFileApp +Class5=CResLibDoc +Class6=CResLibView + +ResourceCount=3 +Resource1=IDR_RESLIBTYPE +Resource2=IDR_MAINFRAME +Resource3=IDD_RES_EDIT + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CDlgResEdit] +Type=0 +BaseClass=CDialog +HeaderFile=DlgResEdit.h +ImplementationFile=DlgResEdit.cpp + +[CLS:CMainFrame] +Type=0 +BaseClass=CMDIFrameWnd +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CResFileApp] +Type=0 +BaseClass=CWinApp +HeaderFile=ResFile.h +ImplementationFile=ResFile.cpp +Filter=N +VirtualFilter=AC +LastObject=CResFileApp + +[CLS:CResLibDoc] +Type=0 +BaseClass=CDocument +HeaderFile=ResLibDoc.h +ImplementationFile=ResLibDoc.cpp + +[CLS:CResLibView] +Type=0 +BaseClass=CTreeView +HeaderFile=ResLibView.h +ImplementationFile=ResLibView.cpp + +[DLG:IDD_RES_EDIT] +Type=1 +Class=CDlgResEdit +ControlCount=3 +Control1=IDOK,button,1342242817 +Control2=IDC_DUMP,edit,1353779204 +Control3=IDC_STATIC,static,1342308352 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_MRU_FILE1 +Command3=ID_APP_EXIT +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_RESLIBTYPE] +Type=1 +Class=? +Command1=ID_FILE_OPEN +Command2=ID_FILE_CLOSE +Command3=ID_FILE_SAVE +Command4=ID_FILE_MRU_FILE1 +Command5=ID_APP_EXIT +Command6=ID_WINDOW_NEW +Command7=ID_WINDOW_CASCADE +Command8=ID_WINDOW_TILE_HORZ +Command9=ID_WINDOW_ARRANGE +Command10=ID_APP_ABOUT +CommandCount=10 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.cpp new file mode 100644 index 0000000..e7858bd --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.cpp @@ -0,0 +1,138 @@ +// ResFile.cpp : Defines the class behaviors for the application. +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "utsampleabout.h" +#include "ResFile.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "ResLibDoc.h" +#include "ResLibView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CResFileApp + +BEGIN_MESSAGE_MAP(CResFileApp, CWinApp) + //{{AFX_MSG_MAP(CResFileApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CResFileApp construction + +CResFileApp::CResFileApp() + { + m_nClipFormat = 0; + } + +///////////////////////////////////////////////////////////////////////////// +// The one and only CResFileApp object + +CResFileApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CResFileApp initialization + +BOOL CResFileApp::InitInstance() +{ + if(!AfxOleInit()) + { + AfxMessageBox(_T("OLE Failed."), MB_ICONSTOP); + return FALSE; + } + + // Standard initialization + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + LoadStdProfileSettings(); // Load standard INI file options (including MRU) + + // Register document templates + + CMultiDocTemplate* pDocTemplate; + pDocTemplate = new CMultiDocTemplate( + IDR_RESLIBTYPE, + RUNTIME_CLASS(CResLibDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CResLibView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // 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 + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + m_nClipFormat = (CLIPFORMAT)::RegisterClipboardFormat(_T("DemoOXRes")); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// + +// App command to run the dialog +void CResFileApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CResFileApp commands + +int CResFileApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsp new file mode 100644 index 0000000..1ca1c57 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsp @@ -0,0 +1,293 @@ +# Microsoft Developer Studio Project File - Name="ResFile" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ResFile - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ResFile.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ResFile.mak" CFG="ResFile - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ResFile - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ResFile - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ResFile - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "ResFile - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "ResFile - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ResFile - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ResFile.exe" + +!ELSEIF "$(CFG)" == "ResFile - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ResFile.exe" + +!ELSEIF "$(CFG)" == "ResFile - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ResFile_" +# PROP BASE Intermediate_Dir "ResFile_" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ResFile.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"ResFile.exe" + +!ELSEIF "$(CFG)" == "ResFile - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ResFile0" +# PROP BASE Intermediate_Dir "ResFile0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"ResFile.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"ResFile.exe" + +!ELSEIF "$(CFG)" == "ResFile - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ResFile1" +# PROP BASE Intermediate_Dir "ResFile1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\include" /I "..\..\..\source\utsampleabout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\include" /i "..\..\..\source\utsampleabout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"ResFile.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"ResFile.exe" + +!ENDIF + +# Begin Target + +# Name "ResFile - Win32 Release" +# Name "ResFile - Win32 Debug" +# Name "ResFile - Win32 Release_Shared" +# Name "ResFile - Win32 Unicode_Debug" +# Name "ResFile - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXResourceFile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXResourceLibrary.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\DlgResEdit.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResFile.rc +# End Source File +# Begin Source File + +SOURCE=.\ResLibDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\ResLibView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\DlgResEdit.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=.\ResFile.h +# End Source File +# Begin Source File + +SOURCE=.\ResLibDoc.h +# End Source File +# Begin Source File + +SOURCE=.\ResLibView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\imagelis.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ResFile.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ResFile.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ResLibDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsw new file mode 100644 index 0000000..be6eb29 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ResFile"=".\ResFile.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.h new file mode 100644 index 0000000..cb85c2b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.h @@ -0,0 +1,38 @@ +// ResFile.h : main header file for the RESFILE application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CResFileApp: +// See ResFile.cpp for the implementation of this class +// + +class CResFileApp : public CWinApp +{ +public: + CResFileApp(); + CLIPFORMAT m_nClipFormat; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResFileApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CResFileApp) + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.rc new file mode 100644 index 0000000..4371163 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.rc @@ -0,0 +1,347 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\ResFile.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\ResFile.ico" +IDR_RESLIBTYPE ICON DISCARDABLE "res\\ResLibDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About...", ID_APP_ABOUT + END +END + +IDR_RESLIBTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE + MENUITEM SEPARATOR + MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + 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...", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_RES_EDIT DIALOGEX 0, 0, 437, 252 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Demo of COXResourceFile" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Close",IDOK,194,231,50,14 + EDITTEXT IDC_DUMP,7,19,423,209,ES_MULTILINE | ES_READONLY | + WS_VSCROLL | WS_HSCROLL,WS_EX_DLGMODALFRAME + LTEXT "(This demo program does not support changing the resource contents)", + IDC_STATIC,7,7,239,8 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "Dundas Software\0" + VALUE "FileDescription", "RESFILE MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "RESFILE\0" + VALUE "LegalCopyright", "Copyright © 1998\0" + VALUE "OriginalFilename", "RESFILE.EXE\0" + VALUE "ProductName", "RESFILE Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_RES_EDIT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 430 + TOPMARGIN, 7 + BOTTOMMARGIN, 245 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_IMAGELIST BITMAP DISCARDABLE "res\\imagelis.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Resource Library" + IDR_RESLIBTYPE "\n\n\nExecutable Files (*.exe, *.dll)\n.EXE;.DLL\n\n" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Demo of COXResourceLibrary & COXResourceFile" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_DESCRIPTION_FILE "resFileInfo.rtf" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\ResFile.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.vcproj new file mode 100644 index 0000000..583b87c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResFile.vcproj @@ -0,0 +1,1136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.cpp new file mode 100644 index 0000000..9ed4d81 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.cpp @@ -0,0 +1,103 @@ +// ResLibDoc.cpp : implementation of the CResLibDoc class +// + +#include "stdafx.h" +#include "ResFile.h" + +#include "ResLibDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CResLibDoc + +IMPLEMENT_DYNCREATE(CResLibDoc, CDocument) + +BEGIN_MESSAGE_MAP(CResLibDoc, CDocument) + //{{AFX_MSG_MAP(CResLibDoc) + ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateFileSave) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CResLibDoc construction/destruction + +CResLibDoc::CResLibDoc() + { + } + +CResLibDoc::~CResLibDoc() + { + } + +BOOL CResLibDoc::OnNewDocument() + { + return FALSE; + } + +///////////////////////////////////////////////////////////////////////////// +// CResLibDoc serialization + +void CResLibDoc::Serialize(CArchive& ar) + { + UNREFERENCED_PARAMETER(ar); + } + +///////////////////////////////////////////////////////////////////////////// +// CResLibDoc diagnostics + +#ifdef _DEBUG +void CResLibDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CResLibDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CResLibDoc commands + +BOOL CResLibDoc::OnOpenDocument(LPCTSTR lpszPathName) +{ + if (!CDocument::OnOpenDocument(lpszPathName)) + return FALSE; + + if (!m_ResLib.Open(lpszPathName)) + { + AfxMessageBox(_T("Cannot open the specified file.")); + return FALSE; + } + + if (!m_ResLib.EnumResources(&m_sTypes, &m_sNames, &m_nLangs)) + { + AfxMessageBox(_T("Cannot enumerate resources.")); + return FALSE; + } + + return TRUE; +} + +void CResLibDoc::OnUpdateFileSave(CCmdUI* pCmdUI) +{ + pCmdUI->Enable(IsModified()); +} + +BOOL CResLibDoc::OnSaveDocument(LPCTSTR lpszPathName) +{ + UNREFERENCED_PARAMETER(lpszPathName); + if (m_ResLib.Commit()) + { + SetModifiedFlag(FALSE); + return TRUE; + } + + return FALSE; +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.h new file mode 100644 index 0000000..40207af --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibDoc.h @@ -0,0 +1,52 @@ +// ResLibDoc.h : interface of the CResLibDoc class +// + +#include "OXResourceLibrary.h" + +///////////////////////////////////////////////////////////////////////////// + +class CResLibDoc : public CDocument +{ +protected: // create from serialization only + CResLibDoc(); + DECLARE_DYNCREATE(CResLibDoc) + +// Attributes +public: + COXResourceLibrary m_ResLib; + CStringArray m_sTypes; + CStringArray m_sNames; + CWordArray m_nLangs; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResLibDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); + virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CResLibDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CResLibDoc) + afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.cpp new file mode 100644 index 0000000..fda04b8 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.cpp @@ -0,0 +1,447 @@ +// ResLibView.cpp : implementation of the CResLibView class +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +#include "stdafx.h" +#include "ResFile.h" + +#include "ResLibDoc.h" +#include "ResLibView.h" +#include "OXResourceLibrary.h" +#include "OXResourceFile.h" +#include "DlgResEdit.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// we will use this value to distinguish a folder from a resource item in the tree view +// (a resource item stores an index that can be used to fetch type, name and language +// from GetDocument()->m_sTypes, m_sNames and m_nLangs, respectively). +#define TVI_DATA_FOLDER 0xFFFFFFFF + +///////////////////////////////////////////////////////////////////////////// +// CResLibView + +IMPLEMENT_DYNCREATE(CResLibView, CTreeView) + +BEGIN_MESSAGE_MAP(CResLibView, CTreeView) + //{{AFX_MSG_MAP(CResLibView) + ON_NOTIFY_REFLECT(TVN_ITEMEXPANDED, OnItemexpanded) + ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk) + ON_COMMAND(ID_EDIT_CUT, OnEditCut) + ON_UPDATE_COMMAND_UI(ID_EDIT_CUT, OnUpdateEditCut) + ON_COMMAND(ID_EDIT_COPY, OnEditCopy) + ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateEditCopy) + ON_COMMAND(ID_EDIT_PASTE, OnEditPaste) + ON_UPDATE_COMMAND_UI(ID_EDIT_PASTE, OnUpdateEditPaste) + ON_COMMAND(ID_EDIT_CLEAR, OnEditClear) + ON_UPDATE_COMMAND_UI(ID_EDIT_CLEAR, OnUpdateEditClear) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CResLibView construction/destruction + +CResLibView::CResLibView() +{ + m_ilFolder.Create(IDB_IMAGELIST, 16, 0, RGB(255,0,255)); + m_hRootItem = NULL; + m_nClipFormat = 0; + m_bModifiable = FALSE; +} + +CResLibView::~CResLibView() +{ +} + +BOOL CResLibView::PreCreateWindow(CREATESTRUCT& cs) +{ + cs.style |= TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS; + return CTreeView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CResLibView drawing + +void CResLibView::OnDraw(CDC* pDC) +{ + UNREFERENCED_PARAMETER(pDC); + CResLibDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); +} + +void CResLibView::OnInitialUpdate() +{ + CTreeView::OnInitialUpdate(); + CTreeCtrl& rTree = GetTreeCtrl(); + rTree.SetImageList(&m_ilFolder, TVSIL_NORMAL); + + m_nClipFormat = ((CResFileApp*)AfxGetApp())->m_nClipFormat; + m_pDoc = GetDocument(); + m_pResLib = &m_pDoc->m_ResLib; + + // calling IsModifiable() once instead of repeatedly checking it + m_bModifiable = m_pResLib->IsModifiable(); + + if (m_pResLib == NULL) + return; + + m_hRootItem = rTree.InsertItem(m_pResLib->GetFileName() + + (m_bModifiable ? _T("") : _T(" <<>>"))); + rTree.SetItemData(m_hRootItem, TVI_DATA_FOLDER); + + CString sType, sName, sPrevType; + HTREEITEM hTypeItem = NULL; + int iImage = 0; + for (int i = 0; i < m_pDoc->m_sTypes.GetSize(); i++) + { + sType = m_pDoc->m_sTypes[i]; + sName = m_pDoc->m_sNames[i]; + if (sType != sPrevType) + { + sPrevType = sType; + GetTypeOutput(sType, iImage); + + hTypeItem = rTree.InsertItem(sType, m_hRootItem); + rTree.SetItemData(hTypeItem, TVI_DATA_FOLDER); + } + + GetNameOutput(sName, m_pDoc->m_nLangs[i]); + + ASSERT(hTypeItem); + HTREEITEM hResItem = rTree.InsertItem(sName, iImage, iImage, hTypeItem); + rTree.SetItemData(hResItem, (DWORD)i); + } + + rTree.Expand(m_hRootItem, TVE_EXPAND); + rTree.SortChildren(m_hRootItem); +} + +void CResLibView::GetTypeOutput(CString& sType, int& iImage) +{ + // format output a little bit: incomplete (see WinUser.h) + switch (COXResourceFile::OXResCStringToInt(sType)) + { + case (DWORD)RT_CURSOR: sType = _T("Cursor (hardware-dependent)"); + iImage = 3; break; + case (DWORD)RT_BITMAP: sType = _T("Bitmap"); + iImage = 4; break; + case (DWORD)RT_ICON: sType = _T("Icon (hardware-dependent)"); + iImage = 5; break; + case (DWORD)RT_MENU: sType = _T("Menu"); + iImage = 6; break; + case (DWORD)RT_DIALOG: sType = _T("Dialog"); + iImage = 7; break; + case (DWORD)RT_STRING: sType = _T("String Table"); + iImage = 8; break; + case (DWORD)RT_ACCELERATOR: sType = _T("Accelerator"); + iImage = 9; break; + case (DWORD)RT_RCDATA: sType = _T("Raw Data"); + iImage = 2; break; + case (DWORD)RT_VERSION: sType = _T("Version"); + iImage = 10; break; + case (DWORD)RT_TOOLBAR: sType = _T("Toolbar"); + iImage = 11; break; + case (DWORD)RT_GROUP_CURSOR:sType = _T("Cursor (hardware-independent)"); + iImage = 3; break; + case (DWORD)RT_GROUP_ICON: sType = _T("Icon (hardware-independent)"); + iImage = 5; break; + case 0: /* string */ sType = CString("\"") + sType + _T("\""); + default: iImage = 2; + } +} + +void CResLibView::GetNameOutput(CString& sName, WORD nLang) +{ + if (COXResourceFile::OXResCStringToInt(sName) == 0) + sName = CString("\"") + sName + _T("\""); + + if (nLang != MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) && + nLang != MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) && + nLang != MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT) && + nLang != MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)) + { + CString sLang; + sLang.Format(_T(" (LangID: %d)"), nLang); + sName += sLang; + } +} + +///////////////////////////////////////////////////////////////////////////// +// CResLibView diagnostics + +#ifdef _DEBUG +void CResLibView::AssertValid() const +{ + CTreeView::AssertValid(); +} + +void CResLibView::Dump(CDumpContext& dc) const +{ + CTreeView::Dump(dc); +} + +CResLibDoc* CResLibView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CResLibDoc))); + return (CResLibDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CResLibView message handlers + +void CResLibView::OnItemexpanded(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + + CTreeCtrl& rTree = GetTreeCtrl(); + HTREEITEM hItem = pNMTreeView->itemNew.hItem; + int iImage = ((pNMTreeView->itemNew.state & TVIS_EXPANDED) == TVIS_EXPANDED) ? 1 : 0; + rTree.SetItemImage(hItem, iImage, iImage); + rTree.SortChildren(hItem); + + *pResult = 0; +} + +void CResLibView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult) +{ + UNREFERENCED_PARAMETER(pNMHDR); + CTreeCtrl& rTree = GetTreeCtrl(); + CPoint pt; GetCursorPos(&pt); ScreenToClient(&pt); UINT nFlag; + HTREEITEM hItem = rTree.HitTest(pt, &nFlag); + if (hItem == NULL) return; + + DWORD nIndex = rTree.GetItemData(hItem); + + if (nIndex != TVI_DATA_FOLDER) + { + CWaitCursor wait; + // When dbl-click on a resource that was pasted from a previous copy, + // we need to fetch the temporary COXResourceFile we created during pasting + // (those we let m_pResLib handle their destruction in OnEditPaste()). + COXResourceFile* pResFile = m_pResLib->GetOpenedResFile(m_pDoc->m_sTypes[nIndex], + m_pDoc->m_sNames[nIndex], m_pDoc->m_nLangs[nIndex]); + BOOL bNeedDelete = FALSE; // if it was pasted and managed by the library + + if(pResFile == NULL) // not those pasted items + { + pResFile = new COXResourceFile; + if (!pResFile->Open(CFile::modeReadWrite, m_pResLib, FALSE, m_pDoc->m_sTypes[nIndex], + m_pDoc->m_sNames[nIndex], m_pDoc->m_nLangs[nIndex])) + { + delete pResFile; + pResFile = NULL; + AfxMessageBox(_T("Failed to open the specified resource.")); + } + else + // in this demo, the dlg won't edit the file, otherwise, we can leave an + // edited file without deleting it (but we have to specify AutoDeleteByLib + // in Open() above), and delete unchanged file (it's ok even if it's set + // bAutoDeleteByLib) + bNeedDelete = TRUE; + } + + if(pResFile) + { + CDlgResEdit dlg(pResFile, this); + dlg.DoModal(); + // this dlg can not really be used to edit binary data directly for simplicity + // of this demo program; for people who have interest in extending the + // functionality of this dialog, please refer to Developer Studio's editor as + // a good example (to view it, right click on a resource in your resource view, + // and choose "Open Binary Data") + // should we have edited the resource, we may have written something like: + // if(dlg.DoModal() == IDOK) dlg.m_ResFile.Flush(); + } + + if (bNeedDelete) + { + pResFile->Abort(); // destructor will call Flush(), which is not necessary here + delete pResFile; + } + } + + *pResult = 0; +} + +int CResLibView::GetSelectedResIndex() +{ + CTreeCtrl& rTree = GetTreeCtrl(); + HTREEITEM hItem = rTree.GetSelectedItem(); + if (hItem) + { + DWORD nIndex = rTree.GetItemData(hItem); + if (nIndex != TVI_DATA_FOLDER) return (int)nIndex; + } + return -1; // if folder was selected +} + +void CResLibView::OnUpdateEditCut(CCmdUI* pCmdUI) +{ + pCmdUI->Enable(m_pResLib && m_bModifiable && GetSelectedResIndex() != -1); +} + +void CResLibView::OnUpdateEditCopy(CCmdUI* pCmdUI) +{ + pCmdUI->Enable(GetSelectedResIndex() != -1); +} + +void CResLibView::OnUpdateEditClear(CCmdUI* pCmdUI) +{ + pCmdUI->Enable(m_pResLib && m_bModifiable && GetSelectedResIndex() != -1); +} + +void CResLibView::OnUpdateEditPaste(CCmdUI* pCmdUI) +{ + COleDataObject oleObj; + pCmdUI->Enable(m_pResLib && m_bModifiable && oleObj.AttachClipboard() && + oleObj.IsDataAvailable(m_nClipFormat)); +} + +void CResLibView::OnEditCut() +{ + OnEditCopy(); + OnEditClear(); +} + +void CResLibView::OnEditClear() +{ + CTreeCtrl& rTree = GetTreeCtrl(); + HTREEITEM hItem = rTree.GetSelectedItem(); + if (hItem == NULL) return; + + DWORD nIndex = rTree.GetItemData(hItem); + if (nIndex == TVI_DATA_FOLDER) return; + + m_pResLib->DeleteResource(m_pDoc->m_sTypes[nIndex], m_pDoc->m_sNames[nIndex], + m_pDoc->m_nLangs[nIndex]); + + // ... we set its name to empty to indicate it's deleted, useful when checking + // if a type folder has been added + m_pDoc->m_sNames[nIndex].Empty(); + m_pDoc->SetModifiedFlag(); + + HTREEITEM hTypeItem = rTree.GetParentItem(hItem); + ASSERT(hTypeItem); + rTree.DeleteItem(hItem); + if (rTree.GetChildItem(hTypeItem) == NULL) + rTree.DeleteItem(hTypeItem); +} + +void CResLibView::OnEditCopy() +{ + int nIndex = GetSelectedResIndex(); + if (nIndex == -1) return; + + COXResourceFile resFile; + if (!resFile.Open(CFile::modeRead, m_pResLib, FALSE, m_pDoc->m_sTypes[nIndex], + m_pDoc->m_sNames[nIndex], m_pDoc->m_nLangs[nIndex])) + { + TRACE0("Failed to open the specified resource to copy.\n"); + return; + } + + // we definitely want to include tags (type, name and lang) in the hGlobal + HGLOBAL hGlobal = resFile.DetachEx(); + if (hGlobal == NULL) + { + TRACE0("Failed to load data from the specified resource to copy.\n"); + return; + } + + COleDataSource* pOleSource = new COleDataSource; + pOleSource->CacheGlobalData(m_nClipFormat, hGlobal); + pOleSource->SetClipboard(); +} + +void CResLibView::OnEditPaste() +{ + COleDataObject oleObj; + if (!oleObj.AttachClipboard() || !oleObj.IsDataAvailable(m_nClipFormat)) + return; + + HGLOBAL hGlobal = oleObj.GetGlobalData(m_nClipFormat); + if (hGlobal == NULL) + return; + + COXResourceFile* pResFile = new COXResourceFile; + if(!pResFile->SetHandleEx(hGlobal)) + { + TRACE0("Failed to load resource from clipboard.\n"); + delete pResFile; + return; + } + + // 1st TRUE to make sure when m_pResLib goes out of scope, pResFile will be deleted; + // 2nd TRUE to make sure we are adding, not replacing + pResFile->SetResourceLibrary(m_pResLib, TRUE, TRUE); + // you could ask user to input a unique name here, but + // the default implementation is quite exhaustive already + + m_pDoc->SetModifiedFlag(); + + BOOL bTypeExist = FALSE; + UINT i = 0; + for (i = 0; i < (UINT)m_pDoc->m_sTypes.GetSize(); i++) + { + if (!m_pDoc->m_sNames[i].IsEmpty() && + m_pDoc->m_sTypes[i] == pResFile->GetResType()) + { + bTypeExist = TRUE; + break; + } + } + + DWORD nIndexNewItem = (DWORD)m_pDoc->m_sTypes.Add(pResFile->GetResType()); + m_pDoc->m_sNames.Add(pResFile->GetResName()); + m_pDoc->m_nLangs.Add(pResFile->GetResLanguage()); + + CString sType, sName; int iImage; + sType = pResFile->GetResType(); + sName = pResFile->GetResName(); + GetTypeOutput(sType, iImage); + GetNameOutput(sName, pResFile->GetResLanguage()); + + CTreeCtrl& rTree = GetTreeCtrl(); + HTREEITEM hTypeItem = NULL; + if (bTypeExist) + { + hTypeItem = FindTypeHItem(i); + } + else + { + hTypeItem = rTree.InsertItem(sType, m_hRootItem); + rTree.SetItemData(hTypeItem, TVI_DATA_FOLDER); + } + + ASSERT(hTypeItem); + HTREEITEM hResItem = rTree.InsertItem(sName, iImage, iImage, hTypeItem); + rTree.SortChildren(hTypeItem); + rTree.EnsureVisible(hResItem); + rTree.SelectItem(hResItem); + rTree.SetItemData(hResItem, (DWORD)nIndexNewItem); +} + +HTREEITEM CResLibView::FindTypeHItem(UINT nIndex) +{ + CTreeCtrl& rTree = GetTreeCtrl(); + + for (HTREEITEM hTypeIter = rTree.GetChildItem(m_hRootItem); hTypeIter; + hTypeIter = rTree.GetNextSiblingItem(hTypeIter)) + { + for (HTREEITEM hResIter = rTree.GetChildItem(hTypeIter); hResIter; + hResIter = rTree.GetNextSiblingItem(hResIter)) + { + if (rTree.GetItemData(hResIter) == nIndex) + return hTypeIter; + } + } + + return NULL; +} + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.h new file mode 100644 index 0000000..55bebed --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/ResLibView.h @@ -0,0 +1,81 @@ +// ResLibView.h : interface of the CResLibView class +// +//----------------- Dundas Software ---------------------------------------- +//======================================================================== + +///////////////////////////////////////////////////////////////////////////// + +class CResLibView : public CTreeView +{ +protected: // create from serialization only + CResLibView(); + DECLARE_DYNCREATE(CResLibView) + + // format output + static void GetTypeOutput(CString& sType, int& iImage); + static void GetNameOutput(CString& sName, WORD nLang); + + // tree item + int GetSelectedResIndex(); + HTREEITEM FindTypeHItem(UINT nIndex); + + CImageList m_ilFolder; + HTREEITEM m_hRootItem; + + // values copied from document or app + CResLibDoc* m_pDoc; + COXResourceLibrary* m_pResLib; + CLIPFORMAT m_nClipFormat; + + BOOL m_bModifiable; + +// Attributes +public: + CResLibDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CResLibView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnInitialUpdate(); // called first time after construct + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CResLibView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CResLibView) + afx_msg void OnItemexpanded(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnEditCut(); + afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI); + afx_msg void OnEditCopy(); + afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI); + afx_msg void OnEditPaste(); + afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI); + afx_msg void OnEditClear(); + afx_msg void OnUpdateEditClear(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in ResLibView.cpp +inline CResLibDoc* CResLibView::GetDocument() + { return (CResLibDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.cpp new file mode 100644 index 0000000..d180b82 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// ResFile.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.h new file mode 100644 index 0000000..3c3591b --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/StdAfx.h @@ -0,0 +1,23 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions + +#include // MFC support for Windows 95 Common Controls +#include // MFC Common controls +#include // MFC OLE classes +#include // MFC OLE dialog classes +#include // MFC OLE automation classes + +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.rc2 new file mode 100644 index 0000000..4f320e6 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResFile.rc2 @@ -0,0 +1,13 @@ +// +// RESFILE.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResLibDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResLibDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/ResLibDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/Toolbar.bmp new file mode 100644 index 0000000..df6eb95 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/idr_resl.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/idr_resl.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/idr_resl.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/imagelis.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/imagelis.bmp new file mode 100644 index 0000000..876490f Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/res/imagelis.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resFileInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resFileInfo.rtf new file mode 100644 index 0000000..e6e0307 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resFileInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resource.h new file mode 100644 index 0000000..45b7edf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/resfile/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ResFile.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_RESLIBTYPE 129 +#define IDD_RES_EDIT 131 +#define IDC_DUMP 1000 +#define IDB_IMAGELIST 26662 +#define ID_DESCRIPTION_FILE 61216 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 134 +#define _APS_NEXT_COMMAND_VALUE 32777 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.cpp new file mode 100644 index 0000000..d87dd80 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.cpp @@ -0,0 +1,65 @@ +// ChildFrm.cpp : implementation of the CChildFrame class +// + +#include "stdafx.h" +#include "scrngrab.h" + +#include "ChildFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CChildFrame + +IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) + +BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) + //{{AFX_MSG_MAP(CChildFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG_MAP +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 + + return CMDIChildWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.h new file mode 100644 index 0000000..089fffc --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/ChildFrm.h @@ -0,0 +1,40 @@ +// ChildFrm.h : interface of the CChildFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CChildFrame : public CMDIChildWnd +{ + DECLARE_DYNCREATE(CChildFrame) +public: + CChildFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CChildFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +// Generated message map functions +protected: + //{{AFX_MSG(CChildFrame) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.cpp new file mode 100644 index 0000000..47fe912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.cpp @@ -0,0 +1,91 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "scrngrab.h" +#include "oxdib.h" + +#include "MainFrm.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP +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_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + return 0; +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CMDIFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// 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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.h new file mode 100644 index 0000000..743575a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/MainFrm.h @@ -0,0 +1,45 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + + +class CMainFrame : public CMDIFrameWnd +{ + DECLARE_DYNAMIC(CMainFrame) +public: + CMainFrame(); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// 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; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.cpp new file mode 100644 index 0000000..ddd2c06 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// scrngrab.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.h new file mode 100644 index 0000000..12f6912 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/Toolbar.bmp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/Toolbar.bmp new file mode 100644 index 0000000..d501723 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/Toolbar.bmp differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.rc2 b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.rc2 new file mode 100644 index 0000000..6c6decb --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrab.rc2 @@ -0,0 +1,13 @@ +// +// SCRNGRAB.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/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrabDoc.ico b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrabDoc.ico new file mode 100644 index 0000000..2a1f1ae Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/res/scrngrabDoc.ico differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/resource.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/resource.h new file mode 100644 index 0000000..8ac812c --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/resource.h @@ -0,0 +1,28 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by scrngrab.rc +// +#define IDD_ABOUTBOX 100 +#define IDD_SCRNGRAB_FORM 101 +#define IDR_MAINFRAME 128 +#define IDR_SCRNGRTYPE 129 +#define ID_DESCRIPTION_FILE 130 +#define IDC_DESK_RADIO 1000 +#define IDC_CLT_RADIO 1001 +#define IDC_CAPT_BUTTON 1002 +#define IDC_WND_RADIO 1003 +#define IDC_STATICIMAGE 1003 +#define IDC_SEL_RADIO 1004 +#define IDC_CAPT_BUTTON_ENTIRE 1004 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrnGrabInfo.rtf b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrnGrabInfo.rtf new file mode 100644 index 0000000..1afa0d2 Binary files /dev/null and b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrnGrabInfo.rtf differ diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.clw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.clw new file mode 100644 index 0000000..adc7949 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.clw @@ -0,0 +1,111 @@ +; CLW file contains information for the MFC ClassWizard + +[General Info] +Version=1 +LastClass=CScrngrabView +LastTemplate=CDialog +NewFileInclude1=#include "stdafx.h" +NewFileInclude2=#include "scrngrab.h" +LastPage=0 + +ClassCount=5 +Class1=CChildFrame +Class2=CMainFrame +Class3=CScrngrabApp +Class4=CScrngrabDoc +Class5=CScrngrabView + +ResourceCount=3 +Resource1=IDR_SCRNGRTYPE +Resource2=IDR_MAINFRAME +Resource3=IDD_SCRNGRAB_FORM + +[CLS:CChildFrame] +Type=0 +BaseClass=CMDIChildWnd +HeaderFile=ChildFrm.h +ImplementationFile=ChildFrm.cpp +LastObject=CChildFrame + +[CLS:CMainFrame] +Type=0 +BaseClass=COXMainFrame +HeaderFile=MainFrm.h +ImplementationFile=MainFrm.cpp + +[CLS:CScrngrabApp] +Type=0 +BaseClass=CWinApp +HeaderFile=scrngrab.h +ImplementationFile=scrngrab.cpp +Filter=N +VirtualFilter=AC +LastObject=CScrngrabApp + +[CLS:CScrngrabDoc] +Type=0 +BaseClass=CDocument +HeaderFile=scrngrabDoc.h +ImplementationFile=scrngrabDoc.cpp + +[CLS:CScrngrabView] +Type=0 +BaseClass=CFormView +HeaderFile=scrngrabView.h +ImplementationFile=scrngrabView.cpp +Filter=D +VirtualFilter=VWC +LastObject=IDC_STATICIMAGE + +[DLG:IDD_SCRNGRAB_FORM] +Type=1 +Class=CScrngrabView +ControlCount=6 +Control1=IDC_STATIC,static,1342308352 +Control2=IDC_CAPT_BUTTON,button,1342373888 +Control3=IDC_STATICIMAGE,static,1342177284 +Control4=IDC_CAPT_BUTTON_ENTIRE,button,1342373888 +Control5=IDC_STATIC,button,1342177287 +Control6=IDC_STATIC,button,1342177287 + +[MNU:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_APP_EXIT +Command3=ID_VIEW_STATUS_BAR +Command4=ID_APP_ABOUT +CommandCount=4 + +[MNU:IDR_SCRNGRTYPE] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_CLOSE +Command3=ID_APP_EXIT +Command4=ID_VIEW_STATUS_BAR +Command5=ID_WINDOW_NEW +Command6=ID_WINDOW_CASCADE +Command7=ID_WINDOW_TILE_HORZ +Command8=ID_WINDOW_ARRANGE +Command9=ID_APP_ABOUT +CommandCount=9 + +[ACL:IDR_MAINFRAME] +Type=1 +Class=? +Command1=ID_FILE_NEW +Command2=ID_FILE_OPEN +Command3=ID_FILE_SAVE +Command4=ID_EDIT_UNDO +Command5=ID_EDIT_CUT +Command6=ID_EDIT_COPY +Command7=ID_EDIT_PASTE +Command8=ID_EDIT_UNDO +Command9=ID_EDIT_CUT +Command10=ID_EDIT_COPY +Command11=ID_EDIT_PASTE +Command12=ID_NEXT_PANE +Command13=ID_PREV_PANE +CommandCount=13 + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.cpp new file mode 100644 index 0000000..225e054 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.cpp @@ -0,0 +1,131 @@ +// scrngrab.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "scrngrab.h" + +#include "MainFrm.h" +#include "ChildFrm.h" +#include "scrngrabDoc.h" +#include "scrngrabView.h" + +#include "UTSampleAbout.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabApp + +BEGIN_MESSAGE_MAP(CScrngrabApp, CWinApp) + //{{AFX_MSG_MAP(CScrngrabApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabApp construction + +CScrngrabApp::CScrngrabApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CScrngrabApp object + +CScrngrabApp theApp; +static HINSTANCE g_hRichEdDLL=NULL; + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabApp initialization + +BOOL CScrngrabApp::InitInstance() +{ + // 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. + + // Initialize RichEdit control + // for About Dialog + if(g_hRichEdDLL==NULL) + { + g_hRichEdDLL=::LoadLibrary(_T("RICHED32.DLL")); + if(g_hRichEdDLL==NULL) + TRACE(_T("Cannot load library to display RichEditTextControl")); + } + + +#if _MSC_VER < 1400 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + + + LoadStdProfileSettings(); // 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_SCRNGRTYPE, + RUNTIME_CLASS(CScrngrabDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CScrngrabView)); + AddDocTemplate(pDocTemplate); + + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // The main window has been initialized, so show and update it. + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; +} + +// App command to run the dialog +void CScrngrabApp::OnAppAbout() +{ + CUTSampleAboutDlg aboutDlg(IDR_MAINFRAME,ID_DESCRIPTION_FILE); + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabApp commands + +int CScrngrabApp::ExitInstance() +{ + // TODO: Add your specialized code here and/or call the base class + + // unload the library + if(g_hRichEdDLL!=NULL) + ::FreeLibrary(g_hRichEdDLL); + + return CWinApp::ExitInstance(); +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsp new file mode 100644 index 0000000..a8f9eff --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsp @@ -0,0 +1,289 @@ +# Microsoft Developer Studio Project File - Name="scrngrab" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=scrngrab - Win32 Unicode_Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "scrngrab.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "scrngrab.mak" CFG="scrngrab - Win32 Unicode_Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "scrngrab - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "scrngrab - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "scrngrab - Win32 Release_Shared" (based on "Win32 (x86) Application") +!MESSAGE "scrngrab - Win32 Unicode_Debug" (based on "Win32 (x86) Application") +!MESSAGE "scrngrab - Win32 Unicode_Release" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "scrngrab - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\Release" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"scrngrab.exe" + +!ELSEIF "$(CFG)" == "scrngrab - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\Debug" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"scrngrab.exe" + +!ELSEIF "$(CFG)" == "scrngrab - Win32 Release_Shared" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "scrngrab" +# PROP BASE Intermediate_Dir "scrngrab" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Shared" +# PROP Intermediate_Dir "Release_Shared" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"scrngrab.exe" +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"scrngrab.exe" + +!ELSEIF "$(CFG)" == "scrngrab - Win32 Unicode_Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "scrngra0" +# PROP BASE Intermediate_Dir "scrngra0" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Unicode_Debug" +# PROP Intermediate_Dir "Unicode_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"scrngrab.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"scrngrab.exe" + +!ELSEIF "$(CFG)" == "scrngrab - Win32 Unicode_Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "scrngra1" +# PROP BASE Intermediate_Dir "scrngra1" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Unicode_Release" +# PROP Intermediate_Dir "Unicode_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\..\..\Include" /I "..\..\..\Source\UTSampleAbout" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_UNICODE" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\Include" /i "..\..\..\Source\UTSampleAbout" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"scrngrab.exe" +# ADD LINK32 /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /out:"scrngrab.exe" + +!ENDIF + +# Begin Target + +# Name "scrngrab - Win32 Release" +# Name "scrngrab - Win32 Debug" +# Name "scrngrab - Win32 Release_Shared" +# Name "scrngrab - Win32 Unicode_Debug" +# Name "scrngrab - Win32 Unicode_Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# Begin Group "UTSource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\UTSampleAbout\HtmlCtrl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\Oxdib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\OXScreenGrab.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\UTBStrOp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Source\UTSampleAbout\UTSampleAbout.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ChildFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\scrngrab.cpp +# End Source File +# Begin Source File + +SOURCE=.\scrngrab.rc +# End Source File +# Begin Source File + +SOURCE=.\scrngrabDoc.cpp +# End Source File +# Begin Source File + +SOURCE=.\scrngrabView.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=.\ChildFrm.h +# End Source File +# Begin Source File + +SOURCE=.\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXDIB.H +# End Source File +# Begin Source File + +SOURCE=..\..\..\Include\OXScreenGrab.h +# End Source File +# Begin Source File + +SOURCE=.\scrngrab.h +# End Source File +# Begin Source File + +SOURCE=.\scrngrabDoc.h +# End Source File +# Begin Source File + +SOURCE=.\scrngrabView.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\scrngrab.ico +# End Source File +# Begin Source File + +SOURCE=.\res\scrngrab.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\scrngrabDoc.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Toolbar.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsw b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsw new file mode 100644 index 0000000..787aaec --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "scrngrab"=".\scrngrab.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.exe.manifest b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.exe.manifest new file mode 100644 index 0000000..275675d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.exe.manifest @@ -0,0 +1,22 @@ + + + +Your app description here + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.h new file mode 100644 index 0000000..ef1894a --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.h @@ -0,0 +1,39 @@ +// scrngrab.h : main header file for the SCRNGRAB application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabApp: +// See scrngrab.cpp for the implementation of this class +// + +class CScrngrabApp : public CWinApp +{ +public: + CScrngrabApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrngrabApp) + public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CScrngrabApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.rc b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.rc new file mode 100644 index 0000000..b082ce7 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.rc @@ -0,0 +1,370 @@ +//Microsoft Developer Studio 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 DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""utsampleabout.rc""\r\n" + "#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" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\scrngrab.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\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 DISCARDABLE "res\\scrngrab.ico" +IDR_SCRNGRTYPE ICON DISCARDABLE "res\\scrngrabDoc.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MAINFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR + END + POPUP "&Help" + BEGIN + MENUITEM "&About scrngrab...", ID_APP_ABOUT + END +END + +IDR_SCRNGRTYPE MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&New\tCtrl+N", ID_FILE_NEW + MENUITEM "&Close", ID_FILE_CLOSE + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_APP_EXIT + END + POPUP "&View" + BEGIN + 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 ScreenGrabber..", ID_APP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, 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_SCRNGRAB_FORM DIALOG DISCARDABLE 0, 0, 225, 238 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "The selection starts with the first left mouse click after clicking the Selection button", + IDC_STATIC,13,17,137,17 + PUSHBUTTON "Selection",IDC_CAPT_BUTTON,155,24,57,13,WS_GROUP + CONTROL "",IDC_STATICIMAGE,"Static",SS_BLACKRECT,13,81,198,144 + PUSHBUTTON "Entire screen",IDC_CAPT_BUTTON_ENTIRE,155,56,57,13, + WS_GROUP + GROUPBOX "",IDC_STATIC,7,71,211,160 + GROUPBOX "",IDC_STATIC,7,7,211,37 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// 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 "040904b0" + BEGIN + VALUE "CompanyName", "Dundas Software Ltd.\0" + VALUE "FileDescription", "Demo of Screengrabber class for Ultimate Toolbox\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SCRNGRAB\0" + VALUE "LegalCopyright", "Copyright Dundas Software © 1998\0" + VALUE "OriginalFilename", "SCRNGRAB.EXE\0" + VALUE "ProductName", "SCRNGRAB Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SCRNGRAB_FORM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 218 + TOPMARGIN, 7 + BOTTOMMARGIN, 231 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + IDR_MAINFRAME "Screengrabber class" + IDR_SCRNGRTYPE "\nScreenGrabber\nScreenGrabber\n\n\nScreenGrabber.Document\nScreenGrabber Document" + ID_DESCRIPTION_FILE "ScrnGrabInfo.rtf" +END + +STRINGTABLE PRELOAD DISCARDABLE +BEGIN + AFX_IDS_APP_TITLE "Demo of Screengrabber class for the Weekly MFC EXtension Library" + AFX_IDS_IDLEMESSAGE "Ready" +END + +STRINGTABLE DISCARDABLE +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 DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_APP_ABOUT "Display program information, version number and copyright\nAbout" + ID_APP_EXIT "Quit the application; prompts to save documents\nExit" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_NEXT_PANE "Switch to the next window pane\nNext Pane" + ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + 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" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" + ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" +END + +STRINGTABLE DISCARDABLE +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" +END + +STRINGTABLE DISCARDABLE +BEGIN + AFX_IDS_SCRESTORE "Restore the window to normal size" + AFX_IDS_SCTASKLIST "Activate Task List" + AFX_IDS_MDICHILD "Activate this window" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "utsampleabout.rc" +#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) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\scrngrab.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.vcproj b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.vcproj new file mode 100644 index 0000000..2c550bf --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrab.vcproj @@ -0,0 +1,1087 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.cpp new file mode 100644 index 0000000..8d7279d --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.cpp @@ -0,0 +1,82 @@ +// scrngrabDoc.cpp : implementation of the CScrngrabDoc class +// + +#include "stdafx.h" +#include "scrngrab.h" + +#include "scrngrabDoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabDoc + +IMPLEMENT_DYNCREATE(CScrngrabDoc, CDocument) + +BEGIN_MESSAGE_MAP(CScrngrabDoc, CDocument) + //{{AFX_MSG_MAP(CScrngrabDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabDoc construction/destruction + +CScrngrabDoc::CScrngrabDoc() +{ + // TODO: add one-time construction code here + +} + +CScrngrabDoc::~CScrngrabDoc() +{ +} + +BOOL CScrngrabDoc::OnNewDocument() +{ + if (!CDocument::OnNewDocument()) + return FALSE; + + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabDoc serialization + +void CScrngrabDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } +} + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabDoc diagnostics + +#ifdef _DEBUG +void CScrngrabDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CScrngrabDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabDoc commands diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.h new file mode 100644 index 0000000..80fa925 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabDoc.h @@ -0,0 +1,44 @@ +// scrngrabDoc.h : interface of the CScrngrabDoc class +// +///////////////////////////////////////////////////////////////////////////// + +class CScrngrabDoc : public CDocument +{ +protected: // create from serialization only + CScrngrabDoc(); + DECLARE_DYNCREATE(CScrngrabDoc) + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrngrabDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CScrngrabDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CScrngrabDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.cpp b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.cpp new file mode 100644 index 0000000..c3f972e --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.cpp @@ -0,0 +1,143 @@ +// scrngrabView.cpp : implementation of the CScrngrabView class +// + +#include "stdafx.h" +#include "scrngrab.h" + +#include "scrngrabDoc.h" +#include "scrngrabView.h" +#include "mainfrm.h" +#include "oxscreengrab.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabView + +IMPLEMENT_DYNCREATE(CScrngrabView, CFormView) + +BEGIN_MESSAGE_MAP(CScrngrabView, CFormView) + //{{AFX_MSG_MAP(CScrngrabView) + ON_BN_CLICKED(IDC_CAPT_BUTTON, OnCaptButton) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_BN_CLICKED(IDC_CAPT_BUTTON_ENTIRE, OnCaptButtonEntire) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabView construction/destruction + +CScrngrabView::CScrngrabView() + : CFormView(CScrngrabView::IDD) +{ + //{{AFX_DATA_INIT(CScrngrabView) + m_nCaptOption = 1; + //}}AFX_DATA_INIT + // TODO: add construction code here + + m_bCapturing = FALSE; +} + +CScrngrabView::~CScrngrabView() +{ +} + +void CScrngrabView::DoDataExchange(CDataExchange* pDX) +{ + CFormView::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CScrngrabView) + DDX_Control(pDX, IDC_STATICIMAGE, m_stcImage); + //}}AFX_DATA_MAP +} + +BOOL CScrngrabView::PreCreateWindow(CREATESTRUCT& cs) +{ + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + + return CFormView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabView diagnostics + +#ifdef _DEBUG +void CScrngrabView::AssertValid() const +{ + CFormView::AssertValid(); +} + +void CScrngrabView::Dump(CDumpContext& dc) const +{ + CFormView::Dump(dc); +} + +CScrngrabDoc* CScrngrabView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScrngrabDoc))); + return (CScrngrabDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CScrngrabView message handlers + +void CScrngrabView::OnCaptButton() +{ + if (!UpdateData(TRUE)) + return; + m_bCapturing = TRUE; + +} + +void CScrngrabView::OnLButtonDown(UINT nFlags, CPoint point) +{ + CFormView::OnLButtonDown(nFlags, point); + + if (m_bCapturing) + { + ::ReleaseCapture(); + COXScreenGrabber ScreenGrabber; + ScreenGrabber.GrabTracker(this, point, AfxGetApp()->m_pMainWnd); + + DrawRslt(ScreenGrabber.GetGrabDIB()); + m_bCapturing = FALSE; + } +} + +void CScrngrabView::OnInitialUpdate() +{ + CFormView::OnInitialUpdate(); + + ResizeParentToFit(FALSE); + +} + +void CScrngrabView::OnLButtonUp(UINT nFlags, CPoint point) +{ + + CFormView::OnLButtonUp(nFlags, point); +} + +void CScrngrabView::OnCaptButtonEntire() +{ + COXScreenGrabber scr; + scr.GrabFullWindow(CWnd::FromHandle(::GetDesktopWindow())); + DrawRslt(scr.GetGrabDIB()); +} + +void CScrngrabView::DrawRslt(COXDIB *pDib) +{ + CRect rct; + m_stcImage.GetClientRect(&rct); + CDC* pDC=m_stcImage.GetDC(); + CSize sz=pDib->GetSize(); + CRect rctDIB(0,0, sz.cx, sz.cy); + pDib->Paint(pDC,rct,rctDIB); + +} diff --git a/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.h b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.h new file mode 100644 index 0000000..faeb228 --- /dev/null +++ b/UltimateToolbox93_samples/Ultimate Toolbox/samples/utility/scrngrab/scrngrabView.h @@ -0,0 +1,66 @@ +// scrngrabView.h : interface of the CScrngrabView class +// +///////////////////////////////////////////////////////////////////////////// + +#include "OXDIB.h" + + +class CScrngrabView : public CFormView +{ +protected: // create from serialization only + CScrngrabView(); + DECLARE_DYNCREATE(CScrngrabView) + +public: + //{{AFX_DATA(CScrngrabView) + enum { IDD = IDD_SCRNGRAB_FORM }; + CStatic m_stcImage; + int m_nCaptOption; + //}}AFX_DATA + +// Attributes +public: + CScrngrabDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CScrngrabView) + public: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +public: + void DrawRslt(COXDIB* pDib); + virtual ~CScrngrabView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + BOOL m_bCapturing; + +// Generated message map functions +protected: + //{{AFX_MSG(CScrngrabView) + afx_msg void OnCaptButton(); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnCaptButtonEntire(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#ifndef _DEBUG // debug version in scrngrabView.cpp +inline CScrngrabDoc* CScrngrabView::GetDocument() + { return (CScrngrabDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_src/Ultimate Toolbox/ChangeHistory.htm b/UltimateToolbox93_src/Ultimate Toolbox/ChangeHistory.htm new file mode 100644 index 0000000..65747ae --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/ChangeHistory.htm @@ -0,0 +1,538 @@ + + + + +Ultimate ToolBox Change History + + + + + + +

Ultimate Toolbox Change History

+

Version 9.3

+

+ Major release feature:

+ +
+
    +
  • The Hyperbar classes provide an easy way to add some cool UI functionality to any + existing or new project that uses a toolbar. 
  • +
+ + + +
+

+ Bug Fixes:

+
    +
  • OXSkins - it's now possible ( and preferred ) to specify the desired + skin using an enum
  • +
  • The CustomiseManager sample has a minor bug fix, which caused a very rare + crash
  • OutlookStyleDemo : Added ability to change skin type at run time, + and improved overall skin support.
  • +
  • COXBItmapMenu : Fixed bug which caused documents to close when dirty + without prompting  
  • COXFrameWndDock::MakeItDockable + : Can now specify which sides to support and if we should dock immediately   
  • +
  • COXFrameWndDock::AttachMDIChild + : Allows users to specify the side to dock to, before it would dock to the first + one that was available.  Also fixed some docking bugs in this class.
  • +
  • COXListEdit : Added code to send a message to indicate editing has ended when the + drop button is pressed. 
  • +
  • COXPropertyTree : Added code to send a message to indicate editing has ended when + focus is lost.
  • +
  • Moved all the skinning drawing into seperate classes, so they are all handled polymorphically + by the toolbox controls.
  • +
  • COXSizeDockBar::TabAllDockedControlBars : Added code so that the visible bar can + be selected, via a pointer or by index. 
  • +
+

+ Version 9.2

+

Major release feature:

+
    +
  • The entire code base is now compatible with VC++ 2005, VC++ 2003, and + VC++ 6. You get zero-warning compilation on VC++ 2005.
  • +
+

Bug Fixes:

+
    +
  • COXComboPickerCtrl::OnPaint now checks if the OS version is + XP or higher, and if so it uses the default OS painting, else it does custom + painting for the combo box arrow
  • +
  • COXCalendarPopup::OnPaint : A bug (missing cast) has been + fixed which caused an error in VC++ 7.1 or higher
  • +
  • COXDateTimeCtrl::OnDropDown : The return value has been + changed from TRUE to FALSE, thus fixing a bad bug where the parent window + never gets to handle the notification.
  • +
  • The bug in MDI child menus (in skinned mode) where the restore, + minimize, and close items were shown in an un-skinned condition has been + fixed.
  • +
  • COXSysInfo has been updated to correctly identify all OSes + up to Windows Vista.
  • +
  • The Cool Controls demo had a bug where the Listbox tooltips came up as + garbage - this has been fixed.
  • +
  • Minor bugs have been fixed in the Status Bar demo (which caused garbage + to show up in it)
  • +
  • The Screen Grabber demo has been fixed to not crash on a multiple + monitor setup.
  • +
  • A trivial bug in COXMDIFrameWndSizeDock::OnActivate has + been fixed.
  • +
  • A bug in COXTreeCtrl that caused random crashes during + drag/drop scenarios has been fixed.
  • +
+

Version +9.0

+ +

Major Upgrades:

+ +
    +
  1. The Office 2003 Look and Feel was added. The following + Ultimate ToolBox UI elements support this new skin: +
      +
    1. Menus
    2. +
    3. Toolbars and menubars
    4. +
    5. Docking windows
    6. +
    7. MDI tabs and Tear-off tabs
    8. +
    9. Shortcut bar
    10. +
    11. Properties window
    12. +
    13. Status bar
    14. +
    +
  2. +
+ +
    +
  1. The Properties window was enhanced to look more like + the VS.NET properties window.
  2. +
+ +

Minor Changes and Fixes:

+
    +
  1. A bug causing the Caption Painter +not to work in Windows XP was fixed.
  2. +
  3. A problem casing excessive flashing +of the toolbar, menu bar and docking windows under the Office XP skin was +fixed.
  4. +
  5. A problem causing the close, +minimize and maximize buttons of the menu bar to appear too large in skinned +Windows XP was fixed.
  6. +
  7. A bug causing a floating toolbar to +stick to the mouse cursor even after the user has released the button was +fixed.
  8. +
  9. A GDI leak found in the Office XP +skin causing problems in Windows ME was removed.
  10. +
  11. Several upgrades to the COXTreeCtrl were implemented:
      +
    1. Arrow key navigation was added.
    2. +
    3. Various drawing problems involving +different back colors were fixed.
    4. +
    5. An item indentation problem involving +adding a child item to a collapsed parent was fixed.
    6. +
    +
  12. +
  13. A problem in COXPreviewDialog caused +by a font that does not exist in all operating systems was fixed.
  14. +
  15. The classes COXTreeCtrl and +COXGridCtrl will draw their sort headers correctly now in Windows XP skinned +mode.
  16. +
  17. Several upgrades to the +COXPropertiesWnd class were implemented:
      +
    1. OnDeleteProperty() notification was +added.
    2. +
    3. A method for deleting all properties +called DeleteAll() was added.
    4. +
    5. A problem causing a crash if a +property is deleted while being edited was fixed.
    6. +
    7. A problem causing the combo box drop +list not to show in its entirety was fixed.
    8. +
    9. Added the following functionality: +when editing a property the changes will be accepted if Enter is pressed and +discarded when Escape is pressed.
    10. +
    +
  18. +
  19. Fixed a problem in COXMultiComboBox +causing uncontrolled scrolling to the bottom of the drop list in Windows XP +skinned mode.
  20. +
+ +

Sample Changes:

+ +
    +
  1. The SkinsDemo sample was enhanced to show the new + Office 2003 look and feel.
  2. +
  3. The SkinsDemo sample was upgraded to demonstrate how to + show and hide the different docking windows from the View menu.
  4. +
+ +

New Classes:

+ +
    +
  1. COXUxTheme – internal class used by +various Ultimate Toolbox classes designed to detect the presence of Windows XP +skins and retrieve their color schemas.
  2. +
+ +

Version +8.1

+

Major Upgrades:

+
    +
  1. Visual +Studio.NET 2003 full compatibility.
  2. +
  3. Enhancements to +the VS.NET like properties window: the following property types with their +appropriate editors are now supported:
      +
    1. Text
    2. +
    3. Numeric (with +the ability to specify the number of decimal places)
    4. +
    5. List of items +(enumeration)
    6. +
    7. Date
    8. +
    9. IP address
    10. +
    11. Currency
    12. +
    13. Color
    14. +
    15. Filename
    16. +
    17. Directory
    18. +
    19. Time (from +nanoseconds to days)
    20. +
    21. Angle (degrees, +radians or grades)
    22. +
    23. Length (metric +or imperial)
    24. +
    25. Temperature +(Celsius, Fahrenheit, Kelvin)
    26. +
    27. Custom field +with a custom editor.
    28. +
    +
  4. +
+ +

Minor Changes and Fixes:

+ +
    +
  1. The TVOXS_NOFOCUSRECT style was +introduced in COXTreeView to provide the ability to turn off the item focus +rectangle for selected items.
  2. +
  3. A buggy assertion statement was +removed from COXMDIChildWndSizeDock::Create(…)
  4. +
  5. An auto-scrolling problem in COXMultiComboBox was fixed.
  6. +
  7. A bug in COXPhysicalEdit causing a +crash was fixed.
  8. +
  9. A bug causing all drop edit controls +to show garbage characters in the tooltips was fixed.
  10. +
  11. A bug preventing COXTreeCtrl::SelectItem(…) from having any effect in single selection mode was +fixed.
  12. +
  13. A bug causing a floating menu to +jump away from the mouse cursor was fixed.
  14. +
+ +

Sample Changes:

+ +
    +
  1. The SkinsDemo sample was enhanced to +demonstrate the use of COXPropertiesWnd and all the different type of +properties that are supported.
  2. +
  3. The CustomizeManager sample was +modified to reflect that in CMainFrame::OnCreate() InitializeToolbars() must be +called prior to calling InitializeCommands().
  4. +
+ +

New Classes:

+ +
    +
  1. COXPropertyTree – internal class +used by COXPropertiesWnd.
  2. +
  3. COXListEdit – A drop edit control +with the ability to display a list of items.
  4. +
  5. COXListPopup – internal class used +by COXListEdit.
  6. +
  7. COXIPEdit – A an IP address edit +control.
  8. +
  9. COXCalendarEdit – A drop edit +control for dates.
  10. +
  11. COXMonthCalPopup – internal class +used by COXCalendarEdit.
  12. +
+ +

Version +8.02

+ +

Changes and Fixes:

+
    +
  1. When the snapping and tear-off behavior is enabled a + floating window could not be resized. This was fixed.
  2. +
  3. OXShdWnd.cpp was not added to the build library project + causing link errors. This was fixed.
  4. +
  5. In COXPropertiesWnd it was possible to edit a category + name, which caused a crash. This was fixed.
  6. +
  7. When the extended tree control (COXTreeCtrl) is + automatically populated the user could not expand the tree by single + clicking on the plus. This was fixed.
  8. +
  9. Some painting problems of the edit control of the + extended tree were fixed.
  10. +
  11. A problem preventing a date item from being edited in + the extended tree was fixed.
  12. +
  13. The COXShdWnd class was not declared as exportable, + which caused some link errors. This problem was fixed.
  14. +
  15. In the Customize Manager it was possible to turn off + the “cool look” of the toolbars while in OfficeXP skin mode, which caused + a crash. This problem was fixed.
  16. +
  17. A paining problem of COXCustomTBComboBox with the + CBS_DROPLIST style under the Office XP skin was fixed.
  18. +
  19. A problem causing COXSkinnedCombo not to send + CBN_SELCHANGE message was fixed.
  20. +
  21. A problem causing a floating window not to redraw the + window behind it fast enough while moving was fixed.
  22. +
  23. In COXDao the FindNext method will work properly with + searches on string values.
  24. +
+ +

Sample Changes:

+
    +
  1. A new sample called CustomizeManager was added to the + samples/advanced/ directory. This sample demonstrates how to use + COXCustomizeManager. The different steps required are written as comments + in the source code. Just search for the string “STEP”.
  2. +
  3. A new sample called ExtendedTreeControl was added to + the samples/gui/ directory. This sample shows how to achieve the + functionality of COXTreeCtrl demonstrated in the downloadable Demo + Browser.
  4. +
  5. The link errors in the TabViews sample were fixed.
  6. +
+ +

Version +8.01

+ +

New +Functionality:

+ +
    +
  1. Ability + to programmatically tab all docked windows on a dock bar. Use + + COXSizeDockBar:: TabAllDockedControlBars(…) to accomplish +this.
+ +

Changes +and Fixes:

+
    +
  1. COXSkinnedComboBox + now sends proper notification messages.
  2. +
  3. A combo + box custom toolbar button is now properly centered in the Windows XP skin.
  4. +
  5. A + behavior problem was fixed when the user double-clicks the gripper of a tabbed + docking window.
  6. +
  7. A + behavior problem was fixed preventing the user from moving a docked + toolbar to the left edge of the windows without the toolbar going into + float mode.
  8. +
  9. A crash + in COXPreviewDialog which only occurred in Windows 2000 when compiled with + VC7 was fixed.
  10. +
  11. Missing + files causing links errors were added to the SideBySideToolbars sample.
  12. +
+ +

Version +8.0

+ +

Major Features:

+ + + + + + + + + + + + + + + + + + +
+

Snapping Toolbars, Menubars and + Docking Windows

+
+

When a toolbar, menubar or a docking windows is being + dragged the entire content is shown instead of just the outline. When it is + being docked it snaps to its appropriate position before the user releases + the mouse button. This behaviour is the same as the snapping toolbars and + docking windows of Visual Studio .NET.

+
+

Detachable tabs

+
+

Two or more docking windows can be docked to the same area + of then screen. When they are only one of the is shown and the others can be + activated by clicking on the appropriate tab on the bottom. The user can + click on a tab an drag it away, therefore separating a docking window from + the group, hence the name "detachable tabs". Behaviour is similar + but not identical to the detachable tabs of Visual Studio .NET

+
+

Properties Window

+
+

A new window designed to provide UI for properties and + property categories.

+
+

Window Shadows

+
+

A new template class called COXShadowedWnd<...> + providing the ability to display a shadow behind any window. The + implementation does not require Win 2000 or higher and allows the shadowed + window to be moveable and sizeable.

+
+ +

There are also numerous minor features, updates and bug fixes.

+

Version +7.52

+ +

Changes and Fixes:

+ +
    +
  1. The “octodll” project was renamed to “UT”.
  2. +
  3. The “octolib” project was renamed to “UTStaticLib”
  4. +
  5. The files “UTDLL.h” and “UTStaticLib.h” were added to + the /include folder to automatically link to the appropriate .LIB file.
  6. +
  7. A CFormView constructor was added to COXSkinnedView.h
  8. +
  9. Various bug fixes.
  10. +
+ +

Sample Changes:

+ +
    +
  1. Two new samples were added to +/samples/GettingStarted
      +
    1. UsingDLL – +explains how to use the Ultimate ToolBox in a DLL.
    2. +
    3. UsingStaticLib – +explains how to use the UltimateToolBox in a static library.
    4. +
    +
  2. +
+ +

Version +7.51

+ +

Office XP Skin Fixes:

+ +
    +
  1. The colors of a skinned application are now +determined exactly the same way as Office XP, so a skinned application will +look the  same as Office XP under any color scheme.
  2. +
  3. A drawing problem of COXSkinnedCombo in Win +XP with Common Controls 6.0 was fixed.
  4. +
  5. A skinned mini frame window will no longer +show a non skinned close button when sized.
  6. +
  7. A GDI leak was removed that could lead to a +crash on some systems.
  8. +
  9. A menu positioning problem causing the menu +to pop on top of the menu bar item when the menu bar is docked at the bottom of +the  application was fixed.
  10. +
  11. A problem causing the COXCoolToolBar to draw +incorrectly when the item images are very large was fixed.
  12. +
  13. The main frame will now properly recalculate +it layout when the skins are changed dynamically.
  14. +
  15. COXStatusBar will now properly draw a bitmap +under the Office XP skin.
  16. +
  17. Win 9x: The slit window separators will now +be properly drawn.
  18. +
  19. The size of the menu check boxes was +corrected.
  20. +
  21. The skin classes will no longer report Level +4 warnings.
  22. +
  23. Win 9x: A drawing problem with the menu +shadow when the menu bar is docked to the bottom was fixed.
  24. +
  25. Win 9X: A popup window will no longer +interfere with the shadow if its parent window.
  26. +
  27. Win 9x: A problem causing the menu bar not +to draw while moving was fixed.
  28. +
  29. Win 9x: The hot icons of a toolbar or a menu +will now be raised and will drop a shadow.
  30. +
  31. Win 9x: A problem causing the toolbar and +shortcut bar images not to draw transparently in 32-bit color was fixed.          +
  32. +
+ +

Other Changes:

+ +
    +
  1. Multi-monitor support was added.
  2. +
  3. OXToolTipCtrl.cpp was added as a dependency +to OXBitmapMenu.cpp, so you might have to add OXToolTipCtrl.cpp to your project +to avoid linker error LNK2001.
  4. +
+ +

Sample Changes:

+ +
    +
  1. The OulookLikeDemo sample was modified to +demonstrate skinned drop down buttons properly.
  2. +
  3. More comments were added to the SkinsDemo to +show the steps involved in adding skins to an application. Just search for +"STEP".
  4. +
+ + + + \ No newline at end of file diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/CONVFILE.h b/UltimateToolbox93_src/Ultimate Toolbox/include/CONVFILE.h new file mode 100644 index 0000000..c2cc30e --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/CONVFILE.h @@ -0,0 +1,271 @@ +// ========================================================================== +// Class Specification : COXConvertedFile +// ========================================================================== + +// Header file : convfile.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// YES Abstract class (does not have any objects) +// Pure functions : ConvertRead +// ConvertWrite +// YES Derived from CFile + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// Yes Uses exceptions (same as CFile) + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class enhances the CFile bass class by enabling conversions +// Every block that is read from file or written to file is first +// converted by calling the pure virtual functions ConvertRead and ConvertWrite +// These conversion functions work with buffers of fixed size that must specified +// when a COXConvertedFile is constructed + +// Remark: +// To enable the conversion blockwise are file functions are buffered until +// an entire block can be processed +// The actual file positioning occurs always with that specified size +// Blocks are padded with 0-characters + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// +#ifndef __CONVFILE_H__ +#define __CONVFILE_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "watchbuf.h" + +#ifndef LPCBYTE +#define LPCBYTE const unsigned char* +#endif + + +class OX_CLASS_DECL COXConvertedFile : public CFile +{ +DECLARE_DYNAMIC(COXConvertedFile) + +// Data members ------------------------------------------------------------- +public: + +protected: + BOOL m_bEnabled; + + const UINT m_nBufferLength; + LPBYTE m_pOriginalBuffer; + COXWatchBuffer m_convertedBuffer; + + int m_nBufferPos; + DWORD m_nFilePos; + BOOL m_bRead; + + BOOL m_bOpenedForRead; + BOOL m_bOpenedForWrite; + + CFile* m_pDelegateToFile; + +private: + +// Member functions --------------------------------------------------------- +public: + COXConvertedFile(UINT wBufferLength, BOOL bConvertEnabled = TRUE); + // --- In :wBufferLength : The length used for conversions + // bConvertEnabled : Whether conversion should be actually done + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + UINT GetBufferLength() const; + // --- In : + // --- Out : + // --- Returns : The length of the internal buffer + // --- Effect : + + BOOL IsConvertEnabled() const; + // --- In : + // --- Out : + // --- Returns : Whether conversions are enabled or not + // --- Effect : + + BOOL EnableConvert(BOOL bEnable = TRUE); + // --- In : bEnable : The new enable state + // --- Out : + // --- Returns : Whether it succeeds or not + // --- Effect : Enables or disables the file conversion + // This can only be done on buffer boundaries + // (So must be : GetPosition() % GetBufferLength() == 0) + + WORD ForceEnableConvert(BOOL bEnable = TRUE); + // --- In : bEnable : The new enable state + // --- Out : + // --- Returns : The number of bytes skipped to reach th next buffer boundary + // --- Effect : Enables or disables the file conversion + // When this function is invoked and the buffer is not + // on a boundary (GetPosition() % GetBufferLength() != 0) + // bytes will be skipped until a boundary is reached + // When the file has been opened for writing, zero-characters + // will be written + + virtual BOOL IsOpen() const; + // --- In : + // --- Out : + // --- Returns : Whether the file has been opened and not yet closed + // --- Effect : + + virtual BOOL ConvertRead(LPCBYTE pOriginal, LPBYTE pConverted) = 0; + // --- In : pOriginal : Buffer with original contents + // pConverted : Empty (but allocated) buffer + // --- Out : pConverted : Converted buffer + // --- Returns : Whether it succeeded or not + // Should always be TRUE for now + // --- Effect : Converts a block when it is read from file + // pOriginal contains the original file contents + // Both blocks have the length that was specified at construction time + + virtual BOOL ConvertWrite(LPCBYTE pOriginal, LPBYTE pConverted) = 0; + // --- In : pOriginal : Buffer with original contents + // pConverted : Empty (but allocated) buffer + // --- Out : pConverted : Converted buffer + // --- Returns : Whether it succeeded or not + // Should always be TRUE for now + // --- Effect : Converts a block when it is written from file + // pConverted should contain the new file contents + // Both blocks have the length that was specified at construction time + +// ANSI functions + virtual LPSTR ReadString(LPSTR psz, UINT nMax); + // --- In : psz : Specifies a pointer to a user-supplied buffer that will receive + // a null-terminated text string. + // nMax : Specifies the maximum number of characters to read. + // Should be one less than the size of the lpsz buffer. + // --- Out : + // --- Returns : A pointer to the buffer containing the text data; + // NULL if end-of-file was reached. + // --- Effect : This function completely mimics the CStdioFile::ReadString behaviour + // including the CR/LF - LF conversion and EOF-character detection + + virtual void WriteString(LPCSTR psz); + // --- In : psz : Specifies a pointer to a buffer containing a null-terminated + // text string. + // --- Out : + // --- Returns : + // --- Effect : This function completely mimics the CStdioFile::WriteString behaviour + // including the CR/LF - LF conversion and EOF-character detection + +#ifdef WIN32 +// UNICODE functions + virtual LPSTR ReadString(LPWSTR psz, UINT nMax); + // --- In : psz : Specifies a pointer to a user-supplied buffer that will receive + // a null-terminated text string. + // nMax : Specifies the maximum number of characters to read. + // Should be one less than the size of the lpsz buffer. + // --- Out : + // --- Returns : A pointer to the buffer containing the text data; + // NULL if end-of-file was reached. + // --- Effect : This function completely mimics the CStdioFile::ReadString behaviour + // including the CR/LF - LF conversion and EOF-character detection + + virtual void WriteString(LPCWSTR psz); + // --- In : psz : Specifies a pointer to a buffer containing a null-terminated + // text string. + // --- Out : + // --- Returns : + // --- Effect : This function completely mimics the CStdioFile::WriteString behaviour + // including the CR/LF - LF conversion and EOF-character detection +#endif + + BOOL DelegateOpen(CFile* pDelegateToFile, UINT nOpenFlags); + // --- In : pDelegateToFile : The new file pointer to delegated to. + // nOpenFlags : The flags that will determine how this encrypted file should + // be treated. + // --- Out : + // --- Returns : succesfull or not + // --- Effect : This function enables this conversion to be inserted into a chain of transformations. + // This chaining requires a setup sequence of transformations. Via this function + // you tell this conversion on what file pointer he has to do his conversion. + // This file pointer can allready be converted himself, so that's the way to + // form a sequence of transformations. More specifically this file pointer replaces + // the CFile baseclass of this encrypted file. All calls to the baseclass will now + // be routed(delegated) to this file pointer, which is the next in the transformation chain. + + BOOL UnDelegateOpen(); + // --- In : + // --- Out : + // --- Returns : succesfull or not + // --- Effect : Calling this function ensures that this transformation is not anymore + // chained to other transfromations. It's again a stand-alone transformation. + // The state where this object will be in after calling this function, is the + // same when the object was just constructed. + + // The following functions are the overloaded versions of the original CFile functions + // They take care of the buffering and conversions + virtual BOOL Open(LPCTSTR pszFileName, UINT nOpenFlags, CFileException* pError = NULL); + + virtual CFile* Duplicate() const; +#if _MFC_VER >= 0x0700 + virtual ULONGLONG GetPosition() const; + virtual ULONGLONG GetLength() const; +#else + virtual DWORD GetPosition() const; + virtual DWORD GetLength() const; +#endif + virtual LONG Seek(LONG lOff, UINT nFrom); + virtual void SetLength(DWORD dwNewLen); + + virtual UINT Read(void FAR* lpBuf, UINT nCount); + virtual void Write(const void FAR* lpBuf, UINT nCount); + + virtual void LockRange(DWORD dwPos, DWORD dwCount); + virtual void UnlockRange(DWORD dwPos, DWORD dwCount); + + virtual void Abort(); + virtual void Flush(); + virtual void Close(); + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXConvertedFile(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + DWORD GetLengthPrivate() const; + BOOL ReadBuffer(); + void FlushBuffer(); + void CheckBufferPosition(); + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/COPYTREE.h b/UltimateToolbox93_src/Ultimate Toolbox/include/COPYTREE.h new file mode 100644 index 0000000..dc2fc87 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/COPYTREE.h @@ -0,0 +1,150 @@ +// ========================================================================== +// Class Specification : COXCopyTree +// ========================================================================== + +// Header file : copytree.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class allows the copying of the contents of one directory to another + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __COPYTREE_H__ +#define __COPYTREE_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "path.h" +#include "dstrlist.h" + + +class OX_CLASS_DECL COXCopyTree : public CObject +{ +DECLARE_DYNAMIC(COXCopyTree) + +// Data members ------------------------------------------------------------- +public: + +protected: + COXDoubleStringList m_dsFiles; // Files created during copy process + COXDoubleStringList m_dsDirs; // Dirs created during copy process + + short m_nStatus; // Status of the copy process + + COXDirSpec m_SourceDir; + COXDirSpec m_DestDir; + COXDirSpec m_BufferDir; + + COXPathSpec m_SourcePath; + COXPathSpec m_DestPath; + + COXCopyStatusDialog* m_pCpyStatDlg; + +private: + HCURSOR m_hCursor; + +// Member functions --------------------------------------------------------- +public: + COXCopyTree(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + BOOL DoCopyTree(COXDirSpec SourceDir, COXDirSpec DestDir, BOOL bOnlyContents = TRUE, + BOOL bCleanUp = FALSE,COXCopyStatusDialog* pCpyStatDlg = NULL); + // --- In : SourceDir : the directory to copy the contents from + // DestDir : the directory to copy the contents to + // bOnlyContents : whether to copy the name of the source directory first + // pCpyStatDlg : pointer to Status dlg. MUST ONLY BE ALLOCATED(new) AND + // NOT YET CREATED!!!!! + // --- Out : + // --- Returns : suceeded or not + // --- Effect : copies the contents of one directory to another + + void WalkTree(WORD wLevel); + // --- Input : wLevel : bookmark, when wLevel is greater than 0, then the + // current working directory is a subdirectory of the original + // directory. If wLevel is equal to 0, then the directory is the + // original directory and the recursive calls stop + // --- Out : + // --- Returns : + // --- Effect : finds a subdirectory in the current working directory, + // changes the current working directory to this subdirectory, + // and recusively calls itself until there are no more + // subdirectories + + void CleanUp(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : clean up the dirs and files double list and check for + // required removal of files based on status. + + + void SetHourGlass(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Set an hourglass cursor + + void SetArrow(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Set an arrow cursor + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXCopyTree(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/CPYSTDLG.h b/UltimateToolbox93_src/Ultimate Toolbox/include/CPYSTDLG.h new file mode 100644 index 0000000..cd72bc2 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/CPYSTDLG.h @@ -0,0 +1,159 @@ +// ========================================================================== +// Class Specification : COXCopyStatusDialog +// ========================================================================== + +// Header file : cpystdlg.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXModelessDialog + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// YES/NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is used to give the user some feedback regarding the copy process +// The user is also able to cancel the process via the cancel button + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __COPYSTATUS_H__ +#define __COPYSTATUS_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "mdeldlg.h" + + +class OX_CLASS_DECL COXCopyStatusDialog : public COXModelessDialog +{ +DECLARE_DYNAMIC(COXCopyStatusDialog) + +// Data members ------------------------------------------------------------- +public: + enum ECopyStatus + { + CSUndefined = 0, + CSCopying = 1, + CSRemoving = 2, + }; + + static const ECopyStatus CS_FIRST; + static const ECopyStatus CS_LAST; + +protected: + BOOL m_bCancelled; + CWnd* m_pParentWnd; + + CStatic* m_pFromLabel; + CStatic* m_pToLabel; + CStatic* m_pFromMsg; + CStatic* m_pToMsg; + +private: + +// Member functions --------------------------------------------------------- +public: + COXCopyStatusDialog(COXCopyStatusDialog** ppSelf = NULL, CWnd* pParentWnd = NULL); + // --- In : ppSelf : a pointer to itself, used to null out automatic + // any reference the user made to this dialog + // pParentWnd : the parent of this modeless dialog + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual BOOL Create(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Creates the Resource template in memory and Calls CreateIndirect + // to finally create the modeless dlg with it. + + virtual BOOL IsCancelled(); + // --- In : + // --- Out : + // --- Returns : Whether the user has pushed the cancel button or not + // --- Effect : + + virtual void OnCancel(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Called when the user clicks the Cancel button (the button with an ID of IDCANCEL). + // The Cancelled member is set + + virtual void SetStatusText(ECopyStatus eCopyStatus, LPCTSTR pszFromText = _T(""), LPCTSTR pszToText = _T("")); + // --- In : eCopyStatus : The status of the copy process + // pszFromText : the text representing the file you're copying from + // pszToText : the text representing the file you're copying to + // --- Out : + // --- Returns : Succeeded or not + // --- Effect : Gives the user some feedback on the copy process by setting some text to + // a few Static variables. + + static int nCopyAnsiToWideChar (LPWORD lpWCStr, LPTSTR lpAnsiIn); + // --- In : lpWCStr : Wide char String to copy to + // lpAnsiIn : ansi String to copy from + // --- Out : + // --- Returns : + // --- Effect :Takes second parameter as Ansi string, copies + // it to first parameter as wide character (16-bits / char) string, + // and returns integer number of wide characters (words) in string + // including the trailing wide char NULL) + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXCopyStatusDialog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + BOOL CreateControls(); + BOOL CreateStatic(UINT nIDC, LPCTSTR pszText = _T(""), + const CRect& Position=CRect(0,0,0,0)); + + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //{{AFX_MSG(CFindDialog) + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/DIR.h b/UltimateToolbox93_src/Ultimate Toolbox/include/DIR.h new file mode 100644 index 0000000..567acd2 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/DIR.h @@ -0,0 +1,367 @@ +// ========================================================================== +// Class Specification : COXDirSpec +// ========================================================================== + +// Header file : dir.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates the directory specification on Windows NT +// supported file systems (FAT, VFAT, NTFS, HPFS) +// A directory consists of a drive specification, followed a subdirectory + +// Remark: +// Directory specifications are always represented in upper case characters +// An implicit conversion is done when the supplied names are in lower case; +// All member functions starting with "Do" will physically change something +// on disk. Other functions only change the internal data. +// E.g. The normal destructor only destroys the internal representation, +// to actually remove a directory use DoRemove() + +// Prerequisites (necessary conditions): +// +// Limited edition: +// In the not registered version (#define NOT_REGISTERED) +// a limited implementation of COXDirSpec is provided +// The function DoCopyDirectory() is not implemented + +///////////////////////////////////////////////////////////////////////////// +#ifndef __DIR_H__ +#define __DIR_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +// #define NOT_REGISTERED 1 + +#ifndef NOT_REGISTERED +class COXCopyStatusDialog; +#endif // !NOT_REGISTERED + + +class OX_CLASS_DECL COXDirSpec : public CObject +{ +DECLARE_SERIAL(COXDirSpec) + +// Data members ------------------------------------------------------------- +public: + +protected: + CString m_sDrive; + CString m_sSubdirectory; + +private: + +// Member functions --------------------------------------------------------- +public: + COXDirSpec(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXDirSpec(LPCTSTR pszDirectory); + // --- In : pszDirectory : The new drive and directory of the object + // --- Out : + // --- Returns : + // --- Effect : + // --- Effect : Contruction of an object together with a SetDirectory() + // Notice that whether the directory specification is valid or not + // cannot be checked in this way + + #ifdef WIN32 + BOOL IsChildDir(LPWIN32_FIND_DATA lpFindFileData) const; + #endif + + COXDirSpec(const COXDirSpec& dirSrc); + // --- In : dirSrc : Directory object which will be copied + // --- Out : + // --- Returns : + // --- Effect : Copy contruction. + + BOOL AppendDirectory(const COXDirSpec& dirSecond); + // --- In : dirSecond : The directory object which will be appendec to the object + // --- Out : + // --- Returns : Whether drive and directory specification have a correct format + // --- Effect : The drive specification of the second directory specification + // must be empty or the same as that of this object. + // The subdirectory of the second dir spec may not start with + // back slash. + // It is interpreted as a subdirectory beneath the subdirectory + // of this object + + COXDirSpec& operator=(const COXDirSpec& dirSrc); + // --- In : dirSrc : Directory object which will be assign to 'this' directory object + // --- Out: + // --- Returns: + // --- Effect : Assignment operator + + CString GetDrive() const; + // --- In : + // --- Out : + // --- Returns :The drive specification of this object + // It consists of a drive letter and a colon + // or an empty string + // --- Effect : + BOOL SetDrive(LPCTSTR pszDrive); + // --- In : pszDrive : The new drive letter of the object + // --- Out : + // --- Returns : Whether drive specification has a correct format + // Whether it actually exitst is not checked + // --- Effect : + void ForceSetDrive(LPCTSTR pszDrive); + // --- In : pszDrive : The new drive letter of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + CString GetSubdirectory() const; + // --- In : + // --- Out : + // --- Returns :The subdirectory specification of this object + // It only ends in a back slash when it is the root directory + // The result may be an empty string + // --- Effect : + BOOL SetSubdirectory(LPCTSTR pszSubdirectory); + // --- In : pszSubdirectory : The new subdirectory of the object + // --- Out : + // --- Returns : Whether subdirectory specification has a correct format + // Wild characters are not allowed + // Whether it actually exitst is not checked + // --- Effect : + void ForceSetSubdirectory(LPCTSTR pszSubdirectory); + // --- In : pszSubdirectory : The new subdirectory of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + COXDirSpec GetLastSubdirectory() const; + // --- In : + // --- Out : + // --- Returns :The last subdirectory specification of this object + // Several subdirectories can be seperated by black slashes, + // only the last one is returned + // (together with the drive specification) + // It only ends in a back slash when it is the root directory + // --- Effect : + void RemoveLastSubdirectory(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Removes the last subdirectory specification of this object + // Several subdirectories can be seperated by black slashes, + // only the last one is removed + // The root directory is never removed + + CString GetDirectory() const; + // --- In : + // --- Out : + // --- Returns :The drive and directory specification of this object + // It only ends in a back slash when it is the root directory + // The result may be an empty string + // --- Effect : + BOOL SetDirectory(LPCTSTR pszDirectory); + // --- In : pszDirectory : The new drive and directory of the object + // --- Out : + // --- Returns : Whether drive and directory specification have a correct format + // Whether it actually exitst is not checked + // --- Effect : + void ForceSetDirectory(LPCTSTR pszDirectory); + // --- In : pszDirectory : The new drive and directory of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + CString GetFileSystemType(); + // --- In : + // --- Out : + // --- Returns : The name identifying the file system of this drive + // When the drive spec is not specified, an empty string + // is returned + // --- Effect : Determines the file system. + // Possible values are (among others): + // FAT : File Allocation Table + // HPFS : High Performance File System + // NTFS : New Technology File Sytem + // CDFS : Compact Disk File System + // Notice that WIN16 can only detect FAT-systems + + BOOL MakeTemp(); + // --- In : + // --- Out : + // --- Returns : Whether the unique directory could be determined + // --- Effect : Replaces the directory specification by that of the + // temporary directory + + BOOL MakeUnique(); + // --- In : + // --- Out : + // --- Returns : Whether a unique name could be made + // --- Effect : Replaces the directory specification by another + // directory specification that does not yet exist on disk + // So this can be used to make unique directory names + + BOOL MakeLargestExisting(); + // --- In : + // --- Out : + // --- Returns : Whether a unique name could be made + // --- Effect : Removes subdirectories from the directory specification + // until a directory specification is found that actually exists on disk + // (This will become the current directory) + // The drive spec is never changed + // The resulting dir spec is an absolute spec + + BOOL Exists() const; + // --- In : + // --- Out : + // --- Returns : Whether the directory (not a file!) physically exists on disk + // --- Effect : + + BOOL IsEmpty() const; + // --- In : + // --- Out : + // --- Returns : Whether the directory specification is empty + // --- Effect : + + void Empty(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : CLears the directory specification + + BOOL IsEmptyDir() const; + // --- In : + // --- Out : + // --- Returns : Whether the directory is empty = contains no files or other subdirs + // --- Effect : + + + UINT DoGetDriveType(); + // --- In : + // --- Out : + // --- Returns :the type of drive + // --- Effect : Examines the type of drive associated with this dirspec + + CString DoGetVolumeInformation(); + // --- In : + // --- Out : + // --- Returns :The volume name of the dirspec. if it fails it returns an empty string + // --- Effect : + + DWORD DoGetDiskFreeSpace(); + // --- In : + // --- Out : + // --- Returns :Free disk space + // --- Effect : Calculates the free disk space on the drive associated with this dirspec + + BOOL DoGetCurrentDir(); + // --- In : + // --- Out : + // --- Returns :Whether it succeeded or not + // --- Effect : Copies the current DOS drive and directory to the object + + BOOL DoSetCurrentDir() const; + // --- In : + // --- Out : + // --- Returns : Whether it succeeded or not + // --- Effect : Makes the direcory specified by this object the current + // directory + + BOOL DoMakeNew() const; + // --- In : + // --- Out : + // --- Returns :Whether it succeeded or not + // --- Effect : Makes a new subdirectory + // Several directories can be created in one call + +#ifndef NOT_REGISTERED + BOOL DoCopyDirectory(COXDirSpec DestDirectory, BOOL bOnlyContents = TRUE, + BOOL bCleanUp = FALSE, COXCopyStatusDialog* pCpyStatDlg = NULL); + // --- In : DestDirectory : the directory to copy to + // bOnlyContents : whether to copy only the contents or also the source dir + // pCpyStatDlg : pointer to Status dlg. MUST ONLY BE ALLOCATED(new) AND + // NOT YET CREATED!!!!! + // --- Out : + // --- Returns :Whether it succeeded or not + // --- Effect : Copioes the entire contents(files + subdirs) in this dirspec + // to another directory +#endif // !NOT_REGISTERED + + BOOL DoRemove(BOOL bRecursively = FALSE, BOOL bAlsoRemoveReadOnly = FALSE) const; + // --- In : bRecursively : Whether all underlying subdirectories + // sould be deleted first + // bAlsoRemoveReadOnly : Whether to also remove files that are + // marked as read only (TRUE) or not (FALSE) + // --- Out : + // --- Returns : Whether it succeeded or not + // --- Effect : Removes the directory + + virtual void Serialize( CArchive& archive ); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Read or write to archive + + BOOL operator==(const COXDirSpec& dirSpec) const; + BOOL operator!=(const COXDirSpec& dirSpec) const; + BOOL operator<=(const COXDirSpec& dirSpec) const; + BOOL operator<(const COXDirSpec& dirSpec) const; + BOOL operator>=(const COXDirSpec& dirSpec) const; + BOOL operator>(const COXDirSpec& dirSpec) const; + // --- In : dirSpec : Second object to which this object will be compared + // --- Out : + // --- Returns : FALSE or TRUE + // --- Effect : Comparison operators + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXDirSpec(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + COXDirSpec FindLowerDirectory() const; + BOOL RemoveAllFiles(BOOL bAlsoRemoveReadOnly = FALSE) const; + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/DIRLIST.h b/UltimateToolbox93_src/Ultimate Toolbox/include/DIRLIST.h new file mode 100644 index 0000000..e8a66a9 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/DIRLIST.h @@ -0,0 +1,146 @@ +// ========================================================================== +// Class Specification : COXDirList +// ========================================================================== + +// Header file : dirlist.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is used to get a list of all the directories in a +// certain path. +// You first set the path, by specifying it (SetPath()) +// Then you start the search (Search()) +// And then you examine the result (GetList()) + +// Remark: +// *** + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// +#ifndef __DIRLIST_H__ +#define __DIRLIST_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "path.h" + + +class OX_CLASS_DECL COXDirList : public CObject +{ +DECLARE_DYNAMIC(COXDirList) + +// Data members ------------------------------------------------------------- +public: + +protected: + COXPathSpec m_path; + CObArray m_dirArray; + +private: + +// Member functions --------------------------------------------------------- +public: + COXDirList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXPathSpec GetPath() const; + // --- In : + // --- Out : + // --- Returns : The path of dirlist + // --- Effect : + BOOL SetPath(COXPathSpec path); + // --- In : path : The new path specification of the dirlist + // --- Out : + // --- Returns : Whether the setting succeeded or not + // --- Effect : The specified path is converted to an absolute path + // if it is relative + // When no file specification is supplied *.* is assumed + + BOOL Search(); + // --- In : + // --- Out : + // --- Returns : Whether the search succeeded or not + // --- Effect : This function will search the directory specified + // by SetPath and build a list of dir specifications + // All the found dirs are appended to the list + // These can be accessed by GetList + + const CObArray* GetList() const; + // --- In : + // --- Out : + // --- Returns : A const pointer to the list of const dir specifications + // --- Effect : The list may be empty, when search did not find any dirs + + const COXDirSpec* GetAt(int nIndex) const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : + + void Sort(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Sorts the Dir list + + void ClearList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Clears the dir list + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXDirList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +// Message handlers --------------------------------------------------------- + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/DSTRLIST.h b/UltimateToolbox93_src/Ultimate Toolbox/include/DSTRLIST.h new file mode 100644 index 0000000..e11b8d4 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/DSTRLIST.h @@ -0,0 +1,172 @@ +// ========================================================================== +// Class Specification : COXDoubleStringList +// ========================================================================== + +// Header file : dStrList.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// NO Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class contains support for a doublely linked linked string list. +// Therefore the linked list contains previous and next pointers +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __DSTRLIST_H__ +#define __DSTRLIST_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + + +typedef struct StringList + { + LPTSTR pString; + BOOL bMarked; + struct StringList* pPrev; + struct StringList* pNext; + } STRINGLIST; + +class OX_CLASS_DECL COXDoubleStringList +{ +// Data members ------------------------------------------------------------- +public: +protected: +private: + STRINGLIST* m_pHead; + STRINGLIST* m_pCurrent; + STRINGLIST* m_pTail; + short m_nCount; + +// Member functions --------------------------------------------------------- +public: + COXDoubleStringList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + short GetCount() + { return m_nCount; } + // --- In : + // --- Out : + // --- Returns : Number of elements in this linked list + // --- Effect : + + short Add(LPCTSTR lpcszItem); + // --- In : lpcszItem : the item to be added + // --- Out : + // --- Returns : SUCCESS or F_MEMORY if memory exception occurred + // --- Effect : add to the list + + short AddUnique(LPCTSTR lpcszItem); + // --- In : lpcszItem : the item to be added + // --- Out : + // --- Returns : SUCCESS or F_MEMORY if memory exception occurred + // --- Effect : add to the list + + short Find(LPCTSTR pStr, int* pnSel = NULL); + // --- In : pStr : the item to be searched + // --- Out : pnSel : pointer to the index of the item if found + // --- Returns : SUCCESS or F_NOTFOUND if not found + // --- Effect : search item in linked list + + short Remove(int nSel); + // --- In : nSel : the index of item to be removed + // --- Out : + // --- Returns : SUCCESS or F_NOTFOUND if not found + // --- Effect : delete item in linked list + + LPTSTR GetFirst(); + // --- In : + // --- Out : + // --- Returns : The first string or NULL if END + // --- Effect : get the first string + + LPTSTR GetPrev(); + // --- In : + // --- Out : + // --- Returns : The prev string or NULL if END + // --- Effect : get the prev string + + LPTSTR GetLast(); + // --- In : + // --- Out : + // --- Returns : The last string or NULL if END + // --- Effect : get the last string + + LPTSTR GetNext(); + // --- In : + // --- Out : + // --- Returns : The next string or NULL if END + // --- Effect : get the next string + + LPTSTR GetAt(short nIndex); + // --- In : nIndex : the index of the item to be fetched + // --- Out : + // --- Returns : The string or NULL if not found + // --- Effect : gets a string on an certain index + + void SetMarked(short nIndex, BOOL bMark); // mark or unmark an entry + // --- In : nIndex : the item to be marked/unmarked + // bMark : TRUE to mark, ... + // --- Out : + // --- Returns : + // --- Effect : mark or unmark an entry + + BOOL IsMarked(short nIndex); + // --- In : nIndex : index of the item + // --- Out : + // --- Returns : whether the item with nIndex is marked or not + // --- Effect : + + void RemoveAll(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Removes all items from this linked list + + virtual ~COXDoubleStringList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: +private: +}; +#endif // __DSTRLIST_H__ +// ////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/EVNTLOG.h b/UltimateToolbox93_src/Ultimate Toolbox/include/EVNTLOG.h new file mode 100644 index 0000000..283fa50 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/EVNTLOG.h @@ -0,0 +1,329 @@ +// ========================================================================== +// Class Specification : COXEventLog +// ========================================================================== + +// Header file : evntlog.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// Creation Date : 27 November 1995 +// Last Modification : 27 November 1995 + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class makes the reading and writing to the eventlog of +// Windows NT very easy + +// Remark: + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// + +#ifndef __EVENT_LOG_H__ +#define __EVENT_LOG_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +enum EventType + { + eventError = EVENTLOG_ERROR_TYPE, + eventWarning = EVENTLOG_WARNING_TYPE, + eventInformation = EVENTLOG_INFORMATION_TYPE, + eventSuccess = EVENTLOG_AUDIT_SUCCESS, + eventFailure = EVENTLOG_AUDIT_FAILURE + }; + +class OX_CLASS_DECL COXEventLog : public CObject +{ +DECLARE_DYNAMIC(COXEventLog) +// Data members ------------------------------------------------------------- +public: + + CString m_sComputerName; + CString m_sLogName; + +protected: + + HANDLE m_LogHandle; + HANDLE m_EventSourceHandle; + + DWORD m_ErrorCode; + DWORD m_NumberOfBytesRead; + DWORD m_NumberOfBytesInNextRecord; + +private: + +// Member functions --------------------------------------------------------- +public: + COXEventLog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXEventLog(LPCTSTR pszSourceName); + // --- In : pszSourceName : Points to a null-terminated string that + // specifies the name of the source referenced by the returned + // handle. The source name must be a subkey of a logfile entry + // under the EventLog key in the registry. For example, the source + // name WinApp would be valid if the registry had the following form: + // HKEY_LOCAL_MACHINE + // System + // CurrentControlSet + // Services + // EventLog + // Application + // WinApp + // Security + // System + // If the source name cannot be found, the event logging service uses + // the Application logfile with no message files for the event + // identifier or category. + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual BOOL Backup(LPCTSTR pszNameOfBackupFile); + // --- In : pszNameOfBackupFile : Points to a null-terminated string that names + // the backup file. The backup filename may contain a server + // name to save the backup file on a remote server. + // --- Out : + // --- Returns : succeeded or not + // --- Effect : saves the specified event log to a backup file. The function + // does not clear the event log. + + virtual BOOL Clear(LPCTSTR pszNameOfBackupFile); + // --- In : pszNameOfBackupFile : Points to the null-terminated string specifying + // the name of a file in which a current copy of the event logfile + // will be placed. If this file already exists, the function fails. + // The backup filename may contain a server name to save the + // backup file on a remote server. If the lpBackupFileName parameter + // is NULL, the current event logfile is not backed up. + // --- Out : + // --- Returns : succeeded or not + // --- Effect : The ClearEventLog function clears the event log, + // and if name_of_backup_file is not NULL, saves the current copy + // of the logfile to a backup file. + + virtual BOOL Close(); + // --- In : + // --- Out : + // --- Returns : succeeded or not + // --- Effect : Closes the event log + + virtual BOOL CreateApplicationLog(LPCTSTR pszApplicationName, + LPCTSTR pszFileContainingMessageTableResource, + DWORD dwSupportedTypes); + // --- In : pszApplicationName : name of the subkey toi create in the registry + // pszFileContainingMessageTableResource : value of the subkey + // dwSupportedTypes : types supported + // --- Out : + // --- Returns : succeeded or not + // --- Effect : Creates a log entry in the registry for an application with + // name application_name and value the name file_containing_message_table_resource + + virtual BOOL DeleteApplicationLog(LPCTSTR pszApplicationName); + // --- In : application_name : subkey to delete + // --- Out : + // --- Returns : succeeded or not + // --- Effect : Removes a log entry out of the registry + + virtual BOOL DeregisterSource(); + // --- In : + // --- Out : + // --- Returns : succeeded or not + // --- Effect : closes registrysource registered by the RegisterSource function. + + virtual DWORD GetErrorCode() const; + // --- In : + // --- Out : + // --- Returns : the errorcode + // --- Effect : Returns the last error that occurred when executing the last command + + virtual BOOL GetNumberOfRecords(DWORD& dwNumberOfRecords); + // --- In : + // --- Out : dwNumberOfRecords : number of records + // --- Returns : succeeded or not + // --- Effect : retrieves the number of records in the current event log. + + virtual BOOL GetNumberOfBytesInNextRecord(DWORD& dwNumberOfBytesInNextRecord); + // --- In : + // --- Out : dwNumberOfRecords : number of bytes in next record + // --- Returns : succeeded or not + // --- Effect : retrieves the number of bytes in the next record of the current event log. + + virtual BOOL NotifyChange(HANDLE hEventHandle, HANDLE hLogHandle = NULL); + // --- In : hEventHandle : A handle to a Win32 event. This is the event that becomes + // signaled when an event is written to the event log file + // specified by log_handle. + // hLogHandle : Handle to an event log file + // --- Out : + // --- Returns : succeeded or not + // --- Effect : lets an application receive notification when an event is written + // to the event log file specified by log_handle. When the event is + // written to the event log file, the function causes the event object + // specified by event_handle to become signaled. + + virtual BOOL OpenBackup(LPCTSTR pszNameOfBackupFile, LPCTSTR pszNameOfComputer = NULL); + // --- In : pszNameOfBackupFile : Points to a null-terminated string that specifies + // the name of the backup file. The backup filename may contain a server + // name to open a backup file on a remote server (in this case, the + // lpszUNCServerName parameter must be NULL). + // pszNameOfComputer : Points to a null-terminated string that specifies + // the Universal Naming Convention (UNC) name of the server on which + // this operation is to be performed. If this parameter is NULL, the + // operation is performed on the local computer. + // --- Out : + // --- Returns : succeeded or not + // --- Effect : opens a backup event log. + + virtual BOOL Open(LPCTSTR pszLogName, LPCTSTR pszNameOfComputer = NULL); + // --- In : pszLogName : Points to a null-terminated string that specifies the name + // of the source that will be opened. The source + // name must be a subkey of a logfile entry under the EventLog key in + // the registry. For example, the source name WinApp would be valid if + // the registry had the following form: + // HKEY_LOCAL_MACHINE + // System + // CurrentControlSet + // Services + // EventLog + // Application + // WinApp + // Security + // System + // + // If the source name cannot be found, the event logging service uses + // the Application logfile with no message files for the event identifier + // or category. + // pszNameOfComputer : Points to a null-terminated string that specifies + // the Universal Naming Convention (UNC) name of the server on which + // this operation is to be performed. If this parameter is NULL, the + // operation is performed on the local computer. + // --- Out : + // --- Returns : succeeded or not + // --- Effect : opens an event log. + + virtual BOOL Read(DWORD dwRecordNumber, + LPVOID pBuffer, + DWORD& dwNumberOfBytesToRead, + DWORD dwHowToRead = EVENTLOG_FORWARDS_READ | EVENTLOG_SEQUENTIAL_READ); + // --- In : dwRecordNumber : see ::ReadEventLog parameter dwRecordOffset + // dwHowToRead : see ::ReadEventLog parameter dwReadFlags + // --- Out : pBuffer : see ::ReadEventLog parameter lpBuffer + // dwNumberOfBytesToRead : see ::ReadEventLog parameter nNumberOfBytesToRead + // --- Returns : succeeded or not + // --- Effect : reads a whole number of entries from the specified event log. The + // function can be used to read log entries in forward or reverse + // chronological order. + + virtual BOOL RegisterSource(LPCTSTR pszSourceName, LPCTSTR pszNameOfComputer = NULL); + // --- In : pszSourceName : Points to a null-terminated string that specifies the name + // of the source that will be opened. The source + // name must be a subkey of a logfile entry under the EventLog key in + // the registry. For example, the source name WinApp would be valid if + // the registry had the following form: + // HKEY_LOCAL_MACHINE + // System + // CurrentControlSet + // Services + // EventLog + // Application + // WinApp + // Security + // System + // + // If the source name cannot be found, the event logging service uses + // the Application logfile with no message files for the event identifier + // or category. + // pszNameOfComputer : Points to a null-terminated string that specifies + // the Universal Naming Convention (UNC) name of the server on which + // this operation is to be performed. If this parameter is NULL, the + // operation is performed on the local computer. + // --- Out : + // --- Returns : succeeded or not + // --- Effect : register source_name with name_of_computer at the eventlog + + virtual BOOL Report(EventType eEventType, + DWORD dwEventIdentifier, + WORD wCategory = 0, + WORD wNumberOfStrings = 0, + LPCTSTR* pszStringArray = NULL, + DWORD dwNumberOfRawDataBytes = 0, + LPVOID pRawDataBuffer = NULL, + PSID pUserSecurityIdentifier = NULL); + // --- In : see ::ReportEvent + // --- Out : + // --- Returns : succeeded or not + // --- Effect : writes an entry at the end of the current event log. + + virtual BOOL Report(LPCTSTR pszLogName, + DWORD dwMessageStringResourceID, + WORD wNumberOfStrings = 0, + LPCTSTR* pszStringArray = NULL); + // --- In : see ::ReportEvent + // --- Out : + // --- Returns : succeeded or not + // --- Effect : opens the eventlog, writes an entry at the end of the current + // event logand closes it again + + virtual void ReportError(LPCTSTR pszStringToReport); + // --- In : pszStringToReport : data to write + // --- Out : + // --- Returns : succeeded or not + // --- Effect : writes an error entry at the end of the current event log. + + virtual void ReportInformation(LPCTSTR pszStringToReport); + // --- In : pszStringToReport : data to write + // --- Out : + // --- Returns : succeeded or not + // --- Effect : writes an info entry at the end of the current event log. + +#if defined(_DEBUG) + virtual void Dump(CDumpContext& dump_context) const; + virtual void AssertValid() const; +#endif // _DEBUG + + virtual ~COXEventLog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + void Initialize(); + +}; + +#endif // __EVENT_LOG_H__ diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/FILE.h b/UltimateToolbox93_src/Ultimate Toolbox/include/FILE.h new file mode 100644 index 0000000..b433a2c --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/FILE.h @@ -0,0 +1,245 @@ +// ========================================================================== +// Class Specification : COXFileSpec +// ========================================================================== + +// Header file : file.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates a file specification. +// A file specification consists of a fule base name, a file extender +// and file attributes (length, ...) + +// Remark: +// File specifications are always represented in lower case characters +// An implicite conversion is done when the supplied names are in upper case; +// All member functions starting with "Do" will physically change something +// on disk. Other functions only change the internal data. + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __FILE_H__ +#define __FILE_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXFileSpec : public CObject +{ +DECLARE_SERIAL(COXFileSpec) + +// Data members ------------------------------------------------------------- +public: + +protected: + CString m_sFileName; + CTime m_time; + LONG m_lnLength; + BYTE m_eAttributes; + +private: + +// Member functions --------------------------------------------------------- +public: + COXFileSpec(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXFileSpec(LPCTSTR pszFileName); + // --- In : pszFileName : The new file name of the object + // --- Out : + // --- Returns : + // --- Effect : + // --- Effect : Contruction of an object together with a SetFileName() + // Notice that whether the file specification is valid or not + // cannot be checked in this way + + COXFileSpec(const COXFileSpec& fileSrc); + // --- In : fileSrc : File object which will be copied + // --- Out : + // --- Returns : + // --- Effect : Copy contruction. + + COXFileSpec& operator=(const COXFileSpec& fileSrc); + // --- In : fileSrc : File object which will be assign to 'this' file object + // --- Out: + // --- Returns: + // --- Effect : Assignment operator + + CString GetBaseName() const; + // --- In : + // --- Out : + // --- Returns :The base name of this object + // It does not end in a full stop + // --- Effect : + BOOL SetBaseName(LPCTSTR pszBaseName); + // --- In : pszBaseName : The new base name of the object + // --- Out : + // --- Returns : Whether base name has a correct format + // Wild characters are allowed + // --- Effect : + void ForceSetBaseName(LPCTSTR pszBaseName); + // --- In : pszBaseName : The new base name of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + CString GetExtender() const; + // --- In : + // --- Out : + // --- Returns :The extender of this object + // It never begins with a full stop + // The result may be an empty string + // --- Effect : + BOOL SetExtender(LPCTSTR sExtender); + // --- In : pszExtender : The new extender of the object + // --- Out : + // --- Returns : Whether extender has a correct format + // Wild characters are allowed + // --- Effect : + void ForceSetExtender(LPCTSTR sExtender); + // --- In : pszExtender : The new extender of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + CString GetFileName() const; + // --- In : + // --- Out : + // --- Returns :The base name and the extender of this object + // The result may be an empty string + // --- Effect : + BOOL SetFileName(LPCTSTR sFileName); + // --- In : pszFileName : The new base name and extender of the object + // --- Out : + // --- Returns : Whether file name has a correct format + // Wild characters are allowed + // --- Effect : + void ForceSetFileName(LPCTSTR sFileName); + // --- In : pszFileName : The new base name and extender of the object + // --- Out : + // --- Returns : + // --- Effect : This function extracts illegal characters and thus + // will always succeeds + + CTime GetTime() const; + // --- In : + // --- Out : + // --- Returns :The creation date and time of this object + // --- Effect : + + BOOL SetTime(CTime time); + // --- In : time : The new date and time of the object + // --- Out : + // --- Returns : Whether date and time specification is valid + // --- Effect : Notice that the DOS file system can only work with + // even numbered seconds (12 seconds exist, 13 not) + // DOS will automatically convert this + + LONG GetLength() const; + // --- In : + // --- Out : + // --- Returns :The file length in bytes of this object + // --- Effect : + + BOOL SetLength(LONG lnLength); + // --- In : lnLength : The length of the object + // --- Out : + // --- Returns : Whether length specification is valid + // --- Effect : + + BYTE GetAttributes() const; + // --- In : + // --- Out : + // --- Returns : The file attributes of this object + // --- Effect : + + BOOL SetAttributes(CFile::Attribute attributes); + // --- In : atrributes : The attributes of the object + // --- Out : + // --- Returns : Whether attributes specification is valid + // --- Effect : + + BOOL IsEmpty() const; + // --- In : + // --- Out : + // --- Returns : Whether the file specification is empty + // --- Effect : + + void Empty(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Clears the file specification + + virtual void Serialize( CArchive& archive ); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Read or write to archive + + BOOL operator==(const COXFileSpec& fileSpec) const; + BOOL operator!=(const COXFileSpec& fileSpec) const; + BOOL operator<=(const COXFileSpec& fileSpec) const; + BOOL operator<(const COXFileSpec& fileSpec) const; + BOOL operator>=(const COXFileSpec& fileSpec) const; + BOOL operator>(const COXFileSpec& fileSpec) const; + // --- In : fileSpec : Second object to which this object will be compared + // --- Out : + // --- Returns : FALSE or TRUE + // --- Effect : Comparison operators + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXFileSpec(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/FILELIST.h b/UltimateToolbox93_src/Ultimate Toolbox/include/FILELIST.h new file mode 100644 index 0000000..c277c79 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/FILELIST.h @@ -0,0 +1,146 @@ +// ========================================================================== +// Class Specification : COXFileList +// ========================================================================== + +// Header file : filelist.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is used to get a list of all the files in a +// certain path. +// You first set the path, by specifying it (SetPath()) +// Then you start the search (Search()) +// And then you examine the result (GetList()) + +// Remark: +// *** + +// Prerequisites (necessary conditions): +// *** + +///////////////////////////////////////////////////////////////////////////// +#ifndef __FILELIST_H__ +#define __FILELIST_H__ + +#include "path.h" + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXFileList : public CObject +{ +DECLARE_DYNAMIC(COXFileList) + +// Data members ------------------------------------------------------------- +public: + +protected: + COXPathSpec m_path; + CObArray m_fileArray; + +private: + +// Member functions --------------------------------------------------------- +public: + COXFileList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXPathSpec GetPath() const; + // --- In : + // --- Out : + // --- Returns : The path of filelist + // --- Effect : + BOOL SetPath(COXPathSpec path); + // --- In : path : The new path specification of the filelist + // --- Out : + // --- Returns : Whether the setting succeeded or not + // --- Effect : The specified path is converted to an absolute path + // if it is relative + // When no file specification is supplied *.* is assumed + + BOOL Search(); + // --- In : + // --- Out : + // --- Returns : Whether the search succeeded or not + // --- Effect : This function will search the directory specified + // by SetPath and build a list of file specifications + // All the found files are appended to the list + // These can be accessed by GetList + + const CObArray* GetList() const; + // --- In : + // --- Out : + // --- Returns : A const pointer to the list of const file specifications + // --- Effect : The list may be empty, when search did not find any files + + const COXFileSpec* GetAt(int nIndex) const; + // --- In : + // --- Out : + // --- Returns : + // --- Effect : + + void Sort(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Sorts the file list + + void ClearList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Clears the file list + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXFileList(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +// Message handlers --------------------------------------------------------- + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/FILELMT.h b/UltimateToolbox93_src/Ultimate Toolbox/include/FILELMT.h new file mode 100644 index 0000000..44ba0ff --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/FILELMT.h @@ -0,0 +1,106 @@ +// ========================================================================== +// File System Limit Specification +// ========================================================================== + +// Header file : filelmt.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This file defines several file system limits + + +///////////////////////////////////////////////////////////////////////////// +#ifndef __FILELMT_H__ +#define __FILELMT_H__ + +// ... The maximum number of characters that a full file name +// (base name and full stop and extender) may use, +// EXCLUDING the zero-terminator +// The is also the maximum length for a directory name +// FAT : 12, VFAT : 254, HPFS : 254, NTFS : 255 +#ifdef WIN32 +#define MAX_FILE_NAME_LENGTH 255 +#else +// ... WIN16 is always FAT +#define MAX_FILE_NAME_LENGTH 12 +#endif + +// ... The maximum number of characters that a full path specification +// may use, EXCLUDING the zero-terminator +// FAT : 66, VFAT : 259, HPFS : 254, NTFS : 255 +#ifdef WIN32 +#define MAX_PATH_NAME_LENGTH 259 +#else +// ... WIN16 is always FAT +#define MAX_PATH_NAME_LENGTH 66 +#endif + +// .... Characters that are always invalid for directory or file names +// * characters in the (decimal) range 0 through 31 +// * less-than (<), geater-than (>), double quotation mark (") +// pipe (|) +// * Drive separator : colon(:) +// * Directory separators : slash (/) and back slash (\) +// * Wild characters : question mark (?) and asterisk (*) +// Different file systems add extra limitations +// FAT : left-square-bracket ([), right-square-bracket (]), +// semi-colon (;), equals-to (=), comma (,) and plus (+) +// Full stop (.) may only be used for extender speration +// VFAT : +// HPFS : +// NTFS : +// The infix _W_ means that wild characters are allowed and thus not invalid chars +// The NULL-character cannot be checked using string functions and is therefore +// removed from the invalid chars +#ifdef WIN32 +#define INVALID_W_PATH_CHARS _T("\x01\x02\x03\x04\x05\x06\x07\x08\x09") \ + _T("\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13") \ + _T("\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D") \ + _T("\x1E\x1F") \ + _T("<>\"|") +#else +// ... WIN16 has much less valid chars +#define INVALID_W_PATH_CHARS "\x01\x02\x03\x04\x05\x06\x07\x08\x09" \ + "\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13" \ + "\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D" \ + "\x1E\x1F" \ + "<>\"|" \ + " +,;=[]`" \ + "\x7F" \ + "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x80" \ + "\x8A\x8B\x8C\x8D\x8E\x8F" \ + "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x90" \ + "\x9A\x9B\x9C\x9D\x9E\x9F" \ + "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xA0" \ + "\xAA\xAB\xAC\xAD\xAE\xAF" \ + "\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xB0" \ + "\xBA\xBB\xBC\xBD\xBE\xBF" \ + "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xC0" \ + "\xCA\xCB\xCC\xCD\xCE\xCF" \ + "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xD0" \ + "\xDA\xDB\xDC\xDD\xDE\xDF" \ + "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xE0" \ + "\xEA\xEB\xEC\xED\xEE\xEF" \ + "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xF0" \ + "\xFA\xFB\xFC\xFD\xFE\xFF" + +#endif + +#define INVALID_W_DIR_CHARS INVALID_W_PATH_CHARS _T(":") +#define INVALID_W_FILE_CHARS INVALID_W_DIR_CHARS _T("/\\") + +#define INVALID_PATH_CHARS INVALID_W_PATH_CHARS _T("?*") +#define INVALID_DIR_CHARS INVALID_W_DIR_CHARS _T("?*") +#define INVALID_FILE_CHARS INVALID_W_FILE_CHARS _T("?*") + +#endif // __FILELMT_H__ diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/MDELDLG.h b/UltimateToolbox93_src/Ultimate Toolbox/include/MDELDLG.h new file mode 100644 index 0000000..88ef94e --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/MDELDLG.h @@ -0,0 +1,124 @@ +// ========================================================================== +// Class Specification : COXModelessDialog +// ========================================================================== + +// Header file : mdeldlg.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CDialog + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// YES/NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class is a generic class which can be used for all modeless dialogs + +// Remark: +// The C++ object will de deleted when the the window is destroyed. +// This is the default behaviour. If you want to disable this, +// specify bAutoDelete = FALSE when constructing the dialog + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __MDELDLG_H__ +#define __MDELDLG_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXModelessDialog : public CDialog +{ +DECLARE_DYNAMIC(COXModelessDialog) + +// Data members ------------------------------------------------------------- +public: + COXModelessDialog** m_ppSelf; + // --- Pointer to pointer to self + +protected: + BOOL m_bAutoDelete; + +private: + +// Member functions --------------------------------------------------------- +public: + COXModelessDialog(COXModelessDialog** ppSelf = NULL, BOOL bAutoDelete = TRUE); + // --- In : ppSelf : pointer to this object, used to null out any references the + // user could have made to this dialog + // bAutoDelete : whether the object will destroy the C++ object + // automatically when the Windows object is destroyed + // (from within the PostNcDestroy fuction) + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + virtual void PostNcDestroy(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Called by the default OnNcDestroy member function after the window + // has been destroyed. Derived classes can use this function + // for custom cleanup such as the deletion of the this pointer. + // Delete self after window has been destroyed, to avoid TRACE + // message in CWnd. This assumes dialog object is created in the heap, + // not on the stack when you use the m_bAutoDelete parameter!! + + virtual void OnOK(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Called when the user clicks the OK button (the button with an ID of IDOK). + // DestroyWindow is called here + + virtual void OnCancel(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Called when the user clicks the Cancel button (the button with an ID of IDCANCEL). + // DestroyWindow is called here + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXModelessDialog(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object, NULL the self-pointer. + +protected: + +private: + +}; + +#endif // __MDELDLG_H__ +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/MFCToolBar.h b/UltimateToolbox93_src/Ultimate Toolbox/include/MFCToolBar.h new file mode 100644 index 0000000..54d76eb --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/MFCToolBar.h @@ -0,0 +1,43 @@ +// ========================================================================== +// Class Specification : CMFCToolBar +// ========================================================================== + +// Header file : MFCToolBar.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "OXDllExt.h" + +#define TOOLBAR_BASE_CLASS CToolBar + +// CMFCToolBar + +class OX_CLASS_DECL CMFCToolBar : public TOOLBAR_BASE_CLASS +{ + DECLARE_DYNAMIC(CMFCToolBar) + +public: + void SetBarStyle(DWORD dwStyle); + CMFCToolBar(); + virtual ~CMFCToolBar(); + virtual BOOL CreateEx(CWnd* pParentWnd, DWORD dwCtrlStyle = TBSTYLE_FLAT, + DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP, + CRect rcBorders = CRect(0, 0, 0, 0), + UINT nID = AFX_IDW_TOOLBAR); + +protected: + DECLARE_MESSAGE_MAP() +}; + + diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OX3DTabView.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OX3DTabView.h new file mode 100644 index 0000000..31f79bc --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OX3DTabView.h @@ -0,0 +1,976 @@ +// ========================================================================== +// Class Specification : +// COX3DTabViewContainer & COX3DTabViewDropTarget +// ========================================================================== + +// Header file : OX3DTabView.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +/* + +For most applications it's not enough to use only one window to provide its all output. +There are different solutions for this problem like splitters or docking windows. +But they usually have common inconvenience: all windows are shown at the same time. +They take a precious screen space while could be rarely used. + +COXShortcutBar control can be used in order to show a number of child windows while +keeping active (fully displayed) only one at a time. But COXShortcutBar was primarily +designed to show icons and have a set of notifications that make sense only while +using such controls as treeview or listview. + +Very good example of how the problem could be resolved can be found in Developer Studio +IDE. For instance "Output" window (with "Build", "Debug", "Find in Files..." panes) or +"Result List" window (with "Search", "Lookup", "See Also" and "History" panes). We call +them TabViews. + +TabViews can be a good alternative for splitter window when you need to have more than +one view per document. Also TabViews can be used within docking window and used as a +container for associated windows that usually implemented as dialog bars. + +We already have in the library COXTabViewContainer class that implements the TabViews +paradigm. In terms of graphical representation this class duplicates the functionality +that can be found in such products as Microsoft Visual Studio IDE (Output window) or +Microsoft Excel (multiple sheets in the same book). Tab buttons are positioned +at the bottom of the window on the same line as the horizontal scroll bar. + +Here we introduce new implementation of the TabViews. The paradigm remains the same +but we've changed the way windows represented in the container. We used standard +Tab control and displayed a tab button for each associated window (page). When a +user clicks a button the corresponding page is activated and displayed. Tab buttons +can be positioned at any side of the container window by means of applying +corresponding Tab control styles (refer to Create() function for details). + +The new class is called COX3DTabViewContainer. It is derived from the standard +CTabCtrl and implements all functionality needed to support tab views. + +COX3DTabViewContainer is easy to use. If you previously worked with +COXTabViewContainer class then you are already know ho to use this class because +we decide to implement it as close as possible to the existing COXTabViewContainer +class. If you haven't used the COXTabViewContainer class yet then the closest +comparison would be splitter windows. + +Here is the list of steps that should be taken in order to deploy TabViews in +your application: + + First Case: COX3DTabViewContainer will be used as a container for document view(s). + + 1) Embed a COX3DTabViewContainer member variable in the parent frame (main frame + window for SDI application, MDIChild window for MDI application). + + 2) Override the parent frame's CFrameWnd::OnCreateClient member function. + + 3) From within the overridden OnCreateClient, call the Create member function + of COX3DTabViewContainer. In this function you have to specify the parent + window and optionally you can specify the initial rectangle, window styles + and window ID. This function is the place where you can specify Tab control + styles that defines the way tab buttons are positioned and displayed. + + 4) If you plan to assign images to TabView pages then you have to create + and load image list with images and associate it with + COX3DTabViewContainer object using CTabCtrl::SetImageList() function. + + 5) After COX3DTabViewContainer window was successfully created you can populate + it with window objects using AddPage() or InsertPage() functions. If you are + inserting view object you have to specify runtime class and context + information in order to keep the document/view architecture in place. + If you are adding a window object that is not a document view then you + have to create it before adding it to COX3DTabViewContainer window. + In AddPage() or InsertPage() functions you can specify text that will be + used as page title in the corresponding tab button. Also you can specify + the index of image in the tab control image list that should be + displayed in the tab button. + + Example: + + BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) + { + // TODO: Add your specialized code here and/or call the base class + + UNREFERENCED_PARAMETER(lpcs); + + if(!m_TabViewContainer.Create(this)) + return FALSE; + + VERIFY(m_ilTabView.Create(IDB_IL_TABVIEWS,16,0,RGB(255,0,255))); + m_TabViewContainer.SetImageList(&m_ilTabView); + + if(!m_TabViewContainer.AddPage(pContext->m_pNewViewClass, + pContext,_T("Primary View"),0)) + return FALSE; + if(!m_TabViewContainer.AddPage(RUNTIME_CLASS(CMyView2), + pContext,_T("View2"),1)) + return FALSE; + + m_TabViewContainer.SetActivePageIndex(0); + + return TRUE; + } + + + + + Second Case: COX3DTabViewContainer will be used as a container for windows within + control bar. + + 1) Create your own CControlBar-derived class (you can use our + COXSizeControlBar as parent class if you need sizable docking windows). + Let's call it CMyControlBar. + + 2) Embed a COX3DTabViewContainer member variable in this class. + + 3) Override CMyControlBar::OnCreate member function. + + 4) From within the overridden OnCreate(), call the Create() member function + of COX3DTabViewContainer. In this function you have to specify the parent + window and optionally you can specify the initial rectangle, window styles + and window ID. This function is the place where you can specify Tab control + styles that defines the way tab buttons are positioned and displayed. + + 5) If you plan to assign images to TabView pages then you have to create + and load image list with images and associate it with + COX3DTabViewContainer object using CTabCtrl::SetImageList() function. + + 6) After COX3DTabViewContainer window was successfully created you can populate + it with window objects using AddPage or InsertPage function. You have to + create window object before adding it to COX3DTabViewContainer. In AddPage or + InsertPage functions you can specify text that will be used as page title + in tab button. Also you can specify the index of image in the tab + control image list that should be displayed in the tab button. + + 7) Override CMyControlBar::OnSize member function and resize in it + COX3DTabViewContainer object as appropriate + + + Example: + + int CMyControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct) + { + if (COXSizeControlBar::OnCreate(lpCreateStruct) == -1) + return -1; + + if(!m_TabViewContainer.Create(this)) + return -1; + + VERIFY(m_ilTabView.Create(IDB_IL_TABVIEWS,16,0,RGB(255,0,255))); + m_TabViewContainer.SetImageList(&m_ilTabView); + + // edit control + if(!edit.Create(WS_CHILD|ES_MULTILINE|ES_AUTOHSCROLL| + ES_AUTOVSCROLL|WS_HSCROLL|WS_VSCROLL,CRect(0,0,0,0), + &m_TabViewContainer,1)) + return -1; + m_TabViewContainer.AddPage(&edit,_T("Edit"),0); + + // list box + if(!listBox.Create(WS_CHILD|WS_HSCROLL|WS_VSCROLL, + CRect(0,0,0,0),&m_TabViewContainer,2)) + return -1; + m_TabViewContainer.AddPage(&listBox,_T("ListBox"),1); + + // list control + if(!listCtrl.Create(WS_CHILD|LVS_REPORT, + CRect(0,0,0,0),&m_TabViewContainer,3)) + return -1; + m_TabViewContainer.AddPage(&listCtrl,_T("List"),2); + + // tree control + if(!treeCtrl.Create(WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, + CRect(0,0,0,0),&m_TabViewContainer,4)) + return -1; + m_TabViewContainer.AddPage(&treeCtrl,_T("Tree"),3); + + m_TabViewContainer.SetActivePageIndex(0); + + return 0; + } + + +Note, that any child window can be used as COX3DTabViewContainer page. + + +The steps that should be taken in order to implement COX3DTabViewContainer in CControlBar +derived window can be applied in general case too. We just decided to show it using +CControlBar derived window because we feel like it's going to be used as parent window +for COX3DTabViewContainer in most cases. + +Above we described the process of creating and populating of COX3DTabViewContainer +object. In most cases that would be all the code you need. For those who need to change +dynamically the contents of COX3DTabViewContainer object we provide a set of the +following functions. + +In order to remove any page at run time you have to use DeletePage() function. + +To set/retrieve page title that is displayed in corresponding tab button use +GetPageTitle() and SetPageTitle() functions. + +To set/retrive active page index call GetActivePageIndex() and SetActivepageIndex() +functions. + +Refer to the class reference for list and description of all public functions. + + +Also take look at the following sample that can be found in .\samples\gui +subdirectory of your ultimate Toolbox directory: + + 3DTabViews - text editor with three panes: text editor, hex viewer, + list view with statistics on number of unique symbols + found in text. + + + + +Dependencies: + +#include "OX3DTabView.h" + + +Source code files: + +"OX3DTabView.h" - COX3DTabViewContainer implementation + + +*/ + +#ifndef _OX3DTABVIEW_H__ +#define _OX3DTABVIEW_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" +#include "OXSkinnedSpinCtrl.h" +#include "OXSkinnedTabCtrl.h" + +#ifndef __AFXOLE_H__ +#include +#define __AFXOLE_H__ +#endif + + +#ifndef __AFXTEMPL_H__ +#include +#define __AFXTEMPL_H__ +#endif + +const int ID_3DTABVIEW_OFFSET_EXTERNAL=0; +const int ID_3DTABVIEW_OFFSET_INTERNAL=0; +const DWORD DEFAULT_3DTABCTRLSTYLE=TCS_MULTILINE|TCS_BOTTOM|TCS_HOTTRACK| + TCS_RIGHTJUSTIFY|TCS_FOCUSNEVER|WS_VISIBLE|WS_CHILD; + +// default extended style for a page +#ifndef OX3DTABVIEWCONTAINER_EX_STYLE +#define OX3DTABVIEWCONTAINER_EX_STYLE WS_EX_CLIENTEDGE +#endif + +///////////////////////////////////////////////////////////////////////////// +// COX3DTabViewContainerDropTarget drop target for COX3DTabViewContainer, to faciliate +// auto-selection on drag over. +class OX_CLASS_DECL COX3DTabViewDropTarget : public COleDropTarget +{ +public: + COX3DTabViewDropTarget() : m_nOldItem(-1) {}; + virtual ~COX3DTabViewDropTarget() {}; + +protected: + int m_nOldItem; + +protected: + // Change tab on drag over handler + virtual DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, + DWORD dwKeyState, CPoint point); + virtual void OnDragLeave( CWnd* pWnd ); +}; + +////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// COX3DTabViewContainer window + +class COXTabSkin; + +class OX_CLASS_DECL COX3DTabViewContainer : public COXSkinnedTabCtrl +{ + friend class COXTabSkinXP; + friend class COXTabSkin2003; + + DECLARE_DYNAMIC(COX3DTabViewContainer) +// Construction +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + COX3DTabViewContainer(); + +// Attributes +public: + +protected: + // drop target object for OLE dragging support (when any object is + // dragged over tab items the corresponding page window will be + // activated) + COX3DTabViewDropTarget m_dropTarget; + + // if TRUE then when any object is dragged over tab items the + // corresponding page window will be activated + BOOL m_bAcceptDraggedObject; + + // internal array of unique IDs + CArray m_arrUniqueIDs; + + // There is only one tab + BOOL m_bOneTabMode; + + // offset from the borders of the client area of the parent window + // where the tab control will be displayed + DWORD m_dwOffsetExternal; + + // offset from the borders of the active page window and display rectangle + // of the tab control + DWORD m_dwOffsetInternal; + + // index of the current active page + int m_nActivePageIndex; + + // internal flag that specifies whether current background painting happens for + // non-client or client area + BOOL m_bDrawingNCBackground; + + // rectangle for displaying a page in + CRect m_rectPage; + +// Operations +public: + + // --- In : lpszClassName - ignored + // lpszWindowName - ignored + // dwStyle - The 3DTabView container's style. + // rect - window rectangle + // pParentWnd - Pointer to the window that is the + // 3DTabView container's parent. + // nID - The 3DTabView container's ID. + // pContext - ignored + // --- Out : + // --- Returns: TRUE if 3DTabView container was successfully created, + // or FALSE otherwise + // --- Effect : Creates the 3DTabView container. Implemented in order to + // support dynamic creation of the object. + virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, + DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, + CCreateContext* pContext=NULL); + + + // --- In : pParentWnd - Pointer to the window that is the + // 3DTabView container's parent. + // rect - window rectangle + // dwStyle - The 3DTabView container's style. The same like + // for CTabCtrl. + // nID - The 3DTabView container's ID. + // --- Out : + // --- Returns: TRUE if 3DTabView container was successfully created, + // or FALSE otherwise + // --- Effect : Creates the 3DTabView container + virtual BOOL Create(CWnd* pParentWnd, CRect rect=CRect(0,0,0,0), + DWORD dwStyle=DEFAULT_3DTABCTRLSTYLE, UINT nID=AFX_IDW_PANE_FIRST); + + + // --- In : pClass - pointer to runtime class information of + // the new window to be added as new page + // pContext - pointer to context info (refer to the + // description of CCreateContext class) + // lpszTitle - text that will be used as page title in + // tab button + // nImage - index of the image in the image list + // associated with the container that will be + // set to the corresponding button + // dwExStyle - extended style to be applied to the page + // bActivate - if TRUE then added page will be activated + // --- Out : + // --- Returns: TRUE if new page was successfully added, or FALSE otherwise + // --- Effect : Adds new page to 3DTabView container. Use this version of + // function if you have to add CView derived class which is + // part of document/view architecture of your application + BOOL AddPage( + CRuntimeClass* pClass, CCreateContext* pContext, LPCTSTR lpszTitle=NULL, + int nImage=-1, DWORD dwExStyle=WS_EX_CLIENTEDGE, BOOL bActivate=TRUE) + { + return InsertPage( + GetPageCount(),pClass,pContext,lpszTitle,nImage,dwExStyle,bActivate); + } + + BOOL AddPage(CWnd* pWnd, UINT nTitleID, int nImage=-1, + DWORD dwExStyle=WS_EX_CLIENTEDGE, BOOL bActivate=TRUE) + { + CString sCaption; + if(!sCaption.LoadString(nTitleID)) + { + return FALSE; + } + return InsertPage( + GetPageCount(),pWnd,(LPCTSTR)sCaption,nImage,dwExStyle,bActivate); + } + + // --- In : pWnd - pointer to created window to be added + // as new page + // lpszTitle - text that will be used as page title in + // tab button + // nImage - index of the image in the image list + // associated with the container that will be + // set to the corresponding button + // dwExStyle - extended style to be applied to the page + // bActivate - if TRUE then added page will be activated + // --- Out : + // --- Returns: TRUE if new page was successfully added, or FALSE otherwise + // --- Effect : Adds new page to 3DTabView container. Use this version of + // function if you have to add any generic window into the + // 3DTabView container. + BOOL AddPage(CWnd* pWnd, LPCTSTR lpszTitle=NULL, int nImage=-1, + DWORD dwExStyle=WS_EX_CLIENTEDGE, BOOL bActivate=TRUE) + { + return InsertPage(GetPageCount(),pWnd,lpszTitle,nImage,dwExStyle,bActivate); + } + + // --- In : nIndex - zero-based index of the new page + // pClass - pointer to runtime class information of + // the new window to be added as new page + // pContext - pointer to context info (refer to the + // description of CCreateContext class) + // lpszTitle - text that will be used as page title in + // tab button + // nImage - index of the image in the image list + // associated with the container that will be + // set to the corresponding button + // dwExStyle - extended style to be applied to the page + // bActivate - if TRUE then inserted page will be activated + // --- Out : + // --- Returns: TRUE if new page was successfully inserted, or FALSE otherwise + // --- Effect : Inserts new page to 3DTabView container. Use this version of + // function if you have to insert CView derived class which is + // part of document/view architecture of your application + virtual BOOL InsertPage(int nIndex, CRuntimeClass* pClass, + CCreateContext* pContext, LPCTSTR lpszTitle=NULL, int nImage=-1, + DWORD dwExStyle=WS_EX_CLIENTEDGE, BOOL bActivate=TRUE); + + // --- In : nIndex - zero-based index of the new page + // pWnd - pointer to created window to be inserted + // as new page + // lpszTitle - text that will be used as page title in + // tab button + // nImage - index of the image in the image list + // associated with the container that will be + // set to the corresponding button + // dwExStyle - extended style to be applied to the page + // bActivate - if TRUE then inserted page will be activated + // --- Out : + // --- Returns: TRUE if new page was successfully inserted, or FALSE otherwise + // --- Effect : Inserts new page to 3DTabView container. Use this version of + // function if you have to add any generic window into the + // 3DTabView container. + virtual BOOL InsertPage(int nIndex, CWnd* pWnd, LPCTSTR lpszTitle=NULL, + int nImage=-1, DWORD dwExStyle=WS_EX_CLIENTEDGE, BOOL bActivate=TRUE); + + + // --- In : pWnd - pointer to the page to be deleted + // bDestroy - flag that specifies if window has to be + // destroyed + // --- Out : + // --- Returns: TRUE if the specified page was successfully deleted, + // or FALSE otherwise + // --- Effect : Deletes existing page from 3DTabView container. + virtual BOOL DeletePage(const CWnd* pWnd, BOOL bDestroy=TRUE); + + // --- In : nIndex - zero-based index of the page to be deleted + // bDestroy - flag that specifies if window has to be + // destroyed + // --- Out : + // --- Returns: TRUE if the specified page was successfully deleted, + // or FALSE otherwise + // --- Effect : Deletes existing page from 3DTabView container. + virtual BOOL DeletePage(int nIndex, BOOL bDestroy=TRUE); + + + // --- In : nIndex - zero-based index of the page to be retrieved + // --- Out : + // --- Returns: pointer to the corresponding page, or NULL if out of range + // index was specified + // --- Effect : Retrieves pointer to the page with specified index + inline CWnd* GetPage(int nIndex) const + { + ASSERT(nIndex>=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndex=0 && nIndexm_hWnd,nIndex); + } + return FALSE; + } + + inline BOOL FindPage(HWND hTestWnd, int& nIndex) const + { + BOOL bResult=FALSE; + for(nIndex=0; nIndexGetSafeHwnd()==hTestWnd) + { + bResult=TRUE; + break; + } + } + return bResult; + } + + + // --- In : pTestWnd - pointer to the window to be tested + // as 3DTabView container's page + // hTestWnd - handle of the window to be tested + // as 3DTabView container's page + // --- Out : + // --- Returns: TRUE if specified window is 3DTabView container's page, + // or FALSE otherwise + // --- Effect : Retrieves the flag that specifies whether the specified + // window is 3DTabView container's page + inline BOOL IsPage(HWND hTestWnd) const + { + int nIndex=-1; + return FindPage(hTestWnd,nIndex); + } + + inline BOOL IsPage(const CWnd* pTestWnd) const + { + int nIndex=-1; + return FindPage(pTestWnd,nIndex); + } + + + // --- In : pTestWnd - pointer to the window to be tested as + // currently active 3DTabView container's page + // hTestWnd - handle of the window to be tested as + // currently active 3DTabView container's page + // --- Out : + // --- Returns: TRUE if specified window is currently active 3DTabView + // container's page, or FALSE otherwise + // --- Effect : Retrieves the flag that specifies whether the specified + // window is currently active 3DTabView container's page + inline BOOL IsActivePage(HWND hTestWnd) const + { + int nIndex=-1; + if(FindPage(hTestWnd,nIndex) && GetActivePageIndex()==nIndex) + { + return TRUE; + } + return FALSE; + } + + inline BOOL IsActivePage(const CWnd* pTestWnd) const + { + int nIndex=-1; + if(FindPage(pTestWnd,nIndex) && GetActivePageIndex()==nIndex) + { + return TRUE; + } + return FALSE; + } + + + // --- In : + // --- Out : + // --- Returns: index of currently active 3DTabView container's page + // --- Effect : Retrieves the index of currently active 3DTabView + // container's page + inline int GetActivePageIndex() const { return m_nActivePageIndex; } + + // --- In : + // --- Out : + // --- Returns: pointer to currently active 3DTabView container's page + // --- Effect : Retrieves the pointer to currently active 3DTabView + // container's page + inline CWnd* GetActivePage() const + { + int nActivePageIndex=GetActivePageIndex(); + if(nActivePageIndex>=0 && nActivePageIndex 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "stdafx.h" + +#if !defined ADDURL_SILENT +#error You must include "wininet.h" before and before afxole.h in stdafx.h. +#endif + +#include "oxdllext.h" + +#define OX_ACTDESK_CHECK_ERROR(ERROR_RESULT) if (FAILED(hRslt))\ + {\ + m_nError=HRESULT_CODE(hRslt);\ + return ERROR_RESULT;\ + } +/////////////////////////////////////////////////////////////////////////// +// Global functions +/////////////////////////////////////////////////////////////////////////// + +//copy TCHAR string to wide-character string. +//The caller is responsible for freeing memory +//by operator delete [] +LPWSTR GetWcharString(LPCTSTR pszSource); + +//copy wide character string to TCHAR string. +//The caller is responsible for freeing memory +//by operator delete [] +LPTSTR GetTcharString(LPWSTR pszwSource); + + + +/////////////////////////////////////////////////////////////////////////// +// COXActiveDesktop +/////////////////////////////////////////////////////////////////////////// +class OX_CLASS_DECL COXActiveDesktop +{ + +public: + + // --- In : hWnd - handle of the parent window + // --- Out : + // --- Returns: + // --- Effect : Constructor + COXActiveDesktop(HWND hWnd=NULL); + + // --- In : Src - the source object + // --- Out : + // --- Returns: + // --- Effect : Copy constructor + COXActiveDesktop(const COXActiveDesktop& Src); + + // --- In : + // --- Out : + // --- Returns: TRUE on success, FALSE if failed + // --- Effect : Releases IActiveDesktop interface and reload it. + BOOL Refresh(); + + // --- In : pBuffer - pointer to the buffer of 8 byte size + // with the new pattern + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Sets new pattern for Active Desktop + BOOL SetPattern(BYTE* pBuffer); + + // --- In : + // --- Out : pBuffer - pointer to the buffer of at least 8 bytes + // size to allocate current pattern of the Active Desktop + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Retrieves current pattern of the Active Desktop + BOOL GetPattern(BYTE* pBuffer); + + // --- In : + // --- Out : + // --- Returns: Last error + // --- Effect : Call this function to get the last error + inline UINT GetLastError(){ return m_nError;} + + // --- In : + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : The first function that must be called to initialize + // the interface + BOOL Init(); + + // --- In : + // --- Out : + // --- Returns: Pointer to the IActiveDesktop interface + // --- Effect : Call this function to obtain pointer to the + // IActive Desktop interface + inline IActiveDesktop* GetActiveDesktop() + { + ASSERT(m_pActiveDesktop); m_pActiveDesktop->AddRef(); + return m_pActiveDesktop; + } + + // --- In : pComp - pointer to a COMPONENT structure that + // describes new item. + // pszSource - NULL terminated URL string + // bDisplayDialog - TRUE to show dialog, FALSE otherwise + // bApply - TRUE to apply changes immediately + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Adds item to the Active Desktop + BOOL AddItem(LPCOMPONENT pComp, LPCTSTR pszSource=NULL, + BOOL bDisplayDialog=FALSE, BOOL bApply=TRUE); + + // --- In : hWnd - handle of the parent window + // --- Out : + // --- Returns: + // --- Effect : Sets new parent window + inline void SetParent(HWND hWnd) { + ASSERT(::IsWindow(hWnd)); m_hWnd=hWnd;} + + // --- In : + // --- Out : + // --- Returns: Handle of the parent window + // --- Effect : Call this function to get handle of the parent window + inline HWND GetParent() { return m_hWnd;} + + // --- In : pszFileName - HTML filename will be created + // pComp - component describing the specified item + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Generates HTML file for specified item + BOOL CreateHTML(LPCTSTR pszFileName, LPCOMPONENT pComp); + + // --- In : pszSource - null terminated string that contains + // URL for HTML items or CLSID for controls + // --- Out : + // --- Returns: Pointer to the component. This pointer should be deleted by caller + // with operator delete + // --- Effect : Returns pointer to COMPONENT structure describing specified item + LPCOMPONENT GetComponent(LPCTSTR pszSource); + + // --- In : dwID - ID of the component (dwID member of the COMPONENT structure) + // --- Out : + // --- Returns: Pointer to the component. This pointer should be deleted by caller + // with operator delete + // --- Effect : Returns pointer to COMPONENT structure describing specified item + LPCOMPONENT GetComponent(DWORD dwID); + + // --- In : nComponent - number of the component. Must be less than returned + // by GetItemCount() + // --- Out : + // --- Returns: Pointer to the component. This pointer should be deleted by caller + // with operator delete + // --- Effect : Returns pointer to COMPONENT structure describing specified item + LPCOMPONENT GetComponent(int nComponent); + + // --- In : + // --- Out : + // --- Returns: Number of the components in Active Desktop + // --- Effect : Call this function to retrieve number of the component + // on the Active Desktop + int GetItemCount(); + + // --- In : + // --- Out : pEnable - pointer to the BOOL variable that + // shows enabled status of Active Desktop + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to find out if the Active Desktop is enabled + BOOL IsDesktopEnabled(BOOL* pEnable); + + // --- In : + // --- Out : pEnable - pointer to the BOOL variable that + // shows enabled status of the components on Active Desktop + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to find out if the components on Active Desktop is enabled + BOOL IsComponentsEnabled(BOOL* pEnable); + + // --- In : + // --- Out : sPattern - string that will repesents pattern with + // decimal numbers + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to get pattern as string + BOOL GetPattern(CString& sPattern); + + // --- In : + // --- Out : sWallpaper - filename of the wallpaper image + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to get wallpaper filename + BOOL GetWallpaper(CString& sWallpaper); + + // --- In : + // --- Out : + // --- Returns: Wallpaper style(WPSTYLE_CENTER + // WPSTYLE_TILE + // WPSTYLE_STRETCH + // WPSTYLE_MAX + // ) on success or -1 on error + // --- Effect : Call this function to get the wallpaper style + int GetWallpaperStyle(); + + // --- In : pComp - pointer to the modified COMPONENT structure + // dwFlags - flags that shows how to apply changes + // bApply - TRUE if apply changes now or FALSE otherwise + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Modifies existing component + BOOL ModifyItem(LPCOMPONENT pComp, DWORD dwFlags=AD_APPLY_ALL | AD_APPLY_FORCE, BOOL bApply=TRUE); + + // --- In : pComp - pointer to the COMPONENT structure describing item to remove + // bApply - TRUE if apply now, FALSE otherwise + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to remove specified item. + BOOL RemoveItem(LPCOMPONENT pComp, BOOL bApply=TRUE); + + // --- In : bEnable - TRUE to enable components or FALSE to disable + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : + BOOL SetComponentsEnable(BOOL bEnable); + + // --- In : bEnable - TRUE to enable Active Desktop or FALSE to disable + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : + BOOL SetDesktopEnable(BOOL bEnable); + + // --- In : sPattern - string with 8 decimal numbers + // describing the new pattern will be set + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to set new pattern + BOOL SetPattern(CString sPattern); + + // --- In : sWallpaper - filename of the new wallpaper will be set on. + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to set new wallpaper for the Active Desktop + BOOL SetWallpaper(CString sWallpaper); + + // --- In : dwStyle - new style will be applied for the wallpaper + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Call this function to apply the new style for the wallpaper + BOOL SetWallpaperStyle(DWORD dwStyle); + + + // --- In : dwFlags - flags determines how the changes will be applied + // (AD_APPLY_SAVE + // AD_APPLY_HTMLGEN + // AD_APPLY_REFRESH + // AD_APPLY_ALL + // AD_APPLY_FORCE ) + // --- Out : + // --- Returns: TRUE on success, FALSE otherwise + // --- Effect : Applies changes for the Active Desktop. + BOOL ApplyChanges(DWORD dwFlags=AD_APPLY_ALL); + + const COXActiveDesktop& operator=(const COXActiveDesktop& Src); + + virtual ~COXActiveDesktop(); + +protected: + HWND m_hWnd; + UINT m_nError; + IActiveDesktop* m_pActiveDesktop; +}; + +#endif // !defined(_OXACTIVEDESKTOP_H__) diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssert.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssert.h new file mode 100644 index 0000000..face03c --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssert.h @@ -0,0 +1,154 @@ +// ========================================================================== +// Specification : +// AdvancedAssert +// ========================================================================== + +// Header file : OXAdvancedAssert.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + + +#ifndef __AdvancedAssert_h__ +#define __AdvancedAssert_h__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#ifndef OX_ADVANCEDASSERT_NOTE1 +#define OX_ADVANCEDASSERT_NOTE1 _T("An unexpected event has just occurred. Please report this event by sending an email. This will help eliminate bugs.") +#endif + +#ifndef OX_ADVANCEDASSERT_NOTE2 +#define OX_ADVANCEDASSERT_NOTE2 _T("Any information you can give about the state when this event occurred would be greately appreciated.") +#endif + +///////////////////////////////////////////////////////////////////////////// +// Diagnostic support + +#if defined(_DEBUG) || defined(BETA) +#ifdef ASSERT +#undef ASSERT + +///////////////////////////////////////////////////////////////////////////// +// Desciption : This is an internal function that is used by the ASSERT macro. +// using some advanced macro processing, the condition that fails +// is converted to a string that is later used in the dialog. +// -- In : lpszCondition - Condition to be displayed +// lpszFileName - filename of failed condition. +// nLine - line number of failed condition. +// -- Out : nothing. +// -- Returns : Returns TRUE when user selects Retry. +// -- Effect : Sends trace message and presents user with Abort, Retry, Ignore, Send dialog. +// Note: file names are still ANSI strings (filenames rarely need UNICODE) +OX_API_DECL BOOL AFXAPI AdvancedAssertFailedLine(LPCTSTR lpszCondition, + LPCSTR lpszFileName, int nLine) ; + +#ifndef _WIN32 +void AfxDebugBreak() ; +#endif + +#define THIS_FILE __FILE__ +#define ASSERT(f) \ + do \ + { \ + if ( !(f) && AdvancedAssertFailedLine(_T(#f), THIS_FILE, __LINE__) ) \ + AfxDebugBreak() ; \ + } \ + while (0) \ + +#endif // ASSERT + +#ifdef VERIFY +#undef VERIFY +#define VERIFY(f) ASSERT(f) +#endif // VERIFY + +#endif // _DEBUG || BETA + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allows programmatic override of +// global send enable flag. When this flag is FALSE, the Send +// button is disabled. +// -- In : New send enable state. +// -- Out : +// -- Returns : Previous send enable state. +// -- Effect : Replace the send enable state. +OX_API_DECL BOOL AppSetAssertSendState(BOOL bEnable=TRUE) ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allows programmer to get global send +// enable flag. When this flag is FALSE, the Send button is disabled. +// -- In : +// -- Out : +// -- Returns : send enable state. +// -- Effect : +OX_API_DECL BOOL AppGetAssertSendState() ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allows programmatic override of +// global beta email address. +// -- In : csEmailAddress - New email address supplied when user selects Send. +// -- Out : +// -- Returns : Previous beta email address. +// -- Effect : Replace the beta email address. +OX_API_DECL CString AppSetAssertEmailAddress(CString csEmailAddress) ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : This function is used to safely gain access to beta email address. +// -- In : +// -- Out : +// -- Returns : Current beta email address. +// -- Effect : +OX_API_DECL LPCSTR AppGetAssertEmailAddress() ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allowas programmatic override of +// global note 1 text. +// -- In : csNote - New text used for note 1. +// -- Out : +// -- Returns : Previous note 1 text. +// -- Effect : Replace the global text used for note 1 in the assert dialog. +OX_API_DECL CString AppSetAssertNote1(CString csNote) ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allows programmer to get text that +// displayed at the top of Assert dialog (Note1). +// -- In : +// -- Out : +// -- Returns : Note1 text. +// -- Effect : +OX_API_DECL CString AppGetAssertNote1() ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allowas programmatic override of +// global note 2 text. +// -- In : csNote - New text used for note 2. +// -- Out : +// -- Returns : Previous note 2 text. +// -- Effect : Replace the global text used for note 2. in the assert dialog. +OX_API_DECL CString AppSetAssertNote2(CString csNote) ; + +///////////////////////////////////////////////////////////////////////////// +// Desciption : Public access function that allows programmer to get text that +// displayed at the top of Assert dialog under Note1 (Note2). +// -- In : +// -- Out : +// -- Returns : Note2 text. +// -- Effect : +OX_API_DECL CString AppGetAssertNote2() ; + +// You will want to correct the beta address. +#define BETA_EMAIL_ADDRESS "Support[SMTP:beta@yourcompany.com]" + +#endif // __AdvancedAssert_h__ +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssertMail.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssertMail.h new file mode 100644 index 0000000..12ab7cc --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAdvancedAssertMail.h @@ -0,0 +1,74 @@ +// ========================================================================== +// Class Specification : +// COXAdvancedAssertMail +// ========================================================================== + +// Header file : OXAdvancedAssertMail.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + + +#ifndef __AdvancedAssertMail_h__ +#define __AdvancedAssertMail_h__ + +// If this is not a debug or a beta version, then don't use any of this code. +#if defined(_DEBUG) || defined(BETA) // entire file + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include // MapiMessage + +///////////////////////////////////////////////////////////////////////////// +// COXAdvancedAssertMail + +class OX_CLASS_DECL COXAdvancedAssertMail +#ifdef _WIN32 + : public CNoTrackObject +#endif + { + public: + COXAdvancedAssertMail() ; + virtual ~COXAdvancedAssertMail() ; + + public: + BOOL IsLoaded() const ; + BOOL IsValidSendMail() const ; + BOOL LoadMapiLibrary() ; + void FreeMapiLibrary() ; + + ULONG Logon (ULONG ulUIParam, LPSTR lpszName, LPSTR lpszPassword, FLAGS flFlags, ULONG ulReserved) ; + ULONG Logoff (ULONG ulUIParam, FLAGS flFlags, ULONG ulReserved) ; + ULONG SendMail(ULONG ulUIParam, lpMapiMessage lpMessage, FLAGS flFlags, ULONG ulReserved) ; + + protected: + HINSTANCE m_hInstMail ; // handle to MAPI32.DLL + LHANDLE m_lhSession ; + ULONG (PASCAL* m_lpfnMAPILogon )(ULONG ulUIParam, LPSTR lpszName, LPSTR lpszPassword, FLAGS flFlags, ULONG ulReserved, LPLHANDLE lplhSession) ; + ULONG (PASCAL* m_lpfnMAPILogoff )(LHANDLE lhSession, ULONG ulUIParam, FLAGS flFlags, ULONG ulReserved) ; + HRESULT (PASCAL* m_lpfnMAPISendMail)(LHANDLE lhSession, ULONG ulUIParam, lpMapiMessage lpMessage, FLAGS flFlags, ULONG ulReserved) ; + } ; + +#ifdef _WIN32 +EXTERN_PROCESS_LOCAL(COXAdvancedAssertMail, appMailState) +#else +extern COXAdvancedAssertMail _appMailState ; +#endif + +int SendMail (LPCSTR pszTo, LPCSTR pszSubject, LPCSTR pszBody, LPCSTR pszAttachment=NULL) ; +int SendMailToBeta( LPCSTR pszSubject, LPCSTR pszBody, LPCSTR pszAttachment=NULL) ; + +#endif // _DEBUG || BETA + +#endif // __AdvancedAssertMail_h__ +///////////////////////////////////////////////////////////////////////////// diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXAppBar.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAppBar.h new file mode 100644 index 0000000..bffc67d --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAppBar.h @@ -0,0 +1,1841 @@ +// ========================================================================== +// Class Specification : COXAppBar +// ========================================================================== +// +// OXAppBar.h +// Version: 9.3 +// +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// +// Class COXAppBar provides functionality of Windows shell application bar +// It is a template class and use CWnd derived class as a parent. +// COXAppBar has two constructors - one for generic CWnd derived class +// and another one for CDialog derived class. It is easy to use. +// To start use it call Register(TRUE). To Load prevous state call LoadState(), +// that returns TRUE on success, otherwise you can suply your own parameters. +// If you want to dock window on certain edge you can use function SetEdge(). +// The two important state are Autohidden and AlwaysOnTop. To set or remove these +// features call SetAutoHide() or SetAlwaysOnTop() with appropriate value - TRUE or FALSE +// Any edge can be excluded from docking state by function SetBarStyle() +// To see appbar styles use GetBarStyle(). You can also exclude ABE_FLOAT state, +// so your appbar always will be docked to some edge. Additional functionality is +// provided by OX_APPBARS_DIFFERENT_DIMS. This flag (set on by default) indicate +// the appbar will provide different width and height for every state. +// Addidtional customization: set the width of the appbar in hidden state, +// time the autohidden appbar will wait while inactive until begin slide to hidden state, +// dimensions in any state and others . +// +// To unregister appbar call Register(FALSE). +// Note: you must provide default constructor for your class will be used by COXAppBar + + +//Dependences: + +//Header files +//#include "OXRegistryValFile.h" +//#include "OXAppBar.h" + +//Cpp files: +//"OXRegistryValFile.cpp" + +#if !defined(_OXAPPBAR_H__) +#define _OXAPPBAR_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXDllExt.h" +#include "OXRegistryValFile.h" +#include "OXMainRes.h" +#include "UTB64Bit.h" + + +/////////////////////////////////////////////////////////////////////////////// +//definitions + +const int OX_APPBAR_VERSION=0x0011; + +//two additional styles +#define ABE_UNKNOWN 0x101 +#define ABE_FLOAT 0x102 + + +//default definitions +#define SLIDING_TIME 10 //time to slide window in autohide state +#define MIN_DIMENSION 2 //width of the appbar in hidden state +#define IDT_AUTOHIDE 1 //timer id for autohide state +#define DEFAULT_DIMENSION 28//default dimension of the appbar (width for right-left, + //height for top-bottom) +#define DIM_TO_FLOAT 10 //how many pixels should be mouse away from docked + //appbar to switch to float state +#define DIM_TO_DOCK 40 //how many pixels should be mouse near to an edge + //to switch from float state to docking state +#define DIM_CAPTION 6 //pixels from top of the window in float state to the cursor +#define TIMER_INTERVAL 100 //milliseconds - how much time will wait inactive autohidden + //bar to start to move to hide + +///////////////////////////////////////////////////////////////////////////// +//the styles can be set + +#define OX_APPBARS_LEFT 0x01 //can dock on the left +#define OX_APPBARS_TOP 0x02 //can dock on the top +#define OX_APPBARS_RIGHT 0x04 //can dock on the right +#define OX_APPBARS_BOTTOM 0x08 //can dock on the bottom +#define OX_APPBARS_ALL_EDGES (OX_APPBARS_LEFT | OX_APPBARS_TOP | OX_APPBARS_RIGHT | OX_APPBARS_BOTTOM) +#define OX_APPBARS_FLOAT 0x10 //can float +#define OX_APPBARS_DIFFERENT_DIMS 0x020 //remember different dimensions + //for every edge +#define OX_APPBARS_ALLS (OX_APPBARS_ALL_EDGES | OX_APPBARS_FLOAT | OX_APPBARS_DIFFERENT_DIMS) + + +typedef struct sMouse +{ + CPoint pt;//current mouse position + BOOL bButtonDown;//TRUE on button down + + sMouse::sMouse(): + pt(0,0), bButtonDown(FALSE){} + +}tMouse; + +typedef struct sBarData +{ + + BOOL bRegistered;//TRUE when registered + BOOL bOnTop;//TRUE when the bar has WS_EX_TOPMOST style + BOOL bAutoHideDesired;//TRUE, if SHOULD BE in autohide state (may be in not + //the state due to error to set autohide state, but this + //variable means desired state that will be set on the edge) + BOOL bHiding;//TRUE while sliding the bar + BOOL bHidden;//TRUE if hidden in autohide style, FALSE otherwise + UINT nWidth;//default width of the bar + UINT nHeight;//default height of the bar + UINT nLeft;//width of the bar on the left edge + UINT nTop;//height of the bar on the top edge + UINT nRight;//width of the bar on the right edge + UINT nBottom;//height of the bar on the bottom edge + UINT nEdge;//edge the bar will be docked on or ABE_FLOAT, ABE_UNKNOWN + UINT nDockEdge;//edge the bar is docked on, no ABE_FLOAT or ABE_UNKNOWN is allowed + DWORD dwStyle;//styles applicable to the bar + + sBarData(): + bRegistered(FALSE), bOnTop(FALSE), + bAutoHideDesired(FALSE), bHiding(FALSE), bHidden(FALSE), + nWidth(DEFAULT_DIMENSION), + nHeight(DEFAULT_DIMENSION), nLeft(DEFAULT_DIMENSION), + nTop(DEFAULT_DIMENSION), nRight(DEFAULT_DIMENSION), + nBottom(DEFAULT_DIMENSION), nEdge(ABE_UNKNOWN), nDockEdge(NULL), + dwStyle(OX_APPBARS_ALLS) + {} + +}tBarData; + + +///////////////////////////////////////////////////////////////////////////// +// COXAppBar window + +template +class OX_CLASS_DECL COXAppBar : public PARENTWND +{ +// public functions +public: + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructs the object + COXAppBar(); + + // --- In : nId - resource ID of the dialog + // pParent - pointer to the parent window + // --- Out : + // --- Returns : + // --- Effect : Constructs the object (for CDialog derived class) + COXAppBar(UINT nId, CWnd* pParent=NULL); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor + virtual ~COXAppBar(); + + // --- In : + // --- Out : + // --- Returns : pointer to structure tBarData + // --- Effect : returns pointer to tBarData + inline const tBarData* GetBarData() const {return &m_BarData;} + + // --- In : nWidth - new default width + // --- Out : + // --- Returns : + // --- Effect : sets new default width for the appbar + inline void SetDefaultWidth(UINT nWidth) {m_BarData.nWidth=nWidth;} + + // --- In : nHeight - new default height + // --- Out : + // --- Returns : + // --- Effect : sets new default height for the appbar + inline void SetDefaultHeight(UINT nHeight){m_BarData.nHeight=nHeight;} + + // --- In : + // --- Out : + // --- Returns : a count of timer ticks the window slides on 1 pixel + // --- Effect : call this function to retrieve the sliding time + inline UINT GetSlidingTime() const {return m_nSlidingTime;} + + // --- In : nSlidingTime - a count of timer ticks the window slides on 1 pixel + // --- Out : + // --- Returns : + // --- Effect : call this function to change the sliding time + inline void SetSlidingTime(UINT nSlidingTime) {m_nSlidingTime=nSlidingTime;} + + // --- In : + // --- Out : + // --- Returns : width of the appbar while hidden + // --- Effect : call this function to get width of the appbar in hidden state + inline UINT GetHiddenWidth() const { return m_nHiddenWidth;} + + // --- In : nHiddenWidth - new width of the appbar in hidden state + // --- Out : + // --- Returns : + // --- Effect : call this function to set new width of the appbar in hidden state + inline void SetHiddenWidth(UINT nHiddenWidth) {m_nHiddenWidth=nHiddenWidth;} + + // --- In : nToFloat - difference (pixels) between cursor and edge + // of the appbar when appbar will switch to the float state + // --- Out : + // --- Returns : + // --- Effect : call this function to set new value to switch to float state + inline void SetPointToFloat(UINT nToFloat) {m_nToFloat=nToFloat;} + + // --- In : + // --- Out : + // --- Returns : current difference (pixels) between cursor and edge + // of the appbar when appbar will switch to the float state + // --- Effect : call this function to get current value to switch to float state + inline UINT GetPointToFloat() const {return m_nToFloat;} + + // --- In : nToDock - difference (pixels) between cursor and screen edge + // when appbar will switch to the docking state + // --- Out : + // --- Returns : + // --- Effect : call this function to set new value to switch to docking state + inline void SetPointToDock(UINT nToDock) {m_nToDock=nToDock;} + + // --- In : + // --- Out : + // --- Returns : difference (pixels) between cursor and screen edge + // when appbar will switch to the docking state + // --- Effect : call this function to get the value the appbar + // will switch to docking state + inline UINT GetPointToDock() const {return m_nToDock;} + + // --- In : nTimerInterval - time the appbar will remain unhidden + // while inactive untill start to sliding + // --- Out : + // --- Returns : + // --- Effect : sets new timer interval value + inline void SetTimerInterval(UINT nTimerInterval) {m_nTimerInterval=nTimerInterval;} + + // --- In : + // --- Out : + // --- Returns : - time the appbar will remain unhidden + // while inactive untill start to sliding + // --- Effect : call this function to retrieve the value of timer interval + inline UINT GetTimerInterval() const {return m_nTimerInterval;} + + // --- In : dwStyle - new styles of the appbar + // The valid styles are: + // OX_APPBARS_LEFT - the appbar can dock + // on the left edge of the screen + // OX_APPBARS_TOP - the appbar can dock + // on the top edge of the screen + // OX_APPBARS_RIGHT - the appbar can dock + // on the right edge of the screen + // OX_APPBARS_BOTTOM - the appbar can dock + // on the bottom + // OX_APPBARS_ALL_EDGES - the appbar can dock + // on all edges of the screen + // OX_APPBARS_FLOAT - the appbar can float + // OX_APPBARS_DIFFERENT_DIMS - the appbar has + // different dimensions for every edge + // OX_APPBARS_ALLS - all posible styles + // --- Out : + // --- Returns : + // --- Effect : sets new styles for the appbar + inline void SetBarStyle(DWORD dwStyle) + { + m_BarData.dwStyle=(dwStyle & OX_APPBARS_ALLS); + } + + // --- In : + // --- Out : + // --- Returns : the appbar styles (See description function SetBarStyle()) + // --- Effect : returns the appbar styles + inline DWORD GetBarStyle () const {return m_BarData.dwStyle;} + + // --- In : + // --- Out : + // --- Returns : TRUE if autobar is in autohidden state. The appbar + // may actually be hidden or unhidden at this moment (if is in + // autohidden state). + // To check actual state see variable + // bHidden in bar data (GetBarData()). There is a difference + // between autohide state and desired autohide state. + // Once you call SetAutoHide(TRUE), the desired state + // (bAutoHideDesired in bar data - call GetBarData()) will + // remain TRUE untill next call SetAutoHide(FALSE). This is + // because the system can has only one autohidden bar per edge. + // So, if there was not posibility to set autohidden state on + // this edge, this function will return FALSE, while bAutoHideDesired + // will be TRUE. Next time the edge has been changed bAutoHideDesired + // will forced to set autohide state on the new edge. + // --- Effect : returns TRUE if the appbar is in autohidden state on this edge + BOOL IsAutoHidden(); + + // --- In : + // --- Out : + // --- Returns : TRUE, if the appbar is floating, FALSE othewise. + // --- Effect : call this function to check floating state of the appabar + inline BOOL IsFloating() const {return (BOOL) (m_BarData.nEdge==ABE_FLOAT);} + + // --- In : + // --- Out : + // --- Returns : TRUE, if the appbar is in topmost state + // --- Effect : call this function to define if the appbar is + // in topmost state + inline BOOL IsAlwaysOnTop() const {return m_BarData.bOnTop;} + + // --- In : + // --- Out : + // --- Returns : TRUE, if appbar is registered, FALSE otherwise + // --- Effect : call this function to define if the appbar is registered + inline BOOL IsRegistered () const {return m_BarData.bRegistered;} + + // --- In : + // --- Out : + // --- Returns : the edge appbar is docking on or ABE_FLOAT, if floating + // --- Effect : call this function to get the edge + // appbar is docking on, if any + inline UINT GetEdge() const { return m_BarData.nEdge;} + + // --- In : bOnTop - TRUE to set as topmost window, FALSE to remove + // --- Out : + // --- Returns : + // --- Effect : call this function to change topmost style of the appbar + void SetAlwaysOnTop(BOOL bOnTop); + + // --- In : nEdge - the edge appbar should be docked on or float + // --- Out : + // --- Returns : + // --- Effect : call this function to change the edge of the appbar + BOOL SetEdge(UINT nEdge); + + // --- In : bHide - TRUE to set autohide style, FALSE to remove + // --- Out : + // --- Returns : TRUE on success, FALSE otherwise. + // --- Effect : Sets or removes autohidden state. The variable + // bHide will determine the autohidden state on all edges + // (See description of IsAutoHidden() function) + BOOL SetAutoHide(BOOL bHide); + + // --- In : bRegister - TRUE to register the appbar, FALSE to remove + // --- Out : + // --- Returns : TRUE on success, FALSE if the system + // could not register or the appbar has been registered + // so far + // --- Effect : Call this function to register or unregister appbar. + // The best way is before call this function + // call function IsRegistered() to check out the status + // of the appbar + BOOL Register(BOOL bRegister=TRUE); + + + void SetDockDimension(UINT nEdge, UINT nWidth) + { + switch (nEdge) + { + case ABE_TOP: + m_BarData.nTop=nWidth; + break; + case ABE_LEFT: + m_BarData.nLeft=nWidth; + break; + case ABE_BOTTOM: + m_BarData.nBottom=nWidth; + break; + case ABE_RIGHT: + m_BarData.nRight=nWidth; + break; + default: + ASSERT(FALSE); + } + } +//protected functions +protected: + + // --- In : nEdge + // --- Out : + // --- Returns : + // --- Effect : Do nothing. Override this function + // if you need to handle changes of the edges + // the appbar switching to + virtual void OnSetEdge(UINT nEdge) { UNREFERENCED_PARAMETER(nEdge);} + + // --- In : + // --- Out : + // --- Returns : TRUE on succes, FALSE otherwise + // --- Effect : Call this function to restore last + // saved state of the appbar + virtual BOOL LoadState(); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Call this function to save appbar to the registry + // before call Register(FALSE); + virtual void SaveState(); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : override this function if you want provide + // popup menu on mouse right-click + virtual void DoPopupMenu(){/* do nothing - override to provide your own menu*/} + + virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam ); + + void Float(APPBARDATA* pData); + void UnFloat(APPBARDATA* pData); + void AppBarCallback(UINT uMsg, WPARAM wParam, LPARAM lParam); + void PosChanged(); + void SetPosition(APPBARDATA* pBarData, BOOL bMove); + void QueryPosition(RECT* pRect); + void UnHide(); + void Hide(); + UINT GetProposedEdge(); + void GetEndRect(CRect& rect); + void GetProposedRect(CRect& rect); + BOOL CanContinue(CRect& rctCurrent, CRect& rctEnd); + void SlideWindow(); + + void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); + int OnCreate(LPCREATESTRUCT lpCreateStruct); + void OnDestroy(); + void OnLButtonDown(UINT nFlags, CPoint point); + void OnLButtonUp(UINT nFlags, CPoint point); + void OnMouseMove(UINT nFlags, CPoint point); + void OnMove(int x, int y); + LRESULT OnNcHitTest(CPoint point); + void OnRButtonDown(UINT nFlags, CPoint point); + void OnTimer(UINT nIDEvent); + void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos); + void OnExitSizeMoveLoop(); + +//protected members +protected: + CRect m_rctFloat; //coordinates of the window in the float state + int m_nOffset;//switches between -1 and 1 indicating in what side slide + tMouse m_stMouse;//position and state of the cursor + tBarData m_BarData;//data related to the bar + BOOL m_bSizeable;//to remember WS_THICKFRAME style while the bar is hidden + UINT m_nSlidingTime;//defines speed to slide + UINT m_nHiddenWidth;//defines width of the window in the hidden state + UINT m_nTimerInterval;//time to wait to start sliding bar while the bar is inactive + UINT m_nToDock;//offset cursor from an edge that will be treated as switch to docking state + UINT m_nToFloat;//offset cursor from the docking frame to switch to float + BOOL m_bFloating;//TRUE while floating +}; + +/* +========================================================================= +======================IMPLEMENTATION===================================== +========================================================================= +*/ + +///////////////////////////////////////////////////////////////////////////// +// COXAppBar + +//////////////////////////////////////////// +//constructor for generic CWnd derived class + +template +COXAppBar::COXAppBar() +{ + ASSERT(PARENTWND::IsKindOf(RUNTIME_CLASS(CWnd))); + m_nOffset=0; + m_bSizeable=FALSE; + m_nSlidingTime=SLIDING_TIME; + m_nHiddenWidth=MIN_DIMENSION; + m_nTimerInterval=TIMER_INTERVAL; + m_nToDock=DIM_TO_DOCK; + m_nToFloat=DIM_TO_FLOAT; + m_bFloating=FALSE; +} + +//////////////////////////////////////////// +//constructor for CDialog derived classes + +template +COXAppBar::COXAppBar(UINT nId, CWnd* pParent): +PARENTWND(nId, pParent) +{ + m_nOffset=0; + m_bSizeable=FALSE; + m_nSlidingTime=TIMER_INTERVAL; + m_nHiddenWidth=MIN_DIMENSION; + m_nTimerInterval=TIMER_INTERVAL; + m_nToDock=DIM_TO_DOCK; + m_nToFloat=DIM_TO_FLOAT; + m_bFloating=FALSE; +} + + + +/////////////////////////////////////// +//destructor + +template +COXAppBar::~COXAppBar() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// COXAppBar message handlers + +///////////////////////////////////// +//cannot define message handler in +//template class - working with +//WindowProc() + +template +LRESULT COXAppBar::WindowProc( UINT message, WPARAM wParam, LPARAM lParam ) +{ +#if defined (_WINDLL) +#if defined (_AFXDLL) + AFX_MANAGE_STATE(AfxGetAppModuleState()); +#else + AFX_MANAGE_STATE(AfxGetStaticModuleState()); +#endif +#endif + + switch (message) + { + case WM_ACTIVATE: + { + OnActivate(LOWORD(wParam), + (CWnd*) CWnd::FromHandle((HWND) lParam), + (BOOL) HIWORD(wParam)); + return NULL; + } + case WM_CREATE: + { + return OnCreate((LPCREATESTRUCT) lParam); + } + case WM_DESTROY: + { + OnDestroy(); + return NULL; + } + case WM_LBUTTONDOWN: + { + CPoint point(LOWORD(lParam), HIWORD(lParam)); + OnLButtonDown((UINT) wParam, point); + return NULL; + } + case WM_LBUTTONUP: + { + CPoint point(LOWORD(lParam), HIWORD(lParam)); + OnLButtonUp((UINT) wParam, point); + return NULL; + } + case WM_MOUSEMOVE: + { + CPoint point(LOWORD(lParam), HIWORD(lParam)); + OnMouseMove((UINT) wParam, point); + return NULL; + } + case WM_MOVE: + { + OnMove(LOWORD(lParam), HIWORD(lParam)); + return NULL; + } + case WM_NCHITTEST: + { + CPoint point(LOWORD(lParam), HIWORD(lParam)); + return OnNcHitTest(point); + } + case WM_RBUTTONDOWN: + { + CPoint point(LOWORD(lParam), HIWORD(lParam)); + OnRButtonDown((UINT) wParam, point); + return NULL; + } + case WM_EXITSIZEMOVE: + { + OnExitSizeMoveLoop(); + return NULL; + } + break; + case WM_TIMER: + { + OnTimer((UINT) wParam); + return NULL; + } + case WM_WINDOWPOSCHANGED: + { + OnWindowPosChanged((WINDOWPOS*) lParam); + return NULL; + } + + default: + { + return PARENTWND::WindowProc(message, wParam, lParam); + } + } +} + + +////////////////////////////////////////////////// +//handlers for WindowProc() + +////////////////////////////////////////////////// +//OnActivate(): if the bar is autohidden, Hide() +//or UnHide() it depends on the message + +template +void COXAppBar::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) +{ + PARENTWND::OnActivate(nState, pWndOther, bMinimized); + + ASSERT(PARENTWND::m_hWnd); + + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(APPBARDATA); + data.hWnd=PARENTWND::m_hWnd; + + SHAppBarMessage(ABM_ACTIVATE, &data); + + if (!IsAutoHidden()) + return; + + switch (nState) + { + case WA_ACTIVE: + case WA_CLICKACTIVE: + if (m_BarData.bHidden) + UnHide(); + break; + + case WA_INACTIVE: + if (!m_BarData.bHidden) + Hide(); + break; + } +} + +////////////////////////////////////////// +//OnCreate(): load default bar rect for +//floating state and SetTimer() for autohidden state + +template +int COXAppBar::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (PARENTWND::OnCreate(lpCreateStruct) == -1) + return -1; + + PARENTWND::GetWindowRect(&m_rctFloat); + + PARENTWND::SetTimer(IDT_AUTOHIDE,m_nTimerInterval,NULL); + return 0; +} + +///////////////////////////////////////// +//ONDestroy(): Unregister and KillTimer() + +template +void COXAppBar::OnDestroy() +{ + Register(FALSE); + PARENTWND::KillTimer(IDT_AUTOHIDE); + PARENTWND::OnDestroy(); +} + +////////////////////////////////////////// +//OnLButtonDown(): start capture if registered + +template +void COXAppBar::OnLButtonDown(UINT nFlags, CPoint point) +{ + if (IsRegistered()) + { + m_stMouse.bButtonDown=TRUE; + ::GetCursorPos(&m_stMouse.pt); + SetCapture(); + } + PARENTWND::OnLButtonDown(nFlags, point); +} + +/////////////////////////////////////////////////// +//OnLButtonUp(): ReleaseCapture() if was registared + +template +void COXAppBar::OnLButtonUp(UINT nFlags, CPoint point) +{ + if (IsRegistered()) + { + m_stMouse.bButtonDown=FALSE; + ::GetCursorPos(&m_stMouse.pt); + ReleaseCapture(); + } + PARENTWND::OnLButtonUp(nFlags, point); +} + +//////////////////////////////////////////////////// +//OnMouseMove() if registered: +//move window if is in float state, +//UnHide() if in hidden state. +//Check for new appropriate edge. + +template +void COXAppBar::OnMouseMove(UINT nFlags, CPoint point) +{ + if (!IsRegistered()) + { + PARENTWND::OnMouseMove(nFlags, point); + return; + } + + if (IsAutoHidden() && m_BarData.bHidden) + { + UnHide(); + return; + } + if (!m_stMouse.bButtonDown || m_BarData.nEdge==ABE_UNKNOWN) + return; + + //get current position + CPoint pt; + ::GetCursorPos(&pt); + + if (m_BarData.nEdge==ABE_FLOAT) + { + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(data); + data.hWnd=PARENTWND::m_hWnd; + data.uEdge=m_BarData.nEdge; + CRect rect; + PARENTWND::GetWindowRect(&rect); + CSize size; + size=pt-m_stMouse.pt; + rect.OffsetRect(size); + m_stMouse.pt=pt; + data.rc=rect; + SetPosition(&data,TRUE); + return; + } + + m_stMouse.pt=pt; + + UINT nNewEdge=GetProposedEdge(); + + if (nNewEdge!=m_BarData.nEdge) + SetEdge(nNewEdge); + + PARENTWND::OnMouseMove(nFlags, point); +} + +////////////////////////////////////////////// +//OnMove(): update cursor position + +template +void COXAppBar::OnMove(int x, int y) +{ + + CWnd::OnMove(x, y); + + CPoint pt; + ::GetCursorPos(&pt); + + m_stMouse.pt=pt; + +} + +////////////////////////////////////////////// +//OnNcHitTest(): handling to allow move window +//by mouse not only with caption, but all client area + +template +LRESULT COXAppBar::OnNcHitTest(CPoint point) +{ + UINT nHitTest; + + nHitTest = PtrToUint(CWnd::OnNcHitTest(point)); + + if (!IsRegistered()) + return nHitTest; + + if (m_BarData.nEdge==ABE_FLOAT) + { + if (nHitTest==HTCLIENT || nHitTest==HTCAPTION) + return HTCLIENT; + else + return nHitTest; + } + if ((m_BarData.nEdge == ABE_TOP) && (nHitTest == HTBOTTOM)) + return HTBOTTOM; + if ((m_BarData.nEdge == ABE_BOTTOM) && (nHitTest == HTTOP)) + return HTTOP; + if ((m_BarData.nEdge == ABE_LEFT) && (nHitTest == HTRIGHT)) + return HTRIGHT; + if ((m_BarData.nEdge == ABE_RIGHT) && (nHitTest == HTLEFT)) + return HTLEFT; + + return HTCLIENT; +} + +///////////////////////////////////////////////// +//OnRButtonDown() Popup menu if cursor is in client area + +template +void COXAppBar::OnRButtonDown(UINT nFlags, CPoint point) +{ + + CRect rct; + PARENTWND::GetClientRect(&rct); + + if (rct.PtInRect(point)) + { + DoPopupMenu(); + PARENTWND::OnRButtonDown(nFlags, point); + } +} + +/////////////////////////////////////////////// +//OnExitSizeMoveLoop(): Update current position + +template +void COXAppBar::OnExitSizeMoveLoop() +{ + if (!m_BarData.bHiding && !m_BarData.bHidden) + { + CRect rect; + PARENTWND::GetWindowRect(&rect); + + switch (m_BarData.nEdge) + { + case ABE_LEFT: + m_BarData.nWidth=rect.Width(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nLeft=rect.Width(); + break; + case ABE_TOP: + m_BarData.nHeight=rect.Height(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nTop=rect.Height(); + break; + case ABE_RIGHT: + m_BarData.nWidth=rect.Width(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nRight=rect.Width(); + break; + case ABE_BOTTOM: + m_BarData.nHeight=rect.Height(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nBottom=rect.Height(); + break; + } + if (!IsAutoHidden()) + { + APPBARDATA data; + ZeroMemory((void*) &data,sizeof(data)); + data.cbSize=sizeof(data); + data.hWnd=PARENTWND::m_hWnd; + data.uEdge=m_BarData.nEdge; + data.rc=rect; + SetPosition(&data, TRUE); + } + } + +} + + +///////////////////////////////////////////////// +//OnTimer(): In autohidden state hide window, if +//is inactive + +template +void COXAppBar::OnTimer(UINT nIDEvent) +{ + if (IsAutoHidden() && !m_BarData.bHidden && !m_BarData.bHiding) + { + if (::GetActiveWindow()!=PARENTWND::m_hWnd) + { + CPoint pt; + ::GetCursorPos(&pt); + CRect rct; + PARENTWND::GetWindowRect(&rct); + rct.InflateRect(MIN_DIMENSION,MIN_DIMENSION); + if (!rct.PtInRect(pt)) + Hide(); + } + } + PARENTWND::OnTimer(nIDEvent); +} + +/////////////////////////////////////////// +//OnWindowPosChanged() - update current position + +template +void COXAppBar::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) +{ + PARENTWND::OnWindowPosChanged(lpwndpos); + + if (!IsRegistered() || m_BarData.bHiding) + return; + + APPBARDATA data; + + CRect rect; + PARENTWND::GetWindowRect(&rect); + + ZeroMemory(&data, sizeof(data)); + data.cbSize = sizeof(APPBARDATA); + data.rc=rect; + data.uEdge = m_BarData.nEdge; + data.hWnd=PARENTWND::m_hWnd; + + SHAppBarMessage (ABM_WINDOWPOSCHANGED, &data); + + switch(m_BarData.nEdge) + { + case ABE_FLOAT: + { + m_rctFloat=rect; + UINT nNewEdge=GetProposedEdge(); + if (nNewEdge!=m_BarData.nEdge) + SetEdge(nNewEdge); + } + break; + case ABE_LEFT: + if (!m_BarData.bHidden) + { + m_BarData.nWidth=rect.Width(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nLeft=m_BarData.nWidth; + } + break; + case ABE_TOP: + if (!m_BarData.bHidden) + { + m_BarData.nHeight=rect.Height(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nTop=m_BarData.nHeight; + } + break; + case ABE_RIGHT: + if (!m_BarData.bHidden) + { + m_BarData.nWidth=rect.Width(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nRight=m_BarData.nWidth; + } + break; + case ABE_BOTTOM: + if (!m_BarData.bHidden) + { + m_BarData.nHeight=rect.Height(); + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + m_BarData.nBottom=m_BarData.nHeight; + } + break; + } + + +} + +//////////////////////////////////////// +//IsAutoHidden(): defines is bar in autohidden state +//There is a difference between autohidden state and +//variable m_BarData.bAutoHideDesired - the variable +//is always TRUE if last call was SetAutoHide(TRUE) +//and FALSE if last call was SetAutoHide(FALSE) regardless +//of actual autohidden state that returns IsAutoHidden(). +//Every time the docked edge is changed the program will try +//to make the bar autohidden if the variable is TRUE + +template +BOOL COXAppBar::IsAutoHidden() +{ + ASSERT(::IsWindow(PARENTWND::m_hWnd)); + + if (!IsRegistered()) + return FALSE; + + APPBARDATA data; + + ZeroMemory(&data, sizeof(data)); + data.cbSize = sizeof(APPBARDATA); + data.uEdge = m_BarData.nEdge; + data.hWnd=PARENTWND::m_hWnd; + + HWND hWnd=(HWND) SHAppBarMessage(ABM_GETAUTOHIDEBAR, &data); + + return (BOOL) (hWnd==data.hWnd); +} + + +///////////////////////////////////////////// +//QueryPosition(): query position for appbar + +template +void COXAppBar::QueryPosition(RECT* pRect) +{ + ASSERT(::IsWindow(PARENTWND::m_hWnd)); + + APPBARDATA data; + + ZeroMemory(&data, sizeof(data)); + data.cbSize = sizeof(APPBARDATA); + data.rc=*pRect; + data.uEdge = m_BarData.nEdge; + data.hWnd=PARENTWND::m_hWnd; + + SHAppBarMessage(ABM_QUERYPOS, &data); + + switch (data.uEdge) + { + case ABE_LEFT: + data.rc.right = data.rc.left+pRect->right-pRect->left; + break; + + case ABE_RIGHT: + data.rc.left = data.rc.right-pRect->right+pRect->left; + break; + + case ABE_TOP: + data.rc.bottom = data.rc.top + pRect->bottom-pRect->top; + break; + + case ABE_BOTTOM: + data.rc.top = data.rc.bottom - pRect->bottom+pRect->top; + break; + } + *pRect = data.rc; +} + +///////////////////////////////////////////////////// +//SetPosition(): sets the appbar in specified position +//regarding with result of query position + +template +void COXAppBar::SetPosition(APPBARDATA* pBarData, BOOL bMove) +{ + + ASSERT(::IsWindow(PARENTWND::m_hWnd)); + + APPBARDATA data; + + ZeroMemory(&data, sizeof(data)); + data.cbSize = sizeof(APPBARDATA); + data.rc=pBarData->rc; + data.uEdge = pBarData->uEdge; + data.hWnd=PARENTWND::m_hWnd; + + QueryPosition(&data.rc); + + if (data.uEdge !=ABE_FLOAT && data.uEdge!=ABE_UNKNOWN) + SHAppBarMessage(ABM_SETPOS, &data); + if (bMove) + { + + PARENTWND::MoveWindow(pBarData->rc.left, pBarData->rc.top, + pBarData->rc.right - pBarData->rc.left, + pBarData->rc.bottom - pBarData->rc.top, TRUE); + } + + +} + +////////////////////////////////////////////////// +//PosChanged(): handler for notification message - +//windows tell us move the appbar + +template +void COXAppBar::PosChanged() +{ + SetEdge(m_BarData.nEdge); +} + +////////////////////////////////////////////////// +//AppBarCallback(): handler for notification messages + +template +void COXAppBar::AppBarCallback (UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + static HWND hwndZOrder = NULL; + + APPBARDATA data; + ZeroMemory((void*) &data,sizeof(data)); + data.cbSize=sizeof(data); + data.hWnd=PARENTWND::m_hWnd; + + + switch (wParam) + { + case ABN_STATECHANGE: + break; + + case ABN_FULLSCREENAPP: + if (lParam) + { + //Move the appbar to the bottom of the z-order. + + hwndZOrder = GetWindow (m_data.hWnd, GW_HWNDPREV); + SetWindowPos(data.hWnd, HWND_BOTTOM, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + } + else + { + //Restore the Z-order + SetWindowPos(m_data.hWnd, IsAlwaysOnTop() ? HWND_TOPMOST : hwndZOrder, + 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + + hwndZOrder = NULL; + } + break; + + case ABN_POSCHANGED: + PosChanged (); + break; + } +} + +//////////////////////////////////////////////////////////// +//Register(): this function registers/unregisters the appbar. + +template +BOOL COXAppBar::Register(BOOL bRegister) +{ + + ASSERT(PARENTWND::m_hWnd); + + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(APPBARDATA); + data.hWnd=PARENTWND::m_hWnd; + + if (bRegister) + { + data.uCallbackMessage = OX_APPBAR; + m_BarData.bRegistered = PtrToInt(SHAppBarMessage (ABM_NEW, &data)); + if (m_BarData.bRegistered) + { + m_bFloating=FALSE; + if (m_BarData.nEdge==ABE_UNKNOWN ) + SetEdge(ABE_FLOAT); + else + { + int nEdge=m_BarData.nEdge; + m_BarData.nEdge=ABE_UNKNOWN; + SetEdge(nEdge); + } + } + return m_BarData.bRegistered; + } + else + { + SaveState(); + m_BarData.bRegistered = !SHAppBarMessage(ABM_REMOVE, &data); + m_bFloating=FALSE; + return !m_BarData.bRegistered; + } +} + +/////////////////////////////////////////////////// +//SetAutoHide(): sets or remove autohide mode + +template +BOOL COXAppBar::SetAutoHide(BOOL bHide) +{ + + ASSERT(PARENTWND::m_hWnd); + + CRect rect; + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(APPBARDATA); + data.hWnd=PARENTWND::m_hWnd; + data.uEdge = m_BarData.nEdge; + + m_BarData.bAutoHideDesired=bHide; + + HWND hwndAutoHide = (HWND) SHAppBarMessage(ABM_GETAUTOHIDEBAR, &data); + + if (bHide) + { + if (hwndAutoHide != NULL) + { + TRACE0("The system has autohidden appbar on this edge so far\r\n"); + return FALSE; + } + + data.lParam = TRUE; + if (!SHAppBarMessage(ABM_SETAUTOHIDEBAR, &data)) + { + TRACE0("Error to set autohidden bar\r\n"); + return FALSE; + } + if (m_BarData.nEdge!=ABE_FLOAT) + { + PARENTWND::GetWindowRect(&rect); + GetEndRect(rect); + data.rc=rect; + SetPosition(&data, FALSE); + } + } + else + { + if (hwndAutoHide != data.hWnd) + { + TRACE0 ("The window is not hidden\r\n"); + return FALSE; + } + + data.lParam = FALSE; + + if (!SHAppBarMessage(ABM_SETAUTOHIDEBAR, &data)) + { + TRACE0 ("Error to unhide appbar\r\n"); + return FALSE; + } + PARENTWND::GetWindowRect(&rect); + switch (m_BarData.nEdge) + { + case ABE_LEFT: + rect.right=rect.left+m_BarData.nWidth; + break; + case ABE_TOP: + rect.bottom=rect.top+m_BarData.nHeight; + break; + case ABE_RIGHT: + rect.left=rect.right-m_BarData.nWidth; + break; + case ABE_BOTTOM: + rect.top=rect.bottom-m_BarData.nHeight; + break; + default: + return TRUE; + } + data.rc=rect; + SetPosition(&data,TRUE); + } + return TRUE; +} + +/////////////////////////////////////////////// +//SetEdge(): call this function to set desired edge + +template +BOOL COXAppBar::SetEdge(UINT nEdge) +{ + //only for changing edge + if (nEdge==m_BarData.nEdge || !IsRegistered()) + return FALSE; + + switch (nEdge) + { + case ABE_UNKNOWN: + ASSERT(FALSE); + return FALSE; + case ABE_FLOAT: + if (!(m_BarData.dwStyle & OX_APPBARS_FLOAT)) + return FALSE; + break; + case ABE_TOP: + if (!(m_BarData.dwStyle & OX_APPBARS_TOP)) + return FALSE; + m_BarData.nDockEdge=ABE_TOP; + break; + case ABE_LEFT: + if (!(m_BarData.dwStyle & OX_APPBARS_LEFT)) + return FALSE; + m_BarData.nDockEdge=ABE_LEFT; + break; + case ABE_RIGHT: + if (!(m_BarData.dwStyle & OX_APPBARS_RIGHT)) + return FALSE; + m_BarData.nDockEdge=ABE_RIGHT; + break; + case ABE_BOTTOM: + if (!(m_BarData.dwStyle & OX_APPBARS_BOTTOM)) + return FALSE; + m_BarData.nDockEdge=ABE_BOTTOM; + break; + } + + if (IsAutoHidden()) + { + SetAutoHide(FALSE); + m_BarData.bAutoHideDesired=TRUE; + } + + m_BarData.nEdge=nEdge; + + CRect rect; + + ASSERT(PARENTWND::m_hWnd); + PARENTWND::GetWindowRect(&rect); + + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(APPBARDATA); + data.hWnd=PARENTWND::m_hWnd; + data.uEdge=m_BarData.nEdge; + + + if ( nEdge==ABE_FLOAT) + Float(&data); + else + UnFloat(&data); + + + GetProposedRect(rect); + data.rc=rect; + + if (nEdge!=ABE_FLOAT) + { + SetPosition(&data, TRUE); + if (m_BarData.bAutoHideDesired) + SetAutoHide(TRUE); + } + else + PARENTWND::MoveWindow(rect.left, rect.top, + rect.right - rect.left, + rect.bottom - rect.top, TRUE); + + OnSetEdge(m_BarData.nEdge); + return TRUE; +} + +////////////////////////////////////////////////////// +//SetAlwaysOnTop(): sets or remove always_on_top style + +template +void COXAppBar::SetAlwaysOnTop(BOOL bOnTop) +{ + + ::SetWindowPos(PARENTWND::m_hWnd, (bOnTop) ? HWND_TOPMOST : HWND_NOTOPMOST, + 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + + m_BarData.bOnTop = bOnTop; +} + +/////////////////////////////////////////////////// +//Hide(): hides the window in autohidden state + +template +void COXAppBar::Hide() +{ + if (!IsAutoHidden()) + return; + + CRect rect; + PARENTWND::GetWindowRect(&rect); + GetEndRect(rect); + + m_nOffset=-1; + m_BarData.nEdge=m_BarData.nEdge; + m_BarData.bHiding=TRUE; + SlideWindow(); + m_BarData.bHidden=TRUE; + m_BarData.bHiding=FALSE; + DWORD dwStyle=PARENTWND::GetStyle(); + if (dwStyle & WS_THICKFRAME) + { + m_bSizeable=TRUE; + PARENTWND::ModifyStyle(WS_THICKFRAME,0); + } + if (IsAutoHidden()) + { + APPBARDATA data; + ZeroMemory((void*) &data, sizeof(data)); + data.cbSize=sizeof(data); + data.hWnd=PARENTWND::m_hWnd; + data.rc=rect; + data.uEdge=m_BarData.nEdge; + SetPosition(&data, TRUE); + } +} + +//////////////////////////////////// +//UnHide(): unhidethe window in autohidden state + +template +void COXAppBar::UnHide() +{ + + if (!IsAutoHidden()) + return; + m_nOffset=1; + m_BarData.nEdge=m_BarData.nEdge; + m_BarData.bHiding=TRUE; + SlideWindow(); + m_BarData.bHiding = FALSE; + m_BarData.bHidden=FALSE; + if (m_bSizeable) + PARENTWND::ModifyStyle(0,WS_THICKFRAME); + +} + +/////////////////////////////////////////////////////// +//LoadState(): loads last saved state from the registry + +template +BOOL COXAppBar::LoadState() +{ + + COXRegistryValFile regfile( + HKEY_CURRENT_USER, AfxGetAppName(), _T("AppBar")); + CArchive ar(®file, CArchive::load); + + BOOL bRet=FALSE; + + + if (regfile.GetLength()>0) + { + int nVersion; + ar >> nVersion; + if (nVersion!=OX_APPBAR_VERSION) + return FALSE; + + BOOL bRegistered; + ar >> bRegistered; + + if (bRegistered) + { + if(!IsRegistered()) + Register(TRUE); + } + else + { + if (IsRegistered()) + Register(FALSE); + } + + BOOL bOnTop; + BOOL bAutoHide; + + ar >> bOnTop; + ar >> bAutoHide; + ar >> m_BarData.nWidth; + ar >> m_BarData.nHeight; + ar >> m_BarData.nLeft; + ar >> m_BarData.nTop; + ar >> m_BarData.nRight; + ar >> m_BarData.nBottom; + + UINT nEdge; + //UINT nDockEdge; + + ar >> nEdge;//m_BarData.nEdge; + ar >> m_BarData.nDockEdge; + ar >> m_BarData.dwStyle; + ar >> m_nSlidingTime; + ar >> m_nHiddenWidth; + ar >> m_nTimerInterval; + + ar >> m_nToDock; + ar >> m_nToFloat; + ar >> m_rctFloat.left; + ar >> m_rctFloat.top; + ar >> m_rctFloat.right; + ar >> m_rctFloat.bottom; + + if (IsRegistered()) + { + SetEdge(nEdge); + SetAutoHide(bAutoHide); + SetAlwaysOnTop(bOnTop); + } + bRet=TRUE; + } + + ar.Close(); + return bRet; +} + +/////////////////////////////////////////////////// +//SaveState(): save the state to the registry + +template +void COXAppBar::SaveState() +{ + COXRegistryValFile regfile( + HKEY_CURRENT_USER, AfxGetAppName(), _T("AppBar")); + CArchive ar(®file, CArchive::store); + ar << OX_APPBAR_VERSION; + ar << m_BarData.bRegistered; + ar << m_BarData.bOnTop; + ar << m_BarData.bAutoHideDesired; + ar << m_BarData.nWidth; + ar << m_BarData.nHeight; + ar << m_BarData.nLeft; + ar << m_BarData.nTop; + ar << m_BarData.nRight; + ar << m_BarData.nBottom; + ar << m_BarData.nEdge; + ar << m_BarData.nDockEdge; + ar << m_BarData.dwStyle; + ar << m_nSlidingTime; + ar << m_nHiddenWidth; + ar << m_nTimerInterval; + ar << m_nToDock; + ar << m_nToFloat; + ar << m_rctFloat.left; + ar << m_rctFloat.top; + ar << m_rctFloat.right; + ar << m_rctFloat.bottom; + + ar.Close(); +} + +//////////////////////////////////////////////////// +//SlideWindow(): slides the window in autohidden state +//hiding/unhiding + +template +void COXAppBar::SlideWindow() +{ + CRect rctCurrent; + PARENTWND::GetWindowRect(&rctCurrent); + CRect rctEnd=rctCurrent; + + GetEndRect(rctEnd); + + + DWORD dwCount=::GetTickCount(); + + while(CanContinue(rctCurrent,rctEnd)) + { + if ((dwCount-::GetTickCount())>m_nSlidingTime) + { + dwCount=::GetTickCount(); + switch (m_BarData.nEdge) + { + case ABE_TOP: + rctCurrent.bottom+=m_nOffset; + break; + case ABE_BOTTOM: + rctCurrent.top-=m_nOffset; + break; + case ABE_LEFT: + rctCurrent.right+=m_nOffset; + break; + case ABE_RIGHT: + rctCurrent.left-=m_nOffset; + break; + } + PARENTWND::MoveWindow(&rctCurrent); + } + } + + PARENTWND::MoveWindow(&rctEnd); + +} + +//////////////////////////////////////////////////// +//CanContinue(): helper function for SlideWindow() +//returns FALSE when appbar rect reached final position + +template +BOOL COXAppBar::CanContinue(CRect& rctCurrent, CRect& rctEnd) +{ + switch (m_BarData.nEdge) + { + case ABE_TOP: + case ABE_BOTTOM: + if (m_BarData.bHidden) + return (BOOL) (rctCurrent.Height()rctEnd.Height()); + case ABE_LEFT: + case ABE_RIGHT: + if (m_BarData.bHidden) + return (BOOL) (rctCurrent.Width()rctEnd.Width()); + default: + ASSERT(FALSE); + } + return FALSE; +} + +//////////////////////////////////////////////////// +//GetEndRect(): helper function returns rectangle +//appbar should reach while hiding/unhiding depends +//on docking edge + +template +void COXAppBar::GetEndRect(CRect& rect) +{ + switch (m_BarData.nEdge) + { + case ABE_TOP: + if (m_BarData.bHidden) + rect.bottom=rect.top+m_BarData.nHeight; + else + rect.bottom=rect.top+GetHiddenWidth(); + break; + case ABE_BOTTOM: + if (m_BarData.bHidden) + rect.top=rect.bottom-m_BarData.nHeight; + else + rect.top=rect.bottom-GetHiddenWidth(); + break; + case ABE_LEFT: + if (m_BarData.bHidden) + rect.right=rect.left+m_BarData.nWidth; + else + rect.right=rect.left+GetHiddenWidth(); + break; + case ABE_RIGHT: + if (m_BarData.bHidden) + rect.left=rect.right-m_BarData.nWidth; + else + rect.left=rect.right-GetHiddenWidth(); + + break; + } +} + +////////////////////////////////////////////////////// +//GetProposedRect(): returns proposed rect for the edge +//the appbar will switch to + +template +void COXAppBar::GetProposedRect(CRect& rect) +{ + rect.left=0; + rect.top=0; + rect.right=::GetSystemMetrics(SM_CXSCREEN); + rect.bottom=::GetSystemMetrics(SM_CYSCREEN); + + if (m_BarData.dwStyle & OX_APPBARS_DIFFERENT_DIMS) + { + switch (m_BarData.nEdge) + { + case ABE_UNKNOWN: + ASSERT(FALSE); + break; + case ABE_FLOAT: + { + CPoint pt; + ::GetCursorPos(&pt); + rect.left=pt.x-(m_rctFloat.right-m_rctFloat.left)/2; + rect.right=rect.left+m_rctFloat.right-m_rctFloat.left; + rect.top=pt.y-DIM_CAPTION; + rect.bottom=rect.top+m_rctFloat.bottom-m_rctFloat.top; + } + break; + case ABE_LEFT: + rect.right=m_BarData.nLeft; + break; + case ABE_TOP: + rect.bottom=m_BarData.nTop; + break; + case ABE_RIGHT: + rect.left=rect.right-m_BarData.nRight; + break; + case ABE_BOTTOM: + rect.top=rect.bottom-m_BarData.nBottom; + break; + } + return; + } + + switch (m_BarData.nEdge) + { + case ABE_UNKNOWN: + ASSERT(FALSE); + break; + case ABE_FLOAT: + PARENTWND::GetWindowRect(&rect); + break; + case ABE_LEFT: + rect.right=m_BarData.nWidth; + break; + case ABE_TOP: + rect.bottom=m_BarData.nHeight; + break; + case ABE_RIGHT: + rect.left=rect.right-m_BarData.nWidth; + break; + case ABE_BOTTOM: + rect.top=rect.bottom-m_BarData.nHeight; + break; + } +} + +//////////////////////////////////////////////////// +//GetProposedEdge(): propose the edge depends on current +//placement of the appbar and position of the mouse, +//while button pressed + +template +UINT COXAppBar::GetProposedEdge() +{ + + POINT pt; + CRect rectScreen; + rectScreen.top=0; + rectScreen.left=0; + rectScreen.right = GetSystemMetrics(SM_CXSCREEN); + rectScreen.bottom = GetSystemMetrics(SM_CYSCREEN); + + VERIFY(GetCursorPos(&pt)); + CRect rectCurrent; + PARENTWND::GetWindowRect(&rectCurrent); + + UINT nNewEdge=m_BarData.nEdge; + UINT nLeftRight; + UINT nTopBottom; + UINT nDiffr=rectScreen.right; + + switch (m_BarData.nEdge) + { + case ABE_UNKNOWN: + return ABE_UNKNOWN; + case ABE_TOP: + case ABE_LEFT: + case ABE_RIGHT: + case ABE_BOTTOM: + if (!(m_BarData.dwStyle & OX_APPBARS_FLOAT)) + { + if (m_BarData.dwStyle & (OX_APPBARS_LEFT | OX_APPBARS_RIGHT)) + nLeftRight=(pt.x>(rectScreen.right/2))?ABE_RIGHT:ABE_LEFT; + else + if (m_BarData.dwStyle & OX_APPBARS_LEFT) + nLeftRight=ABE_LEFT; + else + if (m_BarData.dwStyle & OX_APPBARS_RIGHT) + nLeftRight=ABE_RIGHT; + else + nLeftRight=ABE_UNKNOWN; + if (m_BarData.dwStyle & (OX_APPBARS_TOP | OX_APPBARS_RIGHT)) + nTopBottom=(pt.y>(rectScreen.bottom/2))?ABE_BOTTOM:ABE_TOP; + else + if (m_BarData.dwStyle & OX_APPBARS_TOP) + nTopBottom=ABE_TOP; + else + if (m_BarData.dwStyle & OX_APPBARS_BOTTOM) + nTopBottom=ABE_BOTTOM; + else + nTopBottom=ABE_UNKNOWN; + switch( nLeftRight) + { + case ABE_UNKNOWN: + if (nTopBottom==ABE_UNKNOWN) + { + ASSERT(FALSE); + return m_BarData.nEdge; + } + return nTopBottom; + case ABE_LEFT: + if (nTopBottom==ABE_UNKNOWN) + return ABE_LEFT; + if (nTopBottom==ABE_TOP) + { + return (pt.x*rectScreen.Height() +void COXAppBar::Float(APPBARDATA* pData) +{ + SHAppBarMessage(ABM_REMOVE, pData); + m_bFloating=TRUE; +} + +////////////////////////////////////////////////// +//UnFloat() registers the appbar after floating + +template +void COXAppBar::UnFloat(APPBARDATA* pData) +{ + ASSERT(IsRegistered()); + + if (m_bFloating) + m_bFloating=!SHAppBarMessage(ABM_NEW,pData); + +} + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXAPPBAR_H__) diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoComplete.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoComplete.h new file mode 100644 index 0000000..05472a4 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoComplete.h @@ -0,0 +1,241 @@ +// ========================================================================== +// Class Specification : COXAutoComplete +// ========================================================================== +// Header file : OXAutoComplete.h +// Version: 9.3 +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. +// +// ////////////////////////////////////////////////////////////////////////// +// +// Description: +// +// The COXAutoComplete class provided similar capabilities to the user +// like IE addressbar. It will remember your last values you've entered in +// the edit box (number of the values for a window you can set by +// SetDepth()) function. And while you are typing it will suggest you some values +// from your most recently used ones. +// To use this class you may have just one instance for you application. +// Call Attach() function for every window you want to provide this +// functionality. If you want to provide separate list of values for +// the windows you should supply different names for every window in +// Attach(). The data is persistent and will be saved in the registry. +// You do not need call Detach() - it will be done on destruction. +// To add value to the list you must call Complete() function telling +// to the COXAutoComplete to add this value to the list. +// Usually it will be when user pressed enter. +// The class has two flags that define his behavior. +// When you call Attach() if you set OX_AUTOCOMPLETE_LIST flag, it will +// bring you list box to show you possible values. +// If you set OX_AUTOCOMPLETE_APPEND style it will fill edit box +// with recommended value. By default all they are set on. +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +////////////////////////////////////////////////////////////////////// +// +// Dependencies: +// OXAutoListBox.h +// OXAutoComplete.h +// OXRegistryValFile.h +// +// OXAutoListBox.cpp +// OXAutoComplete.cpp +// OXRegistryValFile.cpp + + +#if !defined(_OXAUTOCOMPLETE_H__) +#define _OXAUTOCOMPLETE_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "oxdllext.h" +#include "afxtempl.h" +#include "OXAutoListBox.h" +#include "UTB64Bit.h" + +#ifndef OX_AUTOCOMPLETE_DEPTHDEFAULT +#define OX_AUTOCOMPLETE_DEPTHDEFAULT 20 +#endif + +#ifndef OX_AUTOCOMPLETE_NAMEDEFAULT +#define OX_AUTOCOMPLETE_NAMEDEFAULT _T("Common") +#endif + +#ifndef OX_AUTOCOMPLETE_VERSION +#define OX_AUTOCOMPLETE_VERSION 0x100 +#endif + +#ifndef OX_AUTOCOMPLETE_HEIGHTDEFAULTMAX +#define OX_AUTOCOMPLETE_HEIGHTDEFAULTMAX 60 +#endif + +#define OX_AUTOCOMPLETE_LIST 0x01 +#define OX_AUTOCOMPLETE_APPEND 0x02 + +/////////////////////////////////////////////////////////////////////////// +// +// class COXAutoStorage +// +/////////////////////////////////////////////////////////////////////////// +// +// Description: +// Internal helper class +// +/////////////////////////////////////////////////////////////////////////// + +class COXAutoStorage : public CObject +{ +public: + UINT GetDepth(); + void SetDepth(UINT nDepth); + COXAutoStorage(LPCTSTR lpszName=NULL, + UINT nDepth=OX_AUTOCOMPLETE_DEPTHDEFAULT); + ~COXAutoStorage(); + CString GetName() const { return m_sName;} + UINT GetMatchedStrings(CString sText, CStringArray& arsStrings); + BOOL AddString(CString sText); + BOOL Load(); + BOOL Save(); + inline int GetCount() { return PtrToInt( m_arsContents.GetSize() );} +protected: + CString m_sName; + UINT m_nDepth; + CStringArray m_arsContents; +}; + +/////////////////////////////////////////////////////////////////////////// +// +// class COXAutoComplete +// +/////////////////////////////////////////////////////////////////////////// + +class OX_CLASS_DECL COXAutoComplete : public CObject +{ + +//functions: +public: + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Constructor + COXAutoComplete(HWND hParentWnd=NULL); + + // --- In : hWnd - handle of the window to attach to + // lpszStorageName - name of the entry in the registry where + // list of entries is saved + // dwOptions - options - see description of the class + // --- Out : + // --- Returns : TRUE on success, FALSE otherwise + // --- Effect : Attaches list of entries to the window + BOOL Attach(HWND hWnd, LPCTSTR lpszStorageName=NULL, + DWORD dwOptions=OX_AUTOCOMPLETE_LIST | OX_AUTOCOMPLETE_APPEND); + + // --- In : pWnd - A pointer to the window to attach to + // lpszStorageName - name of the entry in the registry where + // list of entries is saved + // dwOptions - options - see description of the class + // --- Out : + // --- Returns : TRUE on success, FALSE otherwise + // --- Effect : Attaches list of entries to the window + BOOL Attach(CWnd* pWnd, LPCTSTR lpszStorageName=NULL, + DWORD dwOptions=OX_AUTOCOMPLETE_LIST | OX_AUTOCOMPLETE_APPEND); + + // --- In : hWnd - A handle to the window to detach from + // --- Out : + // --- Returns : + // --- Effect : Detaches the window + void Detach(HWND hWnd); + + // --- In : pWnd - A pointer to the window to detach from + // --- Out : + // --- Returns : + // --- Effect : Detaches the window + void Detach(CWnd* pWnd=NULL); + + // --- In : hWnd - A handle of the window to add entry to the list from + // --- Out : + // --- Returns : + // --- Effect : Adds entry to the list for + // the specified window + void Complete(HWND hWnd); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Hides listbox + void Hide(); + + // --- In : hWnd - A handle to the window + // --- Out : + // --- Returns : maximum number of entries in the list for the window + // --- Effect : Returns maximum number of the entries in the list + int GetDepth(HWND hWnd); + + // --- In : hWnd - A handle to the window + // nDepth - maximum number of entries in the list for the window + // --- Out : + // --- Returns : + // --- Effect :Sets new maximum entries for the list + void SetDepth(UINT nDepth, HWND hWnd); + + COXAutoStorage* GetStorage(HWND hWnd); + virtual ~COXAutoComplete(); + +protected: + + // --- In : hwnd - A handle of the window where text has been changed + // sNewText - a new text of the window + // --- Out : + // --- Returns : TRUE on success, FALSE otherwise + // --- Effect : This function called internally when text has been + // changed in a window that was attached + virtual BOOL OnContentsChange(HWND hwnd, CString sNewText); + + void ChangeSel(int nKey); + static LRESULT CALLBACK CallWndProc(int nCode, WPARAM wParam, + LPARAM lParam); + static LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, + LPARAM lParam); + +//members +public: + void SetParent(HWND hParentWnd); + + //handle of the window where listbox currently is attached to + HWND m_hAttached; + +protected: + HWND m_hParent; + BOOL m_bUpdate; + COXAutoListBox m_lstBox; + CMap m_mpStorage; + CMap m_mpOptions; + HHOOK m_hkMsg; + HHOOK m_hkKbrd; + static COXAutoComplete* m_pThis; +}; + +#endif // !defined(_OXAUTOCOMPLETE_H__) diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoListBox.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoListBox.h new file mode 100644 index 0000000..9dd02d9 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXAutoListBox.h @@ -0,0 +1,87 @@ +// ========================================================================== +// Class Specification : COXAutoListBox +// ========================================================================== +// Header file : OXAutoListBox.h +// Version: 9.3 +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. +// +// ////////////////////////////////////////////////////////////////////////// +// +// Internal helper class +// +// ////////////////////////////////////////////////////////////////////////// + +#if !defined(_OXAUTOLISTBOX_H__) +#define _OXAUTOLISTBOX_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "oxdllext.h" + +class COXAutoComplete; + +#ifndef OX_AUTOCOMPLETE_IDC_LIST +#define OX_AUTOCOMPLETE_IDC_LIST 24510 +#endif + +///////////////////////////////////////////////////////////////////////////// +// COXAutoListBox window + +class OX_CLASS_DECL COXAutoListBox : public CListBox +{ +// Construction +public: + COXAutoListBox(COXAutoComplete* pComplete); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXAutoListBox) + public: + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); + virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); + virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + void SetComplete(COXAutoComplete* pComplete); + COXAutoComplete* m_pComplete; + UINT m_nHeight; + UINT m_nWidth; + BOOL m_bDraw; + virtual ~COXAutoListBox(); + + // Generated message map functions +protected: + int GetItemFromPoint(POINT pt); + //{{AFX_MSG(COXAutoListBox) + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXAUTOLISTBOX_H__) + \ No newline at end of file diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBITBUF.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBITBUF.h new file mode 100644 index 0000000..e2ac4b4 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBITBUF.h @@ -0,0 +1,145 @@ +// ========================================================================== +// Class Specification : COXBitBuffer +// ========================================================================== + +// Header file : OXBITBUF.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CObject + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class allows bitwase access to a buffer of bytes + +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __BITBUFF_H__ +#define __BITBUFF_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + + +class OX_CLASS_DECL COXBitBuffer : public CObject +{ +DECLARE_DYNAMIC(COXBitBuffer) + +// Data members ------------------------------------------------------------- +public: + +protected: + LPBYTE m_pBuffer; + unsigned char m_ucMask; + long m_cByte; + int m_nRack; + long m_nLastByte; + +private: + +// Member functions --------------------------------------------------------- +public: + COXBitBuffer(LPBYTE pBuffer); + // --- In : pBuffer : The buffer from which the bits will be read or written + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + COXBitBuffer(LPBYTE pBuffer, int nInLength ); + // --- In : pBuffer : The buffer from which the bits will be read or written + // : InLength: sets the length of PBuffer to detect last byte + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // It will initialize the internal state + + void OutputBit(int bit); + // --- In : bit, bit to be written + // --- Out : + // --- Returns : + // --- Effect : writing a bit to the outputbuffer (compressing) + + + void OutputBits(int code, int count); + // --- In : code : sequence of bits being written + // count : number of bits being written + // ---Out : + // ---Returns : + // ---Effect : compressing count bits to the outputbuffer + + void OutputBitsEOS(); + // ---In : code : sequence of null bits to mark end of buffer + // : count : END OF STREAM, 12 bits + // ---Out : + // ---Returns : + // ---Effect : terminating with EOS zero bits to mark end of buffer + + int InputBit(); + // ---In : + // ---Out : + // ---Returns : bit from buffer + // ---Effect : reading a bit from the input buffer for expanding + + unsigned long InputBits(int bit_count); + // ---In : bit_count : number of bit being read + // ---Out : + // ---Returns : multiple bits read from buffer + // ---Effect : reading multiple bits from the inputbuffer for expanding : + + long GetCompressedLength() + { + return m_cByte; + }; + // ---In : + // ---Out : + // ---Returns : m_cByte : number of compressed bytes + // ---Effect : reach for protected member variable + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXBitBuffer(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + +private: + +}; + +#endif +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.h new file mode 100644 index 0000000..8d6d07b --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.h @@ -0,0 +1,59 @@ +// Version: 9.3 + +#if !defined(_OXBMPFILEPICKERCOMBO_H__) +#define _OXBMPFILEPICKERCOMBO_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXDllExt.h" + +#include "OXHistoryCombo.h" +#include "OXPreviewDialog.h" +#include "OXMainRes.h" + +///////////////////////////////////////////////////////////////////////////// +// COXBMPFilePickerCombo window + +class OX_CLASS_DECL COXBMPFilePickerCombo : public COXHistoryCombo +{ +// Construction +public: + COXBMPFilePickerCombo(CString sFileExtFilter); + COXBMPFilePickerCombo(int nID=IDS_OX_FILEPICKERFILTER); +// Attributes +public: + +protected: + CString m_sFileExtFilter; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXBMPFilePickerCombo) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COXBMPFilePickerCombo(); + + virtual BOOL BrowseItem(); + + // Generated message map functions +protected: + //{{AFX_MSG(COXBMPFilePickerCombo) + // NOTE - the ClassWizard will add and remove member functions here. + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXBMPFILEPICKERCOMBO_H__) diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.rc b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.rc new file mode 100644 index 0000000..987be30 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFilePickerCombo.rc @@ -0,0 +1,79 @@ +//Microsoft Developer Studio generated resource script. +// +// Version: 9.3 + +#ifndef _OXBMPFILEPICKERCOMBO_RC__ +#define _OXBMPFILEPICKERCOMBO_RC__ +#include "OXMainRes.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 DISCARDABLE +BEGIN + "OXMainRes.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_OX_FILEPICKERFILTER "Bitmap file (*.bmp;*.dib)|*.bmp; *.dib||" + +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +#endif //_OXBMPFILEPICKERCOMBO_RC__ diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFle.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFle.h new file mode 100644 index 0000000..e682887 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBMPFle.h @@ -0,0 +1,143 @@ +// ========================================================================== +// Class Specification : COXBMPFile +// ========================================================================== + +// Header file : OXBMPFle.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from COXGraphicsFile + +// NO Is a Cwnd. +// NO Two stage creation (constructor & Create()) +// NO Has a message map +// NO Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// YES Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class encapsulates the reading and writing of BMP files +// Remark: +// + +// Prerequisites (necessary conditions): +// + +///////////////////////////////////////////////////////////////////////////// +#ifndef __BMPFILE_H__ +#define __BMPFILE_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXGphFle.h" + + +class OX_CLASS_DECL COXBMPFile : public COXGraphicFile +{ +friend class COXJPEGCompressor; +friend class COXJPEGDecompressor; + +// Data Members +public: + +protected: + // Shared members + jvirt_sarray_ptr m_WholeImage; + JDIMENSION m_RowWidth; + + // Specific Compress members + j_compress_ptr m_cinfo; + JSAMPARRAY m_Colormap; + JDIMENSION m_SourceRow; + int m_BitsPerPixel; + JDIMENSION (COXBMPFile::*m_pfnGetPixelRows)(j_compress_ptr cinfo); + + // Specific Decompress members + BOOL m_bIsOS2; /* saves the OS2 format request flag */ + JDIMENSION m_DataWidth; /* JSAMPLEs per row */ + int m_nPadBytes; /* number of padding bytes needed per row */ + JDIMENSION m_CurOutputRow; /* next row# to write to virtual array */ + void (COXBMPFile::*m_pfnPutPixelRows)(j_decompress_ptr cinfo, JDIMENSION rows_supplied); + +private: + +// Member Functions +public: + COXBMPFile(CString sFullPath); + // --- In : sFullPath : the full path subdirs + name + extender of the graphic file + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // File will not be opened yet. Must be a BMP file + + COXBMPFile(CFile* pGraphicFile); + // --- In : pGraphicFile : a pointer to a CFile. must already be open + // --- Out : + // --- Returns : + // --- Effect : Contructor of object + // Could be used to pass a CMemFile as parameter. Must be a BMP file + + void SetOS2Format(BOOL bIsOS2) + { m_bIsOS2 = bIsOS2;} + + BOOL GetOS2Format() + { return m_bIsOS2;} + +#ifdef _DEBUG + virtual void Dump(CDumpContext&) const; + virtual void AssertValid() const; +#endif //_DEBUG + + virtual ~COXBMPFile(); + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Destructor of object + +protected: + virtual BOOL StartInput(j_compress_ptr cinfo); + virtual BOOL FinishInput(j_compress_ptr cinfo); + virtual JDIMENSION GetPixelRows(j_compress_ptr cinfo); + + virtual BOOL StartOutput(j_decompress_ptr cinfo); + virtual BOOL FinishOutput(j_decompress_ptr cinfo); + virtual BOOL PutPixelRows(j_decompress_ptr cinfo, JDIMENSION rowsSupplied); + + virtual BOOL InitRead(j_compress_ptr cinfo); + virtual BOOL InitWrite(j_decompress_ptr cinfo, BOOL bExtra = FALSE); + + int ReadByte(); + void ReadColorMap(int cmaplen, int mapentrysize); + JDIMENSION Get8bitRow(j_compress_ptr cinfo); + JDIMENSION Get24bitRow(j_compress_ptr cinfo); + JDIMENSION PreloadImage(j_compress_ptr cinfo); + + void PutGrayRows(j_decompress_ptr cinfo, JDIMENSION rows_supplied); + void Put24PixelRows(j_decompress_ptr cinfo, JDIMENSION rows_supplied); + void WriteBMPHeader(j_decompress_ptr cinfo); + void WriteOS2Header(j_decompress_ptr cinfo); + void WriteColorMap (j_decompress_ptr cinfo, int map_colors, int map_entry_size); + +private: + +}; + +#endif //__BMPFILE_H__ diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBackgroundPainter.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBackgroundPainter.h new file mode 100644 index 0000000..d711c8c --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBackgroundPainter.h @@ -0,0 +1,1350 @@ +// ========================================================================== +// Class Specification : +// COXBackgroundPainter & COXBackgroundPainterOrganizer +// ========================================================================== + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +/* + + DESCRIPTION + + +COXBackgroundPainter class is designed to simplify the process of window +background painting. It provides the functionality of painting the +background of the window with specified image and/or color. + +For some reason background painting never been a trivial task. By default, +painting happens when WM_ERASEBKGND message is sent to window. If you +don't handle this message in any specific way then Windows use background +brush associated with the corresponding window class in order to fill +the background of the window. So in order to paint the window using +different color you would have to handle WM_ERASEBKGND message or +alternatively create new window class for your window with the brush of color +you need. + +Painting window's background with different color is neither difficult +nor interesting task. But painting background of window with some image +(like Windows Desktop) could add some value to your application. + +COXBackgroundPainter class provides that kind of functionality. And it +takes only one function call in order to setup a window to be painted in new +fancy way. + +As a number of other Ultimate Toolbox classes COXBackgroundPainter class +is derived from COXHookWnd class. This class allows to handle any +messages before the hooked window does. Also internally COXBackgroundPainter +uses COXDIB object in order to draw 256> color images. + +In order to set any window background to be painted using COXBackgroundPainter +object you have to hook such window using the following function: + + Attach() + +In the function you specify the pointer to the window to be hooked, info +about the image to be used while painting the background (you can specify +COXDIB object, resource or file name), type of image drawing (Tile, +Stretch, Center, ...), background color to be used to fill the window +background that is not covered by image (refer to the documentation on +this function for details), and pointer to the window which top/left point +of its paintable rectangle will be used as origin point for painting +routines (this is very important if you need to align the background +among different child windows of the same parent window). + +It's highly probable that Attach() function will be the only one that you +will use in your applications but we defined a set of additional functions +that allows you to control all aspects of the class functionality. + +Use Detach() function in order to unhook any attached window. +In order to change window background painting properties at run-time without +detaching and attaching it use the following set of functions: + + SetWallpaper() + SetPaintType() + SetBkColor() + SetOriginWindow() + +To retrieve background painting properties call: + + GetWallpaperImage() + GetPaintType() + GetBkColor() + GetOriginWindow() + + +As you can see it's really easy to use this class, but unfortunatly every +story has two sides. We mentioned above about the standard way Windows +paints the background of any window. It is TRUE for any window unless +specific window handles the process of its drawing and paints its +background in different way (e.g. in WM_PAINT handler). Almost all +standard controls paint their background and almost all of them do this +differently. E.g. some of the controls like tree control, list control or +toolbar support powerful NM_CUSTOMDRAW notification. Others, like static +or edit controls should handle WM_CTLCOLOR message in order to paint the +background. And also we shouldn't forget about ownerdraw controls too! + +The question is how to use COXBackgroundPainter class in such cases. +There is no easy answer that will work for any control but generally +you can use the following approach: + + 1) Try to hook the control using Attach() function and test if + it paints the background correctly. If everything is alright + then you are lucky and you are using the control that was designed + consistently with the Windows treat background painting. + + 2) Otherwise you have to provide the background painting for such control + explicitly at some point depending on the functionality of + the control (refer to the documentation on the corresponding control + to make a decision where to put background painting code). You still + can use COXBackgroundPainter class in this case but at the + appropriate moment you have to explicitly call the following + function in order to paint the background: + + DrawWallpaper(CDC* pDC); + + You only have to specify the device context to paint the background in + and this function will take care of everything else itself. + + + +In most applicable cases (like painting the background of dialog, MDIClient +or View windows) COXBackgroundPainter class will work without any additional +efforts from your side. But you still have to have one COXBackgroundPainter +object for every window that is going to be hooked. This could be a little +bit inconvinient, especially if you are going to provide background +painting support for a number of windows within the same framework. + + +In order to simplify things we designed COXBackgroundPainterOrganizer class. +COXBackgroundPainterOrganizer provides very similar to COXBackgroundPainter +set of functions. E.g. the definition of Attach() function is completely +the same. The only difference is that when you call this function for new +window new COXBackgroundPainter object will be instantiated and its +Attach() function will be called. At any moment you can define whether +given window is attached to a COXBackgroundPainter object calling function: + + IsAttached(const CWnd* pWnd); + +You can retrieve the pointer to the COXBackgroundPainter object that +corresponds to the specified window using function: + + GetPainter(const CWnd* pWnd); + + +Refere to the COXBackgroundPainterOrganizer class reference documentation +for details on the rest of functions. + + +As long as COXBackgroundPainterOrganizer class provides almost the same +functionality as COXBackgroundPainter does and it really simplify things +when you hook multiple windows within the same parent window, we suggest +that COXBackgroundPainterOrganizer should be used preferably. Below you +will find some scenarios that can be used while implementing background +painting support. + + + Dialog window with background: + + 1) Define COXBackgroundPainterOrganizer object in your CDialog + derived class + + class CMyDlg : public CDialog + { + . . . . . . . . . . . . . . + protected: + COXBackgroundPainterOrganizer m_backPainterOrganizer; + . . . . . . . . . . . . . . + } + + 2) Override OnInitDialog function and attach dialog window + using COXBackgroundPainterOrganizer object + + BOOL CLogoDlg::OnInitDialog() + { + CDialog::OnInitDialog(); + + // TODO: Add extra initialization here + + . . . . . . . . . . . . . . + + m_backPainterOrganizer.Attach(this,IDB_WALLPAPER); + + . . . . . . . . . . . . . . + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + } + + We assume IDB_WALLPAPER is image ID that you want to use to fill + the background. Using Attach() function the way it shawn here + will tile the specified image to cover all background area, + default background color will be used and dialog itself will be used + as origin window. + + + + + MDI frame window with toolbar. + + 1) Define COXBackgroundPainterOrganizer object and GetPainter() + function in your CMDIFrameWnd derived class + + class CMainFrame : public CMDIFrameWnd + { + . . . . . . . . . . . . . . + protected: + COXBackgroundPainterOrganizer m_backPainterOrganizer; + . . . . . . . . . . . . . . + public: + inline COXBackgroundPainterOrganizer* GetPainter() { + return &m_backPainterOrganizer; + } + . . . . . . . . . . . . . . + } + + 2) Override OnCreate() function and after creating the toolbar use + the following code: + + int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) + { + . . . . . . . . . . . . . . + + // hook toolbar after it was created and initialized + m_backPainterOrganizer.Attach(&m_wndToolBar,IDB_WALLPAPER); + + CWnd* pMDIClient=CWnd::FromHandle(m_hWndMDIClient); + // hook MDIClient window + m_backPainterOrganizer.Attach(pMDIClient,IDB_WALLPAPER,Tile, + CLR_DEFAULT,this); + + . . . . . . . . . . . . . . + + } + + 3) In order to provide smooth background painting for frame window that + supports docking control bars we have to hook undocumented CDockBar + controls that main frame window uses as placeholder for control bars. + In order to do that you have to override the EnableDocking function + in the following way: + + void CMainFrame::EnableDocking(DWORD dwDockStyle) + { + CMDIFrameWnd::EnableDocking(dwDockStyle); + + if(GetControlBar(AFX_IDW_DOCKBAR_TOP)!=NULL && + !m_backPainterOrganizer. + IsAttached(GetControlBar(AFX_IDW_DOCKBAR_TOP))) + { + m_backPainterOrganizer. + Attach(GetControlBar(AFX_IDW_DOCKBAR_TOP),IDB_WALLPAPER, + Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM)!=NULL && + !m_backPainterOrganizer. + IsAttached(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM))) + { + m_backPainterOrganizer. + Attach(GetControlBar(AFX_IDW_DOCKBAR_BOTTOM),IDB_WALLPAPER, + Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_LEFT)!=NULL && + !m_backPainterOrganizer. + IsAttached(GetControlBar(AFX_IDW_DOCKBAR_LEFT))) + { + m_backPainterOrganizer. + Attach(GetControlBar(AFX_IDW_DOCKBAR_LEFT),IDB_WALLPAPER, + Tile,CLR_DEFAULT,this); + } + if(GetControlBar(AFX_IDW_DOCKBAR_RIGHT)!=NULL && + !m_backPainterOrganizer. + IsAttached(GetControlBar(AFX_IDW_DOCKBAR_RIGHT))) + { + m_backPainterOrganizer. + Attach(GetControlBar(AFX_IDW_DOCKBAR_RIGHT),IDB_WALLPAPER, + Tile,CLR_DEFAULT,this); + } + } + + + 4) If you want to paint the background of views too you can override + OnCreate() function of your view class and use the following code: + + int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct) + { + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + // TODO: Add your specialized creation code here + + . . . . . . . . . . . . . . + + ((CMainFrame*)AfxGetMainWnd())->GetPainter()-> + Attach(this,IDB_WALLPAPER); + + . . . . . . . . . . . . . . + + return 0; + } + + + + + +One of an interesting aplication of COXBackgroundPainterOrganizer class +is the following: you want to display 256> color image in the About Box +of your company logo. If you use Picture (actually, CStatic control) +object to do that then you don't have palette support and the size of +control will depend on the size of image. Instead you can do the following: + + 1) Create the window that will be used to display picture + 2) Hook this window using COXBackgroundPainterOrganizer object and + specify the image that will be displayed + +Pretty easy. + + + + + +Special note: How to use COXBackgroundPainterOrganizer to display 256> color + bitmaps when 256 color video mode is set. + +In order to do that we have to release the background image palette when +WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages are sent to attached window. +It's implemented automatically for you in COXBackgroundPainter class but there is +small problem. WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages are sent only +to top-level and overlapped windows. So background images will be correctly +displayed for dialog or mainframe window, but for non-overlapped child windows +you have to provide some way of notifying them that they have to update system +palette. We suggest the following solution for your problem. In the class that +is guaranteed to get WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages +(e.g. it could be your main frame window or dialog window) you include handlers +for them. In the handlers you forward these messages to the windows that are +hooked using COXBackgroundPainterOrganizer or alternatively you can send these +messages to all descendand windows using CWnd::SendMessageToDescendants() function. + + + + + + +All above mentioned techniques are implemented in the BackgroundPainter +sample that can be found in .\samples\gui\BackgroundPainter subdirectory +of your Ultimate Toolbox directory. + + + + +Dependencies: + + #include "OXBackgroundPainter.h" + + +Source code files: + + "OXBackgroundPainter.cpp" + + The following file implements hooking functionality: + + "OXHookWnd.cpp" + + The following file implements support for DIB files: + + "OXDib.cpp" + + + + +*/ + + +#if !defined(_OXBACKGROUNDPAINTER_H_) +#define _OXBACKGROUNDPAINTER_H_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#ifndef __AFXTEMPL_H__ +#include +#define __AFXTEMPL_H__ +#endif + +#include "OXHookWnd.h" +#include "OXDib.h" + + +enum PaintType +{ + Tile, + Stretch, + TopLeft, + TopCenter, + TopRight, + LeftCenter, + Center, + RightCenter, + BottomLeft, + BottomCenter, + BottomRight +}; + +///////////////////////////////////////////////////////////////////////////// +// COXBackgroundPainter window + +class OX_CLASS_DECL COXBackgroundPainter : public COXHookWnd +{ +public: +// Construction + + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + COXBackgroundPainter(); + + + // --- In : pWnd - pointer to created window + // pDIB - pointer to COXDIB object that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // lpszDIBResourceName - resource name of the image that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // nDIBResourceID - resource ID of the image that will be + // used as wallpaper or NULL if you + // don't want to use any bitmap as + // wallpaper + // sDIBFileName - full path to the image file that + // will be used as wallpaper or empty + // string if you don't want to use any + // bitmap as wallpaper + // paintType - painting type. It must take one of + // the following values: + // + // Tile - image will be tiled to cover all + // paintable area of the specified + // window + // Stretch - image will be stretched to fill + // all paintable area of the + // specified window + // TopLeft - image will be drawn starting + // from the left/top point of + // the paintable area of the + // specified window + // TopRight - image will be drawn starting + // from the right/top point of + // the paintable area of the + // specified window + // TopCenter - image will be drawn starting + // from the top side of the paintable + // area of the specified window and + // will be centered horizontally + // LeftCenter - image will be drawn starting + // from the left side of the paintable + // area of the specified window and + // will be centered vertically + // RightCenter - image will be drawn starting + // from the right side of the paintable + // area of the specified window and + // will be centered vertically + // Center - image will be centered vertically + // and horizontally + // BottomLeft - image will be drawn starting + // from the left/bottom point of + // the paintable area of the + // specified window + // BottomRight - image will be drawn starting + // from the right/bottom point of + // the paintable area of the + // specified window + // BottomCenter- image will be drawn starting + // from the bottom side of the paintable + // area of the specified window and + // will be centered horizontally + // + // clrBk - background color, if CLR_DEFAULT is + // specified then default window + // background color will be used. + // Note that if you use image for + // background painting the areas that + // is not covered by the image will + // be filled with this color. + // + // pOriginWnd - pointer to created window which + // top/left point of the paintable + // rectangle will be used as origin + // point while painting the background. + // If NULL is specified then the + // window that is being attached will + // be used as origin one + // --- Out : + // --- Returns: TRUE if pWnd was successfully hooked, otherwise FALSE + // --- Effect : Hooks window. WM_ERASEBKGND message of the hooked window + // will be handled in order to paint the background. Background + // can be painted using specified background image or + // background color. If you chose to use an image to paint the + // background you can aditionaly specify the type of painting + // (refer to the description of paintType argument for details). + // Please, note that you can specify the pointer to the window + // which top/left point of its paintable rectangle will be used + // as origin point for painting routines (this is very important + // if you need to align the background among different child windows + // of the same parent window) + // + inline BOOL Attach(CWnd* pWnd, LPCTSTR lpszDIBResourceName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + COXDIB dib; + if(lpszDIBResourceName!=NULL) + { + if(!dib.LoadResource(lpszDIBResourceName)) + { + return FALSE; + } + } + return Attach(pWnd,&dib,paintType,clrBk,pOriginWnd); + } + + inline BOOL Attach(CWnd* pWnd, UINT nDIBResourceID, PaintType paintType=Tile, + COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + return Attach( + pWnd,MAKEINTRESOURCE(nDIBResourceID),paintType,clrBk,pOriginWnd); + } + + inline BOOL Attach(CWnd* pWnd, const CString& sDIBFileName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + COXDIB dib; + if(!sDIBFileName.IsEmpty()) + { + if(!dib.Read(sDIBFileName)) + { + return FALSE; + } + } + if(Attach(pWnd,&dib,paintType,clrBk,pOriginWnd)) + { + m_sImageFileName=sDIBFileName; + return TRUE; + } + return FALSE; + } + + BOOL Attach(CWnd* pWnd, const COXDIB* pDIB, PaintType paintType=Tile, + COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL); + // + //////////////////////////////////////////////////// + + + // --- In : bRedraw - if TRUE then the attached window + // will be redrawn + // --- Out : + // --- Returns: + // --- Effect : Unhooks attached window if any was hooked + void Detach(BOOL bRedraw=TRUE); + + + // --- In : pDIB - pointer to COXDIB object that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // lpszDIBResourceName - resource name of the image that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // nDIBResourceID - resource ID of the image that will be + // used as wallpaper or NULL if you + // don't want to use any bitmap as + // wallpaper + // sDIBFileName - full path to the image file that + // will be used as wallpaper or empty + // string if you don't want to use any + // bitmap as wallpaper + // bRedraw - if TRUE then the hooked window + // will be redrawn + // --- Out : + // --- Returns: TRUE if new image was successfully set or FALSE otherwise + // --- Effect : Resets the image that will be used to paint the background + // + inline BOOL SetWallpaper(LPCTSTR lpszDIBResourceName, BOOL bRedraw=TRUE) + { + COXDIB dib; + if(lpszDIBResourceName!=NULL) + { + if(!dib.LoadResource(lpszDIBResourceName)) + { + return FALSE; + } + } + return SetWallpaper(&dib,bRedraw); + } + + inline BOOL SetWallpaper(UINT nDIBResourceID, BOOL bRedraw=TRUE) + { + return SetWallpaper(MAKEINTRESOURCE(nDIBResourceID),bRedraw); + } + + inline BOOL SetWallpaper(const CString& sDIBFileName, BOOL bRedraw=TRUE) + { + COXDIB dib; + if(!sDIBFileName.IsEmpty()) + { + if(!dib.Read(sDIBFileName)) + { + return FALSE; + } + } + if(SetWallpaper(&dib,bRedraw)) + { + m_sImageFileName=sDIBFileName; + return TRUE; + } + return FALSE; + } + + inline BOOL SetWallpaper(const COXDIB* pDIB, BOOL bRedraw=TRUE) + { + ASSERT(IsHooked()); + + m_sImageFileName.Empty(); + + if(pDIB!=NULL) + { + m_dibWallpaper=*pDIB; // copy + } + else + { + m_dibWallpaper.Empty(); + } + DoRealizePalette(FALSE,TRUE); + if(bRedraw && ::IsWindow(m_hWndHooked)) + { + ::RedrawWindow(m_hWndHooked, + NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW); + } + + return TRUE; + } + // + //////////////////////////////////////////////////// + + // --- In : + // --- Out : + // --- Returns: pointer to the COXDIB object that is used internally + // in order to paint the background. It can be empty. + // --- Effect : Retrieves the pointer to the COXDIB object that + // represents the image used to paint the background. + // + inline COXDIB* GetWallpaperImage() { return &m_dibWallpaper; } + + // --- In : + // --- Out : + // --- Returns: the name of the image file that is usead as wallpaper image + // --- Effect : Retrieves the name of the image file used to paint the + // background. + inline CString GetWallpaperImageFileName() const { return m_sImageFileName; } + + + // --- In : paintType - painting type. Refer to the + // documentation on the Attach() + // function for the list of all + // possible values it can take. + // bRedraw - if TRUE then the hooked window + // will be redrawn + // --- Out : + // --- Returns: + // --- Effect : Resets the type of background image painting. + // + inline void SetPaintType(PaintType paintType, BOOL bRedraw=TRUE) + { + ASSERT(IsHooked()); + + m_paintType=paintType; // copy + if(bRedraw && ::IsWindow(m_hWndHooked)) + { + ::RedrawWindow(m_hWndHooked,NULL,NULL, + RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW); + } + } + + // --- In : + // --- Out : + // --- Returns: the type of painting of the background. Refer to the + // documentation on the Attach() function for the list + // of all possible return values. + // --- Effect : Retrieves the background painting type. + // + inline PaintType GetPaintType() const { return m_paintType; } + + + // --- In : clrBk - background color, if CLR_DEFAULT is + // specified then default window + // background color will be used. + // Note that if you use image for + // background painting the areas that + // is not covered by the image will + // be filled with this color. + // bRedraw - if TRUE then the hooked window + // will be redrawn + // --- Out : + // --- Returns: + // --- Effect : Sets the background color. + inline void SetBkColor(COLORREF clrBk, BOOL bRedraw=TRUE) + { + ASSERT(IsHooked()); + + m_clrBk=clrBk; // copy + if(bRedraw && ::IsWindow(m_hWndHooked)) + { + ::RedrawWindow(m_hWndHooked,NULL,NULL, + RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW); + } + } + + // --- In : + // --- Out : + // --- Returns: The color used to fill the backgroud. + // --- Effect : Retrieves the background color. + inline COLORREF GetBkColor() const { return m_clrBk; } + + + // --- In : pWndOrigin - pointer to created window which + // top/left point of the paintable + // rectangle will be used as origin + // point while painting the background. + // If NULL is specified then the + // window that is being attached will + // be used as origin one + // bRedraw - if TRUE then the hooked window + // will be redrawn + // --- Out : + // --- Returns: + // --- Effect : Sets the window that defines origin point for background + // painting routines. + inline void SetOriginWnd(CWnd* pOriginWnd, BOOL bRedraw=TRUE) + { + ASSERT(IsHooked()); + + if(pOriginWnd==NULL) + { + m_pOriginWnd=GetHookedWnd(); + } + else + { + m_pOriginWnd=pOriginWnd; + } + + if(bRedraw && ::IsWindow(m_hWndHooked)) + { + ::RedrawWindow(m_hWndHooked,NULL,NULL, + RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW); + } + } + + // --- In : + // --- Out : + // --- Returns: Pointer to the window that serves as an origin one + // --- Effect : Retrieves the pointer to the window which top/left + // point of its paintable area will serve as an origin point. + inline CWnd* GetOriginWnd() const + { + ASSERT(IsHooked()); + return m_pOriginWnd; + } + + + // --- In : pDC - pointer to device context to paint in + // + // --- Out : + // --- Returns: + // --- Effect : Paints in the specified device context. This function + // is called internally from WM_ERASEBKGND message handler. + // As long as most of standard controls don't implement + // extended transparent style and paint their + // background in WM_PAINT handler you would probably like + // to call this function explicitly if you draw the control + // yourself (e.g. use OWNERDRAW style). + virtual void DrawWallpaper(CDC* pDC); + + // --- In : pDC - pointer to device context to paint in + // + // --- Out : + // --- Returns: + // --- Effect : Paints in the specified device context. This function + // is called internally from WM_ERASEBKGND message handler + // in order to fill all areas that are not covered by + // background image or the whole paintable area of the window. + // As long as most of standard controls don't implement + // extended transparent style and paint their + // background in WM_PAINT handler you would probably like + // to call this function explicitly if you draw the control + // yourself (e.g. use OWNERDRAW style). + virtual void FillBackground(CDC* pDC) const; + + + // --- In : lpszProfileName - name of .ini file or hive in registry + // where all information about + // COXBackgroundPainter will be saved. + // --- Out : + // --- Returns: TRUE if succeeds, or FALSE otherwise. + // --- Effect : Saves COXBackgroundPainter state into registry or .ini file + BOOL SaveState(LPCTSTR lpszProfileName); + + // --- In : lpszProfileName - name of .ini file or hive in registry + // where all information about + // COXBackgroundPainter was saved. + // bApply - if equals TRUE then COXBackgroundPainter + // will redraw the background right away. + // + // --- Out : + // --- Returns: TRUE if succeeds, or FALSE otherwise. + // --- Effect : Loads COXBackgroundPainter state from registry or *.ini file + BOOL LoadState(LPCTSTR lpszProfileName, BOOL bApply=TRUE); + + + +// Overrides +protected: + // handles all messages + virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp); + // retrieves the window origin point for background painting + virtual void GetWallpaperOrigin(CPoint& ptOrigin, CRect& rectContainer) const; + + // helper function that supports 256> color bitmaps in the + // 256 color (8 bits) video mode. + UINT DoRealizePalette(BOOL bRedraw=TRUE, BOOL bForeground=TRUE); + + // retrieves the rectangle that can be painted (includes client and + // non-client areas excluding window borders and window caption). + CRect GetPaintableRect(CWnd* pWnd) const; + +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Destructs the object + virtual ~COXBackgroundPainter(); + +protected: + // image to be used as the background one + COXDIB m_dibWallpaper; + // painting type. Refer to Attach() function for details. + PaintType m_paintType; + // background color that will be used in order to fill the + // areas that are not covered by image + COLORREF m_clrBk; + // pointer to the window which top/left point of paintable rectangle + // will serve as an origin point while painting the background + CWnd* m_pOriginWnd; + // filename of the image + CString m_sImageFileName; + + // internal variable used to save the last known size of the + // hooked window + CRect m_rectWindowSaved; +}; + +///////////////////////////////////////////////////////////////////////////// + + +class OX_CLASS_DECL COXBackgroundPainterOrganizer +{ +// Construction +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + COXBackgroundPainterOrganizer() : + m_pFrameWnd(NULL), + m_dwFrameThreadID(NULL), + m_pfnOldCBTHookProc(NULL), + m_pfnOldGetMessageHookProc(NULL), + m_threadOrigPaintType(Tile), + m_threadOrigBkColor(CLR_DEFAULT), + m_threadOriginWnd(NULL) {}; + + + // --- In : pWnd - pointer to created window + // pDIB - pointer to COXDIB object that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // lpszDIBResourceName - resource name of the image that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // nDIBResourceID - resource ID of the image that will be + // used as wallpaper or NULL if you + // don't want to use any bitmap as + // wallpaper + // sDIBFileName - full path to the image file that + // will be used as wallpaper or empty + // string if you don't want to use any + // bitmap as wallpaper + // paintType - painting type. It must take one of + // the following values: + // + // Tile - image will be tiled to cover all + // paintable area of the specified + // window + // Stretch - image will be stretched to fill + // all paintable area of the + // specified window + // TopLeft - image will be drawn starting + // from the left/top point of + // the paintable area of the + // specified window + // TopRight - image will be drawn starting + // from the right/top point of + // the paintable area of the + // specified window + // TopCenter - image will be drawn starting + // from the top side of the paintable + // area of the specified window and + // will be centered horizontally + // LeftCenter - image will be drawn starting + // from the left side of the paintable + // area of the specified window and + // will be centered vertically + // RightCenter - image will be drawn starting + // from the right side of the paintable + // area of the specified window and + // will be centered vertically + // Center - image will be centered vertically + // and horizontally + // BottomLeft - image will be drawn starting + // from the left/bottom point of + // the paintable area of the + // specified window + // BottomRight - image will be drawn starting + // from the right/bottom point of + // the paintable area of the + // specified window + // BottomCenter- image will be drawn starting + // from the bottom side of the paintable + // area of the specified window and + // will be centered horizontally + // + // clrBk - background color, if CLR_DEFAULT is + // specified then default window + // background color will be used. + // Note that if you use image for + // background painting the areas that + // is not covered by the image will + // be filled with this color. + // + // pWndOrigin - pointer to created window which + // top/left point of the paintable + // rectangle will be used as origin + // point while painting the background. + // If NULL is specified then the + // window that is being attached will + // be used as origin one + // --- Out : + // --- Returns: TRUE if pWnd was successfully hooked, otherwise FALSE + // --- Effect : Creates COXBackgroundPainter object for specified window + // and attaches the specified window to it. Refer to the + // documentation on COXBackgroundPainter::Attach() for + // additional info. + // + inline BOOL Attach(CWnd* pWnd, LPCTSTR lpszDIBResourceName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + COXDIB dib; + if(lpszDIBResourceName!=NULL) + if(!dib.LoadResource(lpszDIBResourceName)) + return FALSE; + return Attach(pWnd,&dib,paintType,clrBk,pOriginWnd); + } + + inline BOOL Attach(CWnd* pWnd, UINT nDIBResourceID, PaintType paintType=Tile, + COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + return Attach(pWnd,MAKEINTRESOURCE(nDIBResourceID),paintType,clrBk,pOriginWnd); + } + + inline BOOL Attach(CWnd* pWnd, const CString& sDIBFileName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL) + { + COXDIB dib; + if(!sDIBFileName.IsEmpty()) + if(!dib.Read(sDIBFileName)) + return FALSE; + return Attach(pWnd,&dib,paintType,clrBk,pOriginWnd); + } + + BOOL Attach(CWnd* pWnd, const COXDIB* pDIB, PaintType paintType=Tile, + COLORREF clrBk=CLR_DEFAULT, CWnd* pOriginWnd=NULL); + // + //////////////////////////////////////////////////// + + + // --- In : pWnd - pointer to the attached window or NULL. + // If NULL is specified then all attached + // windows will be unhooked. + // bRedraw - if TRUE then the attached window + // will be redrawn + // --- Out : + // --- Returns: TRUE if function succeeded, or FALSE otherwise + // --- Effect : Unhooks specified or all attached window(s). + BOOL Detach(const CWnd* pWnd=NULL, BOOL bRedraw=TRUE); + + + // --- In : pFrameWnd - pointer to created mainframe window + // (main window in SDI or MDI interface) + // pDIB - pointer to COXDIB object that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // lpszDIBResourceName - resource name of the image that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // nDIBResourceID - resource ID of the image that will be + // used as wallpaper or NULL if you + // don't want to use any bitmap as + // wallpaper + // sDIBFileName - full path to the image file that + // will be used as wallpaper or empty + // string if you don't want to use any + // bitmap as wallpaper + // paintType - painting type. Refer to Attach() + // function for the list of possible + // values + // clrBk - background color, if CLR_DEFAULT is + // specified then default window + // background color will be used. + // Note that if you use image for + // background painting the areas that + // is not covered by the image will + // be filled with this color. + // --- Out : + // --- Returns: TRUE if the mainframe window was successfully hooked, + // otherwise FALSE + // --- Effect : Creates COXBackgroundPainter objects for the mainframe + // child windows (toolbars, menubar, + // MDIClient (MDI interface), etc.) and attaches the + // + inline BOOL AttachFrame(CFrameWnd* pFrameWnd, LPCTSTR lpszDIBResourceName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT) + { + COXDIB dib; + if(lpszDIBResourceName!=NULL) + if(!dib.LoadResource(lpszDIBResourceName)) + return FALSE; + return AttachFrame(pFrameWnd,&dib,paintType,clrBk); + } + + inline BOOL AttachFrame(CFrameWnd* pFrameWnd, UINT nDIBResourceID, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT) + { + return AttachFrame(pFrameWnd,MAKEINTRESOURCE(nDIBResourceID), + paintType,clrBk); + } + + inline BOOL AttachFrame(CFrameWnd* pFrameWnd, const CString& sDIBFileName, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT) + { + COXDIB dib; + if(!sDIBFileName.IsEmpty()) + if(!dib.Read(sDIBFileName)) + return FALSE; + return AttachFrame(pFrameWnd,&dib,paintType,clrBk); + } + + BOOL AttachFrame(CFrameWnd* pFrameWnd, const COXDIB* pDIB, + PaintType paintType=Tile, COLORREF clrBk=CLR_DEFAULT); + // + //////////////////////////////////////////////////// + + + // --- In : bRedraw - if TRUE then the attached windows + // will be redrawn + // --- Out : + // --- Returns: TRUE if all windows were successfully unhooked, + // otherwise FALSE + // --- Effect : Detaches all previously attached windows that has been + // hooked by the AttachFrame() function + BOOL DetachFrame(BOOL bRedraw=TRUE); + + + // --- In : pWnd - pointer to the attached window + // or NULL. If NULL is specified then + // the image will be set to + // all attached windows. + // pDIB - pointer to COXDIB object that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // lpszDIBResourceName - resource name of the image that + // will be used as wallpaper or NULL + // if you don't want to use any bitmap + // as wallpaper + // nDIBResourceID - resource ID of the image that will be + // used as wallpaper or NULL if you + // don't want to use any bitmap as + // wallpaper + // sDIBFileName - full path to the image file that + // will be used as wallpaper or empty + // string if you don't want to use any + // bitmap as wallpaper + // bRedraw - if TRUE then the attached window + // will be redrawn + // --- Out : + // --- Returns: TRUE if new image was successfully set or FALSE otherwise + // --- Effect : Resets the image that will be used to paint the background + // + inline BOOL SetWallpaper(const CWnd* pWnd, LPCTSTR lpszDIBResourceName, + BOOL bRedraw=TRUE) + { + COXDIB dib; + if(lpszDIBResourceName!=NULL) + if(!dib.LoadResource(lpszDIBResourceName)) + return FALSE; + return SetWallpaper(pWnd,&dib,bRedraw); + } + + inline BOOL SetWallpaper(const CWnd* pWnd, UINT nDIBResourceID, BOOL bRedraw=TRUE) + { + return SetWallpaper(pWnd,MAKEINTRESOURCE(nDIBResourceID),bRedraw); + } + + BOOL SetWallpaper(const CWnd* pWnd, const CString& sDIBFileName, BOOL bRedraw=TRUE); + + BOOL SetWallpaper(const CWnd* pWnd, const COXDIB* pDIB, BOOL bRedraw=TRUE); + // + //////////////////////////////////////////////////// + + + // --- In : pWnd - pointer to the attached window + // or NULL. If NULL is specified then + // the paint type will be applied to + // all attached windows. + // paintType - painting type. Refer to the + // documentation on the Attach() + // function for the list of all + // possible values it can take. + // bRedraw - if TRUE then the attached window + // will be redrawn + // --- Out : + // --- Returns: TRUE if new paint type was successfully set + // or FALSE otherwise + // --- Effect : Resets the type of background image painting. + // + BOOL SetPaintType(const CWnd* pWnd, PaintType paintType, BOOL bRedraw=TRUE); + + + // --- In : pWnd - pointer to the attached window + // or NULL. If NULL is specified then + // the background color will be + // applied to all attached windows. + // clrBk - background color, if CLR_DEFAULT is + // specified then default window + // background color will be used. + // Note that if you use image for + // background painting the areas that + // is not covered by the image will + // be filled with this color. + // bRedraw - if TRUE then the attached window + // will be redrawn + // --- Out : + // --- Returns: TRUE if new background color was successfully set + // or FALSE otherwise + // --- Effect : Sets the background color. + BOOL SetBkColor(const CWnd* pWnd, COLORREF clrBk, BOOL bRedraw=TRUE); + + + // --- In : pWnd - pointer to the attached window + // or NULL. If NULL is specified then + // the background color will be + // applied to all attached windows. + // pWndOrigin - pointer to created window which + // top/left point of the paintable + // rectangle will be used as origin + // point while painting the background. + // If NULL is specified then the + // window that is being attached will + // be used as origin one + // bRedraw - if TRUE then the hooked window + // will be redrawn + // --- Out : + // --- Returns: + // --- Effect : Sets the background color. + BOOL SetOriginWnd(const CWnd* pWnd, CWnd* pOriginWnd, BOOL bRedraw=TRUE); + + + // --- In : pWnd - pointer to the attached window + // --- Out : + // --- Returns: Pointer to COXBackgroundPainter object that corresponds + // to the specified attached window if succeed or NULL + // otherwise + // --- Effect : Retrieves the pointer to COXBackgroundPainter object that + // corresponds to the specified attached window. + COXBackgroundPainter* GetPainter(const CWnd* pWnd) const; + + + // --- In : pWnd - pointer to the window + // --- Out : + // --- Returns: TRUE if specified window was hooked before using + // Attach function or FALSE otherwise + // --- Effect : Retrieves the flag that specifies whether the given + // window was attached before or not. + BOOL IsAttached(const CWnd* pWnd) const; + + + // --- In : pWnd - pointer to the attached window + // or NULL. If NULL is specified then + // the saved COXBackgroundPainter settings + // will be applied to all attached windows. + // lpszProfileName - name of .ini file or hive in registry + // where all information about + // COXBackgroundPainter was saved. + // bApply - if equals TRUE then COXBackgroundPainter + // will redraw the background right away. + // + // --- Out : + // --- Returns: TRUE if succeeds, or FALSE otherwise. + // --- Effect : Loads COXBackgroundPainter state from registry or *.ini file + BOOL LoadState(const CWnd* pWnd, LPCTSTR lpszProfileName, BOOL bApply=TRUE); + + inline BOOL IsAttachedFrame() const { return (m_pFrameWnd!=NULL); } + inline CFrameWnd* GetAttachedFrame() const { return m_pFrameWnd; } + inline DWORD GetAttachedFrameThreadID() const { return m_dwFrameThreadID; } + + inline HHOOK GetSavedGetMessageHookProc() const + { return m_pfnOldGetMessageHookProc; } + static HHOOK GetOriginalGetMessageHookProc() + { return COXBackgroundPainterOrganizer::m_pfnOriginalGetMessageHookProc; } + inline HHOOK GetSavedCBTHookProc() const { return m_pfnOldCBTHookProc; } + static HHOOK GetOriginalCBTHookProc() + { return COXBackgroundPainterOrganizer::m_pfnOriginalCBTHookProc; } + + inline COXBackgroundPainter* GetFirstPainter(POSITION& pos) const + { + pos=m_arrAttachedWnd.GetStartPosition(); + HWND hWnd=NULL; + COXBackgroundPainter* pPainter=NULL; + while(pos!=NULL) + { + m_arrAttachedWnd.GetNextAssoc(pos,hWnd,pPainter); + if(::IsWindow(hWnd)) + { + ASSERT(pPainter!=NULL); + break; + } + else + { + pPainter=NULL; + } + } + return pPainter; + } + + inline COXBackgroundPainter* GetNextPainter(POSITION& pos) const + { + if(pos==NULL) + return NULL; + HWND hWnd=NULL; + COXBackgroundPainter* pPainter=NULL; + while(pos!=NULL) + { + m_arrAttachedWnd.GetNextAssoc(pos,hWnd,pPainter); + if(::IsWindow(hWnd)) + { + ASSERT(pPainter!=NULL); + break; + } + else + { + pPainter=NULL; + } + } + return pPainter; + } + + void AttachAllWindows(HWND hWndStartFrom); + +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Destructs the object + virtual ~COXBackgroundPainterOrganizer(); + +protected: + virtual BOOL IsQualified(CWnd* pWnd); + + +public: + // map of all organizers that has been created to handle caption painting + // for all windows created by particular thread + static CMap m_arrFrameOrganizers; + + // original DIB used in attaching all window in the frame (refer to + // AttachFrame() function) + COXDIB m_threadOrigDIB; + // original PaintType used in attaching all windows in the frame + PaintType m_threadOrigPaintType; + // original background color used in attaching all windows in the frame + COLORREF m_threadOrigBkColor; + // original window that defines the origin point used in attaching all + // windows in the frame + CWnd* m_threadOriginWnd; + + +protected: + // map of all attached windows and associated COXBackgroundPainter objects + CMap m_arrAttachedWnd; + // array of all used COXCaptionPainter objects + CArray m_arrUsedPainters; + + // pointer to the attached frame + CFrameWnd* m_pFrameWnd; + // thread ID that created the mainframe window + DWORD m_dwFrameThreadID; + + + // handle of the old CBT hook procedure + HHOOK m_pfnOldCBTHookProc; + // handle of the original CBT hook procedure + static HHOOK m_pfnOriginalCBTHookProc; + + // handle of the old GetMessage hook procedure + HHOOK m_pfnOldGetMessageHookProc; + // handle of the original GetMessage hook procedure + static HHOOK m_pfnOriginalGetMessageHookProc; + + + // hook procedure for CBT + static LRESULT CALLBACK BackgroundPainterCBTHookProc( + int nCode, WPARAM wParam, LPARAM lParam); + + // hook procedure for GetMessage + static LRESULT CALLBACK BackgroundPainterGetMessageHookProc( + int nCode, WPARAM wParam, LPARAM lParam); + + // callback for enumerating topmost windows + static BOOL CALLBACK EnumThreadWindows(HWND hWnd, LPARAM lParam); +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(_OXBACKGROUNDPAINTER_H_) diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBaseSubclassedComboBox.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBaseSubclassedComboBox.h new file mode 100644 index 0000000..08aa84c --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBaseSubclassedComboBox.h @@ -0,0 +1,327 @@ +// ========================================================================== +// Class Specification : +// COXBaseSubclassedComboBox +// ========================================================================== + +// Header file : OXBaseSubclassedComboBox.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + + +/* + + OVERVIEW + +Most common controls are relatively easy to customize through subclassing. E.g if +you need to use your own list box control with extended functionality you just +have to subclass the existing list box. Most common controls are self sufficient. +That means that all control's functionality resides within the control and it +doesn't depend on anything else. + +But it is not the case with combo box control which consists of 3 controls: +combo box, dropdown list box and edit (edit control is not used when LBS_DROPDOWNLIST +style is specified). Imagine that you want to combine the functionality of different +derived classes with extended functionality into new control. E.g you might want to +create history combo box with masked edit control used to type in the items or +multicolumn combo box that allows a user to type in only currency info. + +In this case the following template class will come in handy: + + template + class COXBaseSubclassedComboBox : public PARENTCOMBOBOX { ... } + +As you can see you must provide name of the class for combo box, list box and +edit control. So if you might declare new class as: + + class CHistoryMaskedComboBox : + public COXBaseSubclassedComboBox { ... } + +in order to create a history combo box with masked edit control used to type in +the items. + +Usually the declaring of new class in this way is all you have to do in order to +get new functionality. But sometimes you have to provide additional initialization +steps. In this case you might be interested in overriding the following virtual +functions: + + virtual CEdit* GetEditCtrl(); + virtual CListBox* GetListBoxCtrl(); + virtual void SubclassEditCtrl(CWnd* pWnd); + virtual void SubclassListBoxCtrl(CWnd* pWnd); + +Refer to the documentation on this functions for details. + + +Dependency: + + #include "OXBaseSubclassedComboBox.h" + + +*/ +#ifndef _OX_SUBCLASSEDCOMBOBOX_H__ +#define _OX_SUBCLASSEDCOMBOBOX_H__ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "OXDllExt.h" + +#ifdef SubclassWindow +#undef SubclassWindow +#endif + + +template +class COXBaseSubclassedComboBox : public PARENTCOMBOBOX +{ +// Construction +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect: Constructs the object + COXBaseSubclassedComboBox(); + +// Attributes +public: + +protected: + // dropdown list box control + PARENTLISTBOX m_listBox; + // edit control + PARENTEDIT m_edit; + + // flag that spesifies if corresponding controls has already been subclassed + BOOL m_bSubclassedListBoxCtrl; + BOOL m_bSubclassedEditCtrl; + +// Operations +public: + // --- In : + // --- Out : + // --- Returns: Pointer to the internal edit control + // --- Effect: Retrieves a pointer to the internal edit control. Advanced + // overridable can be overridden in order to supply non default + // edit control. + virtual CEdit* GetEditCtrl() { return (CEdit*)&m_edit; } + + + // --- In : + // --- Out : + // --- Returns: Pointer to the internal list box control + // --- Effect: Retrieves a pointer to the internal list box control. Advanced + // overridable can be overridden in order to supply non default + // list box control. + virtual CListBox* GetListBoxCtrl() { return (CListBox*)&m_listBox; } + +// Implementation +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect: Destructs the object + virtual ~COXBaseSubclassedComboBox(); + + + // called when the control is being subclassed + virtual void PreSubclassWindow(); + +protected: + // --- In : pWnd - pointer to a CWnd object that represents the + // internal edit control. Advanced overridable, can be + // overridden in order to provide additional + // initialization when the object has just been + // subclassed. + // --- Out : + // --- Returns: + // --- Effect: Subclasses the internal edit control using object returned by + // GetEditCtrl() function + virtual void SubclassEditCtrl(CWnd* pWnd); + + // --- In : + // --- Out : + // --- Returns: TRUE if Edit control has already been subclassed + // --- Effect: Retrieves the flag that specifies that edit control has already + // been subclassed + virtual BOOL IsSubclassedEditCtrl() const { return m_bSubclassedEditCtrl; } + + + + // --- In : pWnd - pointer to a CWnd object that represents the + // internal list box control. Advanced overridable, + // can be overridden in order to provide additional + // initialization when the object has just been + // subclassed. + // --- Out : + // --- Returns: + // --- Effect: Subclasses the internal list box control using object returned by + // GetListBoxCtrl() function + virtual void SubclassListBoxCtrl(CWnd* pWnd); + + // --- In : + // --- Out : + // --- Returns: TRUE if list box control has already been subclassed + // --- Effect: Retrieves the flag that specifies that list box control has + // already been subclassed + virtual BOOL IsSubclassedListBoxCtrl() const { return m_bSubclassedListBoxCtrl; } + + + // --- In : + // --- Out : + // --- Returns: TRUE if combo box was successfully initialized + // --- Effect: Initializes the internal state of the combo box. Called right + // after the control was created or subclassed + virtual BOOL InitializeComboBox(); + + + // handles some messages that are important for internal implementation + virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); +}; + +///////////////////////////////////////////////////////////////////// + +template +COXBaseSubclassedComboBox:: +COXBaseSubclassedComboBox() : m_bSubclassedListBoxCtrl(FALSE), + m_bSubclassedEditCtrl(FALSE) + +{ +#ifdef _DEBUG + PARENTCOMBOBOX comboBox; + if(!comboBox.IsKindOf(RUNTIME_CLASS(CComboBox))) + { + TRACE(_T("COXBaseSubclassedComboBox::COXBaseSubclassedComboBox: Parent class must be CComboBox derived\n")); + AfxThrowNotSupportedException(); + } + + PARENTLISTBOX listBox; + if(!listBox.IsKindOf(RUNTIME_CLASS(CListBox))) + { + TRACE(_T("COXBaseSubclassedComboBox::COXBaseSubclassedComboBox: Parent class for the dropdown list box must be CListBox derived\n")); + AfxThrowNotSupportedException(); + } + + PARENTEDIT edit; + if(!edit.IsKindOf(RUNTIME_CLASS(CEdit))) + { + TRACE(_T("COXBaseSubclassedComboBox::COXBaseSubclassedComboBox: Parent class for the combo box edit control must be CEdit derived\n")); + AfxThrowNotSupportedException(); + } +#endif +} + + +template +COXBaseSubclassedComboBox:: +~COXBaseSubclassedComboBox() +{ +} + + +template +LRESULT COXBaseSubclassedComboBox:: +WindowProc(UINT message, WPARAM wParam, LPARAM lParam) +{ +#if defined (_WINDLL) +#if defined (_AFXDLL) + AFX_MANAGE_STATE(AfxGetAppModuleState()); +#else + AFX_MANAGE_STATE(AfxGetStaticModuleState()); +#endif +#endif + + switch(message) + { + case WM_CTLCOLOREDIT: + { + LRESULT lResult=PARENTCOMBOBOX::WindowProc(message,wParam,lParam); + if(!IsSubclassedEditCtrl()) + { + m_bSubclassedEditCtrl=TRUE; + SubclassEditCtrl(CWnd::FromHandle((HWND)lParam)); + } + return lResult; + } + case WM_CTLCOLORLISTBOX: + { + LRESULT lResult=PARENTCOMBOBOX::WindowProc(message,wParam,lParam); + if(!IsSubclassedListBoxCtrl()) + { + m_bSubclassedListBoxCtrl=TRUE; + SubclassListBoxCtrl(CWnd::FromHandle((HWND)lParam)); + } + return lResult; + } + case WM_CREATE: + { + LRESULT lResult=PARENTCOMBOBOX::WindowProc(message,wParam,lParam); + if(!InitializeComboBox()) + { + lResult=FALSE; + } + return lResult; + } + } + + return PARENTCOMBOBOX::WindowProc(message,wParam,lParam); +} + + +template +void COXBaseSubclassedComboBox:: +SubclassEditCtrl(CWnd* pWnd) +{ + ASSERT(pWnd!=NULL); + HWND hWnd=pWnd->GetSafeHwnd(); + VERIFY(GetEditCtrl()->SubclassWindow(hWnd)); +} + + +template +void COXBaseSubclassedComboBox:: +SubclassListBoxCtrl(CWnd* pWnd) +{ + ASSERT(pWnd!=NULL); + HWND hWnd=pWnd->GetSafeHwnd(); + VERIFY(GetListBoxCtrl()->SubclassWindow(hWnd)); +} + + +template +BOOL COXBaseSubclassedComboBox:: +InitializeComboBox() +{ + return TRUE; +} + + +template +void COXBaseSubclassedComboBox:: +PreSubclassWindow() +{ + _AFX_THREAD_STATE* pThreadState=AfxGetThreadState(); + // hook not already in progress + if(pThreadState->m_pWndInit==NULL) + { + if(!InitializeComboBox()) + { + TRACE(_T("COXBaseSubclassedComboBox::PreSubclassWindow: failed to initialize the control\n")); + } + } + + PARENTCOMBOBOX::PreSubclassWindow(); +} + +///////////////////////////////////////////////////////////////////// + +#endif // #ifndef _OX_SUBCLASSEDCOMBOBOX_H__ \ No newline at end of file diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.h new file mode 100644 index 0000000..5da9807 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.h @@ -0,0 +1,1055 @@ +// ========================================================================== +// Class Specification : COXBitmapButton +// ========================================================================== + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class (does not have any objects) +// YES Derived from CButton + +// YES Is a Cwnd. +// YES Two stage creation (constructor & Create()) +// YES Has a message map +// YES Needs a resource (template) + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// This class implements an owner drawn button for which you only have to +// provide one bitmap or icon. The other bitmaps and icons are computed dynamically +// (pressed, inactive (grayed), disabled etc). + +// To use it just link your button (BS_OWNERDRAW) with an COXBitmapButton object +// and call the function LoadBitmap() to supply a bitmap or icon from resource. + +// A special look ('track look') is provided as well. This looks like the +// buttons in the toolbar of the MS Internet Explorer 3.0. +// When the mouse is not over the button, the button looks flat and the +// image is shown inactively (in gray scale). +// When the user moves the mouse over the button it shows a normal 3D button +// and the image has its original colors. +// A disabled button, always has a flat, disabled look (even when the mouse is over +// the button) + +// A second special look ('hyper look') is provided as well. +// In this mode the original image is shown always. So this look does not have +// a button look : just a (transparant) image. +// By default it uses a cursor in the form of a hand. +// It also uses the pseudo disable mode. This means that the button +// is not actually disabled, but the user cannot click it. +// This gives the possibility to use another cursor when the button is +// (pseudo) disabled : a hand with a stop sign. + +// You can add text to the image and set its alignment +// Support for tooltips is also available. The text can be get and set by using +// GetText(), SetText(), GetToolTipText(), SetToolTipText() + +// Remark: +// The buttons used with this class must have the BS_OWNERDRAW style. +// The BS_BITMAP style is not supported, + +// Windows version previous than 4.0 do not support the disabled look. + +// This class has been reworked so that it works with 256-color bitmaps +// (not 256-color icons) +// The images are internally stored as DDB (device dependant bitmaps) +// together with the palette (of the original resource) +// The class uses the one palette when drawing itself. +// To assure nice cooperation with other controls or graphic elements +// you should use one palette for all items within a dialog, formview etc. + +// This file uses resources. (E.g. Bitmap IDC_OX_HAND_CURSOR) +// The reserved ID ranges are : 23460 -> 23479 and 53460 -> 53479 + +///////////////////////////////////////////////////////////////////////////// +/* +Next new features were added to the control: + +1) You can set vertical and horizontal alignment of text and image within control +using next functions: + + void SetHorizontalAlignment(DWORD nAlignment = BS_CENTER); + // --- In : nAlignment : The horizontal alignment of the image + // (BS_LEFT, BS_CENTER or BS_RIGHT) + void SetVerticalAlignment(DWORD nAlignment = BS_VCENTER); + // --- In : nAlignment : The vertical alignment of the image + // (BS_TOP, BS_VCENTER or BS_BOTTOM) + +Vertical and horizontal alignment can be retrieved using next functions: + + DWORD GetHorizontalAlignment() const; + // --- Returns: The horizontal alignment of the image (BS_LEFT, BS_CENTER or BS_RIGHT) + DWORD GetVerticalAlignment() const; + // --- Returns: The vertical alignment of the image (BS_TOP, BS_VCENTER or BS_BOTTOM) + +Below table show you the positions that text and image take depending on vertical +and horizontal alignment: + +BS_LEFT|BS_TOP BS_CENTER|BS_TOP BS_RIGHT|BS_TOP + --------- --------- --------- + |Image | | Image | | Image| + | | | | | | + |Text | | Text | | Text| + --------- --------- --------- + +BS_LEFT|BS_VCENTER BS_CENTER|BS_VCENTER BS_RIGHT|BS_VCENTER + ------------ ------------ ------------ + | | | | | | + |Text Image| |Image Text| |Image Text| + | | | | | | + ------------ ------------ ------------ + + BS_LEFT|BS_BOTTOM BS_CENTER|BS_BOTTOM BS_RIGHT|BS_BOTTOM + --------- --------- --------- + |Text | | Text | | Text| + | | | | | | + |Image | | Image | | Image| + --------- --------- --------- + + + +2) Now we support BS_MULTILINE style to display any text associated with the control + + +3) There were added new extended styles to COXBitmapButton control: + + OXBB_EX_DROPDOWN + OXBB_EX_DROPDOWNRIGHT + OXBB_EX_DROPDOWNNOARROW + + OXBB_EX_TOGGLE + OXBB_EX_TOGGLE3STATE + +New styles can be set/retrieved using next functions: + + void SetStyleEx(DWORD dwStyleEx); + // --- In : dwStyleEx - extended COXBitmapButton style to set + DWORD GetStyleEx(); + // --- Returns: extended COXBitmapButton style + +Next helper functions let you define whether different extended styles were applied +to a button or not: + + BOOL IsDropDownButton(); + // --- Returns: TRUE if OXBB_EX_DROPDOWN extended style is set + + BOOL IsToggleButton(); + // --- Returns: TRUE if OXBB_EX_TOGGLE extended style is set + + +Below you will find full description of these new extended styles: + + 1. Toggle buttons. You can make any COXBitmapButton to be toggle by calling + next function: + + SetStyleEx(OXBB_EX_TOGGLE); + + Such button can be in two state: unchecked & checked. To switch between these state + just left click on control or press space button on a keyboard while control has focus. + In conjunction with OXBB_EX_TOGGLE you can use OXBB_EX_TOGGLE3STATE extended + style. If you set extended style calling: + + SetStyleEx(OXBB_EX_TOGGLE|OXBB_EX_TOGGLE3STATE); + + then button can be set in indeterminate state. If button is in checked state and user + left click on control or press space button on a keyboard while control has focus then + indeterminate state will be set. + + To implement Toggle buttons new extended states were introduced: + + OXBB_STATE_CHECKED + OXBB_STATE_INDETERMINATE + + Button's extendended state can be set/retrieved using next functions: + + void SetStateEx(DWORD dwStateEx); + // --- In : dwStateEx - extended COXBitmapButton state to set + DWORD GetStateEx(); + // --- Returns: extended COXBitmapButton state + + Next helper functions let you define whether a button is in any of extended state + or not: + + BOOL IsChecked(); + // --- Returns: TRUE if button is toggle and has OXBB_STATE_CHECKED state set + BOOL IsIndeterminate(); + // --- Returns: TRUE if button is toggle and has OXBB_STATE_INDETERMINATE state set + + When Toggle button changes its state OXBBN_TOGGLE notification is sent to the + control's parent window. If you handle this notification you have to set return value + to non-zero if you don't want control to call next virtual function: + + virtual void OnToggle(); + + that is defined specifically to be overwritten in derived class. Default implementation + of this function does nothing. + + + Next function was introduced to be specifically used in DoDataExchange function + of any Dialog or FormView based application: + + void AFXAPI DDX_Toggle(CDataExchange *pDX, int nIDC, int& value); + + Parameter value can be one of the next: + 0 - unchecked + 1 - checked + 2 - indeterminate + + + 2. Dropdown buttons. Such buttons can be used to display different picker controls + or menus (COXColorPickerButton is an example of such control). You can make any + COXBitmapButton to be dropdown by calling next function: + + SetStyleEx(OXBB_EX_DROPDOWN); + + We draw dropdown arrow on the right side of the button and by default it is down + oriented. This dropdown button can be right oriented if you call next function: + + SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNRIGHT); + + Or if you prefer you can set dropdown button that doesn't draw dropdown arrow calling: + + SetStyleEx(OXBB_EX_DROPDOWN|OXBB_EX_DROPDOWNNOARROW); + + In derived classes you can provide your own dropdown arrow drawing routine by + overwriting next virtual function: + + virtual void DrawDropDownArrow(CDC* pDC, UINT nState, CRect arrowRect); + // nState is itemState element of LPDRAWITEMSTRUCT that is used in DrawItem + // function + + When dropdown event happens (in result of left clicking or pressing space button) + OXBBN_DROPDOWN notification is sent to the control's parent window. If you handle this + notification you have to set return value to non-zero if you don't want control to + call next virtual function: + + virtual void OnDropDown(); + + that is defined specifically to be overwritten in derived class (we overwrite this + function in COXColorPickerButton class). Default implementation of this function + does nothing. + + +4) There were introduced next function the primary purpose of which is to simplify + process of creating derived COXBitmapButton classes that provide additional + drawing routines: + + virtual CSize GetReservedSpace(); + // --- In : + // --- Out : + // --- Returns: size of reserved space (from the bottom and right) that shouldn't be + // filled withh button's image or text + // --- Effect: helper function + + + If you derive your own class and overwrite this function then don't forget to call + parent implementation of this function before seting any values, e.g.: + + CSize CMyBitmapButton::GetReservedSpace() + { + CSize sizeReserved=COXBitmapButton::GetReservedSpace(); + ......................... + return sizeReserved; + } + +*/ +///////////////////////////////////////////////////////////////////////////// + +#ifndef __OXBITMAPBUTTON_H__ +#define __OXBITMAPBUTTON_H__ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "OXDllExt.h" + +#include "OXMainRes.h" +#include "OXToolTipCtrl.h" + +// The maximum number of images we have to build per bitmap button +#define OX_MAX_IMAGE_COUNT 5 + + +// special extended style +#define OXBB_EX_DROPDOWN 0x00000001 +#define OXBB_EX_TOGGLE 0x00000002 +#define OXBB_EX_DROPDOWNRIGHT 0x00010000 +#define OXBB_EX_DROPDOWNNOARROW 0x00020000 +#define OXBB_EX_TOGGLE3STATE 0x00040000 + +// special state +#define OXBB_STATE_CHECKED 0x00000001 +#define OXBB_STATE_INDETERMINATE 0x00000002 + + +// tooltip ID +#define OXBB_TOOLTIP_ID 1000 + + +BOOL CALLBACK CallbackDrawState(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy); +BOOL CALLBACK CallbackGrayString(HDC hdc, LPARAM lData, int nCount); + +// Next function was introduced to be specifically used in DoDataExchange function +// of any Dialog or FormView based application for Toogle buttons. Parameter value +// can be one of the next: +// 0 - unchecked +// 1 - checked +// 2 - indeterminate +OX_API_DECL void AFXAPI DDX_Toggle(CDataExchange *pDX, int nIDC, int& value); + +class OX_CLASS_DECL COXBitmapButton : public CButton +{ +DECLARE_DYNAMIC(COXBitmapButton); + +// Data members ------------------------------------------------------------- +public: + +protected: + // control to play AVI file if any was loaded + CAnimateCtrl m_animateCtrl; + // TRUE if currently playing AVI file + BOOL m_bPlaying; + + CImageList m_imageList; + CPalette m_palette; + COLORREF m_textColor; + CFont m_textFont; + COXToolTipCtrl m_toolTip; + + BOOL m_bTrackLook; + BOOL m_bMouseOverButton; + BOOL m_bMouseDown; + + BOOL m_bAutoDestroyMenu; + + BOOL m_bHyperLook; + CImageList m_backgroundImage; + BOOL m_bBackgroundGrabbed; + UINT m_nDefaultCursorID; + HCURSOR m_hDefaultCursor; + UINT m_nDisabledCursorID; + HCURSOR m_hDisabledCursor; + + BOOL m_bPseudoDisableMode; + BOOL m_bEnabled; + BOOL m_bHasTabStop; + BOOL m_bDrawDropdownSeparator; + + CPoint m_ptImageOffset; + CPoint m_ptTextOffset; + CPoint m_ptOuterFocusOffset; + CPoint m_ptInnerFocusOffset; + CSize m_hyperFocusSize; + CPoint m_ptDownOffset; + CPoint m_ptCheckedOffset; + CPoint m_ptHyperOffset; + CPoint m_ptArrowOffset; + + static const int m_nNormalImageIndex; + static const int m_nInactiveImageIndex; + static const int m_nDisabledImageIndex; + + static COLORREF m_defaultButtonColor; + + DWORD m_dwStyleEx; + int m_nDropDownArrowWidth; + + DWORD m_dwStateEx; + +private: + +// Member functions --------------------------------------------------------- +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect: Constructs the object + COXBitmapButton(); + + + // --- In : lpszBitmapResource - bitmap resource string + // nIDBitmapResource - bitmap resource ID + // bResize - whether to resize the button to + // fit the size of bitmap and text + // crMask - mask color to use for the bitmap + // (this color of the bitmap will be + // shown transparently) + // --- Out : + // --- Returns: TRUE if bitmap was loaded successfully + // --- Effect: loads the bitmap from resource + BOOL LoadBitmap(LPCTSTR lpszBitmapResource, BOOL bResize = TRUE, + COLORREF crMask = CLR_NONE); + inline BOOL LoadBitmap(UINT nIDBitmapResource, BOOL bResize = TRUE, + COLORREF crMask = CLR_NONE) { + return LoadBitmap(MAKEINTRESOURCE(nIDBitmapResource),bResize,crMask); + } + + + // --- In : lpszBitmapResource - bitmap resource string + // nIDBitmapResource - bitmap resource ID + // crMask - mask color to use for the bitmap + // (this color of the bitmap will be + // shown transparently) + // --- Out : + // --- Returns: TRUE if bitmap was loaded successfully + // --- Effect: loads the bitmap from resource + BOOL LoadInactiveBitmap(LPCTSTR lpszBitmapResource); + inline BOOL LoadInactiveBitmap(UINT nIDBitmapResource) { + return LoadInactiveBitmap(MAKEINTRESOURCE(nIDBitmapResource)); + } + + + // --- In : lpszBitmapResource - bitmap resource string + // nIDBitmapResource - bitmap resource ID + // crMask - mask color to use for the bitmap + // (this color of the bitmap will be + // shown transparently) + // --- Out : + // --- Returns: TRUE if bitmap was loaded successfully + // --- Effect: loads the bitmap from resource + BOOL LoadDisabledBitmap(LPCTSTR lpszBitmapResource); + inline BOOL LoadDisabledBitmap(UINT nIDBitmapResource) { + return LoadDisabledBitmap(MAKEINTRESOURCE(nIDBitmapResource)); + } + + + // --- In : lpszIconResource - icon resource string + // nIDIconResource - icon resource ID + // bResize - whether to resize the button to + // fit the size of bitmap and text + // nWidth - width of the icon + // nHeight - height of the icon + // --- Out : + // --- Returns: TRUE if icon was loaded successfully + // --- Effect: loads the icon from resource + BOOL LoadIcon(LPCTSTR lpszIconResource, BOOL bResize = TRUE, + UINT nWidth = 0, UINT nHeight = 0); + inline BOOL LoadIcon(UINT nIDIconResource, BOOL bResize = TRUE, + UINT nWidth = 0, UINT nHeight = 0) { + return LoadIcon(MAKEINTRESOURCE(nIDIconResource),bResize,nWidth,nHeight); + } + + + // --- In : lpszIconResource - icon resource string + // nIDIconResource - icon resource ID + // nWidth - width of the icon + // nHeight - height of the icon + // --- Out : + // --- Returns: TRUE if icon was loaded successfully + // --- Effect: loads the icon from resource + BOOL LoadInactiveIcon(LPCTSTR lpszIconResource, UINT nWidth = 0, UINT nHeight = 0); + inline BOOL LoadInactiveIcon(UINT nIDIconResource,UINT nWidth = 0, UINT nHeight = 0) { + return LoadInactiveIcon(MAKEINTRESOURCE(nIDIconResource),nWidth,nHeight); + } + + + // --- In : lpszIconResource - icon resource string + // nIDIconResource - icon resource ID + // nWidth - width of the icon + // nHeight - height of the icon + // --- Out : + // --- Returns: TRUE if icon was loaded successfully + // --- Effect: loads the icon from resource + BOOL LoadDisabledIcon(LPCTSTR lpszIconResource, UINT nWidth = 0, UINT nHeight = 0); + inline BOOL LoadDisabledIcon(UINT nIDIconResource, UINT nWidth = 0, UINT nHeight = 0) { + return LoadDisabledIcon(MAKEINTRESOURCE(nIDIconResource),nWidth,nHeight); + } + + + // --- In : nIDAviResource - AVI resource ID + // lpszFileName - the name of the AVI file + // bResize - whether to resize the button to + // fit the size of bitmap and text + // --- Out : + // --- Returns: TRUE if AVI was loaded successfully + // --- Remarks: you have to set either ID or FileName, if both are not NULL + // then we use lpszFileName as valid parameter + // + // Animation controls can play only simple AVI clips. Specifically, + // the clips to be played by an animation control must meet the following + // requirements: + // - There must be exactly one video stream and it must have at least + // one frame. + // - There can be at most two streams in the file (typically the other + // stream, if present, is an audio stream, although the animation + // control ignores audio information). + // - The clip must either be uncompressed or compressed with RLE8 + // compression. + // - No palette changes are allowed in the video stream. + BOOL LoadAvi(UINT nIDAviResource, LPCTSTR lpszFileName = NULL, BOOL bResize = TRUE); + + + // --- In : bResize - whether to resize the button to + // fit the size of bitmap and text + // --- Out : + // --- Returns: TRUE if successful or FALSE otherwise + // --- Effect: remove any images (bitmaps, icons or avi) previously set to control + BOOL RemoveImage(BOOL bResize = TRUE); + + //////////////////////////// + + // --- In : + // --- Out : + // --- Returns: The palette of the bitmap button + // This object is valid after a successful LoadBitmap or LoadIcon + // --- Effect: + CPalette* GetPalette(); + + + // --- In : + // --- Out : + // --- Returns: + // --- Effect: Sizes the button to fit its contents (image and text) + virtual void SizeToContent(); + + + // --- In : + // --- Out : + // --- Returns: Whether the track look mode is enabled + // --- Effect: + BOOL GetTrackLook() const; + + + // --- In : bTrackLook : Whether enable or disable the track look mode + // --- Out : + // --- Returns: Whether is was successful or not + // --- Effect: + BOOL SetTrackLook(BOOL bTrackLook = TRUE); + + + // --- In : nAlignment : The horizontal alignment of the image and text + // (BS_LEFT, BS_CENTER or BS_RIGHT) + // --- Out : + // --- Returns: + // --- Effect: + void SetHorizontalAlignment(DWORD nAlignment = BS_CENTER); + + + // --- In : + // --- Out : + // --- Returns: The horizontal alignment of the image and text + // (BS_LEFT, BS_CENTER or BS_RIGHT) + // --- Effect: + DWORD GetHorizontalAlignment() const; + + + // --- In : nAlignment : The vertical alignment of the image and text + // (BS_TOP, BS_VCENTER or BS_BOTTOM) + // --- Out : + // --- Returns: + // --- Effect: + void SetVerticalAlignment(DWORD nAlignment = BS_VCENTER); + + + // --- In : + // --- Out : + // --- Returns: The vertical alignment of the image and text + // (BS_TOP, BS_VCENTER or BS_BOTTOM) + // --- Effect: + DWORD GetVerticalAlignment() const; + + + // --- In : + // --- Out : + // --- Returns: The current text color + // --- Effect: + COLORREF GetTextColor() const; + + // --- In : textColor : The new text color + // --- Out : + // --- Returns: + // --- Effect: + void SetTextColor(COLORREF textColor); + + + // --- In : + // --- Out : + // --- Returns: The current text font + // --- Effect: + CFont* GetTextFont(); + + // --- In : pTextFont : The new text font + // --- Out : + // --- Returns: + // --- Effect: A copy of the font will be made and stored internally + void SetTextFont(CFont* pTextFont); + + + // --- In : + // --- Out : + // --- Returns: The text of this button + // (window text upto but not including the first '\n") + // --- Effect: + CString GetText() const; + + // --- In : pszText : The new button text + // --- Out : + // --- Returns: + // --- Effect: Sets the new text of this button + // (window text upto but not including the first '\n") + void SetText(LPCTSTR pszText); + + + // --- In : + // --- Out : + // --- Returns: The tool tip text of this button + // (window text starting from but not including the first '\n") + // --- Effect: + CString GetToolTipText() const; + + // --- In : pszToolTipText : The new tool tip text + // --- Out : + // --- Returns: + // --- Effect: Sets the new text of the tool tip + // (window text starting from but not including the first '\n") + void SetToolTipText(LPCTSTR pszToolTipText); + + + // --- In : + // --- Out : + // --- Returns: Whether tooltip is enabled for this window + // --- Effect: + BOOL GetToolTip() const; + + // --- In : + // --- Out : + // --- Returns: Whether the function was successful + // --- Effect: Enable tooltip for this window + BOOL SetToolTip(BOOL bEnable = TRUE); + + + // --- In : + // --- Out : + // --- Returns: The size of button in pixels when it fits its entire contents + // --- Effect: + virtual CSize GetFitButtonSize(); + + + // --- In : + // --- Out : + // --- Returns: The present size of the button in pixels + // --- Effect: + CSize GetButtonSize() const; + + + // --- In : + // --- Out : + // --- Returns: The present size of the image in pixels + // --- Effect: + CSize GetImageSize() const; + + + // --- In : + // --- Out : + // --- Returns: The size of the text in pixels + // --- Effect: + CSize GetTextSize(BOOL bCompact=FALSE); + + + // --- In : + // --- Out : + // --- Returns: Whether the hyper look mode is enabled + // --- Effect: + BOOL GetHyperLook() const; + + + // --- In : bHyperLook : Whether enable or disable the hyper look mode + // --- Out : + // --- Returns: Whether is was successful or not + // --- Effect: + BOOL SetHyperLook(BOOL bHyperLook = TRUE); + + + // --- In : + // --- Out : + // --- Returns: Whether is was successful or not + // --- Effect: This functions deletes an old copy of the button background + // and grabs a new one. + // This function can be useful when you change the background + // during the lifetime of a bitmap button + BOOL RegrabBackground(); + + + // --- In : nCursorID : The new cursor ID to use (0 resets to default cursor) + // --- Out : + // --- Returns: Whether the function was successful (the resource was found) + // --- Effect: Sets the default cursor of this window + // Possible values are : IDC_OX_HAND_CURSOR and IDC_OX_NO_HAND_CURSOR + BOOL SetDefaultCursor(UINT nCursorID = 0); + + + // --- In : + // --- Out : + // --- Returns: The ID of the current default cursor (0 when none is set) + // --- Effect: + UINT GetDefaultCursor() const; + + + // --- In : nCursorID : The new cursor ID to use (0 resets to default cursor) + // --- Out : + // --- Returns: Whether the function was successful (the resource was found) + // --- Effect: Sets the default cursor of this window + // Possible values are : IDC_OX_HAND_CURSOR and IDC_OX_NO_HAND_CURSOR + // The pseudo-disable mode must be activated before the + // disabled cursor will be shown + BOOL SetDisabledCursor(UINT nCursorID = 0); + + // --- In : + // --- Out : + // --- Returns: The ID of the current default cursor (0 when none is set) + // --- Effect: + UINT GetDisabledCursor() const; + + + // --- In : + // --- Out : + // --- Returns: Whether the pseudo-disable mode is active + // --- Effect: + BOOL GetPseudoDisableMode() const; + + // --- In : bPseudoDisableMode : Whether use pseudo-disable mode or not + // --- Out : + // --- Returns: Whether is was successful or not + // --- Effect: In pseudo disable mode the control is visually disabled + // but not really disabled according to Windows. + // This provides the opportunity to receive messages + // even when the window is (psudo)disabled. + // This mode must be set for the disabled cursor to work. + BOOL SetPseudoDisableMode(BOOL bPseudoDisableMode = TRUE); + + + // --- In : + // --- Out : + // --- Returns: Whether this window is enabled or not + // --- Effect: This function also works when in pseudo-disable mode + BOOL IsWindowEnabled() const; + + // --- In : bEnable : Whether to enable (TRUE) or disable (FALSE) this window + // --- Out : + // --- Returns: The old state before the requested state was set + // --- Effect: This function also works when in pseudo-disable mode + BOOL EnableWindow(BOOL bEnable = TRUE); + + + // --- In : + // --- Out : + // --- Returns: Whether the background was grabbed again + // --- Effect: This functions grabs the image that is currently painted + // on the rect used by the bitmap button + // When this function is called during OnEraseBkgnd() it will + // grab the background of the button + BOOL AdjustBackground(); + + + // --- In : dwStyleEx - extended COXBitmapButton style to set + // bRedraw - flag that specifies whether the control should + // be redrawn or not + // --- Out : + // --- Returns: + // --- Effect: This functions sets extended style of COXBitmapButton control. + void SetStyleEx(DWORD dwStyleEx, BOOL bRedraw=TRUE); + + // --- In : + // --- Out : + // --- Returns: extended COXBitmapButton style + // --- Effect: + DWORD GetStyleEx(); + + + // --- In : + // --- Out : + // --- Returns: TRUE if OXBB_EX_DROPDOWN extended style is set + // --- Effect: helper function + BOOL IsDropDownButton(); + + + // --- In : + // --- Out : + // --- Returns: TRUE if OXBB_EX_TOGGLE extended style is set + // --- Effect: helper function + BOOL IsToggleButton(); + + + // --- In : dwStateEx - extended COXBitmapButton state to set + // bRedraw - flag that specifies whether the control should + // be redrawn or not + // --- Out : + // --- Returns: + // --- Effect: This functions sets extended state of COXBitmapButton control. + void SetStateEx(DWORD dwStateEx, BOOL bRedraw=TRUE); + // --- In : + // --- Out : + // --- Returns: extended COXBitmapButton state + // --- Effect: + DWORD GetStateEx(); + + + // --- In : + // --- Out : + // --- Returns: TRUE if button is toggle and has OXBB_STATE_CHECKED state set + // --- Effect: helper function + BOOL IsChecked(); + + // --- In : + // --- Out : + // --- Returns: TRUE if button is toggle and has OXBB_STATE_INDETERMINATE state set + // --- Effect: helper function + BOOL IsIndeterminate(); + + + // --- In : + // --- Out : + // --- Returns: size of reserved space (from the bottom and right) that shouldn't be + // filled with button's image or text + // --- Effect: helper function + virtual CSize GetReservedSpace(); + +#ifdef _DEBUG + // --- In : + // --- Out : + // --- Returns: + // --- Effect: AssertValid performs a validity check on this object + // by checking its internal state. + // In the Debug version of the library, AssertValid may assert and + // thus terminate the program. + virtual void AssertValid() const; + + // --- In : dc : The diagnostic dump context for dumping, usually afxDump. + // --- Out : + // --- Returns: + // --- Effect: Dumps the contents of the object to a CDumpContext object. + // It provides diagnostic services for yourself and + // other users of your class. + // Note The Dump function does not print a newline character + // at the end of its output. + virtual void Dump(CDumpContext& dc) const; +#endif + + // --- Returns: image offset from the control border + // --- Effect: + inline CPoint GetImageOffset() { return m_ptImageOffset; } + + // --- In : image offset from the control border + // --- Effect: set image offset + inline void SetImageOffset(CPoint ptImageOffset) { m_ptImageOffset=ptImageOffset; } + + + // --- Returns: text offset from the control border + // --- Effect: + inline CPoint GetTextOffset() { return m_ptTextOffset; } + + // --- In : text offset from the control border + // --- Effect: set text offset + inline void SetTextOffset(CPoint ptTextOffset) { m_ptTextOffset=ptTextOffset; } + + + // --- Returns: outer focus rectangle offset from the control border + // --- Effect: + inline CPoint GetOuterFocusOffset() { return m_ptOuterFocusOffset; } + + // --- In : outer focus rectangle offset from the control border + // --- Effect: set outer focus rectangle offset + inline void SetOuterFocusOffset(CPoint ptOuterFocusOffset) { + m_ptOuterFocusOffset=ptOuterFocusOffset; } + + + // --- Returns: inner focus rectangle offset from the control border + // --- Effect: + inline CPoint GetInnerFocusOffset() { return m_ptInnerFocusOffset; } + + // --- In : inner focus rectangle offset from the control border + // --- Effect: set inner focus rectangle offset + inline void SetInnerFocusOffset(CPoint ptInnerFocusOffset) { + m_ptInnerFocusOffset=ptInnerFocusOffset; } + + + // --- Returns: focus rectangle size in hyper look mode + // --- Effect: + inline CSize GetHyperFocusSize() { return m_hyperFocusSize; } + + // --- In : focus rectangle size in hyper look mode + // --- Effect: set focus rectangle size in hyper look mode + inline void SetHyperFocusSize(CSize hyperFocusSize) { + m_hyperFocusSize=hyperFocusSize; } + + + // --- Returns: offset used to show button face in pressed down state + // --- Effect: + inline CPoint GetPressedDownOffset() { return m_ptDownOffset; } + + // --- In : offset used to show button face in pressed down state + // --- Effect: set offset used to show button face in pressed down state + inline void SetPressedDownOffset(CPoint ptDownOffset) { + m_ptDownOffset=ptDownOffset; } + + + // --- Returns: offset used to show button face in checked state + // --- Effect: + inline CPoint GetCheckedOffset() { return m_ptCheckedOffset; } + + // --- In : offset used to show button face in checked state + // --- Effect: set offset used to show button face in checked state + inline void SetCheckedOffset(CPoint ptCheckedOffset) { + m_ptCheckedOffset=ptCheckedOffset; } + + + // --- Returns: offset used to show button face when the mouse + // is over the button and hyper look and track look are set. + // --- Effect: + inline CPoint GetHyperOffset() { return m_ptHyperOffset; } + + // --- In : offset used to show button face when the mouse + // is over the button and hyper look and track look are set. + // --- Effect: set offset used to show button face when the mouse + // is over the button and hyper look and track look are set. + inline void SetHyperOffset(CPoint ptHyperOffset) { m_ptHyperOffset=ptHyperOffset; } + + + // --- Returns: dropdown arrow rectangle offset from the control border + // --- Effect: + inline CPoint GetArrowOffset() { return m_ptArrowOffset; } + // --- In : dropdown arrow rectangle offset from the control border + // --- Effect: set dropdown arrow rectangle offset from the control border + inline void SetArrowOffset(CPoint ptArrowOffset) { m_ptArrowOffset=ptArrowOffset; } + + + // --- In : bDrawDropdownSeparator - if TRUE then a separator will be drawn + // between button's image and/or text + // and dropdown mark + // --- Out : + // --- Returns: + // --- Effect: Sets the flag that specifies if dropdown separator will be + // drawn or not + inline void SetDrawDropdownSeparator(BOOL bDrawDropdownSeparator) { + m_bDrawDropdownSeparator=bDrawDropdownSeparator; + } + + + // --- In : bDrawDropdownSeparator - if TRUE then a separator will be drawn + // between button's image and/or text + // and dropdown mark + // --- Out : + // --- Returns: TRUE if a separator will be drawn between button's image and/or + // text and dropdown mark + // --- Effect: Retrieves the flag that specifies if dropdown separator will be + // drawn or not + inline BOOL IsDrawingDropdownSeparator() const { return m_bDrawDropdownSeparator; } + + + // --- In : + // --- Out : + // --- Returns: + // --- Effect: Destructor of the object + virtual ~COXBitmapButton(); + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXBitmapButton) + public: + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); + virtual BOOL PreTranslateMessage(MSG* pMsg); + protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +protected: + HMENU m_hMenu; + virtual void DistributeSpace(UINT nState, CRect itemRect, + CRect& buttonRect, CRect& imageRect, CRect& textRect); + virtual void SelectPalette(CDC* pDC, UINT nState, CRect buttonRect, + CPalette*& pOldPalette); + virtual void DrawButton(CDC* pDC, UINT nState, CRect buttonRect); + virtual void DrawImage(CDC* pDC, UINT nState, CImageList* pImageList, + CRect imageRect); + virtual void DrawText(CDC* pDC, UINT nState, CString sText, CRect textRect); + virtual void DrawFocusRectangle(CDC* pDC, UINT nState, CRect buttonRect, + CRect bitmapRect); + virtual void RestorePalette(CDC* pDC, UINT nState, CRect buttonRect, + CPalette* pOldPalette); + + BOOL BuildGrayBitmap(LPCTSTR lpszBitmapResource, COLORREF crMask, + CBitmap* pGrayBitmap); + BOOL BuildGrayIcon(LPCTSTR lpszIconResource, HICON* phIcon); + BOOL MakeGray(LPBITMAPINFOHEADER pBitmapInfoHeader, COLORREF crMask = CLR_NONE); + BOOL BuildDisabledImage(HICON hSourceIcon, CSize imageSize, HICON& hDestIcon); + + static BOOL GetBitmapPalette(LPCTSTR lpszBitmapResource, CPalette& palette); + static BOOL GetIconPalette(LPCTSTR lpszIconResource, CPalette& palette); + static BOOL GetImagePalette(LPBITMAPINFOHEADER pBitmapInfoHeader, CPalette& palette); + + void CheckTrackLook(CPoint point); + void PostCheckTrackLook(); + + static CString GetSubString(LPCTSTR pszFullString, int nSubIndex, TCHAR cDelimiter); + static CString RemoveAmpersand(LPCTSTR pszText); + static BOOL LoadBitmap(LPCTSTR lpszBitmapResource, CBitmap& bitmap, + CPalette& palette); + + virtual int GetDropDownArrowWidth(); + virtual void DrawDropDownArrow(CDC* pDC, UINT nState, CRect arrowRect); + virtual void OnDropDown(); + + virtual void OnToggle(); + + + // --- In : + // --- Out : + // --- Returns: TRUE if OXBB_STATE_CHECKED is set in result of this function, + // or FALSE otherwise + // --- Effect: toggle between checked and unchecked state + BOOL Toggle(); + + // --- In : + // --- Out : + // --- Returns: TRUE if OXBB_EX_DROPDOWN extended style is set and + // OXBB_EX_DROPDOWNNOARROW is not (i.e. dropdown arrow will be drawn) + // --- Effect: helper function + BOOL HasDropDownArrow(); + + //{{AFX_MSG(COXBitmapButton) + afx_msg void OnSysColorChange(); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); + afx_msg void OnKillFocus(CWnd* pNewWnd); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMButtonUp(UINT nFlags, CPoint point); + afx_msg void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnMove(int x, int y); + afx_msg void OnEnable(BOOL bEnable); + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + //}}AFX_MSG + + afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam); + afx_msg LRESULT OnCheckTrackLook(WPARAM wParam, LPARAM lParam); + afx_msg LRESULT OnClick(WPARAM wParam, LPARAM lParam); + + virtual afx_msg BOOL OnClicked(); + + DECLARE_MESSAGE_MAP() + +private: + +public: + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); +}; + +#endif // __OXBITMAPBUTTON_H__ +// ========================================================================== diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.rc b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.rc new file mode 100644 index 0000000..2b08a61 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapButton.rc @@ -0,0 +1,75 @@ +//Microsoft Developer Studio generated resource script. +// +// Version: 9.3 + +#ifndef _OXBITMAPBUTTON_RC__ +#define _OXBITMAPBUTTON_RC__ +#include "OXMainRes.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 DISCARDABLE +BEGIN + "OXMainRes.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Cursor +// +IDC_OX_HAND_CURSOR CURSOR DISCARDABLE "res\\OXHandCursor.cur" +IDC_OX_NO_HAND_CURSOR CURSOR DISCARDABLE "res\\OXNoHandCursor.cur" + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +#endif //_OXBITMAPBUTTON_RC__ diff --git a/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapMenu.h b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapMenu.h new file mode 100644 index 0000000..3dc80b4 --- /dev/null +++ b/UltimateToolbox93_src/Ultimate Toolbox/include/OXBitmapMenu.h @@ -0,0 +1,827 @@ +// ========================================================================== +// Class Specification : COXBitmapMenu +// ========================================================================== + +// Header file : OXBitmapMenu.h + +// Version: 9.3 + +// This software along with its related components, documentation and files ("The Libraries") +// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is +// governed by a software license agreement ("Agreement"). Copies of the Agreement are +// available at The Code Project (www.codeproject.com), as part of the package you downloaded +// to obtain this file, or directly from our office. For a copy of the license governing +// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900. + +// ////////////////////////////////////////////////////////////////////////// + +// Properties: +// NO Abstract class +// YES Derived from CMenu + +// NO Is a Cwnd. (Its a CMenu) +// NO Two stage creation +// NO Has a message map +// NO Needs a resource + +// NO Persistent objects (saveable on disk) +// NO Uses exceptions + +// ////////////////////////////////////////////////////////////////////////// + +// Desciption : +// COXBitmapMenu implements drawing of the menu items + +// Remark: +// User doesn't need to use this object directly. COXBitmapMenuOrganizer +// handles creation and destruction of COXBitmapMenu Objects. + +// Prerequisites (necessary conditions): +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BITMAPMENU_H +#define BITMAPMENU_H + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#ifndef __AFXTEMPL_H__ +#include +#define __AFXTEMPL_H_H +#endif + +#include "OXDllExt.h" + +// for drag and drop support +#include "OXDragDropSupport.h" +#include "OXMainRes.h" +#include "OXToolTipCtrl.h" + +////////////////////////////////////////////////////////// + + + +typedef struct _tagNMBMCUSTOMIZE +{ + NMHDR nmhdr; + UINT nCustomizeEventID; + LPARAM lParam; +} NMBMCUSTOMIZE; + +////////////////////////////////////////////////////////////////////////// + + +// ID of the expansion item +#ifndef ID_OX_SHOWALLITEMS +#define ID_OX_SHOWALLITEMS 0x0000ff56 +#endif // ID_OX_SHOWALLITEMS + +#ifndef ID_OXBITMAPMENU_SEPARATOR_HEIGHT +#define ID_OXBITMAPMENU_SEPARATOR_HEIGHT 8 +#endif // ID_OXBITMAPMENU_SEPARATOR_HEIGHT + +#ifndef ID_OXBITMAPMENUPOPUPWND_DEFAULT_WIDTH +#define ID_OXBITMAPMENUPOPUPWND_DEFAULT_WIDTH 50 +#endif // ID_OXBITMAPMENUPOPUPWND_DEFAULT_WIDTH +#ifndef ID_OXBITMAPMENUPOPUPWND_DEFAULT_HEIGHT +#define ID_OXBITMAPMENUPOPUPWND_DEFAULT_HEIGHT 18 +#endif // ID_OXBITMAPMENUPOPUPWND_DEFAULT_HEIGHT + +#ifndef IDT_OXCHECKFORDRAGDROPEVENT +#define IDT_OXCHECKFORDRAGDROPEVENT 412 +#endif // IDT_OXCHECKFORDRAGDROPEVENT +#ifndef ID_OXCHECKFORDRAGDROPEVENT_DELAY +#define ID_OXCHECKFORDRAGDROPEVENT_DELAY 200 +#endif // ID_OXCHECKFORDRAGDROPEVENT_DELAY + + +#ifndef OXODS_HIDDEN +#define OXODS_HIDDEN 0x1000 +#endif // OXODS_HIDDEN +#ifndef OXODS_HIDDENFIRST +#define OXODS_HIDDENFIRST 0x2000 +#endif // OXODS_HIDDENFIRST +#ifndef OXODS_HIDDENLAST +#define OXODS_HIDDENLAST 0x4000 +#endif // OXODS_HIDDENLAST + +class COXImageInfo; +class COXItemInfo; +class COXBitmapMenuOrganizer; +class COXMenuSkin; +class COXShadowedItemWnd; +class COXCoolToolBar; + +struct OXDIMENSIONCONSTANTS +{ + // The gap between left edge of menu item and bitmap in pixels + int m_nGapLeftBitmap; + // The gap between the right edge of the bitmap and the end of the icon area (XP skin only) + int m_nGapRightBitmap; + // The gap between bitmap and menu text in pixels + int m_nGapBitmapText; + // The gap between menu text and accelerator + int m_nGapTextAcclrtr; + // The gap between accelerator and right edge of menu item + int m_nGapAcclrtrRight; + // Extra vertical space on top and bottom of text in pixels + int m_nGapVertText; + // --- Extra vertical space on top and bottom of bitmap in pixels + int m_nGapVertBitmap; + // Height of the menu separator + int m_nSeparatorHeight; + // Minimum width of the bitmap + int m_nMinBitmapWidth; + // Gap between two menu items + int m_nGapMenuItems; +}; + +typedef CArray OXSHADOWARRAY; + +struct OXPOPUPWND +{ + OXPOPUPWND(HWND hWindow) + { + hWnd = hWindow; + arPixels.SetSize(0, 1024); + }; + HWND hWnd; + OXSHADOWARRAY arPixels; +}; + +class COXPopupWndStack : public CTypedPtrList +{ +public: + void Push(HWND hWnd) { AddHead(new OXPOPUPWND(hWnd)); }; + HWND Pop() + { + if (IsEmpty()) + return NULL; + return GetHead()->hWnd; + }; + + // Remove the OXPOPUPWND from the stack + void Remove(HWND hWnd) + { + POSITION pos = GetHeadPosition(); + while (pos != NULL) + { + OXPOPUPWND* pPW = GetAt(pos); + if (pPW->hWnd == hWnd) + { + RemoveAt(pos); + delete pPW; + break; + } + GetNext(pos); + } + }; + + // Returns the shadow array of the given window + OXSHADOWARRAY* GetShadowArray(HWND hWnd) + { + POSITION pos = GetHeadPosition(); + while (pos != NULL) + { + OXPOPUPWND* pPW = GetNext(pos); + if (pPW->hWnd == hWnd) + return &pPW->arPixels; + } + return NULL; + } +}; + +///////////////////////////////////////////////////////////////////////////// +// COXShadowedItemWnd window + +class COXShadowedItemWnd : public CWnd +{ + friend class COXMenuSkinClassic; + friend class COXMenuSkinXP; + friend class COXMenuSkin2003; + +// Construction +public: + COXShadowedItemWnd(COXCoolToolBar* pCoolToolBar, int iMenuItem, UINT nFlags); + +// Attributes +public: + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COXShadowedItemWnd) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~COXShadowedItemWnd(); + + // Generated message map functions +protected: + //{{AFX_MSG(COXShadowedItemWnd) + afx_msg void OnPaint(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +private: + COXCoolToolBar* m_pCoolToolbar; + int m_iMenuItem; + UINT m_nPosFlags; + +}; + +// Flags to indicate the ralative position of the popup menu from the selected item +#define OX_TPM_BOTTOM 0x1 // the menu is displayed on the bottom of the selected item +#define OX_TPM_RIGHT 0x2 +#define OX_TPM_LEFT 0x4 +#define OX_TPM_TOP 0x8 + +class OX_CLASS_DECL COXBitmapMenu : public CMenu +{ + friend class COXBitmapMenuOrganizer; + friend class COXMenuSkinClassic; + friend class COXMenuSkinXP; + friend class COXMenuSkin2003; + friend class COXMenuBar; + friend class COXBitmapMenuPopupWnd; + friend class COXShadowedItemWnd; + +DECLARE_DYNAMIC(COXBitmapMenu) + +//Data members -------------------------------------------------------- + +protected: + // map of accelerator keys + CMap m_KeyAccessMap; + // holds the largest width of all the bitmaps in the menu + int m_nBitmapExtent; + // holds the height of the text + int m_nTextHeight; + // holds the largest width of the all the accelerator texts of menu items + int m_nAcceleratorExtent; + // holds the largest width of the texts of menu items + int m_nStringExtent; + // Maintains a list of item infos for cleaning purpose + // while destructing the object + CList m_ItemInfoList; + + + // flag that specifies that menu supports customization + BOOL m_bCutomizable; + // index of the menu item being currently customized + int m_nCustomizedItemIndex; + // flag that specifies that the menu is in the customization mode + BOOL m_bInCutomizationMode; + // recipient of customization related notifications + HWND m_hWndCustomizeOrganizer; + + + // default COleDropSource for drag'n'drop operation + COXSHBDropSource m_oleDropSource; + // default COleDropTarget for drag'n'drop operation + COXSHBDropTarget m_oleDropTarget; + // flag that specifies whether we launched drag'n'drop operation or not + BOOL m_bDragDropOwner; + // flag that specifies if any drag and drop operation is undergoing + BOOL m_bDragDropOperation; + + // popup window that displays the menu in customization mode + class COXBitmapMenuPopupWnd* m_pPopupWnd; + + // index of the item before which the insertion mark is drawn + int m_nInsertMarkIndex; + + // index of the dragged item + int m_nDraggedItemIndex; + + // The rectangle of the toolbar or menubar drop down button which is + // responsible for displaying the menu. This rectangle is in screen coordinates. + CRect m_rectDropDownItem; + + static LRESULT CALLBACK PopupWndProc(HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM lParam); + + COXPopupWndStack m_PopupWndStack; // a stack of all popup container windows + + COXToolTipCtrl m_ToolTipCtrl; + +private: + BOOL IsPopupItem(UINT nItemID); + static BOOL RegisterWindowClass(HINSTANCE hInstance); + static CSize GetPopupMenuSize(CMenu* pMenu); + static void DeterminePosition(CMenu* pMenu, LPCRECT lpItemRect, DWORD dwStyle, CPoint& ptTopLeft, UINT& nFlags, UINT& nPosFlags); + static COXMenuSkin* m_pMenuSkin; + static COXMenuSkin* COXBitmapMenu::GetMenuSkin(); + +//Member functions----------------------------------------------------------------------- +public: + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Object Constructions and defaults are initialised + COXBitmapMenu(); + + // --- In : + // --- Out : + // --- Returns : + // --- Effect : Cleanup and Object Destruction + virtual ~COXBitmapMenu(); + + + // --- In : lpDrawItemStruct - A pointer to a DRAWITEMSTRUCT + // containing information about + // the item to draw. + // --- Out : + // --- Returns: + // --- Effect : This function is called by the MFC framework when a visual + // aspect of the menu has changed. If you override this function + // to implement drawing of the menu you must restore all GDI + // object selected for the display context supplied in + // lpDrawItemStruct before the member function exits + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); + + // --- In : lpMeasureItemStruct - A pointer to a MEASUREITEMSTRUCT structure + // --- Out : + // --- Returns: + // --- Effect : This function is called by the framework to determine menu + // dimensions the menu is created + virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); + + + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Calculates the largest extents of bitmaps, menu texts, + // and accelerator texts + void CalcExtents(); + + + // --- In : ppt - pointer to POINT structure that defines the point + // to test in client coordinates of the menu popup + // window + // --- Out : pbBefore - pointer to BOOL variable that will be set to + // TRUE if specified point is located over the top + // part of found menu item; othrwise it will be set + // to FALSE + // --- Returns: The index of the found menu item + // --- Effect : Finds menu item that is located under the specified point + int HitTest(LPPOINT ppt, BOOL* pbBefore=NULL); + + + // --- In : bCustomizable - if TRUE the menu ca be customized + // --- Out : + // --- Returns: + // --- Effect : Sets the flag that specifies whether the menu can be + // customized or not + inline void SetCustomizable(BOOL bCustomizable) { m_bCutomizable=bCustomizable; } + + // --- In : + // --- Out : + // --- Returns: TRUE if the menu can be customized; otherwise FALSE + // --- Effect: Retrieves the flag that specifies whether the menu can be + // customized or not + virtual BOOL IsCustomizable() const { return m_bCutomizable; } + + + // --- In : bInCutomizationMode - if TRUE the menu will be set in to + // customization mode + // hWndCustomizeOrganizer - handle to window that will be a + // recipient of customization related + // notifications + // --- Out : + // --- Returns: + // --- Effect : Sets the menu in to customization/normal mode + inline void SetCutomizationMode(BOOL bInCutomizationMode, + HWND hWndCustomizeOrganizer=NULL) + { + if(bInCutomizationMode && !IsCustomizable()) + SetCustomizable(TRUE); + if(!bInCutomizationMode) + SetCustomizedItem(-1); + else + m_hWndCustomizeOrganizer=hWndCustomizeOrganizer; + m_bInCutomizationMode=bInCutomizationMode; + } + + // --- In : + // --- Out : + // --- Returns: TRUE if the menu is in customization mode; FALSE if it is in + // normal mode + // --- Effect: Retrieves the flag that specifies whether the menu is in + // customization or normal mode + inline BOOL IsInCustomizationMode() const { return m_bInCutomizationMode; } + + + // --- In : nIndex - menu item index to be set as customized + // --- Out : + // --- Returns: The index of previous customized menu item. -1 if there were + // no customized menu item before + // --- Effect : Sets customized menu item. Specify -1 as a parameter in order + // to reset customized menu item + int SetCustomizedItem(int nIndex); + + // --- In : + // --- Out : + // --- Returns: The index of the customized menu item. -1 if there is no + // customized menu item + // --- Effect : Retrieves customized menu item + inline int GetCustomizedItem() const { return m_nCustomizedItemIndex; } + + // --- In : nIndex - menu item index to test + // --- Out : + // --- Returns: TRUE if specified menu item is customized; otherwise FALSE + // --- Effect : Retrieves the flag that specifies if given item is customized + // one or not + inline BOOL IsItemCustomized(int nIndex) const + { + return (nIndex==m_nCustomizedItemIndex); + } + + + // --- In : nIndex - menu item index before which the insert mark + // will be set + // --- Out : + // --- Returns: The insert mark previous position. -1 if there were no + // insert mark set before + // --- Effect : Sets insert mark at specified position. Specify -1 as a + // parameter in order to reset insert mark position + int SetInsertMark(int nItemIndex); + + // --- In : + // --- Out : + // --- Returns: The insert mark position. -1 if there is no insert mark set + // --- Effect : Retrives insert mark position + inline int GetInsertMark() const { return m_nInsertMarkIndex; } + + + // --- In : nIndex - menu item index to be set as dragged + // --- Out : + // --- Returns: The index of previous dragged menu item. -1 if there were + // no dragged menu item before + // --- Effect : Sets dragged menu item. Specify -1 as a parameter in order + // to reset dragged menu item + inline void SetDraggedItem(int nIndex) { m_nDraggedItemIndex=nIndex; } + + // --- In : + // --- Out : + // --- Returns: The index of the dragged menu item. -1 if there is no + // dragged menu item + // --- Effect : Retrieves dragged menu item + inline int GetDraggedItem() const { return m_nDraggedItemIndex; } + + // --- In : nIndex - menu item index to test + // --- Out : + // --- Returns: TRUE if specified menu item is dragged; otherwise FALSE + // --- Effect : Retrieves the flag that specifies if given item is dragged + // one or not + inline BOOL IsItemDragged(int nIndex) const + { + return (nIndex==m_nDraggedItemIndex); + } + + + // --- In : nIndex - menu item index to display customize menu for + // point - screen coordinates of the Top/Left point at which + // the context menu should be displayed + // --- Out : + // --- Returns: TRUE if context menu was successfully created and displayed; + // otherwise FALSE + // --- Effect : Display context menu with customization commands for the + // specified menu item + virtual BOOL DisplayCustomizeItemContextMenu(int nItemIndex, CPoint point); + + + // --- In : pWndOwner - pointer to a window that will be assigned as + // an owner of returned COleDropSource object + // --- Out : + // --- Returns: A pointer to internal COleDropSource object + // --- Effect : Retrieves a pointer to internal COleDropSource object that will + // allow this object to handle drag'n'drop operation + virtual COleDropSource* GetDropSource(CWnd* pWndOwner) + { + ASSERT(pWndOwner!=NULL); + // owner window (recipient window) must exist at that moment + ASSERT(::IsWindow(pWndOwner->GetSafeHwnd())); + m_oleDropSource.SetOwner(pWndOwner); + return &m_oleDropSource; + } + + // --- In : + // --- Out : + // --- Returns: A pointer to internal COleDropTarget object + // --- Effect : Retrieves a pointer to internal COleDropTarget object that will + // allow this object to handle drag'n'drop operation + virtual COleDropTarget* GetDropTarget() { return &m_oleDropTarget; } + + // --- In : + // --- Out : + // --- Returns: TRUE if this object has started current drag'n'drop operation; + // otherwise FALSE + // --- Effect : Retrieves the flag that specifies whether this object has + // started current drag'n'drop operation + inline BOOL IsDragDropOwner() const { return m_bDragDropOwner; } + + + // --- In : pPopupWnd - a pointer to COXBitmapMenuPopupWnd object that + // will be used to display the menu in customization + // mode + // --- Out : + // --- Returns: + // --- Effect : Sets a pointer to COXBitmapMenuPopupWnd object that will be used + // to display the menu in customization mode + inline void SetPopupWnd(COXBitmapMenuPopupWnd* pPopupWnd) + { + m_pPopupWnd=pPopupWnd; + } + + // --- In : pPopupWnd - a pointer to COXBitmapMenuPopupWnd object that + // will be used to display the menu in customization + // mode + // --- Out : + // --- Returns: A pointer to COXBitmapMenuPopupWnd object that will be used to + // display the menu in customization mode + // --- Effect : Retrieves a pointer to COXBitmapMenuPopupWnd object that will be used + // to display the menu in customization mode + virtual COXBitmapMenuPopupWnd* GetPopupWnd() const { return m_pPopupWnd; } + + + // --- In : nIndex - index of the menu item that is about to become the + // dragged one + // --- Out : + // --- Returns: + // --- Effect: Initializes drag'n'drop operation + virtual void OnBeginDragDrop(int nIndex); + + + // --- In : rgbFace - base color + // rgbHilight - hilight color + // --- Out : + // --- Returns: A handle to created brush object that combines base and highlight + // colors in a specific way + // --- Effect: Creates new brush object for drawing routines (allows to draw + // the background in the way similar to drawing the background + // of pressed toolbar button). Caller is responsible for deleting + // thie returned brush + static HBRUSH HBrushDitherCreate(COLORREF rgbFace, COLORREF rgbHilight); + + BOOL TrackPopupMenu(COXCoolToolBar* pCoolToolBar, CWnd* pWnd, LPCRECT lpRect = NULL); + + // --- Effect: This method should be called by a CMDMSG handler in the main app, + // and it's job is to handle menu buttons for restore/close/minimize in an MDI app + static BOOL HandleMDICommandMessage(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); + +private: + static void RestoreMDI(); + static void CloseMDI(); + static void MinimizeMDI(); + +protected: + static WNDPROC m_origWndProc; + // calculates rectangles for displaying item's image, text and accelerator text + virtual void DistributeSpace(UINT nState, COXImageInfo* pImageInfo, + CRect itemRect, CRect& buttonRect, CRect& imageRect, CRect& text1Rect, + CRect& text2Rect); + // draws the background of menu item + virtual void DrawBackground(CDC* pDC, UINT nState, COXImageInfo* pImageInfo, + CRect itemRect, CRect buttonRect); + // draws the button that frames menu item image + virtual void DrawButton(CDC* pDC, UINT nState, COXImageInfo* pImageInfo, + CRect buttonRect); + // draws menu item image + virtual void DrawImage(CDC* pDC, UINT nState, COXImageInfo* pImageInfo, + CRect imageRect); + // draws menu item text + virtual void DrawText(CDC* pDC, UINT nState, CString sText, CRect text1Rect, + CRect text2Rect); + // draws separator menu item + virtual void DrawSeparator(CDC* pDC, CRect itemRect); + // draws customized menu item + virtual void DrawCustomized(CDC* pDC, CRect itemRect); + // draws insert mark + virtual void DrawInsertMark(CDC* pDC, CRect itemRect, BOOL bBefore); + // draws submenu item + virtual void DrawSubmenuItem(CDC* pDC, UINT nState, CString sText, + COXImageInfo* pImageInfo, CRect itemRect, CRect buttonRect, + CRect text1Rect, CRect text2Rect); + // draws ezpansion item + virtual void DrawExpansionItem(CDC* pDC, CRect itemRect, UINT nState); + + // Saves new created COXItemInfo object in the internal array + void AddItemInfo(COXItemInfo* pItemInfo); + + // handle update routines for the menu commands + void OnUpdateCmdUI(CWnd* pWnd, UINT nIndex, BOOL bSysMenu); + + // sends customization related notifications + LRESULT SendCustomizeNotification(UINT nCustomizeCmdID); + + // update the contents of the displayed menu + void UpdateContents(); + +public: + // drag and drop support + virtual LONG OnDragEnter(WPARAM wParam, LPARAM lParam); + virtual LONG OnDragOver(WPARAM wParam, LPARAM lParam); + virtual LONG OnDragLeave(WPARAM wParam, LPARAM lParam); + virtual LONG OnDrop(WPARAM wParam, LPARAM lParam); + + + // --- In : lpData - reference to a pointer of data that contains + // item info in specific drag'n'drop format + // hMenu - handle to a menu where dropped item will be + // inserted + // nItemIndex - position at which dropped item will be inserted + // + // --- Out : + // --- Returns: + // --- Effect: Retrieves item info from dropped data and insert it at specified + // position in specified menu + virtual void RetrieveDragDropMenuItem(BYTE*& lpData, HMENU hMenu, int nItemIndex); + + // advanced customization commands handlers + virtual void OnCustBMDelete(); + virtual void OnCustBMAppearance(); + virtual void OnCustBMSeparatorBefore(); + virtual void OnCustBMSeparatorAfter(); + virtual void OnCustBMRecentlyUsed(); +}; + +///////////////////////////////////////////////////////////////////////////// + + +class OX_CLASS_DECL COXBitmapMenuPopupWnd : public CWnd +{ + friend class COXMenuSkinClassic; + friend class COXMenuSkinXP; + +DECLARE_DYNAMIC(COXBitmapMenuPopupWnd) + +//Data members -------------------------------------------------------- +public: + +protected: + COXBitmapMenu* m_pBitmapMenu; + + CRect m_rectWindow; + CArray m_arrItemRects; + + CFont m_fontMenu; + + INT_PTR m_nCheckForDragDropEventTimerID; + +//Member functions----------------------------------------------------------------------- +public: + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Constructs the object + COXBitmapMenuPopupWnd(); + + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Destructs the object + virtual ~COXBitmapMenuPopupWnd(); + + + // --- In : + // --- Out : + // --- Returns: pointer to associated bitmap menu object + // --- Effect : retrieves the associated bitmap menu object + virtual COXBitmapMenu* GetBitmapMenu() const { return m_pBitmapMenu; } + + + // --- In : pMenu - pointer to the popup bitmap menu to be displayed + // nFlags - Specifies a screen-position flag. It can be + // one of the following: + // + // TPM_CENTERALIGN Centers the pop-up menu horizontally + // relative to the coordinate specified + // by x. + // TPM_LEFTALIGN Positions the pop-up menu so that its + // left side is aligned with the + // coordinate specified by x. + // TPM_RIGHTALIGN Positions the pop-up menu so that its + // right side is aligned with the + // coordinate specified by x. + // + // x - Specifies the horizontal position in screen + // coordinates of the pop-up menu. Depending on the + // value of the nFlags parameter, the menu can be + // left-aligned, right-aligned, or centered relative + // to this position + // y - Specifies the vertical position in screen + // coordinates of the top of the menu on the screen + // pWnd - Identifies the window that owns the pop-up menu. + // --- Out : + // --- Returns: TRUE if the function is successful; otherwise FALSE + // --- Effect : Displays a floating pop-up menu at the specified location and + // tracks the selection of items on the pop-up menu. A floating + // pop-up menu can appear anywhere on the screen + virtual BOOL TrackPopupMenu(COXBitmapMenu* pMenu, UINT nFlags, + int x, int y, CWnd* pWnd); + + + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Hides the popup window and reset all internal data + virtual void ResetPopupMenu(); + + + // --- In : + // --- Out : + // --- Returns: + // --- Effect : Called by bitmap menu object in order to notify that + // the contents of the menu have been changed + virtual void OnMenuChanged(); + + + // --- In : nIndex - index of the item in the associated menu that + // must be redrawn + // --- Out : + // --- Returns: + // --- Effect : Redraws the specified menu item + void RedrawItem(int nIndex); + + + // --- In : nIndex - index of the item in the associated menu which + // rectangle in client coordinates is being retrieved + // --- Out : + // --- Returns: rectangle taken by the specified menu item + // --- Effect : Retrieves the rectangle taken by the specified menu item + inline CRect GetItemRect(int nIndex) const + { + ASSERT(nIndex>=0 && nIndex